]> git.sur5r.net Git - openldap/blob - configure
zap back-tcl from 2.2
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.478 2003/05/23 04:27:39 kurt Exp  
4
5 # Copyright 1998-2003 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2003 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
34 ac_help="$ac_help
35   --enable-syslog         enable syslog support [auto]"
36 ac_help="$ac_help
37   --enable-proctitle      enable proctitle support [yes]"
38 ac_help="$ac_help
39   --enable-ipv6           enable IPv6 support [auto]"
40 ac_help="$ac_help
41   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
42 ac_help="$ac_help
43   --enable-x-compile      enable cross compiling [no]"
44 ac_help="$ac_help
45   --with-cyrus-sasl       with Cyrus SASL support [auto]"
46 ac_help="$ac_help
47   --with-fetch            with fetch(3) URL support [auto]"
48 ac_help="$ac_help
49   --with-kerberos         with Kerberos support [auto]"
50 ac_help="$ac_help
51   --with-threads          with threads [auto]"
52 ac_help="$ac_help
53   --with-tls              with TLS/SSL support [auto]"
54 ac_help="$ac_help
55   --with-yielding-select  with implicitly yielding select [auto]"
56 ac_help="$ac_help
57
58 SLAPD (Standalone LDAP Daemon) Options:"
59 ac_help="$ac_help
60   --enable-slapd          enable building slapd [yes]"
61 ac_help="$ac_help
62     --enable-aci          enable per-object ACIs (experimental) [no]"
63 ac_help="$ac_help
64     --enable-cleartext    enable cleartext passwords [yes]"
65 ac_help="$ac_help
66     --enable-crypt        enable crypt(3) passwords [no]"
67 ac_help="$ac_help
68     --enable-kpasswd      enable Kerberos password verification [no]"
69 ac_help="$ac_help
70     --enable-lmpasswd     enable LAN Manager passwords [no]"
71 ac_help="$ac_help
72     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
73 ac_help="$ac_help
74     --enable-modules      enable dynamic module support [no]"
75 ac_help="$ac_help
76     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
77 ac_help="$ac_help
78     --enable-rlookups     enable reverse lookups of client hostnames [no]"
79 ac_help="$ac_help
80     --enable-slapi        enable installation of slapi library [no]"
81 ac_help="$ac_help
82     --enable-slp          enable SLPv2 support [no]"
83 ac_help="$ac_help
84     --enable-wrappers     enable tcp wrapper support [no]"
85 ac_help="$ac_help
86     --enable-bdb          enable Berkeley DB backend [yes]"
87 ac_help="$ac_help
88     --with-bdb-module     module type static|dynamic [static]"
89 ac_help="$ac_help
90     --enable-dnssrv       enable dnssrv backend [no]"
91 ac_help="$ac_help
92     --with-dnssrv-module  module type static|dynamic [static]"
93 ac_help="$ac_help
94     --enable-hdb          enable Hierarchical DB backend [no]"
95 ac_help="$ac_help
96     --with-hdb-module     module type static|dynamic [static]"
97 ac_help="$ac_help
98     --enable-ldap         enable ldap backend [no]"
99 ac_help="$ac_help
100     --with-ldap-module    module type static|dynamic [static]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend [no]"
103 ac_help="$ac_help
104     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
105 ac_help="$ac_help
106     --with-ldbm-module    module type static|dynamic [static]"
107 ac_help="$ac_help
108     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
109 ac_help="$ac_help
110     --enable-meta         enable metadirectory backend [no]"
111 ac_help="$ac_help
112     --with-meta-module    module type static|dynamic [static]"
113 ac_help="$ac_help
114     --enable-monitor      enable monitor backend [no]"
115 ac_help="$ac_help
116     --with-monitor-module module type static|dynamic [static]"
117 ac_help="$ac_help
118     --enable-null         enable null backend [no]"
119 ac_help="$ac_help
120     --with-null-module    module type static|dynamic [static]"
121 ac_help="$ac_help
122     --enable-passwd       enable passwd backend [no]"
123 ac_help="$ac_help
124     --with-passwd-module  module type static|dynamic [static]"
125 ac_help="$ac_help
126     --enable-perl         enable perl backend [no]"
127 ac_help="$ac_help
128     --with-perl-module    module type static|dynamic [static]"
129 ac_help="$ac_help
130     --enable-shell        enable shell backend [no]"
131 ac_help="$ac_help
132     --with-shell-module   module type static|dynamic [static]"
133 ac_help="$ac_help
134     --enable-sql          enable sql backend [no]"
135 ac_help="$ac_help
136     --with-sql-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 # OpenLDAP --with-kerberos
1580         # Check whether --with-kerberos or --without-kerberos was given.
1581 if test "${with_kerberos+set}" = set; then
1582   withval="$with_kerberos"
1583   
1584         ol_arg=invalid
1585         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1586                 if test "$withval" = "$ol_val" ; then
1587                         ol_arg="$ol_val"
1588                 fi
1589         done
1590         if test "$ol_arg" = "invalid" ; then
1591                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1592         fi
1593         ol_with_kerberos="$ol_arg"
1594
1595 else
1596         ol_with_kerberos="auto"
1597 fi
1598 # end --with-kerberos
1599
1600 # OpenLDAP --with-threads
1601         # Check whether --with-threads or --without-threads was given.
1602 if test "${with_threads+set}" = set; then
1603   withval="$with_threads"
1604   
1605         ol_arg=invalid
1606         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1607                 if test "$withval" = "$ol_val" ; then
1608                         ol_arg="$ol_val"
1609                 fi
1610         done
1611         if test "$ol_arg" = "invalid" ; then
1612                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1613         fi
1614         ol_with_threads="$ol_arg"
1615
1616 else
1617         ol_with_threads="auto"
1618 fi
1619 # end --with-threads
1620
1621 # OpenLDAP --with-tls
1622         # Check whether --with-tls or --without-tls was given.
1623 if test "${with_tls+set}" = set; then
1624   withval="$with_tls"
1625   
1626         ol_arg=invalid
1627         for ol_val in auto ssleay openssl yes no  ; do
1628                 if test "$withval" = "$ol_val" ; then
1629                         ol_arg="$ol_val"
1630                 fi
1631         done
1632         if test "$ol_arg" = "invalid" ; then
1633                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1634         fi
1635         ol_with_tls="$ol_arg"
1636
1637 else
1638         ol_with_tls="auto"
1639 fi
1640 # end --with-tls
1641
1642 # OpenLDAP --with-yielding_select
1643         # Check whether --with-yielding_select or --without-yielding_select was given.
1644 if test "${with_yielding_select+set}" = set; then
1645   withval="$with_yielding_select"
1646   
1647         ol_arg=invalid
1648         for ol_val in auto yes no manual  ; do
1649                 if test "$withval" = "$ol_val" ; then
1650                         ol_arg="$ol_val"
1651                 fi
1652         done
1653         if test "$ol_arg" = "invalid" ; then
1654                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1655         fi
1656         ol_with_yielding_select="$ol_arg"
1657
1658 else
1659         ol_with_yielding_select="auto"
1660 fi
1661 # end --with-yielding_select
1662
1663
1664
1665 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1666 if test "${with_xxslapdoptions+set}" = set; then
1667   withval="$with_xxslapdoptions"
1668   :
1669 fi
1670
1671 # OpenLDAP --enable-slapd
1672         # Check whether --enable-slapd or --disable-slapd was given.
1673 if test "${enable_slapd+set}" = set; then
1674   enableval="$enable_slapd"
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-slapd" 1>&2; exit 1; }
1684         fi
1685         ol_enable_slapd="$ol_arg"
1686
1687 else
1688         ol_enable_slapd="yes"
1689 fi
1690 # end --enable-slapd
1691 # OpenLDAP --enable-aci
1692         # Check whether --enable-aci or --disable-aci was given.
1693 if test "${enable_aci+set}" = set; then
1694   enableval="$enable_aci"
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-aci" 1>&2; exit 1; }
1704         fi
1705         ol_enable_aci="$ol_arg"
1706
1707 else
1708         ol_enable_aci="no"
1709 fi
1710 # end --enable-aci
1711 # OpenLDAP --enable-cleartext
1712         # Check whether --enable-cleartext or --disable-cleartext was given.
1713 if test "${enable_cleartext+set}" = set; then
1714   enableval="$enable_cleartext"
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-cleartext" 1>&2; exit 1; }
1724         fi
1725         ol_enable_cleartext="$ol_arg"
1726
1727 else
1728         ol_enable_cleartext="yes"
1729 fi
1730 # end --enable-cleartext
1731 # OpenLDAP --enable-crypt
1732         # Check whether --enable-crypt or --disable-crypt was given.
1733 if test "${enable_crypt+set}" = set; then
1734   enableval="$enable_crypt"
1735   
1736         ol_arg=invalid
1737         for ol_val in auto yes no ; do
1738                 if test "$enableval" = "$ol_val" ; then
1739                         ol_arg="$ol_val"
1740                 fi
1741         done
1742         if test "$ol_arg" = "invalid" ; then
1743                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1744         fi
1745         ol_enable_crypt="$ol_arg"
1746
1747 else
1748         ol_enable_crypt="no"
1749 fi
1750 # end --enable-crypt
1751 # OpenLDAP --enable-kpasswd
1752         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1753 if test "${enable_kpasswd+set}" = set; then
1754   enableval="$enable_kpasswd"
1755   
1756         ol_arg=invalid
1757         for ol_val in auto yes no ; do
1758                 if test "$enableval" = "$ol_val" ; then
1759                         ol_arg="$ol_val"
1760                 fi
1761         done
1762         if test "$ol_arg" = "invalid" ; then
1763                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1764         fi
1765         ol_enable_kpasswd="$ol_arg"
1766
1767 else
1768         ol_enable_kpasswd="no"
1769 fi
1770 # end --enable-kpasswd
1771 # OpenLDAP --enable-lmpasswd
1772         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1773 if test "${enable_lmpasswd+set}" = set; then
1774   enableval="$enable_lmpasswd"
1775   
1776         ol_arg=invalid
1777         for ol_val in auto yes no ; do
1778                 if test "$enableval" = "$ol_val" ; then
1779                         ol_arg="$ol_val"
1780                 fi
1781         done
1782         if test "$ol_arg" = "invalid" ; then
1783                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1784         fi
1785         ol_enable_lmpasswd="$ol_arg"
1786
1787 else
1788         ol_enable_lmpasswd="no"
1789 fi
1790 # end --enable-lmpasswd
1791 # OpenLDAP --enable-spasswd
1792         # Check whether --enable-spasswd or --disable-spasswd was given.
1793 if test "${enable_spasswd+set}" = set; then
1794   enableval="$enable_spasswd"
1795   
1796         ol_arg=invalid
1797         for ol_val in auto yes no ; do
1798                 if test "$enableval" = "$ol_val" ; then
1799                         ol_arg="$ol_val"
1800                 fi
1801         done
1802         if test "$ol_arg" = "invalid" ; then
1803                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1804         fi
1805         ol_enable_spasswd="$ol_arg"
1806
1807 else
1808         ol_enable_spasswd="no"
1809 fi
1810 # end --enable-spasswd
1811 # OpenLDAP --enable-modules
1812         # Check whether --enable-modules or --disable-modules was given.
1813 if test "${enable_modules+set}" = set; then
1814   enableval="$enable_modules"
1815   
1816         ol_arg=invalid
1817         for ol_val in auto yes no ; do
1818                 if test "$enableval" = "$ol_val" ; then
1819                         ol_arg="$ol_val"
1820                 fi
1821         done
1822         if test "$ol_arg" = "invalid" ; then
1823                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1824         fi
1825         ol_enable_modules="$ol_arg"
1826
1827 else
1828         ol_enable_modules="no"
1829 fi
1830 # end --enable-modules
1831 ol_enable_multimaster=${ol_enable_multimaster-no}
1832 # OpenLDAP --enable-rewrite
1833         # Check whether --enable-rewrite or --disable-rewrite was given.
1834 if test "${enable_rewrite+set}" = set; then
1835   enableval="$enable_rewrite"
1836   
1837         ol_arg=invalid
1838         for ol_val in auto yes no ; do
1839                 if test "$enableval" = "$ol_val" ; then
1840                         ol_arg="$ol_val"
1841                 fi
1842         done
1843         if test "$ol_arg" = "invalid" ; then
1844                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1845         fi
1846         ol_enable_rewrite="$ol_arg"
1847
1848 else
1849         ol_enable_rewrite="no"
1850 fi
1851 # end --enable-rewrite
1852 # OpenLDAP --enable-rlookups
1853         # Check whether --enable-rlookups or --disable-rlookups was given.
1854 if test "${enable_rlookups+set}" = set; then
1855   enableval="$enable_rlookups"
1856   
1857         ol_arg=invalid
1858         for ol_val in auto yes no ; do
1859                 if test "$enableval" = "$ol_val" ; then
1860                         ol_arg="$ol_val"
1861                 fi
1862         done
1863         if test "$ol_arg" = "invalid" ; then
1864                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1865         fi
1866         ol_enable_rlookups="$ol_arg"
1867
1868 else
1869         ol_enable_rlookups="no"
1870 fi
1871 # end --enable-rlookups
1872 # OpenLDAP --enable-slapi
1873         # Check whether --enable-slapi or --disable-slapi was given.
1874 if test "${enable_slapi+set}" = set; then
1875   enableval="$enable_slapi"
1876   
1877         ol_arg=invalid
1878         for ol_val in auto yes no ; do
1879                 if test "$enableval" = "$ol_val" ; then
1880                         ol_arg="$ol_val"
1881                 fi
1882         done
1883         if test "$ol_arg" = "invalid" ; then
1884                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1885         fi
1886         ol_enable_slapi="$ol_arg"
1887
1888 else
1889         ol_enable_slapi="no"
1890 fi
1891 # end --enable-slapi
1892 # OpenLDAP --enable-slp
1893         # Check whether --enable-slp or --disable-slp was given.
1894 if test "${enable_slp+set}" = set; then
1895   enableval="$enable_slp"
1896   
1897         ol_arg=invalid
1898         for ol_val in auto yes no ; do
1899                 if test "$enableval" = "$ol_val" ; then
1900                         ol_arg="$ol_val"
1901                 fi
1902         done
1903         if test "$ol_arg" = "invalid" ; then
1904                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1905         fi
1906         ol_enable_slp="$ol_arg"
1907
1908 else
1909         ol_enable_slp="no"
1910 fi
1911 # end --enable-slp
1912 # OpenLDAP --enable-wrappers
1913         # Check whether --enable-wrappers or --disable-wrappers was given.
1914 if test "${enable_wrappers+set}" = set; then
1915   enableval="$enable_wrappers"
1916   
1917         ol_arg=invalid
1918         for ol_val in auto yes no ; do
1919                 if test "$enableval" = "$ol_val" ; then
1920                         ol_arg="$ol_val"
1921                 fi
1922         done
1923         if test "$ol_arg" = "invalid" ; then
1924                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1925         fi
1926         ol_enable_wrappers="$ol_arg"
1927
1928 else
1929         ol_enable_wrappers="no"
1930 fi
1931 # end --enable-wrappers
1932
1933
1934 # OpenLDAP --enable-bdb
1935         # Check whether --enable-bdb or --disable-bdb was given.
1936 if test "${enable_bdb+set}" = set; then
1937   enableval="$enable_bdb"
1938   
1939         ol_arg=invalid
1940         for ol_val in auto yes no ; do
1941                 if test "$enableval" = "$ol_val" ; then
1942                         ol_arg="$ol_val"
1943                 fi
1944         done
1945         if test "$ol_arg" = "invalid" ; then
1946                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1947         fi
1948         ol_enable_bdb="$ol_arg"
1949
1950 else
1951         ol_enable_bdb="yes"
1952 fi
1953 # end --enable-bdb
1954 # OpenLDAP --with-bdb_module
1955         # Check whether --with-bdb_module or --without-bdb_module was given.
1956 if test "${with_bdb_module+set}" = set; then
1957   withval="$with_bdb_module"
1958   
1959         ol_arg=invalid
1960         for ol_val in static dynamic ; do
1961                 if test "$withval" = "$ol_val" ; then
1962                         ol_arg="$ol_val"
1963                 fi
1964         done
1965         if test "$ol_arg" = "invalid" ; then
1966                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1967         fi
1968         ol_with_bdb_module="$ol_arg"
1969
1970 else
1971         ol_with_bdb_module="static"
1972 fi
1973 # end --with-bdb_module
1974
1975 # OpenLDAP --enable-dnssrv
1976         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1977 if test "${enable_dnssrv+set}" = set; then
1978   enableval="$enable_dnssrv"
1979   
1980         ol_arg=invalid
1981         for ol_val in auto yes no ; do
1982                 if test "$enableval" = "$ol_val" ; then
1983                         ol_arg="$ol_val"
1984                 fi
1985         done
1986         if test "$ol_arg" = "invalid" ; then
1987                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1988         fi
1989         ol_enable_dnssrv="$ol_arg"
1990
1991 else
1992         ol_enable_dnssrv="no"
1993 fi
1994 # end --enable-dnssrv
1995 # OpenLDAP --with-dnssrv_module
1996         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1997 if test "${with_dnssrv_module+set}" = set; then
1998   withval="$with_dnssrv_module"
1999   
2000         ol_arg=invalid
2001         for ol_val in static dynamic ; do
2002                 if test "$withval" = "$ol_val" ; then
2003                         ol_arg="$ol_val"
2004                 fi
2005         done
2006         if test "$ol_arg" = "invalid" ; then
2007                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2008         fi
2009         ol_with_dnssrv_module="$ol_arg"
2010
2011 else
2012         ol_with_dnssrv_module="static"
2013 fi
2014 # end --with-dnssrv_module
2015
2016 # OpenLDAP --enable-hdb
2017         # Check whether --enable-hdb or --disable-hdb was given.
2018 if test "${enable_hdb+set}" = set; then
2019   enableval="$enable_hdb"
2020   
2021         ol_arg=invalid
2022         for ol_val in auto yes no ; do
2023                 if test "$enableval" = "$ol_val" ; then
2024                         ol_arg="$ol_val"
2025                 fi
2026         done
2027         if test "$ol_arg" = "invalid" ; then
2028                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
2029         fi
2030         ol_enable_hdb="$ol_arg"
2031
2032 else
2033         ol_enable_hdb="no"
2034 fi
2035 # end --enable-hdb
2036 # OpenLDAP --with-hdb_module
2037         # Check whether --with-hdb_module or --without-hdb_module was given.
2038 if test "${with_hdb_module+set}" = set; then
2039   withval="$with_hdb_module"
2040   
2041         ol_arg=invalid
2042         for ol_val in static dynamic ; do
2043                 if test "$withval" = "$ol_val" ; then
2044                         ol_arg="$ol_val"
2045                 fi
2046         done
2047         if test "$ol_arg" = "invalid" ; then
2048                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2049         fi
2050         ol_with_hdb_module="$ol_arg"
2051
2052 else
2053         ol_with_hdb_module="static"
2054 fi
2055 # end --with-hdb_module
2056
2057 # OpenLDAP --enable-ldap
2058         # Check whether --enable-ldap or --disable-ldap was given.
2059 if test "${enable_ldap+set}" = set; then
2060   enableval="$enable_ldap"
2061   
2062         ol_arg=invalid
2063         for ol_val in auto yes no ; do
2064                 if test "$enableval" = "$ol_val" ; then
2065                         ol_arg="$ol_val"
2066                 fi
2067         done
2068         if test "$ol_arg" = "invalid" ; then
2069                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2070         fi
2071         ol_enable_ldap="$ol_arg"
2072
2073 else
2074         ol_enable_ldap="no"
2075 fi
2076 # end --enable-ldap
2077 # OpenLDAP --with-ldap_module
2078         # Check whether --with-ldap_module or --without-ldap_module was given.
2079 if test "${with_ldap_module+set}" = set; then
2080   withval="$with_ldap_module"
2081   
2082         ol_arg=invalid
2083         for ol_val in static dynamic ; do
2084                 if test "$withval" = "$ol_val" ; then
2085                         ol_arg="$ol_val"
2086                 fi
2087         done
2088         if test "$ol_arg" = "invalid" ; then
2089                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2090         fi
2091         ol_with_ldap_module="$ol_arg"
2092
2093 else
2094         ol_with_ldap_module="static"
2095 fi
2096 # end --with-ldap_module
2097
2098 # OpenLDAP --enable-ldbm
2099         # Check whether --enable-ldbm or --disable-ldbm was given.
2100 if test "${enable_ldbm+set}" = set; then
2101   enableval="$enable_ldbm"
2102   
2103         ol_arg=invalid
2104         for ol_val in auto yes no ; do
2105                 if test "$enableval" = "$ol_val" ; then
2106                         ol_arg="$ol_val"
2107                 fi
2108         done
2109         if test "$ol_arg" = "invalid" ; then
2110                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2111         fi
2112         ol_enable_ldbm="$ol_arg"
2113
2114 else
2115         ol_enable_ldbm="no"
2116 fi
2117 # end --enable-ldbm
2118 # OpenLDAP --with-ldbm_api
2119         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2120 if test "${with_ldbm_api+set}" = set; then
2121   withval="$with_ldbm_api"
2122   
2123         ol_arg=invalid
2124         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2125                 if test "$withval" = "$ol_val" ; then
2126                         ol_arg="$ol_val"
2127                 fi
2128         done
2129         if test "$ol_arg" = "invalid" ; then
2130                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2131         fi
2132         ol_with_ldbm_api="$ol_arg"
2133
2134 else
2135         ol_with_ldbm_api="auto"
2136 fi
2137 # end --with-ldbm_api
2138
2139 # OpenLDAP --with-ldbm_module
2140         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2141 if test "${with_ldbm_module+set}" = set; then
2142   withval="$with_ldbm_module"
2143   
2144         ol_arg=invalid
2145         for ol_val in static dynamic ; do
2146                 if test "$withval" = "$ol_val" ; then
2147                         ol_arg="$ol_val"
2148                 fi
2149         done
2150         if test "$ol_arg" = "invalid" ; then
2151                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2152         fi
2153         ol_with_ldbm_module="$ol_arg"
2154
2155 else
2156         ol_with_ldbm_module="static"
2157 fi
2158 # end --with-ldbm_module
2159
2160 # OpenLDAP --with-ldbm_type
2161         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2162 if test "${with_ldbm_type+set}" = set; then
2163   withval="$with_ldbm_type"
2164   
2165         ol_arg=invalid
2166         for ol_val in auto btree hash ; do
2167                 if test "$withval" = "$ol_val" ; then
2168                         ol_arg="$ol_val"
2169                 fi
2170         done
2171         if test "$ol_arg" = "invalid" ; then
2172                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2173         fi
2174         ol_with_ldbm_type="$ol_arg"
2175
2176 else
2177         ol_with_ldbm_type="auto"
2178 fi
2179 # end --with-ldbm_type
2180
2181 # OpenLDAP --enable-meta
2182         # Check whether --enable-meta or --disable-meta was given.
2183 if test "${enable_meta+set}" = set; then
2184   enableval="$enable_meta"
2185   
2186         ol_arg=invalid
2187         for ol_val in auto yes no ; do
2188                 if test "$enableval" = "$ol_val" ; then
2189                         ol_arg="$ol_val"
2190                 fi
2191         done
2192         if test "$ol_arg" = "invalid" ; then
2193                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2194         fi
2195         ol_enable_meta="$ol_arg"
2196
2197 else
2198         ol_enable_meta="no"
2199 fi
2200 # end --enable-meta
2201 # OpenLDAP --with-meta_module
2202         # Check whether --with-meta_module or --without-meta_module was given.
2203 if test "${with_meta_module+set}" = set; then
2204   withval="$with_meta_module"
2205   
2206         ol_arg=invalid
2207         for ol_val in static dynamic ; do
2208                 if test "$withval" = "$ol_val" ; then
2209                         ol_arg="$ol_val"
2210                 fi
2211         done
2212         if test "$ol_arg" = "invalid" ; then
2213                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2214         fi
2215         ol_with_meta_module="$ol_arg"
2216
2217 else
2218         ol_with_meta_module="static"
2219 fi
2220 # end --with-meta_module
2221
2222 # OpenLDAP --enable-monitor
2223         # Check whether --enable-monitor or --disable-monitor was given.
2224 if test "${enable_monitor+set}" = set; then
2225   enableval="$enable_monitor"
2226   
2227         ol_arg=invalid
2228         for ol_val in auto yes no ; do
2229                 if test "$enableval" = "$ol_val" ; then
2230                         ol_arg="$ol_val"
2231                 fi
2232         done
2233         if test "$ol_arg" = "invalid" ; then
2234                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2235         fi
2236         ol_enable_monitor="$ol_arg"
2237
2238 else
2239         ol_enable_monitor="no"
2240 fi
2241 # end --enable-monitor
2242 # OpenLDAP --with-monitor_module
2243         # Check whether --with-monitor_module or --without-monitor_module was given.
2244 if test "${with_monitor_module+set}" = set; then
2245   withval="$with_monitor_module"
2246   
2247         ol_arg=invalid
2248         for ol_val in static dynamic ; do
2249                 if test "$withval" = "$ol_val" ; then
2250                         ol_arg="$ol_val"
2251                 fi
2252         done
2253         if test "$ol_arg" = "invalid" ; then
2254                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2255         fi
2256         ol_with_monitor_module="$ol_arg"
2257
2258 else
2259         ol_with_monitor_module="static"
2260 fi
2261 # end --with-monitor_module
2262
2263 # OpenLDAP --enable-null
2264         # Check whether --enable-null or --disable-null was given.
2265 if test "${enable_null+set}" = set; then
2266   enableval="$enable_null"
2267   
2268         ol_arg=invalid
2269         for ol_val in auto yes no ; do
2270                 if test "$enableval" = "$ol_val" ; then
2271                         ol_arg="$ol_val"
2272                 fi
2273         done
2274         if test "$ol_arg" = "invalid" ; then
2275                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2276         fi
2277         ol_enable_null="$ol_arg"
2278
2279 else
2280         ol_enable_null="no"
2281 fi
2282 # end --enable-null
2283 # OpenLDAP --with-null_module
2284         # Check whether --with-null_module or --without-null_module was given.
2285 if test "${with_null_module+set}" = set; then
2286   withval="$with_null_module"
2287   
2288         ol_arg=invalid
2289         for ol_val in static dynamic ; do
2290                 if test "$withval" = "$ol_val" ; then
2291                         ol_arg="$ol_val"
2292                 fi
2293         done
2294         if test "$ol_arg" = "invalid" ; then
2295                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2296         fi
2297         ol_with_null_module="$ol_arg"
2298
2299 else
2300         ol_with_null_module="static"
2301 fi
2302 # end --with-null_module
2303
2304 # OpenLDAP --enable-passwd
2305         # Check whether --enable-passwd or --disable-passwd was given.
2306 if test "${enable_passwd+set}" = set; then
2307   enableval="$enable_passwd"
2308   
2309         ol_arg=invalid
2310         for ol_val in auto yes no ; do
2311                 if test "$enableval" = "$ol_val" ; then
2312                         ol_arg="$ol_val"
2313                 fi
2314         done
2315         if test "$ol_arg" = "invalid" ; then
2316                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2317         fi
2318         ol_enable_passwd="$ol_arg"
2319
2320 else
2321         ol_enable_passwd="no"
2322 fi
2323 # end --enable-passwd
2324 # OpenLDAP --with-passwd_module
2325         # Check whether --with-passwd_module or --without-passwd_module was given.
2326 if test "${with_passwd_module+set}" = set; then
2327   withval="$with_passwd_module"
2328   
2329         ol_arg=invalid
2330         for ol_val in static dynamic ; do
2331                 if test "$withval" = "$ol_val" ; then
2332                         ol_arg="$ol_val"
2333                 fi
2334         done
2335         if test "$ol_arg" = "invalid" ; then
2336                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2337         fi
2338         ol_with_passwd_module="$ol_arg"
2339
2340 else
2341         ol_with_passwd_module="static"
2342 fi
2343 # end --with-passwd_module
2344
2345 # OpenLDAP --enable-perl
2346         # Check whether --enable-perl or --disable-perl was given.
2347 if test "${enable_perl+set}" = set; then
2348   enableval="$enable_perl"
2349   
2350         ol_arg=invalid
2351         for ol_val in auto yes no ; do
2352                 if test "$enableval" = "$ol_val" ; then
2353                         ol_arg="$ol_val"
2354                 fi
2355         done
2356         if test "$ol_arg" = "invalid" ; then
2357                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2358         fi
2359         ol_enable_perl="$ol_arg"
2360
2361 else
2362         ol_enable_perl="no"
2363 fi
2364 # end --enable-perl
2365 # OpenLDAP --with-perl_module
2366         # Check whether --with-perl_module or --without-perl_module was given.
2367 if test "${with_perl_module+set}" = set; then
2368   withval="$with_perl_module"
2369   
2370         ol_arg=invalid
2371         for ol_val in static dynamic ; do
2372                 if test "$withval" = "$ol_val" ; then
2373                         ol_arg="$ol_val"
2374                 fi
2375         done
2376         if test "$ol_arg" = "invalid" ; then
2377                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2378         fi
2379         ol_with_perl_module="$ol_arg"
2380
2381 else
2382         ol_with_perl_module="static"
2383 fi
2384 # end --with-perl_module
2385
2386 # OpenLDAP --enable-shell
2387         # Check whether --enable-shell or --disable-shell was given.
2388 if test "${enable_shell+set}" = set; then
2389   enableval="$enable_shell"
2390   
2391         ol_arg=invalid
2392         for ol_val in auto yes no ; do
2393                 if test "$enableval" = "$ol_val" ; then
2394                         ol_arg="$ol_val"
2395                 fi
2396         done
2397         if test "$ol_arg" = "invalid" ; then
2398                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2399         fi
2400         ol_enable_shell="$ol_arg"
2401
2402 else
2403         ol_enable_shell="no"
2404 fi
2405 # end --enable-shell
2406 # OpenLDAP --with-shell_module
2407         # Check whether --with-shell_module or --without-shell_module was given.
2408 if test "${with_shell_module+set}" = set; then
2409   withval="$with_shell_module"
2410   
2411         ol_arg=invalid
2412         for ol_val in static dynamic ; do
2413                 if test "$withval" = "$ol_val" ; then
2414                         ol_arg="$ol_val"
2415                 fi
2416         done
2417         if test "$ol_arg" = "invalid" ; then
2418                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2419         fi
2420         ol_with_shell_module="$ol_arg"
2421
2422 else
2423         ol_with_shell_module="static"
2424 fi
2425 # end --with-shell_module
2426
2427 # OpenLDAP --enable-sql
2428         # Check whether --enable-sql or --disable-sql was given.
2429 if test "${enable_sql+set}" = set; then
2430   enableval="$enable_sql"
2431   
2432         ol_arg=invalid
2433         for ol_val in auto yes no ; do
2434                 if test "$enableval" = "$ol_val" ; then
2435                         ol_arg="$ol_val"
2436                 fi
2437         done
2438         if test "$ol_arg" = "invalid" ; then
2439                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2440         fi
2441         ol_enable_sql="$ol_arg"
2442
2443 else
2444         ol_enable_sql="no"
2445 fi
2446 # end --enable-sql
2447 # OpenLDAP --with-sql_module
2448         # Check whether --with-sql_module or --without-sql_module was given.
2449 if test "${with_sql_module+set}" = set; then
2450   withval="$with_sql_module"
2451   
2452         ol_arg=invalid
2453         for ol_val in static dynamic ; do
2454                 if test "$withval" = "$ol_val" ; then
2455                         ol_arg="$ol_val"
2456                 fi
2457         done
2458         if test "$ol_arg" = "invalid" ; then
2459                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2460         fi
2461         ol_with_sql_module="$ol_arg"
2462
2463 else
2464         ol_with_sql_module="static"
2465 fi
2466 # end --with-sql_module
2467
2468
2469 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2470 if test "${with_xxslurpdoptions+set}" = set; then
2471   withval="$with_xxslurpdoptions"
2472   :
2473 fi
2474
2475 # OpenLDAP --enable-slurpd
2476         # Check whether --enable-slurpd or --disable-slurpd was given.
2477 if test "${enable_slurpd+set}" = set; then
2478   enableval="$enable_slurpd"
2479   
2480         ol_arg=invalid
2481         for ol_val in auto yes no ; do
2482                 if test "$enableval" = "$ol_val" ; then
2483                         ol_arg="$ol_val"
2484                 fi
2485         done
2486         if test "$ol_arg" = "invalid" ; then
2487                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2488         fi
2489         ol_enable_slurpd="$ol_arg"
2490
2491 else
2492         ol_enable_slurpd="auto"
2493 fi
2494 # end --enable-slurpd
2495
2496 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2497 if test "${with_xxliboptions+set}" = set; then
2498   withval="$with_xxliboptions"
2499   :
2500 fi
2501
2502 # Check whether --enable-static or --disable-static was given.
2503 if test "${enable_static+set}" = set; then
2504   enableval="$enable_static"
2505   p=${PACKAGE-default}
2506 case $enableval in
2507 yes) enable_static=yes ;;
2508 no) enable_static=no ;;
2509 *)
2510   enable_static=no
2511   # Look at the argument we got.  We use all the common list separators.
2512   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2513   for pkg in $enableval; do
2514     if test "X$pkg" = "X$p"; then
2515       enable_static=yes
2516     fi
2517   done
2518   IFS="$ac_save_ifs"
2519   ;;
2520 esac
2521 else
2522   enable_static=yes
2523 fi
2524
2525 # Check whether --enable-shared or --disable-shared was given.
2526 if test "${enable_shared+set}" = set; then
2527   enableval="$enable_shared"
2528   p=${PACKAGE-default}
2529 case $enableval in
2530 yes) enable_shared=yes ;;
2531 no) enable_shared=no ;;
2532 *)
2533   enable_shared=no
2534   # Look at the argument we got.  We use all the common list separators.
2535   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2536   for pkg in $enableval; do
2537     if test "X$pkg" = "X$p"; then
2538       enable_shared=yes
2539     fi
2540   done
2541   IFS="$ac_save_ifs"
2542   ;;
2543 esac
2544 else
2545   enable_shared=yes
2546 fi
2547
2548
2549
2550 # validate options
2551 if test $ol_enable_slapd = no ; then
2552                 if test $ol_enable_slapi = yes ; then
2553                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2554         fi
2555         if test $ol_enable_bdb = yes ; then
2556                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2557         fi
2558         if test $ol_enable_dnssrv = yes ; then
2559                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2560         fi
2561         if test $ol_enable_hdb = yes ; then
2562                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2563         fi
2564         if test $ol_enable_ldap = yes ; then
2565                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2566         fi
2567         if test $ol_enable_ldbm = yes ; then
2568                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2569         fi
2570         if test $ol_enable_meta = yes ; then
2571                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2572         fi
2573         if test $ol_enable_monitor = yes ; then
2574                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2575         fi
2576         if test $ol_enable_null = yes ; then
2577                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2578         fi
2579         if test $ol_enable_passwd = yes ; then
2580                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2581         fi
2582         if test $ol_enable_perl = yes ; then
2583                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2584         fi
2585         if test $ol_enable_shell = yes ; then
2586                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2587         fi
2588         if test $ol_enable_sql = yes ; then
2589                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2590         fi
2591         if test $ol_enable_modules = yes ; then
2592                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2593         fi
2594         if test $ol_enable_multimaster = yes ; then
2595                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2596         fi
2597         if test $ol_enable_wrappers = yes ; then
2598                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2599         fi
2600         if test $ol_enable_rlookups = yes ; then
2601                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2602         fi
2603         if test $ol_enable_aci = yes ; then
2604                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2605         fi
2606         if test $ol_with_ldbm_api != auto ; then
2607                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2608         fi
2609         if test $ol_with_ldbm_type != auto ; then
2610                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2611         fi
2612         if test $ol_with_bdb_module != static ; then
2613                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2614         fi
2615         if test $ol_with_dnssrv_module != static ; then
2616                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2617         fi
2618         if test $ol_with_hdb_module != static ; then
2619                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2620         fi
2621         if test $ol_with_ldap_module != static ; then
2622                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2623         fi
2624         if test $ol_with_ldbm_module != static ; then
2625                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2626         fi
2627         if test $ol_with_meta_module != static ; then
2628                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2629         fi
2630         if test $ol_with_monitor_module != static ; then
2631                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2632         fi
2633         if test $ol_with_null_module != static ; then
2634                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2635         fi
2636         if test $ol_with_passwd_module != static ; then
2637                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2638         fi
2639         if test $ol_with_perl_module != static ; then
2640                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2641         fi
2642         if test $ol_with_shell_module != static ; then
2643                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2644         fi
2645         if test $ol_with_sql_module != static ; then
2646                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2647         fi
2648         if test $ol_enable_slurpd = yes ; then
2649                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2650         fi
2651         if test $ol_enable_rewrite = yes ; then
2652                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2653         fi
2654
2655         # force settings to no
2656         ol_enable_slapi=no
2657         ol_enable_bdb=no
2658         ol_enable_dnssrv=no
2659         ol_enable_hdb=no
2660         ol_enable_ldap=no
2661         ol_enable_ldbm=no
2662         ol_enable_meta=no
2663         ol_enable_monitor=no
2664         ol_enable_null=no
2665         ol_enable_passwd=no
2666         ol_enable_perl=no
2667         ol_enable_shell=no
2668         ol_enable_sql=no
2669
2670         ol_enable_modules=no
2671         ol_enable_multimaster=no
2672         ol_enable_rlookups=no
2673         ol_enable_aci=no
2674         ol_enable_wrappers=no
2675         ol_enable_dynamic=no
2676
2677         ol_with_ldbm_api=no
2678         ol_with_ldbm_type=no
2679
2680         ol_with_bdb_module=static
2681         ol_with_dnssrv_module=static
2682         ol_with_hdb_module=static
2683         ol_with_ldap_module=static
2684         ol_with_ldbm_module=static
2685         ol_with_meta_module=static
2686         ol_with_monitor_module=static
2687         ol_with_null_module=static
2688         ol_with_passwd_module=static
2689         ol_with_perl_module=static
2690         ol_with_shell_module=static
2691         ol_with_sql_module=static
2692
2693         ol_enable_slurpd=no
2694
2695         ol_enable_rewrite=no
2696
2697 elif test $ol_enable_ldbm = no ; then
2698         
2699         if test $ol_with_ldbm_api != auto ; then
2700                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2701         fi
2702
2703         if test $ol_with_ldbm_type != auto ; then
2704                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2705         fi
2706
2707         if test $ol_with_ldbm_module != static ; then
2708                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2709         fi
2710
2711         if test $ol_enable_modules != yes -a \
2712                 $ol_enable_bdb = no -a \
2713                 $ol_enable_dnssrv = no -a \
2714                 $ol_enable_hdb = no -a \
2715                 $ol_enable_ldap = no -a \
2716                 $ol_enable_meta = no -a \
2717                 $ol_enable_monitor = no -a \
2718                 $ol_enable_null = no -a \
2719                 $ol_enable_passwd = no -a \
2720                 $ol_enable_perl = no -a \
2721                 $ol_enable_shell = no -a \
2722                 $ol_enable_sql = no -a \
2723
2724                 if test $ol_enable_slapd = yes ; then
2725                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2726                 else
2727                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2728                         ol_enable_slapd=no
2729                 fi
2730         fi
2731
2732         ol_with_ldbm_api=no
2733         ol_with_ldbm_type=no
2734         ol_with_ldbm_module=static
2735
2736         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2737                 ol_with_ldbm_api=berkeley
2738         fi
2739
2740 else
2741                 if test $ol_with_ldbm_api = gdbm -a \
2742                 $ol_with_ldbm_type = btree ; then
2743                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2744         fi
2745         if test $ol_with_ldbm_api = mdbm -a \
2746                 $ol_with_ldbm_type = btree ; then
2747                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2748         fi
2749         if test $ol_with_ldbm_api = ndbm -a \
2750                 $ol_with_ldbm_type = btree ; then
2751                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2752         fi
2753
2754         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2755                 if test $ol_with_ldbm_api = auto ; then
2756                         ol_with_ldbm_api=berkeley
2757                 elif test $ol_with_ldbm_api != berkeley ; then
2758                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2759                 fi
2760
2761         elif test $ol_enable_bdb = auto ; then
2762                 if test $ol_with_ldbm_api != berkeley \
2763                         -o $ol_with_ldbm_api != auto ; then
2764                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2765                         ol_enable_bdb=no
2766                 fi
2767         fi
2768 fi
2769
2770 if test $ol_enable_slurpd = yes ; then
2771                 if test $ol_with_threads = no ; then
2772                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2773         fi
2774 fi
2775
2776 if test $ol_enable_lmpasswd = yes ; then
2777         if test $ol_with_tls = no ; then
2778                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2779         fi
2780 fi
2781
2782 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2783         if test $ol_with_kerberos = no ; then
2784                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2785         elif test $ol_with_kerberos = auto ; then
2786                 ol_with_kerberos=yes
2787         fi
2788
2789 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2790         if test $ol_with_kerberos = auto ; then
2791                 ol_with_kerberos=no
2792         elif test $ol_with_kerberos != no ; then
2793                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2794                 ol_with_kerberos=no
2795         fi
2796 fi
2797
2798 if test $ol_enable_spasswd = yes ; then
2799         if test $ol_with_cyrus_sasl = no ; then
2800                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2801         fi
2802         ol_with_cyrus_sasl=yes
2803 fi
2804
2805 echo "$ac_t""done" 1>&6
2806
2807 LDAP_LIBS=
2808 LDIF_LIBS=
2809 LDBM_LIBS=
2810 LTHREAD_LIBS=
2811 LUTIL_LIBS=
2812
2813 SLAPD_LIBS=
2814 SLURPD_LIBS=
2815
2816 BUILD_SLAPD=no
2817 BUILD_SLURPD=no
2818
2819 BUILD_THREAD=no
2820
2821 BUILD_SLAPI=no
2822 SLAPD_SLAPI_DEPEND=
2823
2824 BUILD_BDB=no
2825 BUILD_DNSSRV=no
2826 BUILD_HDB=no
2827 BUILD_LDAP=no
2828 BUILD_LDBM=no
2829 BUILD_META=no
2830 BUILD_MONITOR=no
2831 BUILD_NULL=no
2832 BUILD_PASSWD=no
2833 BUILD_PERL=no
2834 BUILD_SHELL=no
2835 BUILD_SQL=no
2836
2837 BUILD_BDB_DYNAMIC=static
2838 BUILD_DNSSRV_DYNAMIC=static
2839 BUILD_HDB_DYNAMIC=static
2840 BUILD_LDAP_DYNAMIC=static
2841 BUILD_LDBM_DYNAMIC=static
2842 BUILD_META_DYNAMIC=static
2843 BUILD_MONITOR_DYNAMIC=static
2844 BUILD_NULL_DYNAMIC=static
2845 BUILD_PASSWD_DYNAMIC=static
2846 BUILD_PERL_DYNAMIC=static
2847 BUILD_SHELL_DYNAMIC=static
2848 BUILD_SQL_DYNAMIC=static
2849
2850 SLAPD_MODULES_LDFLAGS=
2851 SLAPD_MODULES_CPPFLAGS=
2852
2853 SLAPD_STATIC_BACKENDS=
2854 SLAPD_DYNAMIC_BACKENDS=
2855
2856 SLAPD_PERL_LDFLAGS=
2857 MOD_PERL_LDFLAGS=
2858 PERL_CPPFLAGS=
2859
2860 SLAPD_SQL_LDFLAGS=
2861 SLAPD_SQL_LIBS=
2862 SLAPD_SQL_INCLUDES=
2863
2864 KRB4_LIBS=
2865 KRB5_LIBS=
2866 SASL_LIBS=
2867 TERMCAP_LIBS=
2868 TLS_LIBS=
2869 MODULES_LIBS=
2870 SLAPI_LIBS=
2871 LIBSLAPI=
2872 LIBSLAPITOOLS=
2873 AUTH_LIBS=
2874
2875 SLAPD_SLP_LIBS=
2876
2877
2878 # Find a good install program.  We prefer a C program (faster),
2879 # so one script is as good as another.  But avoid the broken or
2880 # incompatible versions:
2881 # SysV /etc/install, /usr/sbin/install
2882 # SunOS /usr/etc/install
2883 # IRIX /sbin/install
2884 # AIX /bin/install
2885 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2886 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2887 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2888 # ./install, which can be erroneously created by make from ./install.sh.
2889 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2890 echo "configure:2891: checking for a BSD compatible install" >&5
2891 if test -z "$INSTALL"; then
2892 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2893   echo $ac_n "(cached) $ac_c" 1>&6
2894 else
2895     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2896   for ac_dir in $PATH; do
2897     # Account for people who put trailing slashes in PATH elements.
2898     case "$ac_dir/" in
2899     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2900     *)
2901       # OSF1 and SCO ODT 3.0 have their own names for install.
2902       # Don't use installbsd from OSF since it installs stuff as root
2903       # by default.
2904       for ac_prog in ginstall scoinst install; do
2905         if test -f $ac_dir/$ac_prog; then
2906           if test $ac_prog = install &&
2907             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2908             # AIX install.  It has an incompatible calling convention.
2909             :
2910           elif test $ac_prog = install &&
2911             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2912             # program-specific install script used by HP pwplus--don't use.
2913             :
2914           else
2915             ac_cv_path_install="$ac_dir/$ac_prog -c"
2916             break 2
2917           fi
2918         fi
2919       done
2920       ;;
2921     esac
2922   done
2923   IFS="$ac_save_IFS"
2924
2925 fi
2926   if test "${ac_cv_path_install+set}" = set; then
2927     INSTALL="$ac_cv_path_install"
2928   else
2929     # As a last resort, use the slow shell script.  We don't cache a
2930     # path for INSTALL within a source directory, because that will
2931     # break other packages using the cache if that directory is
2932     # removed, or if the path is relative.
2933     INSTALL="$ac_install_sh"
2934   fi
2935 fi
2936 echo "$ac_t""$INSTALL" 1>&6
2937
2938 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2939 # It thinks the first close brace ends the variable substitution.
2940 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2941
2942 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2943
2944 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2945
2946
2947 cat >> confdefs.h <<\EOF
2948 #define HAVE_MKVERSION 1
2949 EOF
2950
2951
2952
2953
2954 ol_aix_threads=no
2955 case "$target" in
2956 *-*-aix*)       if test -z "$CC" ; then
2957                 case "$ol_with_threads" in
2958                 auto | yes |  posix) ol_aix_threads=yes ;;
2959                 esac
2960         fi
2961 ;;
2962 esac
2963
2964 if test $ol_aix_threads = yes ; then
2965         if test -z "${CC}" ; then
2966                 for ac_prog in cc_r xlc_r cc
2967 do
2968 # Extract the first word of "$ac_prog", so it can be a program name with args.
2969 set dummy $ac_prog; ac_word=$2
2970 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2971 echo "configure:2972: checking for $ac_word" >&5
2972 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2973   echo $ac_n "(cached) $ac_c" 1>&6
2974 else
2975   if test -n "$CC"; then
2976   ac_cv_prog_CC="$CC" # Let the user override the test.
2977 else
2978   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2979   ac_dummy="$PATH"
2980   for ac_dir in $ac_dummy; do
2981     test -z "$ac_dir" && ac_dir=.
2982     if test -f $ac_dir/$ac_word; then
2983       ac_cv_prog_CC="$ac_prog"
2984       break
2985     fi
2986   done
2987   IFS="$ac_save_ifs"
2988 fi
2989 fi
2990 CC="$ac_cv_prog_CC"
2991 if test -n "$CC"; then
2992   echo "$ac_t""$CC" 1>&6
2993 else
2994   echo "$ac_t""no" 1>&6
2995 fi
2996
2997 test -n "$CC" && break
2998 done
2999
3000
3001                 if test "$CC" = cc ; then
3002                                                 if test $ol_with_threads != auto ; then
3003                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3004                         else
3005                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3006                         fi
3007                         ol_with_threads=no
3008                 fi
3009         fi
3010
3011         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3012                 ol_with_threads=posix
3013                 ol_cv_pthread_create=yes
3014         fi
3015 fi
3016
3017 if test -z "${CC}"; then
3018         for ac_prog in cc gcc
3019 do
3020 # Extract the first word of "$ac_prog", so it can be a program name with args.
3021 set dummy $ac_prog; ac_word=$2
3022 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3023 echo "configure:3024: checking for $ac_word" >&5
3024 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3025   echo $ac_n "(cached) $ac_c" 1>&6
3026 else
3027   if test -n "$CC"; then
3028   ac_cv_prog_CC="$CC" # Let the user override the test.
3029 else
3030   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3031   ac_dummy="$PATH"
3032   for ac_dir in $ac_dummy; do
3033     test -z "$ac_dir" && ac_dir=.
3034     if test -f $ac_dir/$ac_word; then
3035       ac_cv_prog_CC="$ac_prog"
3036       break
3037     fi
3038   done
3039   IFS="$ac_save_ifs"
3040 fi
3041 fi
3042 CC="$ac_cv_prog_CC"
3043 if test -n "$CC"; then
3044   echo "$ac_t""$CC" 1>&6
3045 else
3046   echo "$ac_t""no" 1>&6
3047 fi
3048
3049 test -n "$CC" && break
3050 done
3051 test -n "$CC" || CC="missing"
3052
3053
3054         if test "${CC}" = "missing" ; then
3055                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3056         fi
3057 fi
3058
3059 if test -z "${AR}"; then
3060         for ac_prog in ar gar
3061 do
3062 # Extract the first word of "$ac_prog", so it can be a program name with args.
3063 set dummy $ac_prog; ac_word=$2
3064 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3065 echo "configure:3066: checking for $ac_word" >&5
3066 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3067   echo $ac_n "(cached) $ac_c" 1>&6
3068 else
3069   if test -n "$AR"; then
3070   ac_cv_prog_AR="$AR" # Let the user override the test.
3071 else
3072   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3073   ac_dummy="$PATH"
3074   for ac_dir in $ac_dummy; do
3075     test -z "$ac_dir" && ac_dir=.
3076     if test -f $ac_dir/$ac_word; then
3077       ac_cv_prog_AR="$ac_prog"
3078       break
3079     fi
3080   done
3081   IFS="$ac_save_ifs"
3082 fi
3083 fi
3084 AR="$ac_cv_prog_AR"
3085 if test -n "$AR"; then
3086   echo "$ac_t""$AR" 1>&6
3087 else
3088   echo "$ac_t""no" 1>&6
3089 fi
3090
3091 test -n "$AR" && break
3092 done
3093 test -n "$AR" || AR="missing"
3094
3095
3096         if test "${AR}" = "missing" ; then
3097                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3098         fi
3099 fi
3100
3101
3102
3103 # Find the correct PATH separator.  Usually this is `:', but
3104 # DJGPP uses `;' like DOS.
3105 if test "X${PATH_SEPARATOR+set}" != Xset; then
3106   UNAME=${UNAME-`uname 2>/dev/null`}
3107   case X$UNAME in
3108     *-DOS) lt_cv_sys_path_separator=';' ;;
3109     *)     lt_cv_sys_path_separator=':' ;;
3110   esac
3111   PATH_SEPARATOR=$lt_cv_sys_path_separator
3112 fi
3113
3114 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3115 echo "configure:3116: checking for Cygwin environment" >&5
3116 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3117   echo $ac_n "(cached) $ac_c" 1>&6
3118 else
3119   cat > conftest.$ac_ext <<EOF
3120 #line 3121 "configure"
3121 #include "confdefs.h"
3122
3123 int main() {
3124
3125 #ifndef __CYGWIN__
3126 #define __CYGWIN__ __CYGWIN32__
3127 #endif
3128 return __CYGWIN__;
3129 ; return 0; }
3130 EOF
3131 if { (eval echo configure:3132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3132   rm -rf conftest*
3133   ac_cv_cygwin=yes
3134 else
3135   echo "configure: failed program was:" >&5
3136   cat conftest.$ac_ext >&5
3137   rm -rf conftest*
3138   ac_cv_cygwin=no
3139 fi
3140 rm -f conftest*
3141 fi
3142
3143 echo "$ac_t""$ac_cv_cygwin" 1>&6
3144 CYGWIN=
3145 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3146 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3147 echo "configure:3148: checking for mingw32 environment" >&5
3148 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3149   echo $ac_n "(cached) $ac_c" 1>&6
3150 else
3151   cat > conftest.$ac_ext <<EOF
3152 #line 3153 "configure"
3153 #include "confdefs.h"
3154
3155 int main() {
3156 return __MINGW32__;
3157 ; return 0; }
3158 EOF
3159 if { (eval echo configure:3160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3160   rm -rf conftest*
3161   ac_cv_mingw32=yes
3162 else
3163   echo "configure: failed program was:" >&5
3164   cat conftest.$ac_ext >&5
3165   rm -rf conftest*
3166   ac_cv_mingw32=no
3167 fi
3168 rm -f conftest*
3169 fi
3170
3171 echo "$ac_t""$ac_cv_mingw32" 1>&6
3172 MINGW32=
3173 test "$ac_cv_mingw32" = yes && MINGW32=yes
3174 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3175 echo "configure:3176: checking for EMX OS/2 environment" >&5
3176 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3177   echo $ac_n "(cached) $ac_c" 1>&6
3178 else
3179   cat > conftest.$ac_ext <<EOF
3180 #line 3181 "configure"
3181 #include "confdefs.h"
3182
3183 int main() {
3184 return __EMX__;
3185 ; return 0; }
3186 EOF
3187 if { (eval echo configure:3188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3188   rm -rf conftest*
3189   ac_cv_emxos2=yes
3190 else
3191   echo "configure: failed program was:" >&5
3192   cat conftest.$ac_ext >&5
3193   rm -rf conftest*
3194   ac_cv_emxos2=no
3195 fi
3196 rm -f conftest*
3197 fi
3198
3199 echo "$ac_t""$ac_cv_emxos2" 1>&6
3200 EMXOS2=
3201 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3202 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3203 echo "configure:3204: checking how to run the C preprocessor" >&5
3204 # On Suns, sometimes $CPP names a directory.
3205 if test -n "$CPP" && test -d "$CPP"; then
3206   CPP=
3207 fi
3208 if test -z "$CPP"; then
3209 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3210   echo $ac_n "(cached) $ac_c" 1>&6
3211 else
3212     # This must be in double quotes, not single quotes, because CPP may get
3213   # substituted into the Makefile and "${CC-cc}" will confuse make.
3214   CPP="${CC-cc} -E"
3215   # On the NeXT, cc -E runs the code through the compiler's parser,
3216   # not just through cpp.
3217   cat > conftest.$ac_ext <<EOF
3218 #line 3219 "configure"
3219 #include "confdefs.h"
3220 #include <assert.h>
3221 Syntax Error
3222 EOF
3223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3224 { (eval echo configure:3225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3226 if test -z "$ac_err"; then
3227   :
3228 else
3229   echo "$ac_err" >&5
3230   echo "configure: failed program was:" >&5
3231   cat conftest.$ac_ext >&5
3232   rm -rf conftest*
3233   CPP="${CC-cc} -E -traditional-cpp"
3234   cat > conftest.$ac_ext <<EOF
3235 #line 3236 "configure"
3236 #include "confdefs.h"
3237 #include <assert.h>
3238 Syntax Error
3239 EOF
3240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3241 { (eval echo configure:3242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3243 if test -z "$ac_err"; then
3244   :
3245 else
3246   echo "$ac_err" >&5
3247   echo "configure: failed program was:" >&5
3248   cat conftest.$ac_ext >&5
3249   rm -rf conftest*
3250   CPP="${CC-cc} -nologo -E"
3251   cat > conftest.$ac_ext <<EOF
3252 #line 3253 "configure"
3253 #include "confdefs.h"
3254 #include <assert.h>
3255 Syntax Error
3256 EOF
3257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3258 { (eval echo configure:3259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3260 if test -z "$ac_err"; then
3261   :
3262 else
3263   echo "$ac_err" >&5
3264   echo "configure: failed program was:" >&5
3265   cat conftest.$ac_ext >&5
3266   rm -rf conftest*
3267   CPP=/lib/cpp
3268 fi
3269 rm -f conftest*
3270 fi
3271 rm -f conftest*
3272 fi
3273 rm -f conftest*
3274   ac_cv_prog_CPP="$CPP"
3275 fi
3276   CPP="$ac_cv_prog_CPP"
3277 else
3278   ac_cv_prog_CPP="$CPP"
3279 fi
3280 echo "$ac_t""$CPP" 1>&6
3281
3282 # Check whether --enable-fast-install or --disable-fast-install was given.
3283 if test "${enable_fast_install+set}" = set; then
3284   enableval="$enable_fast_install"
3285   p=${PACKAGE-default}
3286 case $enableval in
3287 yes) enable_fast_install=yes ;;
3288 no) enable_fast_install=no ;;
3289 *)
3290   enable_fast_install=no
3291   # Look at the argument we got.  We use all the common list separators.
3292   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3293   for pkg in $enableval; do
3294     if test "X$pkg" = "X$p"; then
3295       enable_fast_install=yes
3296     fi
3297   done
3298   IFS="$ac_save_ifs"
3299   ;;
3300 esac
3301 else
3302   enable_fast_install=yes
3303 fi
3304
3305 # Extract the first word of "gcc", so it can be a program name with args.
3306 set dummy gcc; ac_word=$2
3307 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3308 echo "configure:3309: checking for $ac_word" >&5
3309 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3310   echo $ac_n "(cached) $ac_c" 1>&6
3311 else
3312   if test -n "$CC"; then
3313   ac_cv_prog_CC="$CC" # Let the user override the test.
3314 else
3315   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3316   ac_dummy="$PATH"
3317   for ac_dir in $ac_dummy; do
3318     test -z "$ac_dir" && ac_dir=.
3319     if test -f $ac_dir/$ac_word; then
3320       ac_cv_prog_CC="gcc"
3321       break
3322     fi
3323   done
3324   IFS="$ac_save_ifs"
3325 fi
3326 fi
3327 CC="$ac_cv_prog_CC"
3328 if test -n "$CC"; then
3329   echo "$ac_t""$CC" 1>&6
3330 else
3331   echo "$ac_t""no" 1>&6
3332 fi
3333
3334 if test -z "$CC"; then
3335   # Extract the first word of "cc", so it can be a program name with args.
3336 set dummy cc; ac_word=$2
3337 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3338 echo "configure:3339: checking for $ac_word" >&5
3339 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3340   echo $ac_n "(cached) $ac_c" 1>&6
3341 else
3342   if test -n "$CC"; then
3343   ac_cv_prog_CC="$CC" # Let the user override the test.
3344 else
3345   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3346   ac_prog_rejected=no
3347   ac_dummy="$PATH"
3348   for ac_dir in $ac_dummy; do
3349     test -z "$ac_dir" && ac_dir=.
3350     if test -f $ac_dir/$ac_word; then
3351       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3352         ac_prog_rejected=yes
3353         continue
3354       fi
3355       ac_cv_prog_CC="cc"
3356       break
3357     fi
3358   done
3359   IFS="$ac_save_ifs"
3360 if test $ac_prog_rejected = yes; then
3361   # We found a bogon in the path, so make sure we never use it.
3362   set dummy $ac_cv_prog_CC
3363   shift
3364   if test $# -gt 0; then
3365     # We chose a different compiler from the bogus one.
3366     # However, it has the same basename, so the bogon will be chosen
3367     # first if we set CC to just the basename; use the full file name.
3368     shift
3369     set dummy "$ac_dir/$ac_word" "$@"
3370     shift
3371     ac_cv_prog_CC="$@"
3372   fi
3373 fi
3374 fi
3375 fi
3376 CC="$ac_cv_prog_CC"
3377 if test -n "$CC"; then
3378   echo "$ac_t""$CC" 1>&6
3379 else
3380   echo "$ac_t""no" 1>&6
3381 fi
3382
3383   if test -z "$CC"; then
3384     case "`uname -s`" in
3385     *win32* | *WIN32* | *CYGWIN*)
3386       # Extract the first word of "cl", so it can be a program name with args.
3387 set dummy cl; ac_word=$2
3388 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3389 echo "configure:3390: checking for $ac_word" >&5
3390 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3391   echo $ac_n "(cached) $ac_c" 1>&6
3392 else
3393   if test -n "$CC"; then
3394   ac_cv_prog_CC="$CC" # Let the user override the test.
3395 else
3396   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3397   ac_dummy="$PATH"
3398   for ac_dir in $ac_dummy; do
3399     test -z "$ac_dir" && ac_dir=.
3400     if test -f $ac_dir/$ac_word; then
3401       ac_cv_prog_CC="cl"
3402       break
3403     fi
3404   done
3405   IFS="$ac_save_ifs"
3406 fi
3407 fi
3408 CC="$ac_cv_prog_CC"
3409 if test -n "$CC"; then
3410   echo "$ac_t""$CC" 1>&6
3411 else
3412   echo "$ac_t""no" 1>&6
3413 fi
3414  ;;
3415     esac
3416   fi
3417   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3418 fi
3419
3420 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3421 echo "configure:3422: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3422
3423 ac_ext=c
3424 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3425 ac_cpp='$CPP $CPPFLAGS'
3426 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3427 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3428 cross_compiling=$ac_cv_prog_cc_cross
3429
3430 cat > conftest.$ac_ext << EOF
3431
3432 #line 3433 "configure"
3433 #include "confdefs.h"
3434
3435 main(){return(0);}
3436 EOF
3437 if { (eval echo configure:3438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3438   ac_cv_prog_cc_works=yes
3439   # If we can't run a trivial program, we are probably using a cross compiler.
3440   if (./conftest; exit) 2>/dev/null; then
3441     ac_cv_prog_cc_cross=no
3442   else
3443     ac_cv_prog_cc_cross=yes
3444   fi
3445 else
3446   echo "configure: failed program was:" >&5
3447   cat conftest.$ac_ext >&5
3448   ac_cv_prog_cc_works=no
3449 fi
3450 rm -fr conftest*
3451 ac_ext=c
3452 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3453 ac_cpp='$CPP $CPPFLAGS'
3454 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3455 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3456 cross_compiling=$ac_cv_prog_cc_cross
3457
3458 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3459 if test $ac_cv_prog_cc_works = no; then
3460   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3461 fi
3462 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3463 echo "configure:3464: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3464 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3465 cross_compiling=$ac_cv_prog_cc_cross
3466
3467 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3468 echo "configure:3469: checking whether we are using GNU C" >&5
3469 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3470   echo $ac_n "(cached) $ac_c" 1>&6
3471 else
3472   cat > conftest.c <<EOF
3473 #ifdef __GNUC__
3474   yes;
3475 #endif
3476 EOF
3477 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3478   ac_cv_prog_gcc=yes
3479 else
3480   ac_cv_prog_gcc=no
3481 fi
3482 fi
3483
3484 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3485
3486 if test $ac_cv_prog_gcc = yes; then
3487   GCC=yes
3488 else
3489   GCC=
3490 fi
3491
3492 ac_test_CFLAGS="${CFLAGS+set}"
3493 ac_save_CFLAGS="$CFLAGS"
3494 CFLAGS=
3495 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3496 echo "configure:3497: checking whether ${CC-cc} accepts -g" >&5
3497 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3498   echo $ac_n "(cached) $ac_c" 1>&6
3499 else
3500   echo 'void f(){}' > conftest.c
3501 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3502   ac_cv_prog_cc_g=yes
3503 else
3504   ac_cv_prog_cc_g=no
3505 fi
3506 rm -f conftest*
3507
3508 fi
3509
3510 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3511 if test "$ac_test_CFLAGS" = set; then
3512   CFLAGS="$ac_save_CFLAGS"
3513 elif test $ac_cv_prog_cc_g = yes; then
3514   if test "$GCC" = yes; then
3515     CFLAGS="-g -O2"
3516   else
3517     CFLAGS="-g"
3518   fi
3519 else
3520   if test "$GCC" = yes; then
3521     CFLAGS="-O2"
3522   else
3523     CFLAGS=
3524   fi
3525 fi
3526
3527 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3528 if test "${with_gnu_ld+set}" = set; then
3529   withval="$with_gnu_ld"
3530   test "$withval" = no || with_gnu_ld=yes
3531 else
3532   with_gnu_ld=no
3533 fi
3534
3535 ac_prog=ld
3536 if test "$GCC" = yes; then
3537   # Check if gcc -print-prog-name=ld gives a path.
3538   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3539 echo "configure:3540: checking for ld used by GCC" >&5
3540   case $host in
3541   *-*-mingw*)
3542     # gcc leaves a trailing carriage return which upsets mingw
3543     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3544   *)
3545     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3546   esac
3547   case $ac_prog in
3548     # Accept absolute paths.
3549     [\\/]* | [A-Za-z]:[\\/]*)
3550       re_direlt='/[^/][^/]*/\.\./'
3551       # Canonicalize the path of ld
3552       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3553       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3554         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3555       done
3556       test -z "$LD" && LD="$ac_prog"
3557       ;;
3558   "")
3559     # If it fails, then pretend we aren't using GCC.
3560     ac_prog=ld
3561     ;;
3562   *)
3563     # If it is relative, then search for the first ld in PATH.
3564     with_gnu_ld=unknown
3565     ;;
3566   esac
3567 elif test "$with_gnu_ld" = yes; then
3568   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3569 echo "configure:3570: checking for GNU ld" >&5
3570 else
3571   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3572 echo "configure:3573: checking for non-GNU ld" >&5
3573 fi
3574 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3575   echo $ac_n "(cached) $ac_c" 1>&6
3576 else
3577   if test -z "$LD"; then
3578   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3579   for ac_dir in $PATH; do
3580     test -z "$ac_dir" && ac_dir=.
3581     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3582       lt_cv_path_LD="$ac_dir/$ac_prog"
3583       # Check to see if the program is GNU ld.  I'd rather use --version,
3584       # but apparently some GNU ld's only accept -v.
3585       # Break only if it was the GNU/non-GNU ld that we prefer.
3586       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3587         test "$with_gnu_ld" != no && break
3588       else
3589         test "$with_gnu_ld" != yes && break
3590       fi
3591     fi
3592   done
3593   IFS="$ac_save_ifs"
3594 else
3595   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3596 fi
3597 fi
3598
3599 LD="$lt_cv_path_LD"
3600 if test -n "$LD"; then
3601   echo "$ac_t""$LD" 1>&6
3602 else
3603   echo "$ac_t""no" 1>&6
3604 fi
3605 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3606 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3607 echo "configure:3608: checking if the linker ($LD) is GNU ld" >&5
3608 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3609   echo $ac_n "(cached) $ac_c" 1>&6
3610 else
3611   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3612 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3613   lt_cv_prog_gnu_ld=yes
3614 else
3615   lt_cv_prog_gnu_ld=no
3616 fi
3617 fi
3618
3619 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3620 with_gnu_ld=$lt_cv_prog_gnu_ld
3621
3622
3623 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3624 echo "configure:3625: checking for $LD option to reload object files" >&5
3625 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3626   echo $ac_n "(cached) $ac_c" 1>&6
3627 else
3628   lt_cv_ld_reload_flag='-r'
3629 fi
3630
3631 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3632 reload_flag=$lt_cv_ld_reload_flag
3633 test -n "$reload_flag" && reload_flag=" $reload_flag"
3634
3635 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3636 echo "configure:3637: checking for BSD-compatible nm" >&5
3637 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3638   echo $ac_n "(cached) $ac_c" 1>&6
3639 else
3640   if test -n "$NM"; then
3641   # Let the user override the test.
3642   lt_cv_path_NM="$NM"
3643 else
3644   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3645   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3646     test -z "$ac_dir" && ac_dir=.
3647     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3648     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3649       # Check to see if the nm accepts a BSD-compat flag.
3650       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3651       #   nm: unknown option "B" ignored
3652       # Tru64's nm complains that /dev/null is an invalid object file
3653       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3654         lt_cv_path_NM="$tmp_nm -B"
3655         break
3656       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3657         lt_cv_path_NM="$tmp_nm -p"
3658         break
3659       else
3660         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3661         continue # so that we can try to find one that supports BSD flags
3662       fi
3663     fi
3664   done
3665   IFS="$ac_save_ifs"
3666   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3667 fi
3668 fi
3669
3670 NM="$lt_cv_path_NM"
3671 echo "$ac_t""$NM" 1>&6
3672
3673 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3674 echo "configure:3675: checking for a sed that does not truncate output" >&5
3675 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3676   echo $ac_n "(cached) $ac_c" 1>&6
3677 else
3678   # Loop through the user's path and test for sed and gsed.
3679 # Then use that list of sed's as ones to test for truncation.
3680 as_executable_p="test -f"
3681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3682 for as_dir in $PATH
3683 do
3684   IFS=$as_save_IFS
3685   test -z "$as_dir" && as_dir=.
3686   for ac_prog in sed gsed; do
3687     for ac_exec_ext in '' $ac_executable_extensions; do
3688       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3689         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3690       fi
3691     done
3692   done
3693 done
3694
3695   # Create a temporary directory, and hook for its removal unless debugging.
3696 $debug ||
3697 {
3698   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3699   trap '{ (exit 1); exit 1; }' 1 2 13 15
3700 }
3701
3702 # Create a (secure) tmp directory for tmp files.
3703 : ${TMPDIR=/tmp}
3704 {
3705   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3706   test -n "$tmp" && test -d "$tmp"
3707 }  ||
3708 {
3709   tmp=$TMPDIR/sed$$-$RANDOM
3710   (umask 077 && mkdir $tmp)
3711 } ||
3712 {
3713    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3714    { (exit 1); exit 1; }
3715 }
3716   _max=0
3717   _count=0
3718   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3719   # along with /bin/sed that truncates output.
3720   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3721     test ! -f ${_sed} && break
3722     cat /dev/null > "$tmp/sed.in"
3723     _count=0
3724     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3725     # Check for GNU sed and select it if it is found.
3726     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3727       lt_cv_path_SED=${_sed}
3728       break
3729     fi
3730     while true; do
3731       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3732       mv "$tmp/sed.tmp" "$tmp/sed.in"
3733       cp "$tmp/sed.in" "$tmp/sed.nl"
3734       echo >>"$tmp/sed.nl"
3735       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3736       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3737       # 40000 chars as input seems more than enough
3738       test $_count -gt 10 && break
3739       _count=`expr $_count + 1`
3740       if test $_count -gt $_max; then
3741         _max=$_count
3742         lt_cv_path_SED=$_sed
3743       fi
3744     done
3745   done
3746   rm -rf "$tmp"
3747
3748 fi
3749
3750 if test "X$SED" != "X"; then
3751   lt_cv_path_SED=$SED
3752 else
3753   SED=$lt_cv_path_SED
3754 fi
3755 echo "$ac_t""$SED" 1>&6
3756
3757 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3758 echo "configure:3759: checking whether ln -s works" >&5
3759 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3760   echo $ac_n "(cached) $ac_c" 1>&6
3761 else
3762   rm -f conftestdata
3763 if ln -s X conftestdata 2>/dev/null
3764 then
3765   rm -f conftestdata
3766   ac_cv_prog_LN_S="ln -s"
3767 else
3768   ac_cv_prog_LN_S=ln
3769 fi
3770 fi
3771 LN_S="$ac_cv_prog_LN_S"
3772 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3773   echo "$ac_t""yes" 1>&6
3774 else
3775   echo "$ac_t""no" 1>&6
3776 fi
3777
3778 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3779 echo "configure:3780: checking how to recognise dependent libraries" >&5
3780 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3781   echo $ac_n "(cached) $ac_c" 1>&6
3782 else
3783   lt_cv_file_magic_cmd='$MAGIC_CMD'
3784 lt_cv_file_magic_test_file=
3785 lt_cv_deplibs_check_method='unknown'
3786 # Need to set the preceding variable on all platforms that support
3787 # interlibrary dependencies.
3788 # 'none' -- dependencies not supported.
3789 # `unknown' -- same as none, but documents that we really don't know.
3790 # 'pass_all' -- all dependencies passed with no checks.
3791 # 'test_compile' -- check by making test program.
3792 # 'file_magic [[regex]]' -- check by looking for files in library path
3793 # which responds to the $file_magic_cmd with a given egrep regex.
3794 # If you have `file' or equivalent on your system and you're not sure
3795 # whether `pass_all' will *always* work, you probably want this one.
3796
3797 case $host_os in
3798 aix4* | aix5*)
3799   lt_cv_deplibs_check_method=pass_all
3800   ;;
3801
3802 beos*)
3803   lt_cv_deplibs_check_method=pass_all
3804   ;;
3805
3806 bsdi4*)
3807   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3808   lt_cv_file_magic_cmd='/usr/bin/file -L'
3809   lt_cv_file_magic_test_file=/shlib/libc.so
3810   ;;
3811
3812 cygwin* | mingw* | pw32*)
3813   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3814   lt_cv_file_magic_cmd='$OBJDUMP -f'
3815   ;;
3816
3817 darwin* | rhapsody*)
3818   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3819   lt_cv_file_magic_cmd='/usr/bin/file -L'
3820   case "$host_os" in
3821   rhapsody* | darwin1.[012])
3822     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3823     ;;
3824   *) # Darwin 1.3 on
3825     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3826     ;;
3827   esac
3828   ;;
3829
3830 freebsd*)
3831   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3832     case $host_cpu in
3833     i*86 )
3834       # Not sure whether the presence of OpenBSD here was a mistake.
3835       # Let's accept both of them until this is cleared up.
3836       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3837       lt_cv_file_magic_cmd=/usr/bin/file
3838       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3839       ;;
3840     esac
3841   else
3842     lt_cv_deplibs_check_method=pass_all
3843   fi
3844   ;;
3845
3846 gnu*)
3847   lt_cv_deplibs_check_method=pass_all
3848   ;;
3849
3850 hpux10.20*|hpux11*)
3851   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3852   lt_cv_file_magic_cmd=/usr/bin/file
3853   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3854   ;;
3855
3856 irix5* | irix6* | nonstopux*)
3857   case $host_os in
3858   irix5* | nonstopux*)
3859     # this will be overridden with pass_all, but let us keep it just in case
3860     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3861     ;;
3862   *)
3863     case $LD in
3864     *-32|*"-32 ") libmagic=32-bit;;
3865     *-n32|*"-n32 ") libmagic=N32;;
3866     *-64|*"-64 ") libmagic=64-bit;;
3867     *) libmagic=never-match;;
3868     esac
3869     # this will be overridden with pass_all, but let us keep it just in case
3870     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3871     ;;
3872   esac
3873   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3874   lt_cv_deplibs_check_method=pass_all
3875   ;;
3876
3877 # This must be Linux ELF.
3878 linux-gnu*)
3879   case $host_cpu in
3880   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3881     lt_cv_deplibs_check_method=pass_all ;;
3882   *)
3883     # glibc up to 2.1.1 does not perform some relocations on ARM
3884     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3885   esac
3886   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3887   ;;
3888
3889 netbsd*)
3890   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3891     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3892   else
3893     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3894   fi
3895   ;;
3896
3897 newos6*)
3898   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3899   lt_cv_file_magic_cmd=/usr/bin/file
3900   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3901   ;;
3902
3903 openbsd*)
3904   lt_cv_file_magic_cmd=/usr/bin/file
3905   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3906   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3907     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3908   else
3909     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3910   fi
3911   ;;
3912
3913 osf3* | osf4* | osf5*)
3914   # this will be overridden with pass_all, but let us keep it just in case
3915   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3916   lt_cv_file_magic_test_file=/shlib/libc.so
3917   lt_cv_deplibs_check_method=pass_all
3918   ;;
3919
3920 sco3.2v5*)
3921   lt_cv_deplibs_check_method=pass_all
3922   ;;
3923
3924 solaris*)
3925   lt_cv_deplibs_check_method=pass_all
3926   lt_cv_file_magic_test_file=/lib/libc.so
3927   ;;
3928
3929 sysv5uw[78]* | sysv4*uw2*)
3930   lt_cv_deplibs_check_method=pass_all
3931   ;;
3932
3933 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3934   case $host_vendor in
3935   motorola)
3936     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]'
3937     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3938     ;;
3939   ncr)
3940     lt_cv_deplibs_check_method=pass_all
3941     ;;
3942   sequent)
3943     lt_cv_file_magic_cmd='/bin/file'
3944     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3945     ;;
3946   sni)
3947     lt_cv_file_magic_cmd='/bin/file'
3948     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3949     lt_cv_file_magic_test_file=/lib/libc.so
3950     ;;
3951   siemens)
3952     lt_cv_deplibs_check_method=pass_all
3953     ;;
3954   esac
3955   ;;
3956 esac
3957
3958 fi
3959
3960 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3961 file_magic_cmd=$lt_cv_file_magic_cmd
3962 deplibs_check_method=$lt_cv_deplibs_check_method
3963
3964 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3965 echo "configure:3966: checking for object suffix" >&5
3966 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3967   echo $ac_n "(cached) $ac_c" 1>&6
3968 else
3969   rm -f conftest*
3970 echo 'int i = 1;' > conftest.$ac_ext
3971 if { (eval echo configure:3972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3972   for ac_file in conftest.*; do
3973     case $ac_file in
3974     *.c) ;;
3975     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3976     esac
3977   done
3978 else
3979   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3980 fi
3981 rm -f conftest*
3982 fi
3983
3984 echo "$ac_t""$ac_cv_objext" 1>&6
3985 OBJEXT=$ac_cv_objext
3986 ac_objext=$ac_cv_objext
3987
3988
3989
3990
3991 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3992 echo "configure:3993: checking for executable suffix" >&5
3993 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3994   echo $ac_n "(cached) $ac_c" 1>&6
3995 else
3996   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3997   ac_cv_exeext=.exe
3998 else
3999   rm -f conftest*
4000   echo 'int main () { return 0; }' > conftest.$ac_ext
4001   ac_cv_exeext=
4002   if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4003     for file in conftest.*; do
4004       case $file in
4005       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4006       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4007       esac
4008     done
4009   else
4010     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4011   fi
4012   rm -f conftest*
4013   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4014 fi
4015 fi
4016
4017 EXEEXT=""
4018 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4019 echo "$ac_t""${ac_cv_exeext}" 1>&6
4020 ac_exeext=$EXEEXT
4021
4022 if test $host != $build; then
4023   ac_tool_prefix=${host_alias}-
4024 else
4025   ac_tool_prefix=
4026 fi
4027
4028
4029
4030
4031 # Check for command to grab the raw symbol name followed by C symbol from nm.
4032 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4033 echo "configure:4034: checking command to parse $NM output" >&5
4034 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4035   echo $ac_n "(cached) $ac_c" 1>&6
4036 else
4037   
4038 # These are sane defaults that work on at least a few old systems.
4039 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4040
4041 # Character class describing NM global symbol codes.
4042 symcode='[BCDEGRST]'
4043
4044 # Regexp to match symbols that can be accessed directly from C.
4045 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4046
4047 # Transform the above into a raw symbol and a C symbol.
4048 symxfrm='\1 \2\3 \3'
4049
4050 # Transform an extracted symbol line into a proper C declaration
4051 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4052
4053 # Transform an extracted symbol line into symbol name and symbol address
4054 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'"
4055
4056 # Define system-specific variables.
4057 case $host_os in
4058 aix*)
4059   symcode='[BCDT]'
4060   ;;
4061 cygwin* | mingw* | pw32*)
4062   symcode='[ABCDGISTW]'
4063   ;;
4064 hpux*) # Its linker distinguishes data from code symbols
4065   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4066   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'"
4067   ;;
4068 irix* | nonstopux*)
4069   symcode='[BCDEGRST]'
4070   ;;
4071 osf*)
4072   symcode='[BCDEGQRST]'
4073   ;;
4074 solaris* | sysv5*)
4075   symcode='[BDT]'
4076   ;;
4077 sysv4)
4078   symcode='[DFNSTU]'
4079   ;;
4080 esac
4081
4082 # Handle CRLF in mingw tool chain
4083 opt_cr=
4084 case $host_os in
4085 mingw*)
4086   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4087   ;;
4088 esac
4089
4090 # If we're using GNU nm, then use its standard symbol codes.
4091 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4092   symcode='[ABCDGISTW]'
4093 fi
4094
4095 # Try without a prefix undercore, then with it.
4096 for ac_symprfx in "" "_"; do
4097
4098   # Write the raw and C identifiers.
4099 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4100
4101   # Check to see that the pipe works correctly.
4102   pipe_works=no
4103   rm -f conftest*
4104   cat > conftest.$ac_ext <<EOF
4105 #ifdef __cplusplus
4106 extern "C" {
4107 #endif
4108 char nm_test_var;
4109 void nm_test_func(){}
4110 #ifdef __cplusplus
4111 }
4112 #endif
4113 int main(){nm_test_var='a';nm_test_func();return(0);}
4114 EOF
4115
4116   if { (eval echo configure:4117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4117     # Now try to grab the symbols.
4118     nlist=conftest.nm
4119     if { (eval echo configure:4120: \"$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
4120       # Try sorting and uniquifying the output.
4121       if sort "$nlist" | uniq > "$nlist"T; then
4122         mv -f "$nlist"T "$nlist"
4123       else
4124         rm -f "$nlist"T
4125       fi
4126
4127       # Make sure that we snagged all the symbols we need.
4128       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4129         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4130           cat <<EOF > conftest.$ac_ext
4131 #ifdef __cplusplus
4132 extern "C" {
4133 #endif
4134
4135 EOF
4136           # Now generate the symbol file.
4137           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4138
4139           cat <<EOF >> conftest.$ac_ext
4140 #if defined (__STDC__) && __STDC__
4141 # define lt_ptr void *
4142 #else
4143 # define lt_ptr char *
4144 # define const
4145 #endif
4146
4147 /* The mapping between symbol names and symbols. */
4148 const struct {
4149   const char *name;
4150   lt_ptr address;
4151 }
4152 lt_preloaded_symbols[] =
4153 {
4154 EOF
4155           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4156           cat <<\EOF >> conftest.$ac_ext
4157   {0, (lt_ptr) 0}
4158 };
4159
4160 #ifdef __cplusplus
4161 }
4162 #endif
4163 EOF
4164           # Now try linking the two files.
4165           mv conftest.$ac_objext conftstm.$ac_objext
4166           save_LIBS="$LIBS"
4167           save_CFLAGS="$CFLAGS"
4168           LIBS="conftstm.$ac_objext"
4169           CFLAGS="$CFLAGS$no_builtin_flag"
4170           if { (eval echo configure:4171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4171             pipe_works=yes
4172           fi
4173           LIBS="$save_LIBS"
4174           CFLAGS="$save_CFLAGS"
4175         else
4176           echo "cannot find nm_test_func in $nlist" >&5
4177         fi
4178       else
4179         echo "cannot find nm_test_var in $nlist" >&5
4180       fi
4181     else
4182       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4183     fi
4184   else
4185     echo "$progname: failed program was:" >&5
4186     cat conftest.$ac_ext >&5
4187   fi
4188   rm -f conftest* conftst*
4189
4190   # Do not use the global_symbol_pipe unless it works.
4191   if test "$pipe_works" = yes; then
4192     break
4193   else
4194     lt_cv_sys_global_symbol_pipe=
4195   fi
4196 done
4197
4198 fi
4199
4200 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4201 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4202   global_symbol_to_cdecl=
4203   global_symbol_to_c_name_address=
4204 else
4205   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4206   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4207 fi
4208 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4209 then
4210   echo "$ac_t""failed" 1>&6
4211 else
4212   echo "$ac_t""ok" 1>&6
4213 fi
4214
4215 for ac_hdr in dlfcn.h
4216 do
4217 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4218 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4219 echo "configure:4220: checking for $ac_hdr" >&5
4220 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4221   echo $ac_n "(cached) $ac_c" 1>&6
4222 else
4223   cat > conftest.$ac_ext <<EOF
4224 #line 4225 "configure"
4225 #include "confdefs.h"
4226 #include <$ac_hdr>
4227 EOF
4228 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4229 { (eval echo configure:4230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4230 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4231 if test -z "$ac_err"; then
4232   rm -rf conftest*
4233   eval "ac_cv_header_$ac_safe=yes"
4234 else
4235   echo "$ac_err" >&5
4236   echo "configure: failed program was:" >&5
4237   cat conftest.$ac_ext >&5
4238   rm -rf conftest*
4239   eval "ac_cv_header_$ac_safe=no"
4240 fi
4241 rm -f conftest*
4242 fi
4243 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4244   echo "$ac_t""yes" 1>&6
4245     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4246   cat >> confdefs.h <<EOF
4247 #define $ac_tr_hdr 1
4248 EOF
4249  
4250 else
4251   echo "$ac_t""no" 1>&6
4252 fi
4253 done
4254
4255
4256
4257
4258
4259
4260 # Only perform the check for file, if the check method requires it
4261 case $deplibs_check_method in
4262 file_magic*)
4263   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4264     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4265 echo "configure:4266: checking for ${ac_tool_prefix}file" >&5
4266 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4267   echo $ac_n "(cached) $ac_c" 1>&6
4268 else
4269   case $MAGIC_CMD in
4270   /*)
4271   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4272   ;;
4273   ?:/*)
4274   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4275   ;;
4276   *)
4277   ac_save_MAGIC_CMD="$MAGIC_CMD"
4278   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4279   ac_dummy="/usr/bin:$PATH"
4280   for ac_dir in $ac_dummy; do
4281     test -z "$ac_dir" && ac_dir=.
4282     if test -f $ac_dir/${ac_tool_prefix}file; then
4283       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4284       if test -n "$file_magic_test_file"; then
4285         case $deplibs_check_method in
4286         "file_magic "*)
4287           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4288           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4289           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4290             egrep "$file_magic_regex" > /dev/null; then
4291             :
4292           else
4293             cat <<EOF 1>&2
4294
4295 *** Warning: the command libtool uses to detect shared libraries,
4296 *** $file_magic_cmd, produces output that libtool cannot recognize.
4297 *** The result is that libtool may fail to recognize shared libraries
4298 *** as such.  This will affect the creation of libtool libraries that
4299 *** depend on shared libraries, but programs linked with such libtool
4300 *** libraries will work regardless of this problem.  Nevertheless, you
4301 *** may want to report the problem to your system manager and/or to
4302 *** bug-libtool@gnu.org
4303
4304 EOF
4305           fi ;;
4306         esac
4307       fi
4308       break
4309     fi
4310   done
4311   IFS="$ac_save_ifs"
4312   MAGIC_CMD="$ac_save_MAGIC_CMD"
4313   ;;
4314 esac
4315 fi
4316
4317 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4318 if test -n "$MAGIC_CMD"; then
4319   echo "$ac_t""$MAGIC_CMD" 1>&6
4320 else
4321   echo "$ac_t""no" 1>&6
4322 fi
4323
4324 if test -z "$lt_cv_path_MAGIC_CMD"; then
4325   if test -n "$ac_tool_prefix"; then
4326     echo $ac_n "checking for file""... $ac_c" 1>&6
4327 echo "configure:4328: checking for file" >&5
4328 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4329   echo $ac_n "(cached) $ac_c" 1>&6
4330 else
4331   case $MAGIC_CMD in
4332   /*)
4333   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4334   ;;
4335   ?:/*)
4336   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4337   ;;
4338   *)
4339   ac_save_MAGIC_CMD="$MAGIC_CMD"
4340   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4341   ac_dummy="/usr/bin:$PATH"
4342   for ac_dir in $ac_dummy; do
4343     test -z "$ac_dir" && ac_dir=.
4344     if test -f $ac_dir/file; then
4345       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4346       if test -n "$file_magic_test_file"; then
4347         case $deplibs_check_method in
4348         "file_magic "*)
4349           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4350           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4351           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4352             egrep "$file_magic_regex" > /dev/null; then
4353             :
4354           else
4355             cat <<EOF 1>&2
4356
4357 *** Warning: the command libtool uses to detect shared libraries,
4358 *** $file_magic_cmd, produces output that libtool cannot recognize.
4359 *** The result is that libtool may fail to recognize shared libraries
4360 *** as such.  This will affect the creation of libtool libraries that
4361 *** depend on shared libraries, but programs linked with such libtool
4362 *** libraries will work regardless of this problem.  Nevertheless, you
4363 *** may want to report the problem to your system manager and/or to
4364 *** bug-libtool@gnu.org
4365
4366 EOF
4367           fi ;;
4368         esac
4369       fi
4370       break
4371     fi
4372   done
4373   IFS="$ac_save_ifs"
4374   MAGIC_CMD="$ac_save_MAGIC_CMD"
4375   ;;
4376 esac
4377 fi
4378
4379 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4380 if test -n "$MAGIC_CMD"; then
4381   echo "$ac_t""$MAGIC_CMD" 1>&6
4382 else
4383   echo "$ac_t""no" 1>&6
4384 fi
4385
4386   else
4387     MAGIC_CMD=:
4388   fi
4389 fi
4390
4391   fi
4392   ;;
4393 esac
4394
4395 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4396 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4397 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4398 echo "configure:4399: checking for $ac_word" >&5
4399 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4400   echo $ac_n "(cached) $ac_c" 1>&6
4401 else
4402   if test -n "$RANLIB"; then
4403   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4404 else
4405   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4406   ac_dummy="$PATH"
4407   for ac_dir in $ac_dummy; do
4408     test -z "$ac_dir" && ac_dir=.
4409     if test -f $ac_dir/$ac_word; then
4410       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4411       break
4412     fi
4413   done
4414   IFS="$ac_save_ifs"
4415 fi
4416 fi
4417 RANLIB="$ac_cv_prog_RANLIB"
4418 if test -n "$RANLIB"; then
4419   echo "$ac_t""$RANLIB" 1>&6
4420 else
4421   echo "$ac_t""no" 1>&6
4422 fi
4423
4424
4425 if test -z "$ac_cv_prog_RANLIB"; then
4426 if test -n "$ac_tool_prefix"; then
4427   # Extract the first word of "ranlib", so it can be a program name with args.
4428 set dummy ranlib; ac_word=$2
4429 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4430 echo "configure:4431: checking for $ac_word" >&5
4431 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4432   echo $ac_n "(cached) $ac_c" 1>&6
4433 else
4434   if test -n "$RANLIB"; then
4435   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4436 else
4437   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4438   ac_dummy="$PATH"
4439   for ac_dir in $ac_dummy; do
4440     test -z "$ac_dir" && ac_dir=.
4441     if test -f $ac_dir/$ac_word; then
4442       ac_cv_prog_RANLIB="ranlib"
4443       break
4444     fi
4445   done
4446   IFS="$ac_save_ifs"
4447   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4448 fi
4449 fi
4450 RANLIB="$ac_cv_prog_RANLIB"
4451 if test -n "$RANLIB"; then
4452   echo "$ac_t""$RANLIB" 1>&6
4453 else
4454   echo "$ac_t""no" 1>&6
4455 fi
4456
4457 else
4458   RANLIB=":"
4459 fi
4460 fi
4461
4462 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4463 set dummy ${ac_tool_prefix}strip; ac_word=$2
4464 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4465 echo "configure:4466: checking for $ac_word" >&5
4466 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4467   echo $ac_n "(cached) $ac_c" 1>&6
4468 else
4469   if test -n "$STRIP"; then
4470   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4471 else
4472   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4473   ac_dummy="$PATH"
4474   for ac_dir in $ac_dummy; do
4475     test -z "$ac_dir" && ac_dir=.
4476     if test -f $ac_dir/$ac_word; then
4477       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4478       break
4479     fi
4480   done
4481   IFS="$ac_save_ifs"
4482 fi
4483 fi
4484 STRIP="$ac_cv_prog_STRIP"
4485 if test -n "$STRIP"; then
4486   echo "$ac_t""$STRIP" 1>&6
4487 else
4488   echo "$ac_t""no" 1>&6
4489 fi
4490
4491
4492 if test -z "$ac_cv_prog_STRIP"; then
4493 if test -n "$ac_tool_prefix"; then
4494   # Extract the first word of "strip", so it can be a program name with args.
4495 set dummy strip; ac_word=$2
4496 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4497 echo "configure:4498: checking for $ac_word" >&5
4498 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4499   echo $ac_n "(cached) $ac_c" 1>&6
4500 else
4501   if test -n "$STRIP"; then
4502   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4503 else
4504   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4505   ac_dummy="$PATH"
4506   for ac_dir in $ac_dummy; do
4507     test -z "$ac_dir" && ac_dir=.
4508     if test -f $ac_dir/$ac_word; then
4509       ac_cv_prog_STRIP="strip"
4510       break
4511     fi
4512   done
4513   IFS="$ac_save_ifs"
4514   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4515 fi
4516 fi
4517 STRIP="$ac_cv_prog_STRIP"
4518 if test -n "$STRIP"; then
4519   echo "$ac_t""$STRIP" 1>&6
4520 else
4521   echo "$ac_t""no" 1>&6
4522 fi
4523
4524 else
4525   STRIP=":"
4526 fi
4527 fi
4528
4529
4530 enable_dlopen=yes
4531 enable_win32_dll=yes
4532
4533 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4534 if test "${enable_libtool_lock+set}" = set; then
4535   enableval="$enable_libtool_lock"
4536   :
4537 fi
4538
4539 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4540
4541 # Some flags need to be propagated to the compiler or linker for good
4542 # libtool support.
4543 case $host in
4544 *-*-irix6*)
4545   # Find out which ABI we are using.
4546   echo '#line 4547 "configure"' > conftest.$ac_ext
4547   if { (eval echo configure:4548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4548     case `/usr/bin/file conftest.$ac_objext` in
4549     *32-bit*)
4550       LD="${LD-ld} -32"
4551       ;;
4552     *N32*)
4553       LD="${LD-ld} -n32"
4554       ;;
4555     *64-bit*)
4556       LD="${LD-ld} -64"
4557       ;;
4558     esac
4559   fi
4560   rm -rf conftest*
4561   ;;
4562
4563 *-*-sco3.2v5*)
4564   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4565   SAVE_CFLAGS="$CFLAGS"
4566   CFLAGS="$CFLAGS -belf"
4567   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4568 echo "configure:4569: checking whether the C compiler needs -belf" >&5
4569 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4570   echo $ac_n "(cached) $ac_c" 1>&6
4571 else
4572   
4573      ac_ext=c
4574 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4575 ac_cpp='$CPP $CPPFLAGS'
4576 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4577 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4578 cross_compiling=$ac_cv_prog_cc_cross
4579
4580      cat > conftest.$ac_ext <<EOF
4581 #line 4582 "configure"
4582 #include "confdefs.h"
4583
4584 int main() {
4585
4586 ; return 0; }
4587 EOF
4588 if { (eval echo configure:4589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4589   rm -rf conftest*
4590   lt_cv_cc_needs_belf=yes
4591 else
4592   echo "configure: failed program was:" >&5
4593   cat conftest.$ac_ext >&5
4594   rm -rf conftest*
4595   lt_cv_cc_needs_belf=no
4596 fi
4597 rm -f conftest*
4598      ac_ext=c
4599 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4600 ac_cpp='$CPP $CPPFLAGS'
4601 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4602 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4603 cross_compiling=$ac_cv_prog_cc_cross
4604
4605 fi
4606
4607 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4608   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4609     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4610     CFLAGS="$SAVE_CFLAGS"
4611   fi
4612   ;;
4613
4614 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4615   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4616 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4617 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4618 echo "configure:4619: checking for $ac_word" >&5
4619 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4620   echo $ac_n "(cached) $ac_c" 1>&6
4621 else
4622   if test -n "$DLLTOOL"; then
4623   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4624 else
4625   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4626   ac_dummy="$PATH"
4627   for ac_dir in $ac_dummy; do
4628     test -z "$ac_dir" && ac_dir=.
4629     if test -f $ac_dir/$ac_word; then
4630       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4631       break
4632     fi
4633   done
4634   IFS="$ac_save_ifs"
4635 fi
4636 fi
4637 DLLTOOL="$ac_cv_prog_DLLTOOL"
4638 if test -n "$DLLTOOL"; then
4639   echo "$ac_t""$DLLTOOL" 1>&6
4640 else
4641   echo "$ac_t""no" 1>&6
4642 fi
4643
4644
4645 if test -z "$ac_cv_prog_DLLTOOL"; then
4646 if test -n "$ac_tool_prefix"; then
4647   # Extract the first word of "dlltool", so it can be a program name with args.
4648 set dummy dlltool; ac_word=$2
4649 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4650 echo "configure:4651: checking for $ac_word" >&5
4651 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4652   echo $ac_n "(cached) $ac_c" 1>&6
4653 else
4654   if test -n "$DLLTOOL"; then
4655   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4656 else
4657   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4658   ac_dummy="$PATH"
4659   for ac_dir in $ac_dummy; do
4660     test -z "$ac_dir" && ac_dir=.
4661     if test -f $ac_dir/$ac_word; then
4662       ac_cv_prog_DLLTOOL="dlltool"
4663       break
4664     fi
4665   done
4666   IFS="$ac_save_ifs"
4667   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4668 fi
4669 fi
4670 DLLTOOL="$ac_cv_prog_DLLTOOL"
4671 if test -n "$DLLTOOL"; then
4672   echo "$ac_t""$DLLTOOL" 1>&6
4673 else
4674   echo "$ac_t""no" 1>&6
4675 fi
4676
4677 else
4678   DLLTOOL="false"
4679 fi
4680 fi
4681
4682   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4683 set dummy ${ac_tool_prefix}as; ac_word=$2
4684 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4685 echo "configure:4686: checking for $ac_word" >&5
4686 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4687   echo $ac_n "(cached) $ac_c" 1>&6
4688 else
4689   if test -n "$AS"; then
4690   ac_cv_prog_AS="$AS" # Let the user override the test.
4691 else
4692   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4693   ac_dummy="$PATH"
4694   for ac_dir in $ac_dummy; do
4695     test -z "$ac_dir" && ac_dir=.
4696     if test -f $ac_dir/$ac_word; then
4697       ac_cv_prog_AS="${ac_tool_prefix}as"
4698       break
4699     fi
4700   done
4701   IFS="$ac_save_ifs"
4702 fi
4703 fi
4704 AS="$ac_cv_prog_AS"
4705 if test -n "$AS"; then
4706   echo "$ac_t""$AS" 1>&6
4707 else
4708   echo "$ac_t""no" 1>&6
4709 fi
4710
4711
4712 if test -z "$ac_cv_prog_AS"; then
4713 if test -n "$ac_tool_prefix"; then
4714   # Extract the first word of "as", so it can be a program name with args.
4715 set dummy as; ac_word=$2
4716 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4717 echo "configure:4718: checking for $ac_word" >&5
4718 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4719   echo $ac_n "(cached) $ac_c" 1>&6
4720 else
4721   if test -n "$AS"; then
4722   ac_cv_prog_AS="$AS" # Let the user override the test.
4723 else
4724   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4725   ac_dummy="$PATH"
4726   for ac_dir in $ac_dummy; do
4727     test -z "$ac_dir" && ac_dir=.
4728     if test -f $ac_dir/$ac_word; then
4729       ac_cv_prog_AS="as"
4730       break
4731     fi
4732   done
4733   IFS="$ac_save_ifs"
4734   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4735 fi
4736 fi
4737 AS="$ac_cv_prog_AS"
4738 if test -n "$AS"; then
4739   echo "$ac_t""$AS" 1>&6
4740 else
4741   echo "$ac_t""no" 1>&6
4742 fi
4743
4744 else
4745   AS="false"
4746 fi
4747 fi
4748
4749   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4750 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4751 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4752 echo "configure:4753: checking for $ac_word" >&5
4753 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4754   echo $ac_n "(cached) $ac_c" 1>&6
4755 else
4756   if test -n "$OBJDUMP"; then
4757   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4758 else
4759   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4760   ac_dummy="$PATH"
4761   for ac_dir in $ac_dummy; do
4762     test -z "$ac_dir" && ac_dir=.
4763     if test -f $ac_dir/$ac_word; then
4764       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4765       break
4766     fi
4767   done
4768   IFS="$ac_save_ifs"
4769 fi
4770 fi
4771 OBJDUMP="$ac_cv_prog_OBJDUMP"
4772 if test -n "$OBJDUMP"; then
4773   echo "$ac_t""$OBJDUMP" 1>&6
4774 else
4775   echo "$ac_t""no" 1>&6
4776 fi
4777
4778
4779 if test -z "$ac_cv_prog_OBJDUMP"; then
4780 if test -n "$ac_tool_prefix"; then
4781   # Extract the first word of "objdump", so it can be a program name with args.
4782 set dummy objdump; ac_word=$2
4783 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4784 echo "configure:4785: checking for $ac_word" >&5
4785 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4786   echo $ac_n "(cached) $ac_c" 1>&6
4787 else
4788   if test -n "$OBJDUMP"; then
4789   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4790 else
4791   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4792   ac_dummy="$PATH"
4793   for ac_dir in $ac_dummy; do
4794     test -z "$ac_dir" && ac_dir=.
4795     if test -f $ac_dir/$ac_word; then
4796       ac_cv_prog_OBJDUMP="objdump"
4797       break
4798     fi
4799   done
4800   IFS="$ac_save_ifs"
4801   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4802 fi
4803 fi
4804 OBJDUMP="$ac_cv_prog_OBJDUMP"
4805 if test -n "$OBJDUMP"; then
4806   echo "$ac_t""$OBJDUMP" 1>&6
4807 else
4808   echo "$ac_t""no" 1>&6
4809 fi
4810
4811 else
4812   OBJDUMP="false"
4813 fi
4814 fi
4815
4816
4817   # recent cygwin and mingw systems supply a stub DllMain which the user
4818   # can override, but on older systems we have to supply one
4819   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4820 echo "configure:4821: checking if libtool should supply DllMain function" >&5
4821 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4822   echo $ac_n "(cached) $ac_c" 1>&6
4823 else
4824   cat > conftest.$ac_ext <<EOF
4825 #line 4826 "configure"
4826 #include "confdefs.h"
4827
4828 int main() {
4829 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4830       DllMain (0, 0, 0);
4831 ; return 0; }
4832 EOF
4833 if { (eval echo configure:4834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4834   rm -rf conftest*
4835   lt_cv_need_dllmain=no
4836 else
4837   echo "configure: failed program was:" >&5
4838   cat conftest.$ac_ext >&5
4839   rm -rf conftest*
4840   lt_cv_need_dllmain=yes
4841 fi
4842 rm -f conftest*
4843 fi
4844
4845 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4846
4847   case $host/$CC in
4848   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4849     # old mingw systems require "-dll" to link a DLL, while more recent ones
4850     # require "-mdll"
4851     SAVE_CFLAGS="$CFLAGS"
4852     CFLAGS="$CFLAGS -mdll"
4853     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4854 echo "configure:4855: checking how to link DLLs" >&5
4855 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4856   echo $ac_n "(cached) $ac_c" 1>&6
4857 else
4858   cat > conftest.$ac_ext <<EOF
4859 #line 4860 "configure"
4860 #include "confdefs.h"
4861
4862 int main() {
4863
4864 ; return 0; }
4865 EOF
4866 if { (eval echo configure:4867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4867   rm -rf conftest*
4868   lt_cv_cc_dll_switch=-mdll
4869 else
4870   echo "configure: failed program was:" >&5
4871   cat conftest.$ac_ext >&5
4872   rm -rf conftest*
4873   lt_cv_cc_dll_switch=-dll
4874 fi
4875 rm -f conftest*
4876 fi
4877
4878 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4879     CFLAGS="$SAVE_CFLAGS" ;;
4880   *-*-cygwin* | *-*-pw32*)
4881     # cygwin systems need to pass --dll to the linker, and not link
4882     # crt.o which will require a WinMain@16 definition.
4883     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4884   esac
4885   ;;
4886   
4887 esac
4888
4889 # Sed substitution that helps us do robust quoting.  It backslashifies
4890 # metacharacters that are still active within double-quoted strings.
4891 Xsed='sed -e s/^X//'
4892 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4893
4894 # Same as above, but do not quote variable references.
4895 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4896
4897 # Sed substitution to delay expansion of an escaped shell variable in a
4898 # double_quote_subst'ed string.
4899 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4900
4901 # Constants:
4902 rm="rm -f"
4903
4904 # Global variables:
4905 default_ofile=libtool
4906 can_build_shared=yes
4907
4908 # All known linkers require a `.a' archive for static linking (except M$VC,
4909 # which needs '.lib').
4910 libext=a
4911 ltmain="$ac_aux_dir/ltmain.sh"
4912 ofile="$default_ofile"
4913 with_gnu_ld="$lt_cv_prog_gnu_ld"
4914 need_locks="$enable_libtool_lock"
4915
4916 old_CC="$CC"
4917 old_CFLAGS="$CFLAGS"
4918
4919 # Set sane defaults for various variables
4920 test -z "$AR" && AR=ar
4921 test -z "$AR_FLAGS" && AR_FLAGS=cru
4922 test -z "$AS" && AS=as
4923 test -z "$CC" && CC=cc
4924 test -z "$DLLTOOL" && DLLTOOL=dlltool
4925 test -z "$LD" && LD=ld
4926 test -z "$LN_S" && LN_S="ln -s"
4927 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4928 test -z "$NM" && NM=nm
4929 test -z "$OBJDUMP" && OBJDUMP=objdump
4930 test -z "$RANLIB" && RANLIB=:
4931 test -z "$STRIP" && STRIP=:
4932 test -z "$ac_objext" && ac_objext=o
4933
4934 if test x"$host" != x"$build"; then
4935   ac_tool_prefix=${host_alias}-
4936 else
4937   ac_tool_prefix=
4938 fi
4939
4940 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4941 case $host_os in
4942 linux-gnu*) ;;
4943 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4944 esac
4945
4946 case $host_os in
4947 aix3*)
4948   # AIX sometimes has problems with the GCC collect2 program.  For some
4949   # reason, if we set the COLLECT_NAMES environment variable, the problems
4950   # vanish in a puff of smoke.
4951   if test "X${COLLECT_NAMES+set}" != Xset; then
4952     COLLECT_NAMES=
4953     export COLLECT_NAMES
4954   fi
4955   ;;
4956 esac
4957
4958 # Determine commands to create old-style static archives.
4959 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4960 old_postinstall_cmds='chmod 644 $oldlib'
4961 old_postuninstall_cmds=
4962
4963 if test -n "$RANLIB"; then
4964   case $host_os in
4965   openbsd*)
4966     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4967     ;;
4968   *)
4969     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4970     ;;
4971   esac
4972   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4973 fi
4974
4975 # Allow CC to be a program name with arguments.
4976 set dummy $CC
4977 compiler="$2"
4978
4979 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4980 echo "configure:4981: checking for objdir" >&5
4981 rm -f .libs 2>/dev/null
4982 mkdir .libs 2>/dev/null
4983 if test -d .libs; then
4984   objdir=.libs
4985 else
4986   # MS-DOS does not allow filenames that begin with a dot.
4987   objdir=_libs
4988 fi
4989 rmdir .libs 2>/dev/null
4990 echo "$ac_t""$objdir" 1>&6
4991
4992
4993 # Check whether --with-pic or --without-pic was given.
4994 if test "${with_pic+set}" = set; then
4995   withval="$with_pic"
4996   pic_mode="$withval"
4997 else
4998   pic_mode=default
4999 fi
5000
5001 test -z "$pic_mode" && pic_mode=default
5002
5003 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5004 # in isolation, and that seeing it set (from the cache) indicates that
5005 # the associated values are set (in the cache) correctly too.
5006 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5007 echo "configure:5008: checking for $compiler option to produce PIC" >&5
5008 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5009   echo $ac_n "(cached) $ac_c" 1>&6
5010 else
5011    lt_cv_prog_cc_pic=
5012   lt_cv_prog_cc_shlib=
5013   lt_cv_prog_cc_wl=
5014   lt_cv_prog_cc_static=
5015   lt_cv_prog_cc_no_builtin=
5016   lt_cv_prog_cc_can_build_shared=$can_build_shared
5017
5018   if test "$GCC" = yes; then
5019     lt_cv_prog_cc_wl='-Wl,'
5020     lt_cv_prog_cc_static='-static'
5021
5022     case $host_os in
5023     aix*)
5024       # Below there is a dirty hack to force normal static linking with -ldl
5025       # The problem is because libdl dynamically linked with both libc and
5026       # libC (AIX C++ library), which obviously doesn't included in libraries
5027       # list by gcc. This cause undefined symbols with -static flags.
5028       # This hack allows C programs to be linked with "-static -ldl", but
5029       # not sure about C++ programs.
5030       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5031       ;;
5032     amigaos*)
5033       # FIXME: we need at least 68020 code to build shared libraries, but
5034       # adding the `-m68020' flag to GCC prevents building anything better,
5035       # like `-m68040'.
5036       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5037       ;;
5038     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5039       # PIC is the default for these OSes.
5040       ;;
5041     darwin* | rhapsody*)
5042       # PIC is the default on this platform
5043       # Common symbols not allowed in MH_DYLIB files
5044       lt_cv_prog_cc_pic='-fno-common'
5045       ;;
5046     cygwin* | mingw* | pw32* | os2*)
5047       # This hack is so that the source file can tell whether it is being
5048       # built for inclusion in a dll (and should export symbols for example).
5049       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5050       ;;
5051     sysv4*MP*)
5052       if test -d /usr/nec; then
5053          lt_cv_prog_cc_pic=-Kconform_pic
5054       fi
5055       ;;
5056     *)
5057       lt_cv_prog_cc_pic='-fPIC'
5058       ;;
5059     esac
5060   else
5061     # PORTME Check for PIC flags for the system compiler.
5062     case $host_os in
5063     aix3* | aix4* | aix5*)
5064       lt_cv_prog_cc_wl='-Wl,'
5065       # All AIX code is PIC.
5066       if test "$host_cpu" = ia64; then
5067         # AIX 5 now supports IA64 processor
5068         lt_cv_prog_cc_static='-Bstatic'
5069       else
5070         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5071       fi
5072       ;;
5073
5074     hpux9* | hpux10* | hpux11*)
5075       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5076       lt_cv_prog_cc_wl='-Wl,'
5077       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5078       lt_cv_prog_cc_pic='+Z'
5079       ;;
5080
5081     irix5* | irix6* | nonstopux*)
5082       lt_cv_prog_cc_wl='-Wl,'
5083       lt_cv_prog_cc_static='-non_shared'
5084       # PIC (with -KPIC) is the default.
5085       ;;
5086
5087     cygwin* | mingw* | pw32* | os2*)
5088       # This hack is so that the source file can tell whether it is being
5089       # built for inclusion in a dll (and should export symbols for example).
5090       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5091       ;;
5092
5093     newsos6)
5094       lt_cv_prog_cc_pic='-KPIC'
5095       lt_cv_prog_cc_static='-Bstatic'
5096       ;;
5097
5098     osf3* | osf4* | osf5*)
5099       # All OSF/1 code is PIC.
5100       lt_cv_prog_cc_wl='-Wl,'
5101       lt_cv_prog_cc_static='-non_shared'
5102       ;;
5103
5104     sco3.2v5*)
5105       lt_cv_prog_cc_pic='-Kpic'
5106       lt_cv_prog_cc_static='-dn'
5107       lt_cv_prog_cc_shlib='-belf'
5108       ;;
5109
5110     solaris*)
5111       lt_cv_prog_cc_pic='-KPIC'
5112       lt_cv_prog_cc_static='-Bstatic'
5113       lt_cv_prog_cc_wl='-Wl,'
5114       ;;
5115
5116     sunos4*)
5117       lt_cv_prog_cc_pic='-PIC'
5118       lt_cv_prog_cc_static='-Bstatic'
5119       lt_cv_prog_cc_wl='-Qoption ld '
5120       ;;
5121
5122     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5123       lt_cv_prog_cc_pic='-KPIC'
5124       lt_cv_prog_cc_static='-Bstatic'
5125       lt_cv_prog_cc_wl='-Wl,'
5126       ;;
5127
5128     uts4*)
5129       lt_cv_prog_cc_pic='-pic'
5130       lt_cv_prog_cc_static='-Bstatic'
5131       ;;
5132
5133     sysv4*MP*)
5134       if test -d /usr/nec ;then
5135         lt_cv_prog_cc_pic='-Kconform_pic'
5136         lt_cv_prog_cc_static='-Bstatic'
5137       fi
5138       ;;
5139
5140     *)
5141       lt_cv_prog_cc_can_build_shared=no
5142       ;;
5143     esac
5144   fi
5145
5146 fi
5147
5148 if test -z "$lt_cv_prog_cc_pic"; then
5149   echo "$ac_t""none" 1>&6
5150 else
5151   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5152
5153   # Check to make sure the pic_flag actually works.
5154   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5155 echo "configure:5156: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5156   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5157   echo $ac_n "(cached) $ac_c" 1>&6
5158 else
5159       save_CFLAGS="$CFLAGS"
5160     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5161     cat > conftest.$ac_ext <<EOF
5162 #line 5163 "configure"
5163 #include "confdefs.h"
5164
5165 int main() {
5166
5167 ; return 0; }
5168 EOF
5169 if { (eval echo configure:5170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5170   rm -rf conftest*
5171         case $host_os in
5172       hpux9* | hpux10* | hpux11*)
5173         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5174         # they create non-PIC objects.  So, if there were any warnings, we
5175         # assume that PIC is not supported.
5176         if test -s conftest.err; then
5177           lt_cv_prog_cc_pic_works=no
5178         else
5179           lt_cv_prog_cc_pic_works=yes
5180         fi
5181         ;;
5182       *)
5183         lt_cv_prog_cc_pic_works=yes
5184         ;;
5185       esac
5186     
5187 else
5188   echo "configure: failed program was:" >&5
5189   cat conftest.$ac_ext >&5
5190   rm -rf conftest*
5191         lt_cv_prog_cc_pic_works=no
5192     
5193 fi
5194 rm -f conftest*
5195     CFLAGS="$save_CFLAGS"
5196   
5197 fi
5198
5199
5200   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5201     lt_cv_prog_cc_pic=
5202     lt_cv_prog_cc_can_build_shared=no
5203   else
5204     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5205   fi
5206
5207   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5208 fi
5209
5210 # Check for any special shared library compilation flags.
5211 if test -n "$lt_cv_prog_cc_shlib"; then
5212   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5213   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5214   else
5215    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5216     lt_cv_prog_cc_can_build_shared=no
5217   fi
5218 fi
5219
5220 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5221 echo "configure:5222: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5222 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5223   echo $ac_n "(cached) $ac_c" 1>&6
5224 else
5225     lt_cv_prog_cc_static_works=no
5226   save_LDFLAGS="$LDFLAGS"
5227   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5228   cat > conftest.$ac_ext <<EOF
5229 #line 5230 "configure"
5230 #include "confdefs.h"
5231
5232 int main() {
5233
5234 ; return 0; }
5235 EOF
5236 if { (eval echo configure:5237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5237   rm -rf conftest*
5238   lt_cv_prog_cc_static_works=yes
5239 else
5240   echo "configure: failed program was:" >&5
5241   cat conftest.$ac_ext >&5
5242 fi
5243 rm -f conftest*
5244   LDFLAGS="$save_LDFLAGS"
5245
5246 fi
5247
5248
5249 # Belt *and* braces to stop my trousers falling down:
5250 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5251 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5252
5253 pic_flag="$lt_cv_prog_cc_pic"
5254 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5255 wl="$lt_cv_prog_cc_wl"
5256 link_static_flag="$lt_cv_prog_cc_static"
5257 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5258 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5259
5260
5261 # Check to see if options -o and -c are simultaneously supported by compiler
5262 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5263 echo "configure:5264: checking if $compiler supports -c -o file.$ac_objext" >&5
5264 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5265   echo $ac_n "(cached) $ac_c" 1>&6
5266 else
5267   
5268 $rm -r conftest 2>/dev/null
5269 mkdir conftest
5270 cd conftest
5271 echo "int some_variable = 0;" > conftest.$ac_ext
5272 mkdir out
5273 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5274 # that will create temporary files in the current directory regardless of
5275 # the output directory.  Thus, making CWD read-only will cause this test
5276 # to fail, enabling locking or at least warning the user not to do parallel
5277 # builds.
5278 chmod -w .
5279 save_CFLAGS="$CFLAGS"
5280 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5281 compiler_c_o=no
5282 if { (eval echo configure:5283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5283   # The compiler can only warn and ignore the option if not recognized
5284   # So say no if there are warnings
5285   if test -s out/conftest.err; then
5286     lt_cv_compiler_c_o=no
5287   else
5288     lt_cv_compiler_c_o=yes
5289   fi
5290 else
5291   # Append any errors to the config.log.
5292   cat out/conftest.err 1>&5
5293   lt_cv_compiler_c_o=no
5294 fi
5295 CFLAGS="$save_CFLAGS"
5296 chmod u+w .
5297 $rm conftest* out/*
5298 rmdir out
5299 cd ..
5300 rmdir conftest
5301 $rm -r conftest 2>/dev/null
5302
5303 fi
5304
5305 compiler_c_o=$lt_cv_compiler_c_o
5306 echo "$ac_t""$compiler_c_o" 1>&6
5307
5308 if test x"$compiler_c_o" = x"yes"; then
5309   # Check to see if we can write to a .lo
5310   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5311 echo "configure:5312: checking if $compiler supports -c -o file.lo" >&5
5312   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5313   echo $ac_n "(cached) $ac_c" 1>&6
5314 else
5315   
5316   lt_cv_compiler_o_lo=no
5317   save_CFLAGS="$CFLAGS"
5318   CFLAGS="$CFLAGS -c -o conftest.lo"
5319   save_objext="$ac_objext"
5320   ac_objext=lo
5321   cat > conftest.$ac_ext <<EOF
5322 #line 5323 "configure"
5323 #include "confdefs.h"
5324
5325 int main() {
5326 int some_variable = 0;
5327 ; return 0; }
5328 EOF
5329 if { (eval echo configure:5330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5330   rm -rf conftest*
5331       # The compiler can only warn and ignore the option if not recognized
5332     # So say no if there are warnings
5333     if test -s conftest.err; then
5334       lt_cv_compiler_o_lo=no
5335     else
5336       lt_cv_compiler_o_lo=yes
5337     fi
5338   
5339 else
5340   echo "configure: failed program was:" >&5
5341   cat conftest.$ac_ext >&5
5342 fi
5343 rm -f conftest*
5344   ac_objext="$save_objext"
5345   CFLAGS="$save_CFLAGS"
5346   
5347 fi
5348
5349   compiler_o_lo=$lt_cv_compiler_o_lo
5350   echo "$ac_t""$compiler_o_lo" 1>&6
5351 else
5352   compiler_o_lo=no
5353 fi
5354
5355 # Check to see if we can do hard links to lock some files if needed
5356 hard_links="nottested"
5357 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5358   # do not overwrite the value of need_locks provided by the user
5359   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5360 echo "configure:5361: checking if we can lock with hard links" >&5
5361   hard_links=yes
5362   $rm conftest*
5363   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5364   touch conftest.a
5365   ln conftest.a conftest.b 2>&5 || hard_links=no
5366   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5367   echo "$ac_t""$hard_links" 1>&6
5368   if test "$hard_links" = no; then
5369     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5370     need_locks=warn
5371   fi
5372 else
5373   need_locks=no
5374 fi
5375
5376 if test "$GCC" = yes; then
5377   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5378   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5379 echo "configure:5380: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5380   echo "int some_variable = 0;" > conftest.$ac_ext
5381   save_CFLAGS="$CFLAGS"
5382   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5383   compiler_rtti_exceptions=no
5384   cat > conftest.$ac_ext <<EOF
5385 #line 5386 "configure"
5386 #include "confdefs.h"
5387
5388 int main() {
5389 int some_variable = 0;
5390 ; return 0; }
5391 EOF
5392 if { (eval echo configure:5393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5393   rm -rf conftest*
5394       # The compiler can only warn and ignore the option if not recognized
5395     # So say no if there are warnings
5396     if test -s conftest.err; then
5397       compiler_rtti_exceptions=no
5398     else
5399       compiler_rtti_exceptions=yes
5400     fi
5401   
5402 else
5403   echo "configure: failed program was:" >&5
5404   cat conftest.$ac_ext >&5
5405 fi
5406 rm -f conftest*
5407   CFLAGS="$save_CFLAGS"
5408   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5409
5410   if test "$compiler_rtti_exceptions" = "yes"; then
5411     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5412   else
5413     no_builtin_flag=' -fno-builtin'
5414   fi
5415 fi
5416
5417 # See if the linker supports building shared libraries.
5418 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5419 echo "configure:5420: checking whether the linker ($LD) supports shared libraries" >&5
5420
5421 allow_undefined_flag=
5422 no_undefined_flag=
5423 need_lib_prefix=unknown
5424 need_version=unknown
5425 # when you set need_version to no, make sure it does not cause -set_version
5426 # flags to be left without arguments
5427 archive_cmds=
5428 archive_expsym_cmds=
5429 old_archive_from_new_cmds=
5430 old_archive_from_expsyms_cmds=
5431 export_dynamic_flag_spec=
5432 whole_archive_flag_spec=
5433 thread_safe_flag_spec=
5434 hardcode_into_libs=no
5435 hardcode_libdir_flag_spec=
5436 hardcode_libdir_separator=
5437 hardcode_direct=no
5438 hardcode_minus_L=no
5439 hardcode_shlibpath_var=unsupported
5440 runpath_var=
5441 link_all_deplibs=unknown
5442 always_export_symbols=no
5443 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5444 # include_expsyms should be a list of space-separated symbols to be *always*
5445 # included in the symbol list
5446 include_expsyms=
5447 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5448 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5449 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5450 # as well as any symbol that contains `d'.
5451 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5452 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5453 # platforms (ab)use it in PIC code, but their linkers get confused if
5454 # the symbol is explicitly referenced.  Since portable code cannot
5455 # rely on this symbol name, it's probably fine to never include it in
5456 # preloaded symbol tables.
5457 extract_expsyms_cmds=
5458
5459 case $host_os in
5460 cygwin* | mingw* | pw32*)
5461   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5462   # When not using gcc, we currently assume that we are using
5463   # Microsoft Visual C++.
5464   if test "$GCC" != yes; then
5465     with_gnu_ld=no
5466   fi
5467   ;;
5468 openbsd*)
5469   with_gnu_ld=no
5470   ;;
5471 esac
5472
5473 ld_shlibs=yes
5474 if test "$with_gnu_ld" = yes; then
5475   # If archive_cmds runs LD, not CC, wlarc should be empty
5476   wlarc='${wl}'
5477
5478   # See if GNU ld supports shared libraries.
5479   case $host_os in
5480   aix3* | aix4* | aix5*)
5481     # On AIX, the GNU linker is very broken
5482     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5483     ld_shlibs=no
5484     cat <<EOF 1>&2
5485
5486 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5487 *** to be unable to reliably create shared libraries on AIX.
5488 *** Therefore, libtool is disabling shared libraries support.  If you
5489 *** really care for shared libraries, you may want to modify your PATH
5490 *** so that a non-GNU linker is found, and then restart.
5491
5492 EOF
5493     ;;
5494
5495   amigaos*)
5496     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)'
5497     hardcode_libdir_flag_spec='-L$libdir'
5498     hardcode_minus_L=yes
5499
5500     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5501     # that the semantics of dynamic libraries on AmigaOS, at least up
5502     # to version 4, is to share data among multiple programs linked
5503     # with the same dynamic library.  Since this doesn't match the
5504     # behavior of shared libraries on other platforms, we can use
5505     # them.
5506     ld_shlibs=no
5507     ;;
5508
5509   beos*)
5510     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5511       allow_undefined_flag=unsupported
5512       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5513       # support --undefined.  This deserves some investigation.  FIXME
5514       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5515     else
5516       ld_shlibs=no
5517     fi
5518     ;;
5519
5520   cygwin* | mingw* | pw32*)
5521     # hardcode_libdir_flag_spec is actually meaningless, as there is
5522     # no search path for DLLs.
5523     hardcode_libdir_flag_spec='-L$libdir'
5524     allow_undefined_flag=unsupported
5525     always_export_symbols=yes
5526
5527     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5528       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5529       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5530       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5531       else $CC -o impgen impgen.c ; fi)~
5532       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5533
5534     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5535
5536     # cygwin and mingw dlls have different entry points and sets of symbols
5537     # to exclude.
5538     # FIXME: what about values for MSVC?
5539     dll_entry=__cygwin_dll_entry@12
5540     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5541     case $host_os in
5542     mingw*)
5543       # mingw values
5544       dll_entry=_DllMainCRTStartup@12
5545       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5546       ;;
5547     esac
5548
5549     # mingw and cygwin differ, and it's simplest to just exclude the union
5550     # of the two symbol sets.
5551     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5552
5553     # recent cygwin and mingw systems supply a stub DllMain which the user
5554     # can override, but on older systems we have to supply one (in ltdll.c)
5555     if test "x$lt_cv_need_dllmain" = "xyes"; then
5556       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5557       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~
5558         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5559     else
5560       ltdll_obj=
5561       ltdll_cmds=
5562     fi
5563
5564     # Extract the symbol export list from an `--export-all' def file,
5565     # then regenerate the def file from the symbol export list, so that
5566     # the compiled dll only exports the symbol export list.
5567     # Be careful not to strip the DATA tag left be newer dlltools.
5568     export_symbols_cmds="$ltdll_cmds"'
5569       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5570       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5571
5572     # If the export-symbols file already is a .def file (1st line
5573     # is EXPORTS), use it as is.
5574     # If DATA tags from a recent dlltool are present, honour them!
5575     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5576         cp $export_symbols $output_objdir/$soname-def;
5577       else
5578         echo EXPORTS > $output_objdir/$soname-def;
5579         _lt_hint=1;
5580         cat $export_symbols | while read symbol; do
5581          set dummy \$symbol;
5582          case \$# in
5583            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5584            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5585            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5586          esac;
5587          _lt_hint=`expr 1 + \$_lt_hint`;
5588         done;
5589       fi~
5590       '"$ltdll_cmds"'
5591       $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~
5592       $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~
5593       $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~
5594       $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~
5595       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5596     ;;
5597
5598   netbsd*)
5599     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5600       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5601       wlarc=
5602     else
5603       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5604       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5605     fi
5606     ;;
5607
5608   solaris* | sysv5*)
5609     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5610       ld_shlibs=no
5611       cat <<EOF 1>&2
5612
5613 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5614 *** create shared libraries on Solaris systems.  Therefore, libtool
5615 *** is disabling shared libraries support.  We urge you to upgrade GNU
5616 *** binutils to release 2.9.1 or newer.  Another option is to modify
5617 *** your PATH or compiler configuration so that the native linker is
5618 *** used, and then restart.
5619
5620 EOF
5621     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5622       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5623       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5624     else
5625       ld_shlibs=no
5626     fi
5627     ;;
5628
5629   sunos4*)
5630     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5631     wlarc=
5632     hardcode_direct=yes
5633     hardcode_shlibpath_var=no
5634     ;;
5635
5636   *)
5637     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5638       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5639       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5640     else
5641       ld_shlibs=no
5642     fi
5643     ;;
5644   esac
5645
5646   if test "$ld_shlibs" = yes; then
5647     runpath_var=LD_RUN_PATH
5648     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5649     export_dynamic_flag_spec='${wl}--export-dynamic'
5650     case $host_os in
5651     cygwin* | mingw* | pw32*)
5652       # dlltool doesn't understand --whole-archive et. al.
5653       whole_archive_flag_spec=
5654       ;;
5655     *)
5656       # ancient GNU ld didn't support --whole-archive et. al.
5657       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5658         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5659       else
5660         whole_archive_flag_spec=
5661       fi
5662       ;;
5663     esac
5664   fi
5665 else
5666   # PORTME fill in a description of your system's linker (not GNU ld)
5667   case $host_os in
5668   aix3*)
5669     allow_undefined_flag=unsupported
5670     always_export_symbols=yes
5671     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'
5672     # Note: this linker hardcodes the directories in LIBPATH if there
5673     # are no directories specified by -L.
5674     hardcode_minus_L=yes
5675     if test "$GCC" = yes && test -z "$link_static_flag"; then
5676       # Neither direct hardcoding nor static linking is supported with a
5677       # broken collect2.
5678       hardcode_direct=unsupported
5679     fi
5680     ;;
5681
5682   aix4* | aix5*)
5683     if test "$host_cpu" = ia64; then
5684       # On IA64, the linker does run time linking by default, so we don't
5685       # have to do anything special.
5686       aix_use_runtimelinking=no
5687       exp_sym_flag='-Bexport'
5688       no_entry_flag=""
5689     else
5690       aix_use_runtimelinking=no
5691
5692       # Test if we are trying to use run time linking or normal
5693       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5694       # need to do runtime linking.
5695       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5696         for ld_flag in $LDFLAGS; do
5697           case $ld_flag in
5698           *-brtl*)
5699             aix_use_runtimelinking=yes
5700             break
5701           ;;
5702           esac
5703         done
5704       esac
5705
5706       exp_sym_flag='-bexport'
5707       no_entry_flag='-bnoentry'
5708     fi
5709
5710     # When large executables or shared objects are built, AIX ld can
5711     # have problems creating the table of contents.  If linking a library
5712     # or program results in "error TOC overflow" add -mminimal-toc to
5713     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5714     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5715
5716     hardcode_direct=yes
5717     archive_cmds=''
5718     hardcode_libdir_separator=':'
5719     if test "$GCC" = yes; then
5720       case $host_os in aix4.[012]|aix4.[012].*)
5721         collect2name=`${CC} -print-prog-name=collect2`
5722         if test -f "$collect2name" && \
5723           strings "$collect2name" | grep resolve_lib_name >/dev/null
5724         then
5725           # We have reworked collect2
5726           hardcode_direct=yes
5727         else
5728           # We have old collect2
5729           hardcode_direct=unsupported
5730           # It fails to find uninstalled libraries when the uninstalled
5731           # path is not listed in the libpath.  Setting hardcode_minus_L
5732           # to unsupported forces relinking
5733           hardcode_minus_L=yes
5734           hardcode_libdir_flag_spec='-L$libdir'
5735           hardcode_libdir_separator=
5736         fi
5737       esac
5738
5739       shared_flag='-shared'
5740     else
5741       # not using gcc
5742       if test "$host_cpu" = ia64; then
5743         shared_flag='${wl}-G'
5744       else
5745         if test "$aix_use_runtimelinking" = yes; then
5746           shared_flag='${wl}-G'
5747         else
5748           shared_flag='${wl}-bM:SRE'
5749         fi
5750       fi
5751     fi
5752
5753     # It seems that -bexpall can do strange things, so it is better to
5754     # generate a list of symbols to export.
5755     always_export_symbols=yes
5756     if test "$aix_use_runtimelinking" = yes; then
5757       # Warning - without using the other runtime loading flags (-brtl),
5758       # -berok will link without error, but may produce a broken library.
5759       allow_undefined_flag='-berok'
5760       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5761       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"
5762     else
5763       if test "$host_cpu" = ia64; then
5764         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5765         allow_undefined_flag="-z nodefs"
5766         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"
5767       else
5768         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5769         # Warning - without using the other run time loading flags,
5770         # -berok will link without error, but may produce a broken library.
5771         allow_undefined_flag='${wl}-berok'
5772         # This is a bit strange, but is similar to how AIX traditionally builds
5773         # it's shared libraries.
5774         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'
5775       fi
5776     fi
5777     ;;
5778
5779   amigaos*)
5780     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)'
5781     hardcode_libdir_flag_spec='-L$libdir'
5782     hardcode_minus_L=yes
5783     # see comment about different semantics on the GNU ld section
5784     ld_shlibs=no
5785     ;;
5786
5787   cygwin* | mingw* | pw32*)
5788     # When not using gcc, we currently assume that we are using
5789     # Microsoft Visual C++.
5790     # hardcode_libdir_flag_spec is actually meaningless, as there is
5791     # no search path for DLLs.
5792     hardcode_libdir_flag_spec=' '
5793     allow_undefined_flag=unsupported
5794     # Tell ltmain to make .lib files, not .a files.
5795     libext=lib
5796     # FIXME: Setting linknames here is a bad hack.
5797     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5798     # The linker will automatically build a .lib file if we build a DLL.
5799     old_archive_from_new_cmds='true'
5800     # FIXME: Should let the user specify the lib program.
5801     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5802     fix_srcfile_path='`cygpath -w "$srcfile"`'
5803     ;;
5804
5805   darwin* | rhapsody*)
5806     case "$host_os" in
5807     rhapsody* | darwin1.[012])
5808       allow_undefined_flag='-undefined suppress'
5809       ;;
5810     *) # Darwin 1.3 on
5811       allow_undefined_flag='-flat_namespace -undefined suppress'
5812       ;;
5813     esac
5814     # FIXME: Relying on posixy $() will cause problems for
5815     #        cross-compilation, but unfortunately the echo tests do not
5816     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5817     #        `"' quotes if we put them in here... so don't!
5818     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)'
5819     # We need to add '_' to the symbols in $export_symbols first
5820     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5821     hardcode_direct=yes
5822     hardcode_shlibpath_var=no
5823     whole_archive_flag_spec='-all_load $convenience'
5824     ;;
5825
5826   freebsd1*)
5827     ld_shlibs=no
5828     ;;
5829
5830   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5831   # support.  Future versions do this automatically, but an explicit c++rt0.o
5832   # does not break anything, and helps significantly (at the cost of a little
5833   # extra space).
5834   freebsd2.2*)
5835     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5836     hardcode_libdir_flag_spec='-R$libdir'
5837     hardcode_direct=yes
5838     hardcode_shlibpath_var=no
5839     ;;
5840
5841   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5842   freebsd2*)
5843     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5844     hardcode_direct=yes
5845     hardcode_minus_L=yes
5846     hardcode_shlibpath_var=no
5847     ;;
5848
5849   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5850   freebsd*)
5851     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5852     hardcode_libdir_flag_spec='-R$libdir'
5853     hardcode_direct=yes
5854     hardcode_shlibpath_var=no
5855     ;;
5856
5857   hpux9* | hpux10* | hpux11*)
5858     case $host_os in
5859     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' ;;
5860     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5861     esac
5862     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5863     hardcode_libdir_separator=:
5864     hardcode_direct=yes
5865     hardcode_minus_L=yes # Not in the search PATH, but as the default
5866                          # location of the library.
5867     export_dynamic_flag_spec='${wl}-E'
5868     ;;
5869
5870   irix5* | irix6* | nonstopux*)
5871     if test "$GCC" = yes; then
5872       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'
5873       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5874     else
5875       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'
5876       hardcode_libdir_flag_spec='-rpath $libdir'
5877     fi
5878     hardcode_libdir_separator=:
5879     link_all_deplibs=yes
5880     ;;
5881
5882   netbsd*)
5883     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5884       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5885     else
5886       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5887     fi
5888     hardcode_libdir_flag_spec='-R$libdir'
5889     hardcode_direct=yes
5890     hardcode_shlibpath_var=no
5891     ;;
5892
5893   newsos6)
5894     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5895     hardcode_direct=yes
5896     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5897     hardcode_libdir_separator=:
5898     hardcode_shlibpath_var=no
5899     ;;
5900
5901   openbsd*)
5902     hardcode_direct=yes
5903     hardcode_shlibpath_var=no
5904     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5905       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5906       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5907       export_dynamic_flag_spec='${wl}-E'
5908     else
5909       case "$host_os" in
5910       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5911         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5912         hardcode_libdir_flag_spec='-R$libdir'
5913         ;;
5914       *)
5915         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5916         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5917         ;;
5918       esac
5919     fi
5920     ;;
5921
5922   os2*)
5923     hardcode_libdir_flag_spec='-L$libdir'
5924     hardcode_minus_L=yes
5925     allow_undefined_flag=unsupported
5926     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'
5927     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5928     ;;
5929
5930   osf3*)
5931     if test "$GCC" = yes; then
5932       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5933       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'
5934     else
5935       allow_undefined_flag=' -expect_unresolved \*'
5936       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'
5937     fi
5938     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5939     hardcode_libdir_separator=:
5940     ;;
5941
5942   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5943     if test "$GCC" = yes; then
5944       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5945       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'
5946       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5947     else
5948       allow_undefined_flag=' -expect_unresolved \*'
5949       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'
5950       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5951       $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'
5952
5953       #Both c and cxx compiler support -rpath directly
5954       hardcode_libdir_flag_spec='-rpath $libdir'
5955     fi
5956     hardcode_libdir_separator=:
5957     ;;
5958
5959   sco3.2v5*)
5960     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5961     hardcode_shlibpath_var=no
5962     runpath_var=LD_RUN_PATH
5963     hardcode_runpath_var=yes
5964     export_dynamic_flag_spec='${wl}-Bexport'
5965     ;;
5966
5967   solaris*)
5968     # gcc --version < 3.0 without binutils cannot create self contained
5969     # shared libraries reliably, requiring libgcc.a to resolve some of
5970     # the object symbols generated in some cases.  Libraries that use
5971     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5972     # a copy of libgcc.a into every shared library to guarantee resolving
5973     # such symbols causes other problems:  According to Tim Van Holder
5974     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5975     # (to the application) exception stack for one thing.
5976     no_undefined_flag=' -z defs'
5977     if test "$GCC" = yes; then
5978       case `$CC --version 2>/dev/null` in
5979       [12].*)
5980         cat <<EOF 1>&2
5981
5982 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5983 *** create self contained shared libraries on Solaris systems, without
5984 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5985 *** -no-undefined support, which will at least allow you to build shared
5986 *** libraries.  However, you may find that when you link such libraries
5987 *** into an application without using GCC, you have to manually add
5988 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5989 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5990 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5991
5992 EOF
5993         no_undefined_flag=
5994         ;;
5995       esac
5996     fi
5997     # $CC -shared without GNU ld will not create a library from C++
5998     # object files and a static libstdc++, better avoid it by now
5999     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6000     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6001                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6002     hardcode_libdir_flag_spec='-R$libdir'
6003     hardcode_shlibpath_var=no
6004     case $host_os in
6005     solaris2.[0-5] | solaris2.[0-5].*) ;;
6006     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6007       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6008     esac
6009     link_all_deplibs=yes
6010     ;;
6011
6012   sunos4*)
6013     if test "x$host_vendor" = xsequent; then
6014       # Use $CC to link under sequent, because it throws in some extra .o
6015       # files that make .init and .fini sections work.
6016       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6017     else
6018       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6019     fi
6020     hardcode_libdir_flag_spec='-L$libdir'
6021     hardcode_direct=yes
6022     hardcode_minus_L=yes
6023     hardcode_shlibpath_var=no
6024     ;;
6025
6026   sysv4)
6027     case $host_vendor in
6028       sni)
6029         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6030         hardcode_direct=yes # is this really true???
6031         ;;
6032       siemens)
6033         ## LD is ld it makes a PLAMLIB
6034         ## CC just makes a GrossModule.
6035         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6036         reload_cmds='$CC -r -o $output$reload_objs'
6037         hardcode_direct=no
6038         ;;
6039       motorola)
6040         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6041         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6042         ;;
6043     esac
6044     runpath_var='LD_RUN_PATH'
6045     hardcode_shlibpath_var=no
6046     ;;
6047
6048   sysv4.3*)
6049     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6050     hardcode_shlibpath_var=no
6051     export_dynamic_flag_spec='-Bexport'
6052     ;;
6053
6054   sysv5*)
6055     no_undefined_flag=' -z text'
6056     # $CC -shared without GNU ld will not create a library from C++
6057     # object files and a static libstdc++, better avoid it by now
6058     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6059     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6060                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6061     hardcode_libdir_flag_spec=
6062     hardcode_shlibpath_var=no
6063     runpath_var='LD_RUN_PATH'
6064     ;;
6065
6066   uts4*)
6067     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6068     hardcode_libdir_flag_spec='-L$libdir'
6069     hardcode_shlibpath_var=no
6070     ;;
6071
6072   dgux*)
6073     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6074     hardcode_libdir_flag_spec='-L$libdir'
6075     hardcode_shlibpath_var=no
6076     ;;
6077
6078   sysv4*MP*)
6079     if test -d /usr/nec; then
6080       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6081       hardcode_shlibpath_var=no
6082       runpath_var=LD_RUN_PATH
6083       hardcode_runpath_var=yes
6084       ld_shlibs=yes
6085     fi
6086     ;;
6087
6088   sysv4.2uw2*)
6089     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6090     hardcode_direct=yes
6091     hardcode_minus_L=no
6092     hardcode_shlibpath_var=no
6093     hardcode_runpath_var=yes
6094     runpath_var=LD_RUN_PATH
6095     ;;
6096
6097   sysv5uw7* | unixware7*)
6098     no_undefined_flag='${wl}-z ${wl}text'
6099     if test "$GCC" = yes; then
6100       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6101     else
6102       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6103     fi
6104     runpath_var='LD_RUN_PATH'
6105     hardcode_shlibpath_var=no
6106     ;;
6107
6108   *)
6109     ld_shlibs=no
6110     ;;
6111   esac
6112 fi
6113 echo "$ac_t""$ld_shlibs" 1>&6
6114 test "$ld_shlibs" = no && can_build_shared=no
6115
6116 # Check hardcoding attributes.
6117 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6118 echo "configure:6119: checking how to hardcode library paths into programs" >&5
6119 hardcode_action=
6120 if test -n "$hardcode_libdir_flag_spec" || \
6121    test -n "$runpath_var"; then
6122
6123   # We can hardcode non-existant directories.
6124   if test "$hardcode_direct" != no &&
6125      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6126      # have to relink, otherwise we might link with an installed library
6127      # when we should be linking with a yet-to-be-installed one
6128      ## test "$hardcode_shlibpath_var" != no &&
6129      test "$hardcode_minus_L" != no; then
6130     # Linking always hardcodes the temporary library directory.
6131     hardcode_action=relink
6132   else
6133     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6134     hardcode_action=immediate
6135   fi
6136 else
6137   # We cannot hardcode anything, or else we can only hardcode existing
6138   # directories.
6139   hardcode_action=unsupported
6140 fi
6141 echo "$ac_t""$hardcode_action" 1>&6
6142
6143 striplib=
6144 old_striplib=
6145 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6146 echo "configure:6147: checking whether stripping libraries is possible" >&5
6147 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6148   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6149   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6150   echo "$ac_t""yes" 1>&6
6151 else
6152   echo "$ac_t""no" 1>&6
6153 fi
6154
6155 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6156 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6157
6158 # PORTME Fill in your ld.so characteristics
6159 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6160 echo "configure:6161: checking dynamic linker characteristics" >&5
6161 library_names_spec=
6162 libname_spec='lib$name'
6163 soname_spec=
6164 postinstall_cmds=
6165 postuninstall_cmds=
6166 finish_cmds=
6167 finish_eval=
6168 shlibpath_var=
6169 shlibpath_overrides_runpath=unknown
6170 version_type=none
6171 dynamic_linker="$host_os ld.so"
6172 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6173 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6174
6175 case $host_os in
6176 aix3*)
6177   version_type=linux
6178   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6179   shlibpath_var=LIBPATH
6180
6181   # AIX has no versioning support, so we append a major version to the name.
6182   soname_spec='${libname}${release}.so$major'
6183   ;;
6184
6185 aix4* | aix5*)
6186   version_type=linux
6187   need_lib_prefix=no
6188   need_version=no
6189   hardcode_into_libs=yes
6190   if test "$host_cpu" = ia64; then
6191     # AIX 5 supports IA64
6192     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6193     shlibpath_var=LD_LIBRARY_PATH
6194   else
6195     # With GCC up to 2.95.x, collect2 would create an import file
6196     # for dependence libraries.  The import file would start with
6197     # the line `#! .'.  This would cause the generated library to
6198     # depend on `.', always an invalid library.  This was fixed in
6199     # development snapshots of GCC prior to 3.0.
6200     case $host_os in
6201       aix4 | aix4.[01] | aix4.[01].*)
6202         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6203              echo ' yes '
6204              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6205           :
6206         else
6207           can_build_shared=no
6208         fi
6209         ;;
6210     esac
6211     # AIX (on Power*) has no versioning support, so currently we can
6212     # not hardcode correct soname into executable. Probably we can
6213     # add versioning support to collect2, so additional links can
6214     # be useful in future.
6215     if test "$aix_use_runtimelinking" = yes; then
6216       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6217       # instead of lib<name>.a to let people know that these are not
6218       # typical AIX shared libraries.
6219       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6220     else
6221       # We preserve .a as extension for shared libraries through AIX4.2
6222       # and later when we are not doing run time linking.
6223       library_names_spec='${libname}${release}.a $libname.a'
6224       soname_spec='${libname}${release}.so$major'
6225     fi
6226     shlibpath_var=LIBPATH
6227   fi
6228   hardcode_into_libs=yes
6229   ;;
6230
6231 amigaos*)
6232   library_names_spec='$libname.ixlibrary $libname.a'
6233   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6234   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'
6235   ;;
6236
6237 beos*)
6238   library_names_spec='${libname}.so'
6239   dynamic_linker="$host_os ld.so"
6240   shlibpath_var=LIBRARY_PATH
6241   ;;
6242
6243 bsdi4*)
6244   version_type=linux
6245   need_version=no
6246   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6247   soname_spec='${libname}${release}.so$major'
6248   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6249   shlibpath_var=LD_LIBRARY_PATH
6250   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6251   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6252   export_dynamic_flag_spec=-rdynamic
6253   # the default ld.so.conf also contains /usr/contrib/lib and
6254   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6255   # libtool to hard-code these into programs
6256   ;;
6257
6258 cygwin* | mingw* | pw32*)
6259   version_type=windows
6260   need_version=no
6261   need_lib_prefix=no
6262   case $GCC,$host_os in
6263   yes,cygwin*)
6264     library_names_spec='$libname.dll.a'
6265     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6266     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6267       dldir=$destdir/`dirname \$dlpath`~
6268       test -d \$dldir || mkdir -p \$dldir~
6269       $install_prog .libs/$dlname \$dldir/$dlname'
6270     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6271       dlpath=$dir/\$dldll~
6272        $rm \$dlpath'
6273     ;;
6274   yes,mingw*)
6275     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6276     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6277     ;;
6278   yes,pw32*)
6279     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6280     ;;
6281   *)
6282     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6283     ;;
6284   esac
6285   dynamic_linker='Win32 ld.exe'
6286   # FIXME: first we should search . and the directory the executable is in
6287   shlibpath_var=PATH
6288   ;;
6289
6290 darwin* | rhapsody*)
6291   dynamic_linker="$host_os dyld"
6292   version_type=darwin
6293   need_lib_prefix=no
6294   need_version=no
6295   # FIXME: Relying on posixy $() will cause problems for
6296   #        cross-compilation, but unfortunately the echo tests do not
6297   #        yet detect zsh echo's removal of \ escapes.
6298   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)'
6299   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6300   shlibpath_overrides_runpath=yes
6301   shlibpath_var=DYLD_LIBRARY_PATH
6302   ;;
6303
6304 freebsd1*)
6305   dynamic_linker=no
6306   ;;
6307
6308 freebsd*)
6309   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6310   version_type=freebsd-$objformat
6311   case $version_type in
6312     freebsd-elf*)
6313       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6314       need_version=no
6315       need_lib_prefix=no
6316       ;;
6317     freebsd-*)
6318       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6319       need_version=yes
6320       ;;
6321   esac
6322   shlibpath_var=LD_LIBRARY_PATH
6323   case $host_os in
6324   freebsd2*)
6325     shlibpath_overrides_runpath=yes
6326     ;;
6327   *)
6328     shlibpath_overrides_runpath=no
6329     hardcode_into_libs=yes
6330     ;;
6331   esac
6332   ;;
6333
6334 gnu*)
6335   version_type=linux
6336   need_lib_prefix=no
6337   need_version=no
6338   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6339   soname_spec='${libname}${release}.so$major'
6340   shlibpath_var=LD_LIBRARY_PATH
6341   hardcode_into_libs=yes
6342   ;;
6343
6344 hpux9* | hpux10* | hpux11*)
6345   # Give a soname corresponding to the major version so that dld.sl refuses to
6346   # link against other versions.
6347   dynamic_linker="$host_os dld.sl"
6348   version_type=sunos
6349   need_lib_prefix=no
6350   need_version=no
6351   shlibpath_var=SHLIB_PATH
6352   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6353   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6354   soname_spec='${libname}${release}.sl$major'
6355   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6356   postinstall_cmds='chmod 555 $lib'
6357   ;;
6358
6359 irix5* | irix6* | nonstopux*)
6360   case $host_os in
6361     nonstopux*) version_type=nonstopux ;;
6362     *)          version_type=irix ;;
6363   esac
6364   need_lib_prefix=no
6365   need_version=no
6366   soname_spec='${libname}${release}.so$major'
6367   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6368   case $host_os in
6369   irix5* | nonstopux*)
6370     libsuff= shlibsuff=
6371     ;;
6372   *)
6373     case $LD in # libtool.m4 will add one of these switches to LD
6374     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6375     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6376     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6377     *) libsuff= shlibsuff= libmagic=never-match;;
6378     esac
6379     ;;
6380   esac
6381   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6382   shlibpath_overrides_runpath=no
6383   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6384   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6385   ;;
6386
6387 # No shared lib support for Linux oldld, aout, or coff.
6388 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6389   dynamic_linker=no
6390   ;;
6391
6392 # This must be Linux ELF.
6393 linux-gnu*)
6394   version_type=linux
6395   need_lib_prefix=no
6396   need_version=no
6397   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6398   soname_spec='${libname}${release}.so$major'
6399   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6400   shlibpath_var=LD_LIBRARY_PATH
6401   shlibpath_overrides_runpath=no
6402   # This implies no fast_install, which is unacceptable.
6403   # Some rework will be needed to allow for fast_install
6404   # before this can be enabled.
6405   hardcode_into_libs=yes
6406
6407   # We used to test for /lib/ld.so.1 and disable shared libraries on
6408   # powerpc, because MkLinux only supported shared libraries with the
6409   # GNU dynamic linker.  Since this was broken with cross compilers,
6410   # most powerpc-linux boxes support dynamic linking these days and
6411   # people can always --disable-shared, the test was removed, and we
6412   # assume the GNU/Linux dynamic linker is in use.
6413   dynamic_linker='GNU/Linux ld.so'
6414   ;;
6415
6416 netbsd*)
6417   version_type=sunos
6418   need_lib_prefix=no
6419   need_version=no
6420   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6421     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6422     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6423     dynamic_linker='NetBSD (a.out) ld.so'
6424   else
6425     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6426     soname_spec='${libname}${release}.so$major'
6427     dynamic_linker='NetBSD ld.elf_so'
6428   fi
6429   shlibpath_var=LD_LIBRARY_PATH
6430   shlibpath_overrides_runpath=yes
6431   hardcode_into_libs=yes
6432   ;;
6433
6434 newsos6)
6435   version_type=linux
6436   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6437   shlibpath_var=LD_LIBRARY_PATH
6438   shlibpath_overrides_runpath=yes
6439   ;;
6440
6441 openbsd*)
6442   version_type=sunos
6443   need_lib_prefix=no
6444   need_version=no
6445   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6446     case "$host_os" in
6447     openbsd2.[89] | openbsd2.[89].*)
6448       shlibpath_overrides_runpath=no
6449       ;;
6450     *)
6451       shlibpath_overrides_runpath=yes
6452       ;;
6453     esac
6454   else
6455     shlibpath_overrides_runpath=yes
6456   fi
6457   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6458   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6459   shlibpath_var=LD_LIBRARY_PATH
6460   ;;
6461
6462 os2*)
6463   libname_spec='$name'
6464   need_lib_prefix=no
6465   library_names_spec='$libname.dll $libname.a'
6466   dynamic_linker='OS/2 ld.exe'
6467   shlibpath_var=LIBPATH
6468   ;;
6469
6470 osf3* | osf4* | osf5*)
6471   version_type=osf
6472   need_version=no
6473   soname_spec='${libname}${release}.so$major'
6474   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6475   shlibpath_var=LD_LIBRARY_PATH
6476   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6477   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6478   hardcode_into_libs=yes
6479   ;;
6480
6481 sco3.2v5*)
6482   version_type=osf
6483   soname_spec='${libname}${release}.so$major'
6484   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6485   shlibpath_var=LD_LIBRARY_PATH
6486   ;;
6487
6488 solaris*)
6489   version_type=linux
6490   need_lib_prefix=no
6491   need_version=no
6492   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6493   soname_spec='${libname}${release}.so$major'
6494   shlibpath_var=LD_LIBRARY_PATH
6495   shlibpath_overrides_runpath=yes
6496   hardcode_into_libs=yes
6497   # ldd complains unless libraries are executable
6498   postinstall_cmds='chmod +x $lib'
6499   ;;
6500
6501 sunos4*)
6502   version_type=sunos
6503   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6504   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6505   shlibpath_var=LD_LIBRARY_PATH
6506   shlibpath_overrides_runpath=yes
6507   if test "$with_gnu_ld" = yes; then
6508     need_lib_prefix=no
6509   fi
6510   need_version=yes
6511   ;;
6512
6513 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6514   version_type=linux
6515   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6516   soname_spec='${libname}${release}.so$major'
6517   shlibpath_var=LD_LIBRARY_PATH
6518   case $host_vendor in
6519     sni)
6520       shlibpath_overrides_runpath=no
6521       need_lib_prefix=no
6522       export_dynamic_flag_spec='${wl}-Blargedynsym'
6523       runpath_var=LD_RUN_PATH
6524       ;;
6525     siemens)
6526       need_lib_prefix=no
6527       ;;
6528     motorola)
6529       need_lib_prefix=no
6530       need_version=no
6531       shlibpath_overrides_runpath=no
6532       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6533       ;;
6534   esac
6535   ;;
6536
6537 uts4*)
6538   version_type=linux
6539   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6540   soname_spec='${libname}${release}.so$major'
6541   shlibpath_var=LD_LIBRARY_PATH
6542   ;;
6543
6544 dgux*)
6545   version_type=linux
6546   need_lib_prefix=no
6547   need_version=no
6548   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6549   soname_spec='${libname}${release}.so$major'
6550   shlibpath_var=LD_LIBRARY_PATH
6551   ;;
6552
6553 sysv4*MP*)
6554   if test -d /usr/nec ;then
6555     version_type=linux
6556     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6557     soname_spec='$libname.so.$major'
6558     shlibpath_var=LD_LIBRARY_PATH
6559   fi
6560   ;;
6561
6562 *)
6563   dynamic_linker=no
6564   ;;
6565 esac
6566 echo "$ac_t""$dynamic_linker" 1>&6
6567 test "$dynamic_linker" = no && can_build_shared=no
6568
6569 # Report the final consequences.
6570 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6571 echo "configure:6572: checking if libtool supports shared libraries" >&5
6572 echo "$ac_t""$can_build_shared" 1>&6
6573
6574 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6575 echo "configure:6576: checking whether to build shared libraries" >&5
6576 test "$can_build_shared" = "no" && enable_shared=no
6577
6578 # On AIX, shared libraries and static libraries use the same namespace, and
6579 # are all built from PIC.
6580 case "$host_os" in
6581 aix3*)
6582   test "$enable_shared" = yes && enable_static=no
6583   if test -n "$RANLIB"; then
6584     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6585     postinstall_cmds='$RANLIB $lib'
6586   fi
6587   ;;
6588
6589 aix4*)
6590   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6591     test "$enable_shared" = yes && enable_static=no
6592   fi
6593   ;;
6594 esac
6595 echo "$ac_t""$enable_shared" 1>&6
6596
6597 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6598 echo "configure:6599: checking whether to build static libraries" >&5
6599 # Make sure either enable_shared or enable_static is yes.
6600 test "$enable_shared" = yes || enable_static=yes
6601 echo "$ac_t""$enable_static" 1>&6
6602
6603 if test "$hardcode_action" = relink; then
6604   # Fast installation is not supported
6605   enable_fast_install=no
6606 elif test "$shlibpath_overrides_runpath" = yes ||
6607      test "$enable_shared" = no; then
6608   # Fast installation is not necessary
6609   enable_fast_install=needless
6610 fi
6611
6612 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6613 if test "$GCC" = yes; then
6614   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6615 fi
6616
6617 if test "x$enable_dlopen" != xyes; then
6618   enable_dlopen=unknown
6619   enable_dlopen_self=unknown
6620   enable_dlopen_self_static=unknown
6621 else
6622   lt_cv_dlopen=no
6623   lt_cv_dlopen_libs=
6624
6625   case $host_os in
6626   beos*)
6627     lt_cv_dlopen="load_add_on"
6628     lt_cv_dlopen_libs=
6629     lt_cv_dlopen_self=yes
6630     ;;
6631
6632   cygwin* | mingw* | pw32*)
6633     lt_cv_dlopen="LoadLibrary"
6634     lt_cv_dlopen_libs=
6635    ;;
6636
6637   *)
6638     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6639 echo "configure:6640: checking for shl_load" >&5
6640 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6641   echo $ac_n "(cached) $ac_c" 1>&6
6642 else
6643   cat > conftest.$ac_ext <<EOF
6644 #line 6645 "configure"
6645 #include "confdefs.h"
6646 /* System header to define __stub macros and hopefully few prototypes,
6647     which can conflict with char shl_load(); below.  */
6648 #include <assert.h>
6649 /* Override any gcc2 internal prototype to avoid an error.  */
6650 /* We use char because int might match the return type of a gcc2
6651     builtin and then its argument prototype would still apply.  */
6652 char shl_load();
6653 char (*f)();
6654
6655 int main() {
6656
6657 /* The GNU C library defines this for functions which it implements
6658     to always fail with ENOSYS.  Some functions are actually named
6659     something starting with __ and the normal name is an alias.  */
6660 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6661 choke me
6662 #else
6663 f = shl_load;
6664 #endif
6665
6666 ; return 0; }
6667 EOF
6668 if { (eval echo configure:6669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6669   rm -rf conftest*
6670   eval "ac_cv_func_shl_load=yes"
6671 else
6672   echo "configure: failed program was:" >&5
6673   cat conftest.$ac_ext >&5
6674   rm -rf conftest*
6675   eval "ac_cv_func_shl_load=no"
6676 fi
6677 rm -f conftest*
6678 fi
6679
6680 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6681   echo "$ac_t""yes" 1>&6
6682   lt_cv_dlopen="shl_load"
6683 else
6684   echo "$ac_t""no" 1>&6
6685 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6686 echo "configure:6687: checking for shl_load in -ldld" >&5
6687 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6688 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6689   echo $ac_n "(cached) $ac_c" 1>&6
6690 else
6691   ac_save_LIBS="$LIBS"
6692 LIBS="-ldld  $LIBS"
6693 cat > conftest.$ac_ext <<EOF
6694 #line 6695 "configure"
6695 #include "confdefs.h"
6696 /* Override any gcc2 internal prototype to avoid an error.  */
6697 /* We use char because int might match the return type of a gcc2
6698     builtin and then its argument prototype would still apply.  */
6699 char shl_load();
6700
6701 int main() {
6702 shl_load()
6703 ; return 0; }
6704 EOF
6705 if { (eval echo configure:6706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6706   rm -rf conftest*
6707   eval "ac_cv_lib_$ac_lib_var=yes"
6708 else
6709   echo "configure: failed program was:" >&5
6710   cat conftest.$ac_ext >&5
6711   rm -rf conftest*
6712   eval "ac_cv_lib_$ac_lib_var=no"
6713 fi
6714 rm -f conftest*
6715 LIBS="$ac_save_LIBS"
6716
6717 fi
6718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6719   echo "$ac_t""yes" 1>&6
6720   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6721 else
6722   echo "$ac_t""no" 1>&6
6723 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6724 echo "configure:6725: checking for dlopen" >&5
6725 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6726   echo $ac_n "(cached) $ac_c" 1>&6
6727 else
6728   cat > conftest.$ac_ext <<EOF
6729 #line 6730 "configure"
6730 #include "confdefs.h"
6731 /* System header to define __stub macros and hopefully few prototypes,
6732     which can conflict with char dlopen(); below.  */
6733 #include <assert.h>
6734 /* Override any gcc2 internal prototype to avoid an error.  */
6735 /* We use char because int might match the return type of a gcc2
6736     builtin and then its argument prototype would still apply.  */
6737 char dlopen();
6738 char (*f)();
6739
6740 int main() {
6741
6742 /* The GNU C library defines this for functions which it implements
6743     to always fail with ENOSYS.  Some functions are actually named
6744     something starting with __ and the normal name is an alias.  */
6745 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6746 choke me
6747 #else
6748 f = dlopen;
6749 #endif
6750
6751 ; return 0; }
6752 EOF
6753 if { (eval echo configure:6754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6754   rm -rf conftest*
6755   eval "ac_cv_func_dlopen=yes"
6756 else
6757   echo "configure: failed program was:" >&5
6758   cat conftest.$ac_ext >&5
6759   rm -rf conftest*
6760   eval "ac_cv_func_dlopen=no"
6761 fi
6762 rm -f conftest*
6763 fi
6764
6765 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6766   echo "$ac_t""yes" 1>&6
6767   lt_cv_dlopen="dlopen"
6768 else
6769   echo "$ac_t""no" 1>&6
6770 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6771 echo "configure:6772: checking for dlopen in -ldl" >&5
6772 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6773 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6774   echo $ac_n "(cached) $ac_c" 1>&6
6775 else
6776   ac_save_LIBS="$LIBS"
6777 LIBS="-ldl  $LIBS"
6778 cat > conftest.$ac_ext <<EOF
6779 #line 6780 "configure"
6780 #include "confdefs.h"
6781 /* Override any gcc2 internal prototype to avoid an error.  */
6782 /* We use char because int might match the return type of a gcc2
6783     builtin and then its argument prototype would still apply.  */
6784 char dlopen();
6785
6786 int main() {
6787 dlopen()
6788 ; return 0; }
6789 EOF
6790 if { (eval echo configure:6791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6791   rm -rf conftest*
6792   eval "ac_cv_lib_$ac_lib_var=yes"
6793 else
6794   echo "configure: failed program was:" >&5
6795   cat conftest.$ac_ext >&5
6796   rm -rf conftest*
6797   eval "ac_cv_lib_$ac_lib_var=no"
6798 fi
6799 rm -f conftest*
6800 LIBS="$ac_save_LIBS"
6801
6802 fi
6803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6804   echo "$ac_t""yes" 1>&6
6805   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6806 else
6807   echo "$ac_t""no" 1>&6
6808 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6809 echo "configure:6810: checking for dlopen in -lsvld" >&5
6810 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6811 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6812   echo $ac_n "(cached) $ac_c" 1>&6
6813 else
6814   ac_save_LIBS="$LIBS"
6815 LIBS="-lsvld  $LIBS"
6816 cat > conftest.$ac_ext <<EOF
6817 #line 6818 "configure"
6818 #include "confdefs.h"
6819 /* Override any gcc2 internal prototype to avoid an error.  */
6820 /* We use char because int might match the return type of a gcc2
6821     builtin and then its argument prototype would still apply.  */
6822 char dlopen();
6823
6824 int main() {
6825 dlopen()
6826 ; return 0; }
6827 EOF
6828 if { (eval echo configure:6829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6829   rm -rf conftest*
6830   eval "ac_cv_lib_$ac_lib_var=yes"
6831 else
6832   echo "configure: failed program was:" >&5
6833   cat conftest.$ac_ext >&5
6834   rm -rf conftest*
6835   eval "ac_cv_lib_$ac_lib_var=no"
6836 fi
6837 rm -f conftest*
6838 LIBS="$ac_save_LIBS"
6839
6840 fi
6841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6842   echo "$ac_t""yes" 1>&6
6843   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6844 else
6845   echo "$ac_t""no" 1>&6
6846 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6847 echo "configure:6848: checking for dld_link in -ldld" >&5
6848 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6849 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6850   echo $ac_n "(cached) $ac_c" 1>&6
6851 else
6852   ac_save_LIBS="$LIBS"
6853 LIBS="-ldld  $LIBS"
6854 cat > conftest.$ac_ext <<EOF
6855 #line 6856 "configure"
6856 #include "confdefs.h"
6857 /* Override any gcc2 internal prototype to avoid an error.  */
6858 /* We use char because int might match the return type of a gcc2
6859     builtin and then its argument prototype would still apply.  */
6860 char dld_link();
6861
6862 int main() {
6863 dld_link()
6864 ; return 0; }
6865 EOF
6866 if { (eval echo configure:6867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6867   rm -rf conftest*
6868   eval "ac_cv_lib_$ac_lib_var=yes"
6869 else
6870   echo "configure: failed program was:" >&5
6871   cat conftest.$ac_ext >&5
6872   rm -rf conftest*
6873   eval "ac_cv_lib_$ac_lib_var=no"
6874 fi
6875 rm -f conftest*
6876 LIBS="$ac_save_LIBS"
6877
6878 fi
6879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6880   echo "$ac_t""yes" 1>&6
6881   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6882 else
6883   echo "$ac_t""no" 1>&6
6884 fi
6885
6886               
6887 fi
6888
6889             
6890 fi
6891
6892           
6893 fi
6894
6895         
6896 fi
6897
6898       
6899 fi
6900
6901     ;;
6902   esac
6903
6904   if test "x$lt_cv_dlopen" != xno; then
6905     enable_dlopen=yes
6906   else
6907     enable_dlopen=no
6908   fi
6909
6910   case $lt_cv_dlopen in
6911   dlopen)
6912     save_CPPFLAGS="$CPPFLAGS"
6913         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6914
6915     save_LDFLAGS="$LDFLAGS"
6916     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6917
6918     save_LIBS="$LIBS"
6919     LIBS="$lt_cv_dlopen_libs $LIBS"
6920
6921     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6922 echo "configure:6923: checking whether a program can dlopen itself" >&5
6923 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6924   echo $ac_n "(cached) $ac_c" 1>&6
6925 else
6926           if test "$cross_compiling" = yes; then :
6927   lt_cv_dlopen_self=cross
6928 else
6929     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6930   lt_status=$lt_dlunknown
6931   cat > conftest.$ac_ext <<EOF
6932 #line 6933 "configure"
6933 #include "confdefs.h"
6934
6935 #if HAVE_DLFCN_H
6936 #include <dlfcn.h>
6937 #endif
6938
6939 #include <stdio.h>
6940
6941 #ifdef RTLD_GLOBAL
6942 #  define LT_DLGLOBAL           RTLD_GLOBAL
6943 #else
6944 #  ifdef DL_GLOBAL
6945 #    define LT_DLGLOBAL         DL_GLOBAL
6946 #  else
6947 #    define LT_DLGLOBAL         0
6948 #  endif
6949 #endif
6950
6951 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6952    find out it does not work in some platform. */
6953 #ifndef LT_DLLAZY_OR_NOW
6954 #  ifdef RTLD_LAZY
6955 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6956 #  else
6957 #    ifdef DL_LAZY
6958 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6959 #    else
6960 #      ifdef RTLD_NOW
6961 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6962 #      else
6963 #        ifdef DL_NOW
6964 #          define LT_DLLAZY_OR_NOW      DL_NOW
6965 #        else
6966 #          define LT_DLLAZY_OR_NOW      0
6967 #        endif
6968 #      endif
6969 #    endif
6970 #  endif
6971 #endif
6972
6973 #ifdef __cplusplus
6974 extern "C" void exit (int);
6975 #endif
6976
6977 void fnord() { int i=42;}
6978 int main ()
6979 {
6980   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6981   int status = $lt_dlunknown;
6982
6983   if (self)
6984     {
6985       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6986       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6987       /* dlclose (self); */
6988     }
6989
6990     exit (status);
6991 }
6992 EOF
6993   if { (eval echo configure:6994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6994     (./conftest; exit; ) 2>/dev/null
6995     lt_status=$?
6996     case x$lt_status in
6997       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6998       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6999       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7000     esac
7001   else :
7002     # compilation failed
7003     lt_cv_dlopen_self=no
7004   fi
7005 fi
7006 rm -fr conftest*
7007
7008     
7009 fi
7010
7011 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7012
7013     if test "x$lt_cv_dlopen_self" = xyes; then
7014       LDFLAGS="$LDFLAGS $link_static_flag"
7015       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7016 echo "configure:7017: checking whether a statically linked program can dlopen itself" >&5
7017 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7018   echo $ac_n "(cached) $ac_c" 1>&6
7019 else
7020           if test "$cross_compiling" = yes; then :
7021   lt_cv_dlopen_self_static=cross
7022 else
7023     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7024   lt_status=$lt_dlunknown
7025   cat > conftest.$ac_ext <<EOF
7026 #line 7027 "configure"
7027 #include "confdefs.h"
7028
7029 #if HAVE_DLFCN_H
7030 #include <dlfcn.h>
7031 #endif
7032
7033 #include <stdio.h>
7034
7035 #ifdef RTLD_GLOBAL
7036 #  define LT_DLGLOBAL           RTLD_GLOBAL
7037 #else
7038 #  ifdef DL_GLOBAL
7039 #    define LT_DLGLOBAL         DL_GLOBAL
7040 #  else
7041 #    define LT_DLGLOBAL         0
7042 #  endif
7043 #endif
7044
7045 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7046    find out it does not work in some platform. */
7047 #ifndef LT_DLLAZY_OR_NOW
7048 #  ifdef RTLD_LAZY
7049 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7050 #  else
7051 #    ifdef DL_LAZY
7052 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7053 #    else
7054 #      ifdef RTLD_NOW
7055 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7056 #      else
7057 #        ifdef DL_NOW
7058 #          define LT_DLLAZY_OR_NOW      DL_NOW
7059 #        else
7060 #          define LT_DLLAZY_OR_NOW      0
7061 #        endif
7062 #      endif
7063 #    endif
7064 #  endif
7065 #endif
7066
7067 #ifdef __cplusplus
7068 extern "C" void exit (int);
7069 #endif
7070
7071 void fnord() { int i=42;}
7072 int main ()
7073 {
7074   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7075   int status = $lt_dlunknown;
7076
7077   if (self)
7078     {
7079       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7080       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7081       /* dlclose (self); */
7082     }
7083
7084     exit (status);
7085 }
7086 EOF
7087   if { (eval echo configure:7088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7088     (./conftest; exit; ) 2>/dev/null
7089     lt_status=$?
7090     case x$lt_status in
7091       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7092       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7093       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7094     esac
7095   else :
7096     # compilation failed
7097     lt_cv_dlopen_self_static=no
7098   fi
7099 fi
7100 rm -fr conftest*
7101
7102       
7103 fi
7104
7105 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7106     fi
7107
7108     CPPFLAGS="$save_CPPFLAGS"
7109     LDFLAGS="$save_LDFLAGS"
7110     LIBS="$save_LIBS"
7111     ;;
7112   esac
7113
7114   case $lt_cv_dlopen_self in
7115   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7116   *) enable_dlopen_self=unknown ;;
7117   esac
7118
7119   case $lt_cv_dlopen_self_static in
7120   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7121   *) enable_dlopen_self_static=unknown ;;
7122   esac
7123 fi
7124
7125
7126 if test "$enable_shared" = yes && test "$GCC" = yes; then
7127   case $archive_cmds in
7128   *'~'*)
7129     # FIXME: we may have to deal with multi-command sequences.
7130     ;;
7131   '$CC '*)
7132     # Test whether the compiler implicitly links with -lc since on some
7133     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7134     # to ld, don't add -lc before -lgcc.
7135     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7136 echo "configure:7137: checking whether -lc should be explicitly linked in" >&5
7137     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7138   echo $ac_n "(cached) $ac_c" 1>&6
7139 else
7140   $rm conftest*
7141     echo 'static int dummy;' > conftest.$ac_ext
7142
7143     if { (eval echo configure:7144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7144       soname=conftest
7145       lib=conftest
7146       libobjs=conftest.$ac_objext
7147       deplibs=
7148       wl=$lt_cv_prog_cc_wl
7149       compiler_flags=-v
7150       linker_flags=-v
7151       verstring=
7152       output_objdir=.
7153       libname=conftest
7154       save_allow_undefined_flag=$allow_undefined_flag
7155       allow_undefined_flag=
7156       if { (eval echo configure:7157: \"$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; }
7157       then
7158         lt_cv_archive_cmds_need_lc=no
7159       else
7160         lt_cv_archive_cmds_need_lc=yes
7161       fi
7162       allow_undefined_flag=$save_allow_undefined_flag
7163     else
7164       cat conftest.err 1>&5
7165     fi
7166 fi
7167
7168     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7169     ;;
7170   esac
7171 fi
7172 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7173
7174 # The second clause should only fire when bootstrapping the
7175 # libtool distribution, otherwise you forgot to ship ltmain.sh
7176 # with your package, and you will get complaints that there are
7177 # no rules to generate ltmain.sh.
7178 if test -f "$ltmain"; then
7179   :
7180 else
7181   # If there is no Makefile yet, we rely on a make rule to execute
7182   # `config.status --recheck' to rerun these tests and create the
7183   # libtool script then.
7184   test -f Makefile && make "$ltmain"
7185 fi
7186
7187 if test -f "$ltmain"; then
7188   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7189   $rm -f "${ofile}T"
7190
7191   echo creating $ofile
7192
7193   # Now quote all the things that may contain metacharacters while being
7194   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7195   # variables and quote the copies for generation of the libtool script.
7196   for var in echo old_CC old_CFLAGS SED \
7197     AR AR_FLAGS CC LD LN_S NM SHELL \
7198     reload_flag reload_cmds wl \
7199     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7200     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7201     library_names_spec soname_spec \
7202     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7203     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7204     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7205     old_striplib striplib file_magic_cmd export_symbols_cmds \
7206     deplibs_check_method allow_undefined_flag no_undefined_flag \
7207     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7208     global_symbol_to_c_name_address \
7209     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7210     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7211     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7212
7213     case $var in
7214     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7215     old_postinstall_cmds | old_postuninstall_cmds | \
7216     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7217     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7218     postinstall_cmds | postuninstall_cmds | \
7219     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7220       # Double-quote double-evaled strings.
7221       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7222       ;;
7223     *)
7224       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7225       ;;
7226     esac
7227   done
7228
7229   cat <<__EOF__ > "${ofile}T"
7230 #! $SHELL
7231
7232 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7233 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7234 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7235 #
7236 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7237 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7238 #
7239 # This program is free software; you can redistribute it and/or modify
7240 # it under the terms of the GNU General Public License as published by
7241 # the Free Software Foundation; either version 2 of the License, or
7242 # (at your option) any later version.
7243 #
7244 # This program is distributed in the hope that it will be useful, but
7245 # WITHOUT ANY WARRANTY; without even the implied warranty of
7246 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7247 # General Public License for more details.
7248 #
7249 # You should have received a copy of the GNU General Public License
7250 # along with this program; if not, write to the Free Software
7251 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7252 #
7253 # As a special exception to the GNU General Public License, if you
7254 # distribute this file as part of a program that contains a
7255 # configuration script generated by Autoconf, you may include it under
7256 # the same distribution terms that you use for the rest of that program.
7257
7258 # A sed that does not truncate output.
7259 SED=$lt_SED
7260
7261 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7262 Xsed="${SED} -e s/^X//"
7263
7264 # The HP-UX ksh and POSIX shell print the target directory to stdout
7265 # if CDPATH is set.
7266 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7267
7268 # ### BEGIN LIBTOOL CONFIG
7269
7270 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7271
7272 # Shell to use when invoking shell scripts.
7273 SHELL=$lt_SHELL
7274
7275 # Whether or not to build shared libraries.
7276 build_libtool_libs=$enable_shared
7277
7278 # Whether or not to build static libraries.
7279 build_old_libs=$enable_static
7280
7281 # Whether or not to add -lc for building shared libraries.
7282 build_libtool_need_lc=$need_lc
7283
7284 # Whether or not to optimize for fast installation.
7285 fast_install=$enable_fast_install
7286
7287 # The host system.
7288 host_alias=$host_alias
7289 host=$host
7290
7291 # An echo program that does not interpret backslashes.
7292 echo=$lt_echo
7293
7294 # The archiver.
7295 AR=$lt_AR
7296 AR_FLAGS=$lt_AR_FLAGS
7297
7298 # The default C compiler.
7299 CC=$lt_CC
7300
7301 # Is the compiler the GNU C compiler?
7302 with_gcc=$GCC
7303
7304 # The linker used to build libraries.
7305 LD=$lt_LD
7306
7307 # Whether we need hard or soft links.
7308 LN_S=$lt_LN_S
7309
7310 # A BSD-compatible nm program.
7311 NM=$lt_NM
7312
7313 # A symbol stripping program
7314 STRIP=$STRIP
7315
7316 # Used to examine libraries when file_magic_cmd begins "file"
7317 MAGIC_CMD=$MAGIC_CMD
7318
7319 # Used on cygwin: DLL creation program.
7320 DLLTOOL="$DLLTOOL"
7321
7322 # Used on cygwin: object dumper.
7323 OBJDUMP="$OBJDUMP"
7324
7325 # Used on cygwin: assembler.
7326 AS="$AS"
7327
7328 # The name of the directory that contains temporary libtool files.
7329 objdir=$objdir
7330
7331 # How to create reloadable object files.
7332 reload_flag=$lt_reload_flag
7333 reload_cmds=$lt_reload_cmds
7334
7335 # How to pass a linker flag through the compiler.
7336 wl=$lt_wl
7337
7338 # Object file suffix (normally "o").
7339 objext="$ac_objext"
7340
7341 # Old archive suffix (normally "a").
7342 libext="$libext"
7343
7344 # Executable file suffix (normally "").
7345 exeext="$exeext"
7346
7347 # Additional compiler flags for building library objects.
7348 pic_flag=$lt_pic_flag
7349 pic_mode=$pic_mode
7350
7351 # Does compiler simultaneously support -c and -o options?
7352 compiler_c_o=$lt_compiler_c_o
7353
7354 # Can we write directly to a .lo ?
7355 compiler_o_lo=$lt_compiler_o_lo
7356
7357 # Must we lock files when doing compilation ?
7358 need_locks=$lt_need_locks
7359
7360 # Do we need the lib prefix for modules?
7361 need_lib_prefix=$need_lib_prefix
7362
7363 # Do we need a version for libraries?
7364 need_version=$need_version
7365
7366 # Whether dlopen is supported.
7367 dlopen_support=$enable_dlopen
7368
7369 # Whether dlopen of programs is supported.
7370 dlopen_self=$enable_dlopen_self
7371
7372 # Whether dlopen of statically linked programs is supported.
7373 dlopen_self_static=$enable_dlopen_self_static
7374
7375 # Compiler flag to prevent dynamic linking.
7376 link_static_flag=$lt_link_static_flag
7377
7378 # Compiler flag to turn off builtin functions.
7379 no_builtin_flag=$lt_no_builtin_flag
7380
7381 # Compiler flag to allow reflexive dlopens.
7382 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7383
7384 # Compiler flag to generate shared objects directly from archives.
7385 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7386
7387 # Compiler flag to generate thread-safe objects.
7388 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7389
7390 # Library versioning type.
7391 version_type=$version_type
7392
7393 # Format of library name prefix.
7394 libname_spec=$lt_libname_spec
7395
7396 # List of archive names.  First name is the real one, the rest are links.
7397 # The last name is the one that the linker finds with -lNAME.
7398 library_names_spec=$lt_library_names_spec
7399
7400 # The coded name of the library, if different from the real name.
7401 soname_spec=$lt_soname_spec
7402
7403 # Commands used to build and install an old-style archive.
7404 RANLIB=$lt_RANLIB
7405 old_archive_cmds=$lt_old_archive_cmds
7406 old_postinstall_cmds=$lt_old_postinstall_cmds
7407 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7408
7409 # Create an old-style archive from a shared archive.
7410 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7411
7412 # Create a temporary old-style archive to link instead of a shared archive.
7413 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7414
7415 # Commands used to build and install a shared archive.
7416 archive_cmds=$lt_archive_cmds
7417 archive_expsym_cmds=$lt_archive_expsym_cmds
7418 postinstall_cmds=$lt_postinstall_cmds
7419 postuninstall_cmds=$lt_postuninstall_cmds
7420
7421 # Commands to strip libraries.
7422 old_striplib=$lt_old_striplib
7423 striplib=$lt_striplib
7424
7425 # Method to check whether dependent libraries are shared objects.
7426 deplibs_check_method=$lt_deplibs_check_method
7427
7428 # Command to use when deplibs_check_method == file_magic.
7429 file_magic_cmd=$lt_file_magic_cmd
7430
7431 # Flag that allows shared libraries with undefined symbols to be built.
7432 allow_undefined_flag=$lt_allow_undefined_flag
7433
7434 # Flag that forces no undefined symbols.
7435 no_undefined_flag=$lt_no_undefined_flag
7436
7437 # Commands used to finish a libtool library installation in a directory.
7438 finish_cmds=$lt_finish_cmds
7439
7440 # Same as above, but a single script fragment to be evaled but not shown.
7441 finish_eval=$lt_finish_eval
7442
7443 # Take the output of nm and produce a listing of raw symbols and C names.
7444 global_symbol_pipe=$lt_global_symbol_pipe
7445
7446 # Transform the output of nm in a proper C declaration
7447 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7448
7449 # Transform the output of nm in a C name address pair
7450 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7451
7452 # This is the shared library runtime path variable.
7453 runpath_var=$runpath_var
7454
7455 # This is the shared library path variable.
7456 shlibpath_var=$shlibpath_var
7457
7458 # Is shlibpath searched before the hard-coded library search path?
7459 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7460
7461 # How to hardcode a shared library path into an executable.
7462 hardcode_action=$hardcode_action
7463
7464 # Whether we should hardcode library paths into libraries.
7465 hardcode_into_libs=$hardcode_into_libs
7466
7467 # Flag to hardcode \$libdir into a binary during linking.
7468 # This must work even if \$libdir does not exist.
7469 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7470
7471 # Whether we need a single -rpath flag with a separated argument.
7472 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7473
7474 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7475 # resulting binary.
7476 hardcode_direct=$hardcode_direct
7477
7478 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7479 # resulting binary.
7480 hardcode_minus_L=$hardcode_minus_L
7481
7482 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7483 # the resulting binary.
7484 hardcode_shlibpath_var=$hardcode_shlibpath_var
7485
7486 # Variables whose values should be saved in libtool wrapper scripts and
7487 # restored at relink time.
7488 variables_saved_for_relink="$variables_saved_for_relink"
7489
7490 # Whether libtool must link a program against all its dependency libraries.
7491 link_all_deplibs=$link_all_deplibs
7492
7493 # Compile-time system search path for libraries
7494 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7495
7496 # Run-time system search path for libraries
7497 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7498
7499 # Fix the shell variable \$srcfile for the compiler.
7500 fix_srcfile_path="$fix_srcfile_path"
7501
7502 # Set to yes if exported symbols are required.
7503 always_export_symbols=$always_export_symbols
7504
7505 # The commands to list exported symbols.
7506 export_symbols_cmds=$lt_export_symbols_cmds
7507
7508 # The commands to extract the exported symbol list from a shared archive.
7509 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7510
7511 # Symbols that should not be listed in the preloaded symbols.
7512 exclude_expsyms=$lt_exclude_expsyms
7513
7514 # Symbols that must always be exported.
7515 include_expsyms=$lt_include_expsyms
7516
7517 # ### END LIBTOOL CONFIG
7518
7519 __EOF__
7520
7521   case $host_os in
7522   aix3*)
7523     cat <<\EOF >> "${ofile}T"
7524
7525 # AIX sometimes has problems with the GCC collect2 program.  For some
7526 # reason, if we set the COLLECT_NAMES environment variable, the problems
7527 # vanish in a puff of smoke.
7528 if test "X${COLLECT_NAMES+set}" != Xset; then
7529   COLLECT_NAMES=
7530   export COLLECT_NAMES
7531 fi
7532 EOF
7533     ;;
7534   esac
7535
7536   case $host_os in
7537   cygwin* | mingw* | pw32* | os2*)
7538     cat <<'EOF' >> "${ofile}T"
7539       # This is a source program that is used to create dlls on Windows
7540       # Don't remove nor modify the starting and closing comments
7541 # /* ltdll.c starts here */
7542 # #define WIN32_LEAN_AND_MEAN
7543 # #include <windows.h>
7544 # #undef WIN32_LEAN_AND_MEAN
7545 # #include <stdio.h>
7546 #
7547 # #ifndef __CYGWIN__
7548 # #  ifdef __CYGWIN32__
7549 # #    define __CYGWIN__ __CYGWIN32__
7550 # #  endif
7551 # #endif
7552 #
7553 # #ifdef __cplusplus
7554 # extern "C" {
7555 # #endif
7556 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7557 # #ifdef __cplusplus
7558 # }
7559 # #endif
7560 #
7561 # #ifdef __CYGWIN__
7562 # #include <cygwin/cygwin_dll.h>
7563 # DECLARE_CYGWIN_DLL( DllMain );
7564 # #endif
7565 # HINSTANCE __hDllInstance_base;
7566 #
7567 # BOOL APIENTRY
7568 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7569 # {
7570 #   __hDllInstance_base = hInst;
7571 #   return TRUE;
7572 # }
7573 # /* ltdll.c ends here */
7574         # This is a source program that is used to create import libraries
7575         # on Windows for dlls which lack them. Don't remove nor modify the
7576         # starting and closing comments
7577 # /* impgen.c starts here */
7578 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7579 #
7580 #  This file is part of GNU libtool.
7581 #
7582 #  This program is free software; you can redistribute it and/or modify
7583 #  it under the terms of the GNU General Public License as published by
7584 #  the Free Software Foundation; either version 2 of the License, or
7585 #  (at your option) any later version.
7586 #
7587 #  This program is distributed in the hope that it will be useful,
7588 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7589 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7590 #  GNU General Public License for more details.
7591 #
7592 #  You should have received a copy of the GNU General Public License
7593 #  along with this program; if not, write to the Free Software
7594 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7595 #  */
7596 #
7597 # #include <stdio.h>            /* for printf() */
7598 # #include <unistd.h>           /* for open(), lseek(), read() */
7599 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7600 # #include <string.h>           /* for strdup() */
7601 #
7602 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7603 # #ifndef O_BINARY
7604 # #define O_BINARY 0
7605 # #endif
7606 #
7607 # static unsigned int
7608 # pe_get16 (fd, offset)
7609 #      int fd;
7610 #      int offset;
7611 # {
7612 #   unsigned char b[2];
7613 #   lseek (fd, offset, SEEK_SET);
7614 #   read (fd, b, 2);
7615 #   return b[0] + (b[1]<<8);
7616 # }
7617 #
7618 # static unsigned int
7619 # pe_get32 (fd, offset)
7620 #     int fd;
7621 #     int offset;
7622 # {
7623 #   unsigned char b[4];
7624 #   lseek (fd, offset, SEEK_SET);
7625 #   read (fd, b, 4);
7626 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7627 # }
7628 #
7629 # static unsigned int
7630 # pe_as32 (ptr)
7631 #      void *ptr;
7632 # {
7633 #   unsigned char *b = ptr;
7634 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7635 # }
7636 #
7637 # int
7638 # main (argc, argv)
7639 #     int argc;
7640 #     char *argv[];
7641 # {
7642 #     int dll;
7643 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7644 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7645 #     unsigned long name_rvas, nexp;
7646 #     unsigned char *expdata, *erva;
7647 #     char *filename, *dll_name;
7648 #
7649 #     filename = argv[1];
7650 #
7651 #     dll = open(filename, O_RDONLY|O_BINARY);
7652 #     if (dll < 1)
7653 #       return 1;
7654 #
7655 #     dll_name = filename;
7656 #
7657 #     for (i=0; filename[i]; i++)
7658 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7659 #           dll_name = filename + i +1;
7660 #
7661 #     pe_header_offset = pe_get32 (dll, 0x3c);
7662 #     opthdr_ofs = pe_header_offset + 4 + 20;
7663 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7664 #
7665 #     if (num_entries < 1) /* no exports */
7666 #       return 1;
7667 #
7668 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7669 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7670 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7671 #     secptr = (pe_header_offset + 4 + 20 +
7672 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7673 #
7674 #     expptr = 0;
7675 #     for (i = 0; i < nsections; i++)
7676 #     {
7677 #       char sname[8];
7678 #       unsigned long secptr1 = secptr + 40 * i;
7679 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7680 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7681 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7682 #       lseek(dll, secptr1, SEEK_SET);
7683 #       read(dll, sname, 8);
7684 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7685 #       {
7686 #           expptr = fptr + (export_rva - vaddr);
7687 #           if (export_rva + export_size > vaddr + vsize)
7688 #               export_size = vsize - (export_rva - vaddr);
7689 #           break;
7690 #       }
7691 #     }
7692 #
7693 #     expdata = (unsigned char*)malloc(export_size);
7694 #     lseek (dll, expptr, SEEK_SET);
7695 #     read (dll, expdata, export_size);
7696 #     erva = expdata - export_rva;
7697 #
7698 #     nexp = pe_as32 (expdata+24);
7699 #     name_rvas = pe_as32 (expdata+32);
7700 #
7701 #     printf ("EXPORTS\n");
7702 #     for (i = 0; i<nexp; i++)
7703 #     {
7704 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7705 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7706 #     }
7707 #
7708 #     return 0;
7709 # }
7710 # /* impgen.c ends here */
7711
7712 EOF
7713     ;;
7714   esac
7715
7716   # We use sed instead of cat because bash on DJGPP gets confused if
7717   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7718   # text mode, it properly converts lines to CR/LF.  This bash problem
7719   # is reportedly fixed, but why not run on old versions too?
7720   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7721
7722   mv -f "${ofile}T" "$ofile" || \
7723     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7724   chmod +x "$ofile"
7725 fi
7726
7727
7728
7729
7730
7731 # This can be used to rebuild libtool when needed
7732 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7733
7734 # Always use our own libtool.
7735 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7736
7737 # Prevent multiple expansion
7738
7739
7740
7741 # test for ln hardlink support
7742 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7743 echo "configure:7744: checking whether ln works" >&5
7744 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7745   echo $ac_n "(cached) $ac_c" 1>&6
7746 else
7747   rm -f conftest.src conftest.dst
7748 echo "conftest" > conftest.src
7749 if ln conftest.src conftest.dst 2>/dev/null
7750 then
7751   ol_cv_prog_LN_H="ln"
7752 else
7753   ol_cv_prog_LN_H="cp"
7754 fi
7755 rm -f conftest.src conftest.dst
7756
7757 fi
7758 LN_H="$ol_cv_prog_LN_H"
7759 if test "$ol_cv_prog_LN_H" = "ln"; then
7760         echo "$ac_t""yes" 1>&6
7761 else
7762         echo "$ac_t""no" 1>&6
7763 fi
7764
7765 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7766 echo "configure:7767: checking whether ln -s works" >&5
7767 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7768   echo $ac_n "(cached) $ac_c" 1>&6
7769 else
7770   rm -f conftestdata
7771 if ln -s X conftestdata 2>/dev/null
7772 then
7773   rm -f conftestdata
7774   ac_cv_prog_LN_S="ln -s"
7775 else
7776   ac_cv_prog_LN_S=ln
7777 fi
7778 fi
7779 LN_S="$ac_cv_prog_LN_S"
7780 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7781   echo "$ac_t""yes" 1>&6
7782 else
7783   echo "$ac_t""no" 1>&6
7784 fi
7785
7786
7787 ol_link_perl=no
7788 if test $ol_enable_perl != no ; then
7789         # Extract the first word of "perl", so it can be a program name with args.
7790 set dummy perl; ac_word=$2
7791 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7792 echo "configure:7793: checking for $ac_word" >&5
7793 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7794   echo $ac_n "(cached) $ac_c" 1>&6
7795 else
7796   case "$PERLBIN" in
7797   /*)
7798   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7799   ;;
7800   ?:/*)
7801   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7802   ;;
7803   *)
7804   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7805   ac_dummy="$PATH"
7806   for ac_dir in $ac_dummy; do 
7807     test -z "$ac_dir" && ac_dir=.
7808     if test -f $ac_dir/$ac_word; then
7809       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7810       break
7811     fi
7812   done
7813   IFS="$ac_save_ifs"
7814   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7815   ;;
7816 esac
7817 fi
7818 PERLBIN="$ac_cv_path_PERLBIN"
7819 if test -n "$PERLBIN"; then
7820   echo "$ac_t""$PERLBIN" 1>&6
7821 else
7822   echo "$ac_t""no" 1>&6
7823 fi
7824
7825
7826         if test "no$PERLBIN" = "no" ; then
7827                 if test $ol_enable_perl = yes ; then
7828                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7829                 fi
7830
7831         else
7832                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7833                 if test x"$ol_with_perl_module" = "xstatic" ; then
7834                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7835                 else
7836                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7837                 fi
7838                                 ol_link_perl=yes
7839         fi
7840 fi
7841
7842 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7843 echo "configure:7844: checking how to run the C preprocessor" >&5
7844 # On Suns, sometimes $CPP names a directory.
7845 if test -n "$CPP" && test -d "$CPP"; then
7846   CPP=
7847 fi
7848 if test -z "$CPP"; then
7849 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7850   echo $ac_n "(cached) $ac_c" 1>&6
7851 else
7852     # This must be in double quotes, not single quotes, because CPP may get
7853   # substituted into the Makefile and "${CC-cc}" will confuse make.
7854   CPP="${CC-cc} -E"
7855   # On the NeXT, cc -E runs the code through the compiler's parser,
7856   # not just through cpp.
7857   cat > conftest.$ac_ext <<EOF
7858 #line 7859 "configure"
7859 #include "confdefs.h"
7860 #include <assert.h>
7861 Syntax Error
7862 EOF
7863 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7864 { (eval echo configure:7865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7865 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7866 if test -z "$ac_err"; then
7867   :
7868 else
7869   echo "$ac_err" >&5
7870   echo "configure: failed program was:" >&5
7871   cat conftest.$ac_ext >&5
7872   rm -rf conftest*
7873   CPP="${CC-cc} -E -traditional-cpp"
7874   cat > conftest.$ac_ext <<EOF
7875 #line 7876 "configure"
7876 #include "confdefs.h"
7877 #include <assert.h>
7878 Syntax Error
7879 EOF
7880 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7881 { (eval echo configure:7882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7882 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7883 if test -z "$ac_err"; then
7884   :
7885 else
7886   echo "$ac_err" >&5
7887   echo "configure: failed program was:" >&5
7888   cat conftest.$ac_ext >&5
7889   rm -rf conftest*
7890   CPP="${CC-cc} -nologo -E"
7891   cat > conftest.$ac_ext <<EOF
7892 #line 7893 "configure"
7893 #include "confdefs.h"
7894 #include <assert.h>
7895 Syntax Error
7896 EOF
7897 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7898 { (eval echo configure:7899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7899 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7900 if test -z "$ac_err"; then
7901   :
7902 else
7903   echo "$ac_err" >&5
7904   echo "configure: failed program was:" >&5
7905   cat conftest.$ac_ext >&5
7906   rm -rf conftest*
7907   CPP=/lib/cpp
7908 fi
7909 rm -f conftest*
7910 fi
7911 rm -f conftest*
7912 fi
7913 rm -f conftest*
7914   ac_cv_prog_CPP="$CPP"
7915 fi
7916   CPP="$ac_cv_prog_CPP"
7917 else
7918   ac_cv_prog_CPP="$CPP"
7919 fi
7920 echo "$ac_t""$CPP" 1>&6
7921
7922
7923 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7924         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7925
7926 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7927         echo "configure: warning: programs compiled here do run here..." 1>&2
7928         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7929
7930 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7931         echo "configure: warning: programs compiled here do not run here..." 1>&2
7932         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7933 fi
7934
7935
7936 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7937 echo "configure:7938: checking for Cygwin environment" >&5
7938 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7939   echo $ac_n "(cached) $ac_c" 1>&6
7940 else
7941   cat > conftest.$ac_ext <<EOF
7942 #line 7943 "configure"
7943 #include "confdefs.h"
7944
7945 int main() {
7946
7947 #ifndef __CYGWIN__
7948 #define __CYGWIN__ __CYGWIN32__
7949 #endif
7950 return __CYGWIN__;
7951 ; return 0; }
7952 EOF
7953 if { (eval echo configure:7954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7954   rm -rf conftest*
7955   ac_cv_cygwin=yes
7956 else
7957   echo "configure: failed program was:" >&5
7958   cat conftest.$ac_ext >&5
7959   rm -rf conftest*
7960   ac_cv_cygwin=no
7961 fi
7962 rm -f conftest*
7963 fi
7964
7965 echo "$ac_t""$ac_cv_cygwin" 1>&6
7966 CYGWIN=
7967 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7968 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7969 echo "configure:7970: checking for mingw32 environment" >&5
7970 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7971   echo $ac_n "(cached) $ac_c" 1>&6
7972 else
7973   cat > conftest.$ac_ext <<EOF
7974 #line 7975 "configure"
7975 #include "confdefs.h"
7976
7977 int main() {
7978 return __MINGW32__;
7979 ; return 0; }
7980 EOF
7981 if { (eval echo configure:7982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7982   rm -rf conftest*
7983   ac_cv_mingw32=yes
7984 else
7985   echo "configure: failed program was:" >&5
7986   cat conftest.$ac_ext >&5
7987   rm -rf conftest*
7988   ac_cv_mingw32=no
7989 fi
7990 rm -f conftest*
7991 fi
7992
7993 echo "$ac_t""$ac_cv_mingw32" 1>&6
7994 MINGW32=
7995 test "$ac_cv_mingw32" = yes && MINGW32=yes
7996
7997
7998
7999 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8000 echo "configure:8001: checking for executable suffix" >&5
8001 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8002   echo $ac_n "(cached) $ac_c" 1>&6
8003 else
8004   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8005   ac_cv_exeext=.exe
8006 else
8007   rm -f conftest*
8008   echo 'int main () { return 0; }' > conftest.$ac_ext
8009   ac_cv_exeext=
8010   if { (eval echo configure:8011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8011     for file in conftest.*; do
8012       case $file in
8013       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8014       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8015       esac
8016     done
8017   else
8018     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8019   fi
8020   rm -f conftest*
8021   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8022 fi
8023 fi
8024
8025 EXEEXT=""
8026 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8027 echo "$ac_t""${ac_cv_exeext}" 1>&6
8028 ac_exeext=$EXEEXT
8029
8030 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8031 echo "configure:8032: checking for object suffix" >&5
8032 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8033   echo $ac_n "(cached) $ac_c" 1>&6
8034 else
8035   rm -f conftest*
8036 echo 'int i = 1;' > conftest.$ac_ext
8037 if { (eval echo configure:8038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8038   for ac_file in conftest.*; do
8039     case $ac_file in
8040     *.c) ;;
8041     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8042     esac
8043   done
8044 else
8045   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8046 fi
8047 rm -f conftest*
8048 fi
8049
8050 echo "$ac_t""$ac_cv_objext" 1>&6
8051 OBJEXT=$ac_cv_objext
8052 ac_objext=$ac_cv_objext
8053
8054
8055 cat >> confdefs.h <<EOF
8056 #define EXEEXT "${EXEEXT}"
8057 EOF
8058
8059
8060 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8061 echo "configure:8062: checking for be_app in -lbe" >&5
8062 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8063 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8064   echo $ac_n "(cached) $ac_c" 1>&6
8065 else
8066   ac_save_LIBS="$LIBS"
8067 LIBS="-lbe -lroot -lnet $LIBS"
8068 cat > conftest.$ac_ext <<EOF
8069 #line 8070 "configure"
8070 #include "confdefs.h"
8071 /* Override any gcc2 internal prototype to avoid an error.  */
8072 /* We use char because int might match the return type of a gcc2
8073     builtin and then its argument prototype would still apply.  */
8074 char be_app();
8075
8076 int main() {
8077 be_app()
8078 ; return 0; }
8079 EOF
8080 if { (eval echo configure:8081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8081   rm -rf conftest*
8082   eval "ac_cv_lib_$ac_lib_var=yes"
8083 else
8084   echo "configure: failed program was:" >&5
8085   cat conftest.$ac_ext >&5
8086   rm -rf conftest*
8087   eval "ac_cv_lib_$ac_lib_var=no"
8088 fi
8089 rm -f conftest*
8090 LIBS="$ac_save_LIBS"
8091
8092 fi
8093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8094   echo "$ac_t""yes" 1>&6
8095   LIBS="$LIBS -lbe -lroot -lnet"
8096 else
8097   echo "$ac_t""no" 1>&6
8098 :
8099 fi
8100
8101
8102
8103
8104
8105 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8106 echo "configure:8107: checking for ${CC-cc} option to accept ANSI C" >&5
8107 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8108   echo $ac_n "(cached) $ac_c" 1>&6
8109 else
8110   am_cv_prog_cc_stdc=no
8111 ac_save_CC="$CC"
8112 # Don't try gcc -ansi; that turns off useful extensions and
8113 # breaks some systems' header files.
8114 # AIX                   -qlanglvl=ansi
8115 # Ultrix and OSF/1      -std1
8116 # HP-UX 10.20 and later -Ae
8117 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8118 # SVR4                  -Xc -D__EXTENSIONS__
8119 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8120 do
8121   CC="$ac_save_CC $ac_arg"
8122   cat > conftest.$ac_ext <<EOF
8123 #line 8124 "configure"
8124 #include "confdefs.h"
8125 #include <stdarg.h>
8126 #include <stdio.h>
8127 #include <sys/types.h>
8128 #include <sys/stat.h>
8129 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8130 struct buf { int x; };
8131 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8132 static char *e (p, i)
8133      char **p;
8134      int i;
8135 {
8136   return p[i];
8137 }
8138 static char *f (char * (*g) (char **, int), char **p, ...)
8139 {
8140   char *s;
8141   va_list v;
8142   va_start (v,p);
8143   s = g (p, va_arg (v,int));
8144   va_end (v);
8145   return s;
8146 }
8147 int test (int i, double x);
8148 struct s1 {int (*f) (int a);};
8149 struct s2 {int (*f) (double a);};
8150 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8151 int argc;
8152 char **argv;
8153
8154 int main() {
8155
8156 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8157
8158 ; return 0; }
8159 EOF
8160 if { (eval echo configure:8161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8161   rm -rf conftest*
8162   am_cv_prog_cc_stdc="$ac_arg"; break
8163 else
8164   echo "configure: failed program was:" >&5
8165   cat conftest.$ac_ext >&5
8166 fi
8167 rm -f conftest*
8168 done
8169 CC="$ac_save_CC"
8170
8171 fi
8172
8173 if test -z "$am_cv_prog_cc_stdc"; then
8174   echo "$ac_t""none needed" 1>&6
8175 else
8176   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8177 fi
8178 case "x$am_cv_prog_cc_stdc" in
8179   x|xno) ;;
8180   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8181 esac
8182
8183 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8184         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8185 fi
8186
8187 # test for make depend flag
8188 OL_MKDEP=
8189 OL_MKDEP_FLAGS=
8190 if test -z "${MKDEP}"; then
8191         OL_MKDEP="${CC-cc}"
8192         if test -z "${MKDEP_FLAGS}"; then
8193                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8194 echo "configure:8195: checking for ${OL_MKDEP} depend flag" >&5
8195 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8196   echo $ac_n "(cached) $ac_c" 1>&6
8197 else
8198   
8199                         ol_cv_mkdep=no
8200                         for flag in "-M" "-xM"; do
8201                                 cat > conftest.c <<EOF
8202  noCode;
8203 EOF
8204                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8205                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8206                                 then
8207                                         if test ! -f conftest."${ac_object}" ; then
8208                                                 ol_cv_mkdep=$flag
8209                                                 OL_MKDEP_FLAGS="$flag"
8210                                                 break
8211                                         fi
8212                                 fi
8213                         done
8214                         rm -f conftest*
8215                 
8216 fi
8217
8218 echo "$ac_t""$ol_cv_mkdep" 1>&6
8219         else
8220                 cc_cv_mkdep=yes
8221                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8222         fi
8223 else
8224         cc_cv_mkdep=yes
8225         OL_MKDEP="${MKDEP}"
8226         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8227 fi
8228
8229
8230
8231 if test "${ol_cv_mkdep}" = no ; then
8232         # this will soon become an error
8233         echo "configure: warning: do not know how to generate dependencies" 1>&2
8234 fi
8235
8236 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8237 echo "configure:8238: checking for afopen in -ls" >&5
8238 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8239 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8240   echo $ac_n "(cached) $ac_c" 1>&6
8241 else
8242   ac_save_LIBS="$LIBS"
8243 LIBS="-ls  $LIBS"
8244 cat > conftest.$ac_ext <<EOF
8245 #line 8246 "configure"
8246 #include "confdefs.h"
8247 /* Override any gcc2 internal prototype to avoid an error.  */
8248 /* We use char because int might match the return type of a gcc2
8249     builtin and then its argument prototype would still apply.  */
8250 char afopen();
8251
8252 int main() {
8253 afopen()
8254 ; return 0; }
8255 EOF
8256 if { (eval echo configure:8257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8257   rm -rf conftest*
8258   eval "ac_cv_lib_$ac_lib_var=yes"
8259 else
8260   echo "configure: failed program was:" >&5
8261   cat conftest.$ac_ext >&5
8262   rm -rf conftest*
8263   eval "ac_cv_lib_$ac_lib_var=no"
8264 fi
8265 rm -f conftest*
8266 LIBS="$ac_save_LIBS"
8267
8268 fi
8269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8270   echo "$ac_t""yes" 1>&6
8271   
8272         AUTH_LIBS=-ls
8273         cat >> confdefs.h <<\EOF
8274 #define HAVE_AIX_SECURITY 1
8275 EOF
8276
8277
8278 else
8279   echo "$ac_t""no" 1>&6
8280 fi
8281
8282
8283 case "$target" in
8284 *-ibm-openedition)
8285         ac_cv_func_getopt=no
8286         cat >> confdefs.h <<\EOF
8287 #define BOTH_STRINGS_H 1
8288 EOF
8289
8290         ;;
8291 esac
8292
8293 ol_link_modules=no
8294 if test $ol_enable_modules != no ; then
8295         for ac_hdr in ltdl.h
8296 do
8297 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8298 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8299 echo "configure:8300: checking for $ac_hdr" >&5
8300 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8301   echo $ac_n "(cached) $ac_c" 1>&6
8302 else
8303   cat > conftest.$ac_ext <<EOF
8304 #line 8305 "configure"
8305 #include "confdefs.h"
8306 #include <$ac_hdr>
8307 EOF
8308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8309 { (eval echo configure:8310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8311 if test -z "$ac_err"; then
8312   rm -rf conftest*
8313   eval "ac_cv_header_$ac_safe=yes"
8314 else
8315   echo "$ac_err" >&5
8316   echo "configure: failed program was:" >&5
8317   cat conftest.$ac_ext >&5
8318   rm -rf conftest*
8319   eval "ac_cv_header_$ac_safe=no"
8320 fi
8321 rm -f conftest*
8322 fi
8323 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8324   echo "$ac_t""yes" 1>&6
8325     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8326   cat >> confdefs.h <<EOF
8327 #define $ac_tr_hdr 1
8328 EOF
8329  
8330 else
8331   echo "$ac_t""no" 1>&6
8332 fi
8333 done
8334
8335
8336         if test $ac_cv_header_ltdl_h = no ; then
8337                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8338         fi
8339
8340         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8341 echo "configure:8342: checking for lt_dlinit in -lltdl" >&5
8342 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8343 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8344   echo $ac_n "(cached) $ac_c" 1>&6
8345 else
8346   ac_save_LIBS="$LIBS"
8347 LIBS="-lltdl  $LIBS"
8348 cat > conftest.$ac_ext <<EOF
8349 #line 8350 "configure"
8350 #include "confdefs.h"
8351 /* Override any gcc2 internal prototype to avoid an error.  */
8352 /* We use char because int might match the return type of a gcc2
8353     builtin and then its argument prototype would still apply.  */
8354 char lt_dlinit();
8355
8356 int main() {
8357 lt_dlinit()
8358 ; return 0; }
8359 EOF
8360 if { (eval echo configure:8361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8361   rm -rf conftest*
8362   eval "ac_cv_lib_$ac_lib_var=yes"
8363 else
8364   echo "configure: failed program was:" >&5
8365   cat conftest.$ac_ext >&5
8366   rm -rf conftest*
8367   eval "ac_cv_lib_$ac_lib_var=no"
8368 fi
8369 rm -f conftest*
8370 LIBS="$ac_save_LIBS"
8371
8372 fi
8373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8374   echo "$ac_t""yes" 1>&6
8375   
8376                 MODULES_LIBS=-lltdl
8377                 cat >> confdefs.h <<\EOF
8378 #define HAVE_LIBLTDL 1
8379 EOF
8380
8381         
8382 else
8383   echo "$ac_t""no" 1>&6
8384 fi
8385
8386
8387         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8388                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8389         fi
8390         ol_link_modules=yes
8391 else
8392         ol_with_bdb_module=static
8393         ol_with_dnssrv_module=static
8394         ol_with_hdb_module=static
8395         ol_with_ldap_module=static
8396         ol_with_ldbm_module=static
8397         ol_with_meta_module=static
8398         ol_with_monitor_module=static
8399         ol_with_null_module=static
8400         ol_with_passwd_module=static
8401         ol_with_perl_module=static
8402         ol_with_shell_module=static
8403         ol_with_sql_module=static
8404 fi
8405
8406 # test for EBCDIC
8407 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8408 echo "configure:8409: checking for EBCDIC" >&5
8409 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8410   echo $ac_n "(cached) $ac_c" 1>&6
8411 else
8412   
8413         cat > conftest.$ac_ext <<EOF
8414 #line 8415 "configure"
8415 #include "confdefs.h"
8416
8417 #if !('M' == 0xd4)
8418 #include <__ASCII__/generate_error.h>
8419 #endif
8420
8421 EOF
8422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8423 { (eval echo configure:8424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8425 if test -z "$ac_err"; then
8426   rm -rf conftest*
8427   ol_cv_cpp_ebcdic=yes
8428 else
8429   echo "$ac_err" >&5
8430   echo "configure: failed program was:" >&5
8431   cat conftest.$ac_ext >&5
8432   rm -rf conftest*
8433   ol_cv_cpp_ebcdic=no
8434 fi
8435 rm -f conftest*
8436 fi
8437
8438 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8439 if test $ol_cv_cpp_ebcdic = yes ; then
8440         cat >> confdefs.h <<\EOF
8441 #define HAVE_EBCDIC 1
8442 EOF
8443
8444 fi
8445
8446 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8447 echo "configure:8448: checking for ANSI C header files" >&5
8448 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8449   echo $ac_n "(cached) $ac_c" 1>&6
8450 else
8451   cat > conftest.$ac_ext <<EOF
8452 #line 8453 "configure"
8453 #include "confdefs.h"
8454 #include <stdlib.h>
8455 #include <stdarg.h>
8456 #include <string.h>
8457 #include <float.h>
8458 EOF
8459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8460 { (eval echo configure:8461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8461 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8462 if test -z "$ac_err"; then
8463   rm -rf conftest*
8464   ol_cv_header_stdc=yes
8465 else
8466   echo "$ac_err" >&5
8467   echo "configure: failed program was:" >&5
8468   cat conftest.$ac_ext >&5
8469   rm -rf conftest*
8470   ol_cv_header_stdc=no
8471 fi
8472 rm -f conftest*
8473
8474 if test $ol_cv_header_stdc = yes; then
8475   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8476 cat > conftest.$ac_ext <<EOF
8477 #line 8478 "configure"
8478 #include "confdefs.h"
8479 #include <string.h>
8480 EOF
8481 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8482   egrep "memchr" >/dev/null 2>&1; then
8483   :
8484 else
8485   rm -rf conftest*
8486   ol_cv_header_stdc=no
8487 fi
8488 rm -f conftest*
8489
8490 fi
8491
8492 if test $ol_cv_header_stdc = yes; then
8493   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8494 cat > conftest.$ac_ext <<EOF
8495 #line 8496 "configure"
8496 #include "confdefs.h"
8497 #include <stdlib.h>
8498 EOF
8499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8500   egrep "free" >/dev/null 2>&1; then
8501   :
8502 else
8503   rm -rf conftest*
8504   ol_cv_header_stdc=no
8505 fi
8506 rm -f conftest*
8507
8508 fi
8509
8510 if test $ol_cv_header_stdc = yes; then
8511   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8512 if test "$cross_compiling" = yes; then
8513   :
8514 else
8515   cat > conftest.$ac_ext <<EOF
8516 #line 8517 "configure"
8517 #include "confdefs.h"
8518 #include <ctype.h>
8519 #ifndef HAVE_EBCDIC
8520 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8521 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8522 #else
8523 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8524                 || ('j' <= (c) && (c) <= 'r') \
8525                 || ('s' <= (c) && (c) <= 'z'))
8526 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8527 #endif
8528 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8529 int main () { int i; for (i = 0; i < 256; i++)
8530 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8531 exit (0); }
8532
8533 EOF
8534 if { (eval echo configure:8535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8535 then
8536   :
8537 else
8538   echo "configure: failed program was:" >&5
8539   cat conftest.$ac_ext >&5
8540   rm -fr conftest*
8541   ol_cv_header_stdc=no
8542 fi
8543 rm -fr conftest*
8544 fi
8545
8546 fi
8547 fi
8548
8549 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8550 if test $ol_cv_header_stdc = yes; then
8551   cat >> confdefs.h <<\EOF
8552 #define STDC_HEADERS 1
8553 EOF
8554
8555 fi
8556 ac_cv_header_stdc=disable
8557
8558
8559 if test $ol_cv_header_stdc != yes; then
8560         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8561 fi
8562
8563 ac_header_dirent=no
8564 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8565 do
8566 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8567 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8568 echo "configure:8569: checking for $ac_hdr that defines DIR" >&5
8569 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8570   echo $ac_n "(cached) $ac_c" 1>&6
8571 else
8572   cat > conftest.$ac_ext <<EOF
8573 #line 8574 "configure"
8574 #include "confdefs.h"
8575 #include <sys/types.h>
8576 #include <$ac_hdr>
8577 int main() {
8578 DIR *dirp = 0;
8579 ; return 0; }
8580 EOF
8581 if { (eval echo configure:8582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8582   rm -rf conftest*
8583   eval "ac_cv_header_dirent_$ac_safe=yes"
8584 else
8585   echo "configure: failed program was:" >&5
8586   cat conftest.$ac_ext >&5
8587   rm -rf conftest*
8588   eval "ac_cv_header_dirent_$ac_safe=no"
8589 fi
8590 rm -f conftest*
8591 fi
8592 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8593   echo "$ac_t""yes" 1>&6
8594     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8595   cat >> confdefs.h <<EOF
8596 #define $ac_tr_hdr 1
8597 EOF
8598  ac_header_dirent=$ac_hdr; break
8599 else
8600   echo "$ac_t""no" 1>&6
8601 fi
8602 done
8603 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8604 if test $ac_header_dirent = dirent.h; then
8605 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8606 echo "configure:8607: checking for opendir in -ldir" >&5
8607 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8608 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8609   echo $ac_n "(cached) $ac_c" 1>&6
8610 else
8611   ac_save_LIBS="$LIBS"
8612 LIBS="-ldir  $LIBS"
8613 cat > conftest.$ac_ext <<EOF
8614 #line 8615 "configure"
8615 #include "confdefs.h"
8616 /* Override any gcc2 internal prototype to avoid an error.  */
8617 /* We use char because int might match the return type of a gcc2
8618     builtin and then its argument prototype would still apply.  */
8619 char opendir();
8620
8621 int main() {
8622 opendir()
8623 ; return 0; }
8624 EOF
8625 if { (eval echo configure:8626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8626   rm -rf conftest*
8627   eval "ac_cv_lib_$ac_lib_var=yes"
8628 else
8629   echo "configure: failed program was:" >&5
8630   cat conftest.$ac_ext >&5
8631   rm -rf conftest*
8632   eval "ac_cv_lib_$ac_lib_var=no"
8633 fi
8634 rm -f conftest*
8635 LIBS="$ac_save_LIBS"
8636
8637 fi
8638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8639   echo "$ac_t""yes" 1>&6
8640   LIBS="$LIBS -ldir"
8641 else
8642   echo "$ac_t""no" 1>&6
8643 fi
8644
8645 else
8646 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8647 echo "configure:8648: checking for opendir in -lx" >&5
8648 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8649 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8650   echo $ac_n "(cached) $ac_c" 1>&6
8651 else
8652   ac_save_LIBS="$LIBS"
8653 LIBS="-lx  $LIBS"
8654 cat > conftest.$ac_ext <<EOF
8655 #line 8656 "configure"
8656 #include "confdefs.h"
8657 /* Override any gcc2 internal prototype to avoid an error.  */
8658 /* We use char because int might match the return type of a gcc2
8659     builtin and then its argument prototype would still apply.  */
8660 char opendir();
8661
8662 int main() {
8663 opendir()
8664 ; return 0; }
8665 EOF
8666 if { (eval echo configure:8667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8667   rm -rf conftest*
8668   eval "ac_cv_lib_$ac_lib_var=yes"
8669 else
8670   echo "configure: failed program was:" >&5
8671   cat conftest.$ac_ext >&5
8672   rm -rf conftest*
8673   eval "ac_cv_lib_$ac_lib_var=no"
8674 fi
8675 rm -f conftest*
8676 LIBS="$ac_save_LIBS"
8677
8678 fi
8679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8680   echo "$ac_t""yes" 1>&6
8681   LIBS="$LIBS -lx"
8682 else
8683   echo "$ac_t""no" 1>&6
8684 fi
8685
8686 fi
8687
8688 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8689 echo "configure:8690: checking for sys/wait.h that is POSIX.1 compatible" >&5
8690 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8691   echo $ac_n "(cached) $ac_c" 1>&6
8692 else
8693   cat > conftest.$ac_ext <<EOF
8694 #line 8695 "configure"
8695 #include "confdefs.h"
8696 #include <sys/types.h>
8697 #include <sys/wait.h>
8698 #ifndef WEXITSTATUS
8699 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8700 #endif
8701 #ifndef WIFEXITED
8702 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8703 #endif
8704 int main() {
8705 int s;
8706 wait (&s);
8707 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8708 ; return 0; }
8709 EOF
8710 if { (eval echo configure:8711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8711   rm -rf conftest*
8712   ac_cv_header_sys_wait_h=yes
8713 else
8714   echo "configure: failed program was:" >&5
8715   cat conftest.$ac_ext >&5
8716   rm -rf conftest*
8717   ac_cv_header_sys_wait_h=no
8718 fi
8719 rm -f conftest*
8720 fi
8721
8722 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8723 if test $ac_cv_header_sys_wait_h = yes; then
8724   cat >> confdefs.h <<\EOF
8725 #define HAVE_SYS_WAIT_H 1
8726 EOF
8727
8728 fi
8729
8730 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8731 echo "configure:8732: checking POSIX termios" >&5
8732 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8733   echo $ac_n "(cached) $ac_c" 1>&6
8734 else
8735   cat > conftest.$ac_ext <<EOF
8736 #line 8737 "configure"
8737 #include "confdefs.h"
8738 #include <sys/types.h>
8739 #include <unistd.h>
8740 #include <termios.h>
8741 int main() {
8742 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8743    tcgetattr(0, 0);
8744 ; return 0; }
8745 EOF
8746 if { (eval echo configure:8747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8747   rm -rf conftest*
8748   am_cv_sys_posix_termios=yes
8749 else
8750   echo "configure: failed program was:" >&5
8751   cat conftest.$ac_ext >&5
8752   rm -rf conftest*
8753   am_cv_sys_posix_termios=no
8754 fi
8755 rm -f conftest*
8756 fi
8757
8758 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8759
8760
8761  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8762 echo "configure:8763: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8763 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8764   echo $ac_n "(cached) $ac_c" 1>&6
8765 else
8766   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8767
8768   gwinsz_in_termios_h=no
8769   if test $am_cv_sys_posix_termios = yes; then
8770     cat > conftest.$ac_ext <<EOF
8771 #line 8772 "configure"
8772 #include "confdefs.h"
8773 #include <sys/types.h>
8774 #     include <termios.h>
8775 #     ifdef TIOCGWINSZ
8776         yes
8777 #     endif
8778     
8779 EOF
8780 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8781   egrep "yes" >/dev/null 2>&1; then
8782   rm -rf conftest*
8783   gwinsz_in_termios_h=yes
8784 fi
8785 rm -f conftest*
8786
8787   fi
8788
8789   if test $gwinsz_in_termios_h = no; then
8790     cat > conftest.$ac_ext <<EOF
8791 #line 8792 "configure"
8792 #include "confdefs.h"
8793 #include <sys/types.h>
8794 #     include <sys/ioctl.h>
8795 #     ifdef TIOCGWINSZ
8796         yes
8797 #     endif
8798     
8799 EOF
8800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8801   egrep "yes" >/dev/null 2>&1; then
8802   rm -rf conftest*
8803   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8804 fi
8805 rm -f conftest*
8806
8807   fi
8808   
8809 fi
8810
8811 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8812   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8813     cat >> confdefs.h <<\EOF
8814 #define GWINSZ_IN_SYS_IOCTL 1
8815 EOF
8816
8817   fi
8818
8819 if test $am_cv_sys_posix_termios = yes ; then
8820         cat >> confdefs.h <<\EOF
8821 #define HAVE_POSIX_TERMIOS 1
8822 EOF
8823
8824 fi
8825
8826 for ac_hdr in \
8827         arpa/inet.h             \
8828         arpa/nameser.h  \
8829         assert.h                \
8830         conio.h                 \
8831         crypt.h                 \
8832         direct.h                \
8833         errno.h                 \
8834         fcntl.h                 \
8835         filio.h                 \
8836         getopt.h                \
8837         grp.h                   \
8838         io.h                    \
8839         libutil.h               \
8840         limits.h                \
8841         locale.h                \
8842         netinet/tcp.h   \
8843         malloc.h                \
8844         memory.h                \
8845         psap.h                  \
8846         pwd.h                   \
8847         process.h               \
8848         resolv.h                \
8849         sgtty.h                 \
8850         shadow.h                \
8851         stddef.h                \
8852         string.h                \
8853         strings.h               \
8854         sysexits.h              \
8855         sys/file.h              \
8856         sys/filio.h             \
8857         sys/errno.h             \
8858         sys/ioctl.h             \
8859         sys/param.h             \
8860         sys/resource.h  \
8861         sys/select.h    \
8862         sys/socket.h    \
8863         sys/stat.h              \
8864         sys/syslog.h    \
8865         sys/time.h              \
8866         sys/types.h             \
8867         sys/ucred.h             \
8868         sys/uio.h               \
8869         syslog.h                \
8870         termios.h               \
8871         unistd.h                \
8872         winsock.h               \
8873         winsock2.h              \
8874
8875 do
8876 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8877 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8878 echo "configure:8879: checking for $ac_hdr" >&5
8879 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8880   echo $ac_n "(cached) $ac_c" 1>&6
8881 else
8882   cat > conftest.$ac_ext <<EOF
8883 #line 8884 "configure"
8884 #include "confdefs.h"
8885 #include <$ac_hdr>
8886 EOF
8887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8888 { (eval echo configure:8889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8890 if test -z "$ac_err"; then
8891   rm -rf conftest*
8892   eval "ac_cv_header_$ac_safe=yes"
8893 else
8894   echo "$ac_err" >&5
8895   echo "configure: failed program was:" >&5
8896   cat conftest.$ac_ext >&5
8897   rm -rf conftest*
8898   eval "ac_cv_header_$ac_safe=no"
8899 fi
8900 rm -f conftest*
8901 fi
8902 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8903   echo "$ac_t""yes" 1>&6
8904     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8905   cat >> confdefs.h <<EOF
8906 #define $ac_tr_hdr 1
8907 EOF
8908  
8909 else
8910   echo "$ac_t""no" 1>&6
8911 fi
8912 done
8913
8914
8915
8916
8917 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8918 echo "configure:8919: checking for dlopen" >&5
8919 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8920   echo $ac_n "(cached) $ac_c" 1>&6
8921 else
8922   cat > conftest.$ac_ext <<EOF
8923 #line 8924 "configure"
8924 #include "confdefs.h"
8925 /* System header to define __stub macros and hopefully few prototypes,
8926     which can conflict with char dlopen(); below.  */
8927 #include <assert.h>
8928 /* Override any gcc2 internal prototype to avoid an error.  */
8929 /* We use char because int might match the return type of a gcc2
8930     builtin and then its argument prototype would still apply.  */
8931 char dlopen();
8932 char (*f)();
8933
8934 int main() {
8935
8936 /* The GNU C library defines this for functions which it implements
8937     to always fail with ENOSYS.  Some functions are actually named
8938     something starting with __ and the normal name is an alias.  */
8939 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8940 choke me
8941 #else
8942 f = dlopen;
8943 #endif
8944
8945 ; return 0; }
8946 EOF
8947 if { (eval echo configure:8948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8948   rm -rf conftest*
8949   eval "ac_cv_func_dlopen=yes"
8950 else
8951   echo "configure: failed program was:" >&5
8952   cat conftest.$ac_ext >&5
8953   rm -rf conftest*
8954   eval "ac_cv_func_dlopen=no"
8955 fi
8956 rm -f conftest*
8957 fi
8958
8959 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8960   echo "$ac_t""yes" 1>&6
8961   :
8962 else
8963   echo "$ac_t""no" 1>&6
8964 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8965 echo "configure:8966: checking for dlopen in -ldl" >&5
8966 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8967 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8968   echo $ac_n "(cached) $ac_c" 1>&6
8969 else
8970   ac_save_LIBS="$LIBS"
8971 LIBS="-ldl  $LIBS"
8972 cat > conftest.$ac_ext <<EOF
8973 #line 8974 "configure"
8974 #include "confdefs.h"
8975 /* Override any gcc2 internal prototype to avoid an error.  */
8976 /* We use char because int might match the return type of a gcc2
8977     builtin and then its argument prototype would still apply.  */
8978 char dlopen();
8979
8980 int main() {
8981 dlopen()
8982 ; return 0; }
8983 EOF
8984 if { (eval echo configure:8985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8985   rm -rf conftest*
8986   eval "ac_cv_lib_$ac_lib_var=yes"
8987 else
8988   echo "configure: failed program was:" >&5
8989   cat conftest.$ac_ext >&5
8990   rm -rf conftest*
8991   eval "ac_cv_lib_$ac_lib_var=no"
8992 fi
8993 rm -f conftest*
8994 LIBS="$ac_save_LIBS"
8995
8996 fi
8997 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8998   echo "$ac_t""yes" 1>&6
8999     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9000     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9001   cat >> confdefs.h <<EOF
9002 #define $ac_tr_lib 1
9003 EOF
9004
9005   LIBS="-ldl $LIBS"
9006
9007 else
9008   echo "$ac_t""no" 1>&6
9009 fi
9010
9011 fi
9012
9013
9014 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9015 echo "configure:9016: checking for sigset in -lV3" >&5
9016 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9017 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9018   echo $ac_n "(cached) $ac_c" 1>&6
9019 else
9020   ac_save_LIBS="$LIBS"
9021 LIBS="-lV3  $LIBS"
9022 cat > conftest.$ac_ext <<EOF
9023 #line 9024 "configure"
9024 #include "confdefs.h"
9025 /* Override any gcc2 internal prototype to avoid an error.  */
9026 /* We use char because int might match the return type of a gcc2
9027     builtin and then its argument prototype would still apply.  */
9028 char sigset();
9029
9030 int main() {
9031 sigset()
9032 ; return 0; }
9033 EOF
9034 if { (eval echo configure:9035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9035   rm -rf conftest*
9036   eval "ac_cv_lib_$ac_lib_var=yes"
9037 else
9038   echo "configure: failed program was:" >&5
9039   cat conftest.$ac_ext >&5
9040   rm -rf conftest*
9041   eval "ac_cv_lib_$ac_lib_var=no"
9042 fi
9043 rm -f conftest*
9044 LIBS="$ac_save_LIBS"
9045
9046 fi
9047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9048   echo "$ac_t""yes" 1>&6
9049     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9050     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9051   cat >> confdefs.h <<EOF
9052 #define $ac_tr_lib 1
9053 EOF
9054
9055   LIBS="-lV3 $LIBS"
9056
9057 else
9058   echo "$ac_t""no" 1>&6
9059 fi
9060
9061
9062 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9063 echo "configure:9064: checking for winsock" >&5
9064 save_LIBS="$LIBS"
9065 for curlib in ws2_32 wsock32; do
9066         LIBS="$LIBS -l$curlib"
9067         cat > conftest.$ac_ext <<EOF
9068 #line 9069 "configure"
9069 #include "confdefs.h"
9070
9071                         char socket@12();
9072                         char select@20();
9073                         char closesocket@4();
9074                         char gethostname@8();
9075                         
9076 int main() {
9077
9078                         socket@12();
9079                         select@20();
9080                         closesocket@4();
9081                         gethostname@8();
9082                         
9083 ; return 0; }
9084 EOF
9085 if { (eval echo configure:9086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9086   rm -rf conftest*
9087   have_winsock=yes
9088 else
9089   echo "configure: failed program was:" >&5
9090   cat conftest.$ac_ext >&5
9091   rm -rf conftest*
9092   have_winsock=no
9093 fi
9094 rm -f conftest*
9095
9096         if test $have_winsock = yes; then
9097                 cat >> confdefs.h <<\EOF
9098 #define HAVE_WINSOCK 1
9099 EOF
9100
9101                 ac_cv_func_socket=yes
9102                 ac_cv_func_select=yes
9103                 ac_cv_func_closesocket=yes
9104                 ac_cv_func_gethostname=yes
9105                 if test $curlib = ws2_32; then
9106                         have_winsock=winsock2
9107                         cat >> confdefs.h <<\EOF
9108 #define HAVE_WINSOCK2 1
9109 EOF
9110
9111                 fi
9112                 break
9113         fi
9114         LIBS="$save_LIBS"
9115 done
9116 echo "$ac_t""$have_winsock" 1>&6
9117
9118
9119 echo $ac_n "checking for socket""... $ac_c" 1>&6
9120 echo "configure:9121: checking for socket" >&5
9121 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9122   echo $ac_n "(cached) $ac_c" 1>&6
9123 else
9124   cat > conftest.$ac_ext <<EOF
9125 #line 9126 "configure"
9126 #include "confdefs.h"
9127 /* System header to define __stub macros and hopefully few prototypes,
9128     which can conflict with char socket(); below.  */
9129 #include <assert.h>
9130 /* Override any gcc2 internal prototype to avoid an error.  */
9131 /* We use char because int might match the return type of a gcc2
9132     builtin and then its argument prototype would still apply.  */
9133 char socket();
9134 char (*f)();
9135
9136 int main() {
9137
9138 /* The GNU C library defines this for functions which it implements
9139     to always fail with ENOSYS.  Some functions are actually named
9140     something starting with __ and the normal name is an alias.  */
9141 #if defined (__stub_socket) || defined (__stub___socket)
9142 choke me
9143 #else
9144 f = socket;
9145 #endif
9146
9147 ; return 0; }
9148 EOF
9149 if { (eval echo configure:9150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9150   rm -rf conftest*
9151   eval "ac_cv_func_socket=yes"
9152 else
9153   echo "configure: failed program was:" >&5
9154   cat conftest.$ac_ext >&5
9155   rm -rf conftest*
9156   eval "ac_cv_func_socket=no"
9157 fi
9158 rm -f conftest*
9159 fi
9160
9161 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9162   echo "$ac_t""yes" 1>&6
9163   :
9164 else
9165   echo "$ac_t""no" 1>&6
9166         
9167         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9168 echo "configure:9169: checking for main in -lsocket" >&5
9169 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9170 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9171   echo $ac_n "(cached) $ac_c" 1>&6
9172 else
9173   ac_save_LIBS="$LIBS"
9174 LIBS="-lsocket  $LIBS"
9175 cat > conftest.$ac_ext <<EOF
9176 #line 9177 "configure"
9177 #include "confdefs.h"
9178
9179 int main() {
9180 main()
9181 ; return 0; }
9182 EOF
9183 if { (eval echo configure:9184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9184   rm -rf conftest*
9185   eval "ac_cv_lib_$ac_lib_var=yes"
9186 else
9187   echo "configure: failed program was:" >&5
9188   cat conftest.$ac_ext >&5
9189   rm -rf conftest*
9190   eval "ac_cv_lib_$ac_lib_var=no"
9191 fi
9192 rm -f conftest*
9193 LIBS="$ac_save_LIBS"
9194
9195 fi
9196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9197   echo "$ac_t""yes" 1>&6
9198     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9199     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9200   cat >> confdefs.h <<EOF
9201 #define $ac_tr_lib 1
9202 EOF
9203
9204   LIBS="-lsocket $LIBS"
9205
9206 else
9207   echo "$ac_t""no" 1>&6
9208 fi
9209
9210         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9211 echo "configure:9212: checking for main in -lnet" >&5
9212 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9213 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9214   echo $ac_n "(cached) $ac_c" 1>&6
9215 else
9216   ac_save_LIBS="$LIBS"
9217 LIBS="-lnet  $LIBS"
9218 cat > conftest.$ac_ext <<EOF
9219 #line 9220 "configure"
9220 #include "confdefs.h"
9221
9222 int main() {
9223 main()
9224 ; return 0; }
9225 EOF
9226 if { (eval echo configure:9227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9227   rm -rf conftest*
9228   eval "ac_cv_lib_$ac_lib_var=yes"
9229 else
9230   echo "configure: failed program was:" >&5
9231   cat conftest.$ac_ext >&5
9232   rm -rf conftest*
9233   eval "ac_cv_lib_$ac_lib_var=no"
9234 fi
9235 rm -f conftest*
9236 LIBS="$ac_save_LIBS"
9237
9238 fi
9239 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9240   echo "$ac_t""yes" 1>&6
9241     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9242     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9243   cat >> confdefs.h <<EOF
9244 #define $ac_tr_lib 1
9245 EOF
9246
9247   LIBS="-lnet $LIBS"
9248
9249 else
9250   echo "$ac_t""no" 1>&6
9251 fi
9252
9253         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9254 echo "configure:9255: checking for main in -lnsl_s" >&5
9255 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9256 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9257   echo $ac_n "(cached) $ac_c" 1>&6
9258 else
9259   ac_save_LIBS="$LIBS"
9260 LIBS="-lnsl_s  $LIBS"
9261 cat > conftest.$ac_ext <<EOF
9262 #line 9263 "configure"
9263 #include "confdefs.h"
9264
9265 int main() {
9266 main()
9267 ; return 0; }
9268 EOF
9269 if { (eval echo configure:9270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9270   rm -rf conftest*
9271   eval "ac_cv_lib_$ac_lib_var=yes"
9272 else
9273   echo "configure: failed program was:" >&5
9274   cat conftest.$ac_ext >&5
9275   rm -rf conftest*
9276   eval "ac_cv_lib_$ac_lib_var=no"
9277 fi
9278 rm -f conftest*
9279 LIBS="$ac_save_LIBS"
9280
9281 fi
9282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9283   echo "$ac_t""yes" 1>&6
9284     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9285     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9286   cat >> confdefs.h <<EOF
9287 #define $ac_tr_lib 1
9288 EOF
9289
9290   LIBS="-lnsl_s $LIBS"
9291
9292 else
9293   echo "$ac_t""no" 1>&6
9294 fi
9295
9296         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9297 echo "configure:9298: checking for main in -lnsl" >&5
9298 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9299 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9300   echo $ac_n "(cached) $ac_c" 1>&6
9301 else
9302   ac_save_LIBS="$LIBS"
9303 LIBS="-lnsl  $LIBS"
9304 cat > conftest.$ac_ext <<EOF
9305 #line 9306 "configure"
9306 #include "confdefs.h"
9307
9308 int main() {
9309 main()
9310 ; return 0; }
9311 EOF
9312 if { (eval echo configure:9313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9313   rm -rf conftest*
9314   eval "ac_cv_lib_$ac_lib_var=yes"
9315 else
9316   echo "configure: failed program was:" >&5
9317   cat conftest.$ac_ext >&5
9318   rm -rf conftest*
9319   eval "ac_cv_lib_$ac_lib_var=no"
9320 fi
9321 rm -f conftest*
9322 LIBS="$ac_save_LIBS"
9323
9324 fi
9325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9326   echo "$ac_t""yes" 1>&6
9327     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9328     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9329   cat >> confdefs.h <<EOF
9330 #define $ac_tr_lib 1
9331 EOF
9332
9333   LIBS="-lnsl $LIBS"
9334
9335 else
9336   echo "$ac_t""no" 1>&6
9337 fi
9338
9339         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9340 echo "configure:9341: checking for socket in -linet" >&5
9341 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9342 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9343   echo $ac_n "(cached) $ac_c" 1>&6
9344 else
9345   ac_save_LIBS="$LIBS"
9346 LIBS="-linet  $LIBS"
9347 cat > conftest.$ac_ext <<EOF
9348 #line 9349 "configure"
9349 #include "confdefs.h"
9350 /* Override any gcc2 internal prototype to avoid an error.  */
9351 /* We use char because int might match the return type of a gcc2
9352     builtin and then its argument prototype would still apply.  */
9353 char socket();
9354
9355 int main() {
9356 socket()
9357 ; return 0; }
9358 EOF
9359 if { (eval echo configure:9360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9360   rm -rf conftest*
9361   eval "ac_cv_lib_$ac_lib_var=yes"
9362 else
9363   echo "configure: failed program was:" >&5
9364   cat conftest.$ac_ext >&5
9365   rm -rf conftest*
9366   eval "ac_cv_lib_$ac_lib_var=no"
9367 fi
9368 rm -f conftest*
9369 LIBS="$ac_save_LIBS"
9370
9371 fi
9372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9373   echo "$ac_t""yes" 1>&6
9374     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9375     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9376   cat >> confdefs.h <<EOF
9377 #define $ac_tr_lib 1
9378 EOF
9379
9380   LIBS="-linet $LIBS"
9381
9382 else
9383   echo "$ac_t""no" 1>&6
9384 fi
9385
9386         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9387 echo "configure:9388: checking for main in -lgen" >&5
9388 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9389 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9390   echo $ac_n "(cached) $ac_c" 1>&6
9391 else
9392   ac_save_LIBS="$LIBS"
9393 LIBS="-lgen  $LIBS"
9394 cat > conftest.$ac_ext <<EOF
9395 #line 9396 "configure"
9396 #include "confdefs.h"
9397
9398 int main() {
9399 main()
9400 ; return 0; }
9401 EOF
9402 if { (eval echo configure:9403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9403   rm -rf conftest*
9404   eval "ac_cv_lib_$ac_lib_var=yes"
9405 else
9406   echo "configure: failed program was:" >&5
9407   cat conftest.$ac_ext >&5
9408   rm -rf conftest*
9409   eval "ac_cv_lib_$ac_lib_var=no"
9410 fi
9411 rm -f conftest*
9412 LIBS="$ac_save_LIBS"
9413
9414 fi
9415 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9416   echo "$ac_t""yes" 1>&6
9417     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9418     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9419   cat >> confdefs.h <<EOF
9420 #define $ac_tr_lib 1
9421 EOF
9422
9423   LIBS="-lgen $LIBS"
9424
9425 else
9426   echo "$ac_t""no" 1>&6
9427 fi
9428
9429
9430 fi
9431
9432
9433 echo $ac_n "checking for select""... $ac_c" 1>&6
9434 echo "configure:9435: checking for select" >&5
9435 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9436   echo $ac_n "(cached) $ac_c" 1>&6
9437 else
9438   cat > conftest.$ac_ext <<EOF
9439 #line 9440 "configure"
9440 #include "confdefs.h"
9441 /* System header to define __stub macros and hopefully few prototypes,
9442     which can conflict with char select(); below.  */
9443 #include <assert.h>
9444 /* Override any gcc2 internal prototype to avoid an error.  */
9445 /* We use char because int might match the return type of a gcc2
9446     builtin and then its argument prototype would still apply.  */
9447 char select();
9448 char (*f)();
9449
9450 int main() {
9451
9452 /* The GNU C library defines this for functions which it implements
9453     to always fail with ENOSYS.  Some functions are actually named
9454     something starting with __ and the normal name is an alias.  */
9455 #if defined (__stub_select) || defined (__stub___select)
9456 choke me
9457 #else
9458 f = select;
9459 #endif
9460
9461 ; return 0; }
9462 EOF
9463 if { (eval echo configure:9464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9464   rm -rf conftest*
9465   eval "ac_cv_func_select=yes"
9466 else
9467   echo "configure: failed program was:" >&5
9468   cat conftest.$ac_ext >&5
9469   rm -rf conftest*
9470   eval "ac_cv_func_select=no"
9471 fi
9472 rm -f conftest*
9473 fi
9474
9475 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9476   echo "$ac_t""yes" 1>&6
9477   :
9478 else
9479   echo "$ac_t""no" 1>&6
9480 { echo "configure: error: select() required." 1>&2; exit 1; }
9481 fi
9482
9483
9484 if test "${ac_cv_header_winsock_h}" != yes; then
9485                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9486 echo "configure:9487: checking types of arguments for select()" >&5
9487  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9488   echo $ac_n "(cached) $ac_c" 1>&6
9489 else
9490    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9491   echo $ac_n "(cached) $ac_c" 1>&6
9492 else
9493     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9494   echo $ac_n "(cached) $ac_c" 1>&6
9495 else
9496      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9497      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9498       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9499        cat > conftest.$ac_ext <<EOF
9500 #line 9501 "configure"
9501 #include "confdefs.h"
9502 #ifdef HAVE_SYS_TYPES_H
9503 #include <sys/types.h>
9504 #endif
9505 #ifdef HAVE_SYS_TIME_H
9506 #include <sys/time.h>
9507 #endif
9508 #ifdef HAVE_SYS_SELECT_H
9509 #include <sys/select.h>
9510 #endif
9511 #ifdef HAVE_SYS_SOCKET_H
9512 #include <sys/socket.h>
9513 #endif
9514 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);
9515 int main() {
9516
9517 ; return 0; }
9518 EOF
9519 if { (eval echo configure:9520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9520   rm -rf conftest*
9521           ac_not_found=no ; break 3
9522 else
9523   echo "configure: failed program was:" >&5
9524   cat conftest.$ac_ext >&5
9525   rm -rf conftest*
9526   ac_not_found=yes
9527 fi
9528 rm -f conftest*
9529       done
9530      done
9531     done
9532    
9533 fi
9534   
9535 fi
9536  
9537 fi
9538  if test "$ac_not_found" = yes; then
9539   ac_cv_func_select_arg1=int 
9540   ac_cv_func_select_arg234='int *' 
9541   ac_cv_func_select_arg5='struct timeval *'
9542  fi
9543  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9544  cat >> confdefs.h <<EOF
9545 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9546 EOF
9547
9548  cat >> confdefs.h <<EOF
9549 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9550 EOF
9551
9552  cat >> confdefs.h <<EOF
9553 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9554 EOF
9555
9556
9557 fi
9558
9559
9560 for ac_hdr in regex.h 
9561 do
9562 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9563 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9564 echo "configure:9565: checking for $ac_hdr" >&5
9565 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9566   echo $ac_n "(cached) $ac_c" 1>&6
9567 else
9568   cat > conftest.$ac_ext <<EOF
9569 #line 9570 "configure"
9570 #include "confdefs.h"
9571 #include <$ac_hdr>
9572 EOF
9573 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9574 { (eval echo configure:9575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9575 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9576 if test -z "$ac_err"; then
9577   rm -rf conftest*
9578   eval "ac_cv_header_$ac_safe=yes"
9579 else
9580   echo "$ac_err" >&5
9581   echo "configure: failed program was:" >&5
9582   cat conftest.$ac_ext >&5
9583   rm -rf conftest*
9584   eval "ac_cv_header_$ac_safe=no"
9585 fi
9586 rm -f conftest*
9587 fi
9588 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9589   echo "$ac_t""yes" 1>&6
9590     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9591   cat >> confdefs.h <<EOF
9592 #define $ac_tr_hdr 1
9593 EOF
9594  
9595 else
9596   echo "$ac_t""no" 1>&6
9597 fi
9598 done
9599
9600 if test "$ac_cv_header_regex_h" != yes ; then
9601         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9602 fi
9603
9604 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9605 echo "configure:9606: checking for library containing regfree" >&5
9606 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9607   echo $ac_n "(cached) $ac_c" 1>&6
9608 else
9609   ac_func_search_save_LIBS="$LIBS"
9610 ac_cv_search_regfree="no"
9611 cat > conftest.$ac_ext <<EOF
9612 #line 9613 "configure"
9613 #include "confdefs.h"
9614 /* Override any gcc2 internal prototype to avoid an error.  */
9615 /* We use char because int might match the return type of a gcc2
9616     builtin and then its argument prototype would still apply.  */
9617 char regfree();
9618
9619 int main() {
9620 regfree()
9621 ; return 0; }
9622 EOF
9623 if { (eval echo configure:9624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9624   rm -rf conftest*
9625   ac_cv_search_regfree="none required"
9626 else
9627   echo "configure: failed program was:" >&5
9628   cat conftest.$ac_ext >&5
9629 fi
9630 rm -f conftest*
9631 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9632 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9633 cat > conftest.$ac_ext <<EOF
9634 #line 9635 "configure"
9635 #include "confdefs.h"
9636 /* Override any gcc2 internal prototype to avoid an error.  */
9637 /* We use char because int might match the return type of a gcc2
9638     builtin and then its argument prototype would still apply.  */
9639 char regfree();
9640
9641 int main() {
9642 regfree()
9643 ; return 0; }
9644 EOF
9645 if { (eval echo configure:9646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9646   rm -rf conftest*
9647   ac_cv_search_regfree="-l$ac_lib"
9648 break
9649 else
9650   echo "configure: failed program was:" >&5
9651   cat conftest.$ac_ext >&5
9652 fi
9653 rm -f conftest*
9654 done
9655 LIBS="$ac_func_search_save_LIBS"
9656 fi
9657
9658 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9659 if test "$ac_cv_search_regfree" != "no"; then
9660   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9661   :
9662 else :
9663   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9664 fi
9665
9666
9667 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9668 echo "configure:9669: checking for compatible POSIX regex" >&5
9669 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9670   echo $ac_n "(cached) $ac_c" 1>&6
9671 else
9672   
9673         if test "$cross_compiling" = yes; then
9674   ol_cv_c_posix_regex=cross
9675 else
9676   cat > conftest.$ac_ext <<EOF
9677 #line 9678 "configure"
9678 #include "confdefs.h"
9679
9680 #include <sys/types.h>
9681 #include <regex.h>
9682 static char *pattern, *string;
9683 main()
9684 {
9685         int rc;
9686         regex_t re;
9687
9688         pattern = "^A";
9689
9690         if(regcomp(&re, pattern, 0)) {
9691                 return -1;
9692         }
9693         
9694         string = "ALL MATCH";
9695         
9696         rc = regexec(&re, string, 0, (void*)0, 0);
9697
9698         regfree(&re);
9699
9700         return rc;
9701 }
9702 EOF
9703 if { (eval echo configure:9704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9704 then
9705   ol_cv_c_posix_regex=yes
9706 else
9707   echo "configure: failed program was:" >&5
9708   cat conftest.$ac_ext >&5
9709   rm -fr conftest*
9710   ol_cv_c_posix_regex=no
9711 fi
9712 rm -fr conftest*
9713 fi
9714
9715 fi
9716
9717 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9718
9719 if test "$ol_cv_c_posix_regex" = no ; then
9720         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9721 fi
9722
9723
9724 have_uuid=no
9725 for ac_hdr in sys/uuid.h
9726 do
9727 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9728 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9729 echo "configure:9730: checking for $ac_hdr" >&5
9730 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9731   echo $ac_n "(cached) $ac_c" 1>&6
9732 else
9733   cat > conftest.$ac_ext <<EOF
9734 #line 9735 "configure"
9735 #include "confdefs.h"
9736 #include <$ac_hdr>
9737 EOF
9738 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9739 { (eval echo configure:9740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9740 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9741 if test -z "$ac_err"; then
9742   rm -rf conftest*
9743   eval "ac_cv_header_$ac_safe=yes"
9744 else
9745   echo "$ac_err" >&5
9746   echo "configure: failed program was:" >&5
9747   cat conftest.$ac_ext >&5
9748   rm -rf conftest*
9749   eval "ac_cv_header_$ac_safe=no"
9750 fi
9751 rm -f conftest*
9752 fi
9753 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9754   echo "$ac_t""yes" 1>&6
9755     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9756   cat >> confdefs.h <<EOF
9757 #define $ac_tr_hdr 1
9758 EOF
9759  
9760 else
9761   echo "$ac_t""no" 1>&6
9762 fi
9763 done
9764
9765 if test $ac_cv_header_sys_uuid_h = yes ; then
9766         save_LIBS="$LIBS"
9767         
9768 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9769 echo "configure:9770: checking for library containing uuid_to_str" >&5
9770 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9771   echo $ac_n "(cached) $ac_c" 1>&6
9772 else
9773   ac_func_search_save_LIBS="$LIBS"
9774 ac_cv_search_uuid_to_str="no"
9775 cat > conftest.$ac_ext <<EOF
9776 #line 9777 "configure"
9777 #include "confdefs.h"
9778 /* Override any gcc2 internal prototype to avoid an error.  */
9779 /* We use char because int might match the return type of a gcc2
9780     builtin and then its argument prototype would still apply.  */
9781 char uuid_to_str();
9782
9783 int main() {
9784 uuid_to_str()
9785 ; return 0; }
9786 EOF
9787 if { (eval echo configure:9788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9788   rm -rf conftest*
9789   ac_cv_search_uuid_to_str="none required"
9790 else
9791   echo "configure: failed program was:" >&5
9792   cat conftest.$ac_ext >&5
9793 fi
9794 rm -f conftest*
9795 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9796 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9797 cat > conftest.$ac_ext <<EOF
9798 #line 9799 "configure"
9799 #include "confdefs.h"
9800 /* Override any gcc2 internal prototype to avoid an error.  */
9801 /* We use char because int might match the return type of a gcc2
9802     builtin and then its argument prototype would still apply.  */
9803 char uuid_to_str();
9804
9805 int main() {
9806 uuid_to_str()
9807 ; return 0; }
9808 EOF
9809 if { (eval echo configure:9810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9810   rm -rf conftest*
9811   ac_cv_search_uuid_to_str="-l$ac_lib"
9812 break
9813 else
9814   echo "configure: failed program was:" >&5
9815   cat conftest.$ac_ext >&5
9816 fi
9817 rm -f conftest*
9818 done
9819 LIBS="$ac_func_search_save_LIBS"
9820 fi
9821
9822 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9823 if test "$ac_cv_search_uuid_to_str" != "no"; then
9824   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9825   have_uuid=yes
9826 else :
9827   :
9828 fi
9829         LIBS="$save_LIBS"
9830
9831         if test have_uuid = yes ; then
9832                 cat >> confdefs.h <<\EOF
9833 #define HAVE_UUID_TO_STR 1
9834 EOF
9835
9836
9837                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9838                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9839         fi
9840 fi
9841
9842 if test $have_uuid = no ; then
9843         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9844 echo "configure:9845: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9845         save_LIBS="$LIBS"
9846         LIBS="$LIBS -lrpcrt4"
9847         cat > conftest.$ac_ext <<EOF
9848 #line 9849 "configure"
9849 #include "confdefs.h"
9850
9851                 char UuidCreate@4();
9852                 char UuidToStringA@8();
9853                 
9854 int main() {
9855
9856                 UuidCreate@4();
9857                 UuidToStringA@8();
9858                 
9859 ; return 0; }
9860 EOF
9861 if { (eval echo configure:9862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9862   rm -rf conftest*
9863   need_rpcrt=yes
9864 else
9865   echo "configure: failed program was:" >&5
9866   cat conftest.$ac_ext >&5
9867   rm -rf conftest*
9868   need_rpcrt=no
9869 fi
9870 rm -f conftest*
9871         if test $need_rpcrt = yes; then
9872                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9873         fi
9874         LIBS="$save_LIBS"
9875         echo "$ac_t""$need_rpcrt" 1>&6
9876 fi
9877
9878 ol_link_dnssrv=no
9879 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9880 echo "configure:9881: checking for res_query" >&5
9881 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9882   echo $ac_n "(cached) $ac_c" 1>&6
9883 else
9884   cat > conftest.$ac_ext <<EOF
9885 #line 9886 "configure"
9886 #include "confdefs.h"
9887 /* System header to define __stub macros and hopefully few prototypes,
9888     which can conflict with char res_query(); below.  */
9889 #include <assert.h>
9890 /* Override any gcc2 internal prototype to avoid an error.  */
9891 /* We use char because int might match the return type of a gcc2
9892     builtin and then its argument prototype would still apply.  */
9893 char res_query();
9894 char (*f)();
9895
9896 int main() {
9897
9898 /* The GNU C library defines this for functions which it implements
9899     to always fail with ENOSYS.  Some functions are actually named
9900     something starting with __ and the normal name is an alias.  */
9901 #if defined (__stub_res_query) || defined (__stub___res_query)
9902 choke me
9903 #else
9904 f = res_query;
9905 #endif
9906
9907 ; return 0; }
9908 EOF
9909 if { (eval echo configure:9910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9910   rm -rf conftest*
9911   eval "ac_cv_func_res_query=yes"
9912 else
9913   echo "configure: failed program was:" >&5
9914   cat conftest.$ac_ext >&5
9915   rm -rf conftest*
9916   eval "ac_cv_func_res_query=no"
9917 fi
9918 rm -f conftest*
9919 fi
9920
9921 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9922   echo "$ac_t""yes" 1>&6
9923   :
9924 else
9925   echo "$ac_t""no" 1>&6
9926 fi
9927
9928 if test $ac_cv_func_res_query = no ; then 
9929         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9930 echo "configure:9931: checking for __res_query" >&5
9931 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9932   echo $ac_n "(cached) $ac_c" 1>&6
9933 else
9934   cat > conftest.$ac_ext <<EOF
9935 #line 9936 "configure"
9936 #include "confdefs.h"
9937 /* System header to define __stub macros and hopefully few prototypes,
9938     which can conflict with char __res_query(); below.  */
9939 #include <assert.h>
9940 /* Override any gcc2 internal prototype to avoid an error.  */
9941 /* We use char because int might match the return type of a gcc2
9942     builtin and then its argument prototype would still apply.  */
9943 char __res_query();
9944 char (*f)();
9945
9946 int main() {
9947
9948 /* The GNU C library defines this for functions which it implements
9949     to always fail with ENOSYS.  Some functions are actually named
9950     something starting with __ and the normal name is an alias.  */
9951 #if defined (__stub___res_query) || defined (__stub_____res_query)
9952 choke me
9953 #else
9954 f = __res_query;
9955 #endif
9956
9957 ; return 0; }
9958 EOF
9959 if { (eval echo configure:9960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9960   rm -rf conftest*
9961   eval "ac_cv_func___res_query=yes"
9962 else
9963   echo "configure: failed program was:" >&5
9964   cat conftest.$ac_ext >&5
9965   rm -rf conftest*
9966   eval "ac_cv_func___res_query=no"
9967 fi
9968 rm -f conftest*
9969 fi
9970
9971 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9972   echo "$ac_t""yes" 1>&6
9973   :
9974 else
9975   echo "$ac_t""no" 1>&6
9976 fi
9977
9978         ac_cv_func_res_query=$ac_cv_func___res_query
9979 fi
9980
9981 if test $ac_cv_func_res_query = no ; then 
9982         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9983 echo "configure:9984: checking for res_query in -lbind" >&5
9984 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9985 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9986   echo $ac_n "(cached) $ac_c" 1>&6
9987 else
9988   ac_save_LIBS="$LIBS"
9989 LIBS="-lbind  $LIBS"
9990 cat > conftest.$ac_ext <<EOF
9991 #line 9992 "configure"
9992 #include "confdefs.h"
9993 /* Override any gcc2 internal prototype to avoid an error.  */
9994 /* We use char because int might match the return type of a gcc2
9995     builtin and then its argument prototype would still apply.  */
9996 char res_query();
9997
9998 int main() {
9999 res_query()
10000 ; return 0; }
10001 EOF
10002 if { (eval echo configure:10003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10003   rm -rf conftest*
10004   eval "ac_cv_lib_$ac_lib_var=yes"
10005 else
10006   echo "configure: failed program was:" >&5
10007   cat conftest.$ac_ext >&5
10008   rm -rf conftest*
10009   eval "ac_cv_lib_$ac_lib_var=no"
10010 fi
10011 rm -f conftest*
10012 LIBS="$ac_save_LIBS"
10013
10014 fi
10015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10016   echo "$ac_t""yes" 1>&6
10017     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10018     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10019   cat >> confdefs.h <<EOF
10020 #define $ac_tr_lib 1
10021 EOF
10022
10023   LIBS="-lbind $LIBS"
10024
10025 else
10026   echo "$ac_t""no" 1>&6
10027 fi
10028
10029         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10030 fi
10031
10032 if test $ac_cv_func_res_query = no ; then 
10033         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10034 echo "configure:10035: checking for __res_query in -lbind" >&5
10035 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10036 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10037   echo $ac_n "(cached) $ac_c" 1>&6
10038 else
10039   ac_save_LIBS="$LIBS"
10040 LIBS="-lbind  $LIBS"
10041 cat > conftest.$ac_ext <<EOF
10042 #line 10043 "configure"
10043 #include "confdefs.h"
10044 /* Override any gcc2 internal prototype to avoid an error.  */
10045 /* We use char because int might match the return type of a gcc2
10046     builtin and then its argument prototype would still apply.  */
10047 char __res_query();
10048
10049 int main() {
10050 __res_query()
10051 ; return 0; }
10052 EOF
10053 if { (eval echo configure:10054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10054   rm -rf conftest*
10055   eval "ac_cv_lib_$ac_lib_var=yes"
10056 else
10057   echo "configure: failed program was:" >&5
10058   cat conftest.$ac_ext >&5
10059   rm -rf conftest*
10060   eval "ac_cv_lib_$ac_lib_var=no"
10061 fi
10062 rm -f conftest*
10063 LIBS="$ac_save_LIBS"
10064
10065 fi
10066 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10067   echo "$ac_t""yes" 1>&6
10068     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10069     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10070   cat >> confdefs.h <<EOF
10071 #define $ac_tr_lib 1
10072 EOF
10073
10074   LIBS="-lbind $LIBS"
10075
10076 else
10077   echo "$ac_t""no" 1>&6
10078 fi
10079
10080         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10081 fi
10082
10083 if test $ac_cv_func_res_query = no ; then 
10084         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10085 echo "configure:10086: checking for res_query in -lresolv" >&5
10086 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10087 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10088   echo $ac_n "(cached) $ac_c" 1>&6
10089 else
10090   ac_save_LIBS="$LIBS"
10091 LIBS="-lresolv  $LIBS"
10092 cat > conftest.$ac_ext <<EOF
10093 #line 10094 "configure"
10094 #include "confdefs.h"
10095 /* Override any gcc2 internal prototype to avoid an error.  */
10096 /* We use char because int might match the return type of a gcc2
10097     builtin and then its argument prototype would still apply.  */
10098 char res_query();
10099
10100 int main() {
10101 res_query()
10102 ; return 0; }
10103 EOF
10104 if { (eval echo configure:10105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10105   rm -rf conftest*
10106   eval "ac_cv_lib_$ac_lib_var=yes"
10107 else
10108   echo "configure: failed program was:" >&5
10109   cat conftest.$ac_ext >&5
10110   rm -rf conftest*
10111   eval "ac_cv_lib_$ac_lib_var=no"
10112 fi
10113 rm -f conftest*
10114 LIBS="$ac_save_LIBS"
10115
10116 fi
10117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10118   echo "$ac_t""yes" 1>&6
10119     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10120     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10121   cat >> confdefs.h <<EOF
10122 #define $ac_tr_lib 1
10123 EOF
10124
10125   LIBS="-lresolv $LIBS"
10126
10127 else
10128   echo "$ac_t""no" 1>&6
10129 fi
10130
10131         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10132 fi
10133
10134 if test $ac_cv_func_res_query = no ; then 
10135         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10136 echo "configure:10137: checking for __res_query in -lresolv" >&5
10137 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10138 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10139   echo $ac_n "(cached) $ac_c" 1>&6
10140 else
10141   ac_save_LIBS="$LIBS"
10142 LIBS="-lresolv  $LIBS"
10143 cat > conftest.$ac_ext <<EOF
10144 #line 10145 "configure"
10145 #include "confdefs.h"
10146 /* Override any gcc2 internal prototype to avoid an error.  */
10147 /* We use char because int might match the return type of a gcc2
10148     builtin and then its argument prototype would still apply.  */
10149 char __res_query();
10150
10151 int main() {
10152 __res_query()
10153 ; return 0; }
10154 EOF
10155 if { (eval echo configure:10156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10156   rm -rf conftest*
10157   eval "ac_cv_lib_$ac_lib_var=yes"
10158 else
10159   echo "configure: failed program was:" >&5
10160   cat conftest.$ac_ext >&5
10161   rm -rf conftest*
10162   eval "ac_cv_lib_$ac_lib_var=no"
10163 fi
10164 rm -f conftest*
10165 LIBS="$ac_save_LIBS"
10166
10167 fi
10168 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10169   echo "$ac_t""yes" 1>&6
10170     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10171     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10172   cat >> confdefs.h <<EOF
10173 #define $ac_tr_lib 1
10174 EOF
10175
10176   LIBS="-lresolv $LIBS"
10177
10178 else
10179   echo "$ac_t""no" 1>&6
10180 fi
10181
10182         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10183 fi
10184
10185 if test "$ac_cv_func_res_query" = yes ; then
10186         cat >> confdefs.h <<\EOF
10187 #define HAVE_RES_QUERY 1
10188 EOF
10189
10190
10191         if test $ol_enable_dnssrv != no ; then
10192                 ol_link_dnssrv=yes
10193         fi
10194 fi
10195
10196 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10197         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10198 fi
10199
10200 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10201 do
10202 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10203 echo "configure:10204: checking for $ac_func" >&5
10204 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10205   echo $ac_n "(cached) $ac_c" 1>&6
10206 else
10207   cat > conftest.$ac_ext <<EOF
10208 #line 10209 "configure"
10209 #include "confdefs.h"
10210 /* System header to define __stub macros and hopefully few prototypes,
10211     which can conflict with char $ac_func(); below.  */
10212 #include <assert.h>
10213 /* Override any gcc2 internal prototype to avoid an error.  */
10214 /* We use char because int might match the return type of a gcc2
10215     builtin and then its argument prototype would still apply.  */
10216 char $ac_func();
10217 char (*f)();
10218
10219 int main() {
10220
10221 /* The GNU C library defines this for functions which it implements
10222     to always fail with ENOSYS.  Some functions are actually named
10223     something starting with __ and the normal name is an alias.  */
10224 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10225 choke me
10226 #else
10227 f = $ac_func;
10228 #endif
10229
10230 ; return 0; }
10231 EOF
10232 if { (eval echo configure:10233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10233   rm -rf conftest*
10234   eval "ac_cv_func_$ac_func=yes"
10235 else
10236   echo "configure: failed program was:" >&5
10237   cat conftest.$ac_ext >&5
10238   rm -rf conftest*
10239   eval "ac_cv_func_$ac_func=no"
10240 fi
10241 rm -f conftest*
10242 fi
10243
10244 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10245   echo "$ac_t""yes" 1>&6
10246     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10247   cat >> confdefs.h <<EOF
10248 #define $ac_tr_func 1
10249 EOF
10250  
10251 else
10252   echo "$ac_t""no" 1>&6
10253 fi
10254 done
10255
10256
10257 ol_link_ipv6=no
10258 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10259         if test $ol_enable_ipv6 = yes ; then
10260                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10261         fi
10262 elif test $ol_enable_ipv6 != no ; then
10263         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10264 echo "configure:10265: checking INET6_ADDRSTRLEN" >&5
10265 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10266   echo $ac_n "(cached) $ac_c" 1>&6
10267 else
10268   
10269                 cat > conftest.$ac_ext <<EOF
10270 #line 10271 "configure"
10271 #include "confdefs.h"
10272
10273 #                       include <netinet/in.h>
10274 #                       ifdef INET6_ADDRSTRLEN
10275                                 __has_inet6_addrstrlen__;
10276 #                       endif
10277                 
10278 EOF
10279 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10280   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10281   rm -rf conftest*
10282   ol_cv_inet6_addrstrlen=yes
10283 else
10284   rm -rf conftest*
10285   ol_cv_inet6_addrstrlen=no
10286 fi
10287 rm -f conftest*
10288
10289 fi
10290
10291 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10292
10293
10294         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10295 echo "configure:10296: checking struct sockaddr_storage" >&5
10296 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10297   echo $ac_n "(cached) $ac_c" 1>&6
10298 else
10299   
10300                 cat > conftest.$ac_ext <<EOF
10301 #line 10302 "configure"
10302 #include "confdefs.h"
10303
10304 #include <sys/types.h>
10305 #include <sys/socket.h>
10306
10307 int main() {
10308
10309                         struct sockaddr_storage ss;
10310
10311 ; return 0; }
10312 EOF
10313 if { (eval echo configure:10314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10314   rm -rf conftest*
10315   ol_cv_struct_sockaddr_storage=yes
10316 else
10317   echo "configure: failed program was:" >&5
10318   cat conftest.$ac_ext >&5
10319   rm -rf conftest*
10320   ol_cv_struct_sockaddr_storage=no
10321 fi
10322 rm -f conftest*
10323 fi
10324
10325 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10326
10327         if test $ol_cv_inet6_addrstrlen = yes \
10328                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10329                 ol_link_ipv6=yes
10330         elif test $ol_enable_ipv6 = yes \
10331                         -a $ol_cv_inet6_addrstrlen = no ; then
10332                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10333         elif test $ol_enable_ipv6 = yes \
10334                         -a $ol_cv_struct_sockaddr_storage = no ; then
10335                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10336         fi
10337 fi
10338
10339 if test $ol_enable_local != no ; then
10340         for ac_hdr in sys/un.h 
10341 do
10342 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10343 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10344 echo "configure:10345: checking for $ac_hdr" >&5
10345 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10346   echo $ac_n "(cached) $ac_c" 1>&6
10347 else
10348   cat > conftest.$ac_ext <<EOF
10349 #line 10350 "configure"
10350 #include "confdefs.h"
10351 #include <$ac_hdr>
10352 EOF
10353 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10354 { (eval echo configure:10355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10355 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10356 if test -z "$ac_err"; then
10357   rm -rf conftest*
10358   eval "ac_cv_header_$ac_safe=yes"
10359 else
10360   echo "$ac_err" >&5
10361   echo "configure: failed program was:" >&5
10362   cat conftest.$ac_ext >&5
10363   rm -rf conftest*
10364   eval "ac_cv_header_$ac_safe=no"
10365 fi
10366 rm -f conftest*
10367 fi
10368 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10369   echo "$ac_t""yes" 1>&6
10370     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10371   cat >> confdefs.h <<EOF
10372 #define $ac_tr_hdr 1
10373 EOF
10374  
10375 else
10376   echo "$ac_t""no" 1>&6
10377 fi
10378 done
10379
10380
10381         if test $ol_enable_local = auto ; then
10382                 ol_enable_local=$ac_cv_header_sys_un_h
10383         elif test $ac_cv_header_sys_un_h = no ; then
10384                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10385         fi
10386 fi
10387
10388 ol_link_kbind=no
10389 ol_link_kpasswd=no
10390 ol_link_krb5=no
10391 ol_link_krb4=no
10392
10393 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10394         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10395         -o $ol_with_kerberos = k425 ; then
10396
10397         for ac_hdr in krb5.h
10398 do
10399 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10400 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10401 echo "configure:10402: checking for $ac_hdr" >&5
10402 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10403   echo $ac_n "(cached) $ac_c" 1>&6
10404 else
10405   cat > conftest.$ac_ext <<EOF
10406 #line 10407 "configure"
10407 #include "confdefs.h"
10408 #include <$ac_hdr>
10409 EOF
10410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10411 { (eval echo configure:10412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10412 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10413 if test -z "$ac_err"; then
10414   rm -rf conftest*
10415   eval "ac_cv_header_$ac_safe=yes"
10416 else
10417   echo "$ac_err" >&5
10418   echo "configure: failed program was:" >&5
10419   cat conftest.$ac_ext >&5
10420   rm -rf conftest*
10421   eval "ac_cv_header_$ac_safe=no"
10422 fi
10423 rm -f conftest*
10424 fi
10425 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10426   echo "$ac_t""yes" 1>&6
10427     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10428   cat >> confdefs.h <<EOF
10429 #define $ac_tr_hdr 1
10430 EOF
10431  
10432 else
10433   echo "$ac_t""no" 1>&6
10434 fi
10435 done
10436
10437
10438         if test $ac_cv_header_krb5_h = yes ; then
10439                                 for ac_hdr in heim_err.h
10440 do
10441 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10442 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10443 echo "configure:10444: checking for $ac_hdr" >&5
10444 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10445   echo $ac_n "(cached) $ac_c" 1>&6
10446 else
10447   cat > conftest.$ac_ext <<EOF
10448 #line 10449 "configure"
10449 #include "confdefs.h"
10450 #include <$ac_hdr>
10451 EOF
10452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10453 { (eval echo configure:10454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10455 if test -z "$ac_err"; then
10456   rm -rf conftest*
10457   eval "ac_cv_header_$ac_safe=yes"
10458 else
10459   echo "$ac_err" >&5
10460   echo "configure: failed program was:" >&5
10461   cat conftest.$ac_ext >&5
10462   rm -rf conftest*
10463   eval "ac_cv_header_$ac_safe=no"
10464 fi
10465 rm -f conftest*
10466 fi
10467 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10468   echo "$ac_t""yes" 1>&6
10469     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10470   cat >> confdefs.h <<EOF
10471 #define $ac_tr_hdr 1
10472 EOF
10473  
10474 else
10475   echo "$ac_t""no" 1>&6
10476 fi
10477 done
10478
10479                 if test $ac_cv_header_heim_err_h = yes ; then
10480                         krb5_impl=heimdal
10481                 else
10482                         krb5_impl=mit
10483                 fi
10484
10485                 if test $krb5_impl = mit; then
10486                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10487 echo "configure:10488: checking for main in -lk5crypto" >&5
10488 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10489 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10490   echo $ac_n "(cached) $ac_c" 1>&6
10491 else
10492   ac_save_LIBS="$LIBS"
10493 LIBS="-lk5crypto  $LIBS"
10494 cat > conftest.$ac_ext <<EOF
10495 #line 10496 "configure"
10496 #include "confdefs.h"
10497
10498 int main() {
10499 main()
10500 ; return 0; }
10501 EOF
10502 if { (eval echo configure:10503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10503   rm -rf conftest*
10504   eval "ac_cv_lib_$ac_lib_var=yes"
10505 else
10506   echo "configure: failed program was:" >&5
10507   cat conftest.$ac_ext >&5
10508   rm -rf conftest*
10509   eval "ac_cv_lib_$ac_lib_var=no"
10510 fi
10511 rm -f conftest*
10512 LIBS="$ac_save_LIBS"
10513
10514 fi
10515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10516   echo "$ac_t""yes" 1>&6
10517   krb5crypto=k5crypto
10518 else
10519   echo "$ac_t""no" 1>&6
10520 krb5crypto=crypto
10521 fi
10522
10523
10524                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10525 echo "configure:10526: checking for main in -lkrb5" >&5
10526 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10527 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10528   echo $ac_n "(cached) $ac_c" 1>&6
10529 else
10530   ac_save_LIBS="$LIBS"
10531 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10532 cat > conftest.$ac_ext <<EOF
10533 #line 10534 "configure"
10534 #include "confdefs.h"
10535
10536 int main() {
10537 main()
10538 ; return 0; }
10539 EOF
10540 if { (eval echo configure:10541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10541   rm -rf conftest*
10542   eval "ac_cv_lib_$ac_lib_var=yes"
10543 else
10544   echo "configure: failed program was:" >&5
10545   cat conftest.$ac_ext >&5
10546   rm -rf conftest*
10547   eval "ac_cv_lib_$ac_lib_var=no"
10548 fi
10549 rm -f conftest*
10550 LIBS="$ac_save_LIBS"
10551
10552 fi
10553 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10554   echo "$ac_t""yes" 1>&6
10555   have_krb5=yes
10556                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10557 else
10558   echo "$ac_t""no" 1>&6
10559 have_krb5=no
10560 fi
10561
10562
10563                 elif test $krb5_impl = heimdal; then
10564                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10565 echo "configure:10566: checking for main in -ldes" >&5
10566 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10567 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10568   echo $ac_n "(cached) $ac_c" 1>&6
10569 else
10570   ac_save_LIBS="$LIBS"
10571 LIBS="-ldes  $LIBS"
10572 cat > conftest.$ac_ext <<EOF
10573 #line 10574 "configure"
10574 #include "confdefs.h"
10575
10576 int main() {
10577 main()
10578 ; return 0; }
10579 EOF
10580 if { (eval echo configure:10581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10581   rm -rf conftest*
10582   eval "ac_cv_lib_$ac_lib_var=yes"
10583 else
10584   echo "configure: failed program was:" >&5
10585   cat conftest.$ac_ext >&5
10586   rm -rf conftest*
10587   eval "ac_cv_lib_$ac_lib_var=no"
10588 fi
10589 rm -f conftest*
10590 LIBS="$ac_save_LIBS"
10591
10592 fi
10593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10594   echo "$ac_t""yes" 1>&6
10595   krb5crypto=des
10596 else
10597   echo "$ac_t""no" 1>&6
10598 krb5crypto=crypto
10599 fi
10600
10601
10602                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10603 echo "configure:10604: checking for main in -lkrb5" >&5
10604 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10605 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10606   echo $ac_n "(cached) $ac_c" 1>&6
10607 else
10608   ac_save_LIBS="$LIBS"
10609 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10610 cat > conftest.$ac_ext <<EOF
10611 #line 10612 "configure"
10612 #include "confdefs.h"
10613
10614 int main() {
10615 main()
10616 ; return 0; }
10617 EOF
10618 if { (eval echo configure:10619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10619   rm -rf conftest*
10620   eval "ac_cv_lib_$ac_lib_var=yes"
10621 else
10622   echo "configure: failed program was:" >&5
10623   cat conftest.$ac_ext >&5
10624   rm -rf conftest*
10625   eval "ac_cv_lib_$ac_lib_var=no"
10626 fi
10627 rm -f conftest*
10628 LIBS="$ac_save_LIBS"
10629
10630 fi
10631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10632   echo "$ac_t""yes" 1>&6
10633   have_krb5=yes
10634                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10635 else
10636   echo "$ac_t""no" 1>&6
10637 have_krb5=no
10638 fi
10639
10640
10641                         cat >> confdefs.h <<\EOF
10642 #define HAVE_HEIMDAL_KERBEROS 1
10643 EOF
10644
10645
10646                 else
10647                         have_krb5=no
10648                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10649                 fi
10650
10651                 if test $have_krb5 = yes ; then
10652                         ol_link_krb5=yes
10653
10654                         cat >> confdefs.h <<\EOF
10655 #define HAVE_KRB5 1
10656 EOF
10657
10658
10659                         if test $ol_enable_kpasswd != no ; then
10660                                 ol_link_kpasswd=yes;
10661                         fi
10662
10663                         if test $ol_with_kerberos = k5only ; then
10664                                 ol_with_kerberos=found
10665                         fi
10666
10667                 elif test $ol_with_kerberos != auto ; then
10668                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10669                 fi
10670
10671         fi
10672 fi
10673
10674 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10675         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10676
10677         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10678 do
10679 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10680 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10681 echo "configure:10682: checking for $ac_hdr" >&5
10682 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10683   echo $ac_n "(cached) $ac_c" 1>&6
10684 else
10685   cat > conftest.$ac_ext <<EOF
10686 #line 10687 "configure"
10687 #include "confdefs.h"
10688 #include <$ac_hdr>
10689 EOF
10690 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10691 { (eval echo configure:10692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10692 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10693 if test -z "$ac_err"; then
10694   rm -rf conftest*
10695   eval "ac_cv_header_$ac_safe=yes"
10696 else
10697   echo "$ac_err" >&5
10698   echo "configure: failed program was:" >&5
10699   cat conftest.$ac_ext >&5
10700   rm -rf conftest*
10701   eval "ac_cv_header_$ac_safe=no"
10702 fi
10703 rm -f conftest*
10704 fi
10705 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10706   echo "$ac_t""yes" 1>&6
10707     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10708   cat >> confdefs.h <<EOF
10709 #define $ac_tr_hdr 1
10710 EOF
10711  
10712 else
10713   echo "$ac_t""no" 1>&6
10714 fi
10715 done
10716
10717
10718         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10719                 if test $krb5_impl = mit; then
10720                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10721 echo "configure:10722: checking for main in -lkrb4" >&5
10722 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10723 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10724   echo $ac_n "(cached) $ac_c" 1>&6
10725 else
10726   ac_save_LIBS="$LIBS"
10727 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10728 cat > conftest.$ac_ext <<EOF
10729 #line 10730 "configure"
10730 #include "confdefs.h"
10731
10732 int main() {
10733 main()
10734 ; return 0; }
10735 EOF
10736 if { (eval echo configure:10737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10737   rm -rf conftest*
10738   eval "ac_cv_lib_$ac_lib_var=yes"
10739 else
10740   echo "configure: failed program was:" >&5
10741   cat conftest.$ac_ext >&5
10742   rm -rf conftest*
10743   eval "ac_cv_lib_$ac_lib_var=no"
10744 fi
10745 rm -f conftest*
10746 LIBS="$ac_save_LIBS"
10747
10748 fi
10749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10750   echo "$ac_t""yes" 1>&6
10751   have_k425=yes
10752                                 KRB4_LIBS="-lkrb4 -ldes425"
10753 else
10754   echo "$ac_t""no" 1>&6
10755 have_k425=no
10756 fi
10757
10758
10759                 elif test $krb5_impl = heimdal; then
10760                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10761 echo "configure:10762: checking for main in -lkrb4" >&5
10762 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10764   echo $ac_n "(cached) $ac_c" 1>&6
10765 else
10766   ac_save_LIBS="$LIBS"
10767 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10768 cat > conftest.$ac_ext <<EOF
10769 #line 10770 "configure"
10770 #include "confdefs.h"
10771
10772 int main() {
10773 main()
10774 ; return 0; }
10775 EOF
10776 if { (eval echo configure:10777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10777   rm -rf conftest*
10778   eval "ac_cv_lib_$ac_lib_var=yes"
10779 else
10780   echo "configure: failed program was:" >&5
10781   cat conftest.$ac_ext >&5
10782   rm -rf conftest*
10783   eval "ac_cv_lib_$ac_lib_var=no"
10784 fi
10785 rm -f conftest*
10786 LIBS="$ac_save_LIBS"
10787
10788 fi
10789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10790   echo "$ac_t""yes" 1>&6
10791   have_k425=yes
10792                                 KRB4_LIBS="-lkrb4"
10793 else
10794   echo "$ac_t""no" 1>&6
10795 have_k425=no
10796 fi
10797
10798
10799                 else
10800                         have_425=no
10801                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10802                 fi
10803
10804                 if test $have_k425 = yes ; then
10805                         ol_with_kerberos=found
10806                         ol_link_krb4=yes
10807
10808                         cat >> confdefs.h <<\EOF
10809 #define HAVE_KRB425 1
10810 EOF
10811
10812                         cat >> confdefs.h <<\EOF
10813 #define HAVE_KRB4 1
10814 EOF
10815
10816
10817                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10818 echo "configure:10819: checking for des_debug in Kerberos libraries" >&5
10819 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10820   echo $ac_n "(cached) $ac_c" 1>&6
10821 else
10822   
10823                                                                 save_LIBS="$LIBS"
10824                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10825                                 cat > conftest.$ac_ext <<EOF
10826 #line 10827 "configure"
10827 #include "confdefs.h"
10828
10829 #include <kerberosIV/krb.h>
10830 #include <kerberosIV/des.h>
10831 extern int des_debug;
10832
10833 int main() {
10834
10835 des_debug = 1;
10836
10837 ; return 0; }
10838 EOF
10839 if { (eval echo configure:10840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10840   rm -rf conftest*
10841   ol_cv_var_des_debug=yes
10842 else
10843   echo "configure: failed program was:" >&5
10844   cat conftest.$ac_ext >&5
10845   rm -rf conftest*
10846   ol_cv_var_des_debug=no
10847 fi
10848 rm -f conftest*
10849                                                                 LIBS="$save_LIBS"
10850                         
10851 fi
10852
10853 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10854
10855                         if test $ol_cv_var_des_debug = yes ; then
10856                                 cat >> confdefs.h <<\EOF
10857 #define HAVE_DES_DEBUG 1
10858 EOF
10859
10860                         fi
10861
10862                         LIBS="$save_LIBS"
10863                 fi
10864         fi
10865 fi
10866
10867 if test $ol_link_krb5 = yes ; then
10868         ol_with_kerberos=found
10869 fi
10870
10871 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10872         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10873
10874         for ac_hdr in krb.h des.h krb-archaeology.h 
10875 do
10876 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10877 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10878 echo "configure:10879: checking for $ac_hdr" >&5
10879 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10880   echo $ac_n "(cached) $ac_c" 1>&6
10881 else
10882   cat > conftest.$ac_ext <<EOF
10883 #line 10884 "configure"
10884 #include "confdefs.h"
10885 #include <$ac_hdr>
10886 EOF
10887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10888 { (eval echo configure:10889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10890 if test -z "$ac_err"; then
10891   rm -rf conftest*
10892   eval "ac_cv_header_$ac_safe=yes"
10893 else
10894   echo "$ac_err" >&5
10895   echo "configure: failed program was:" >&5
10896   cat conftest.$ac_ext >&5
10897   rm -rf conftest*
10898   eval "ac_cv_header_$ac_safe=no"
10899 fi
10900 rm -f conftest*
10901 fi
10902 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10903   echo "$ac_t""yes" 1>&6
10904     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10905   cat >> confdefs.h <<EOF
10906 #define $ac_tr_hdr 1
10907 EOF
10908  
10909 else
10910   echo "$ac_t""no" 1>&6
10911 fi
10912 done
10913
10914
10915         if test $ac_cv_header_krb_h = yes ; then
10916                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10917 echo "configure:10918: checking for main in -lkrb" >&5
10918 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10919 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10920   echo $ac_n "(cached) $ac_c" 1>&6
10921 else
10922   ac_save_LIBS="$LIBS"
10923 LIBS="-lkrb -ldes $LIBS"
10924 cat > conftest.$ac_ext <<EOF
10925 #line 10926 "configure"
10926 #include "confdefs.h"
10927
10928 int main() {
10929 main()
10930 ; return 0; }
10931 EOF
10932 if { (eval echo configure:10933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10933   rm -rf conftest*
10934   eval "ac_cv_lib_$ac_lib_var=yes"
10935 else
10936   echo "configure: failed program was:" >&5
10937   cat conftest.$ac_ext >&5
10938   rm -rf conftest*
10939   eval "ac_cv_lib_$ac_lib_var=no"
10940 fi
10941 rm -f conftest*
10942 LIBS="$ac_save_LIBS"
10943
10944 fi
10945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10946   echo "$ac_t""yes" 1>&6
10947   have_k4=yes
10948 else
10949   echo "$ac_t""no" 1>&6
10950 have_k4=no
10951 fi
10952
10953
10954                 if test $have_k4 = yes ; then
10955                         ol_with_kerberos=found
10956                         ol_link_krb4=yes
10957
10958                         cat >> confdefs.h <<\EOF
10959 #define HAVE_KRB4 1
10960 EOF
10961
10962
10963                         KRB4_LIBS="-lkrb -ldes"
10964
10965                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10966                                 cat >> confdefs.h <<\EOF
10967 #define HAVE_KTH_KERBEROS 1
10968 EOF
10969
10970                         fi
10971                 fi
10972         fi
10973 fi
10974
10975 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10976         ol_link_kpasswd=yes
10977 fi
10978
10979 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10980         ol_link_kbind=yes
10981
10982 elif test $ol_enable_kbind = yes ; then
10983         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10984 fi
10985
10986 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10987         cat >> confdefs.h <<\EOF
10988 #define HAVE_KERBEROS 1
10989 EOF
10990
10991
10992 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10993         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10994 fi
10995
10996 ol_link_tls=no
10997 if test $ol_with_tls != no ; then
10998         for ac_hdr in openssl/ssl.h ssl.h
10999 do
11000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11002 echo "configure:11003: checking for $ac_hdr" >&5
11003 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11004   echo $ac_n "(cached) $ac_c" 1>&6
11005 else
11006   cat > conftest.$ac_ext <<EOF
11007 #line 11008 "configure"
11008 #include "confdefs.h"
11009 #include <$ac_hdr>
11010 EOF
11011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11012 { (eval echo configure:11013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11014 if test -z "$ac_err"; then
11015   rm -rf conftest*
11016   eval "ac_cv_header_$ac_safe=yes"
11017 else
11018   echo "$ac_err" >&5
11019   echo "configure: failed program was:" >&5
11020   cat conftest.$ac_ext >&5
11021   rm -rf conftest*
11022   eval "ac_cv_header_$ac_safe=no"
11023 fi
11024 rm -f conftest*
11025 fi
11026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11027   echo "$ac_t""yes" 1>&6
11028     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11029   cat >> confdefs.h <<EOF
11030 #define $ac_tr_hdr 1
11031 EOF
11032  
11033 else
11034   echo "$ac_t""no" 1>&6
11035 fi
11036 done
11037
11038         
11039         if test $ac_cv_header_openssl_ssl_h = yes \
11040                 -o $ac_cv_header_ssl_h = yes ; then
11041                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11042 echo "configure:11043: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11043 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11044 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11045   echo $ac_n "(cached) $ac_c" 1>&6
11046 else
11047   ac_save_LIBS="$LIBS"
11048 LIBS="-lssl -lcrypto $LIBS"
11049 cat > conftest.$ac_ext <<EOF
11050 #line 11051 "configure"
11051 #include "confdefs.h"
11052 /* Override any gcc2 internal prototype to avoid an error.  */
11053 /* We use char because int might match the return type of a gcc2
11054     builtin and then its argument prototype would still apply.  */
11055 char SSLeay_add_ssl_algorithms();
11056
11057 int main() {
11058 SSLeay_add_ssl_algorithms()
11059 ; return 0; }
11060 EOF
11061 if { (eval echo configure:11062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11062   rm -rf conftest*
11063   eval "ac_cv_lib_$ac_lib_var=yes"
11064 else
11065   echo "configure: failed program was:" >&5
11066   cat conftest.$ac_ext >&5
11067   rm -rf conftest*
11068   eval "ac_cv_lib_$ac_lib_var=no"
11069 fi
11070 rm -f conftest*
11071 LIBS="$ac_save_LIBS"
11072
11073 fi
11074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11075   echo "$ac_t""yes" 1>&6
11076   have_ssleay=yes
11077                         need_rsaref=no
11078 else
11079   echo "$ac_t""no" 1>&6
11080 have_ssleay=no
11081 fi
11082
11083                         
11084                 if test $have_ssleay = no ; then
11085                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11086 echo "configure:11087: checking for SSL_library_init in -lssl" >&5
11087 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11088 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11089   echo $ac_n "(cached) $ac_c" 1>&6
11090 else
11091   ac_save_LIBS="$LIBS"
11092 LIBS="-lssl -lcrypto $LIBS"
11093 cat > conftest.$ac_ext <<EOF
11094 #line 11095 "configure"
11095 #include "confdefs.h"
11096 /* Override any gcc2 internal prototype to avoid an error.  */
11097 /* We use char because int might match the return type of a gcc2
11098     builtin and then its argument prototype would still apply.  */
11099 char SSL_library_init();
11100
11101 int main() {
11102 SSL_library_init()
11103 ; return 0; }
11104 EOF
11105 if { (eval echo configure:11106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11106   rm -rf conftest*
11107   eval "ac_cv_lib_$ac_lib_var=yes"
11108 else
11109   echo "configure: failed program was:" >&5
11110   cat conftest.$ac_ext >&5
11111   rm -rf conftest*
11112   eval "ac_cv_lib_$ac_lib_var=no"
11113 fi
11114 rm -f conftest*
11115 LIBS="$ac_save_LIBS"
11116
11117 fi
11118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11119   echo "$ac_t""yes" 1>&6
11120   have_ssleay=yes
11121                                 need_rsaref=no
11122 else
11123   echo "$ac_t""no" 1>&6
11124 have_ssleay=no
11125 fi
11126
11127                 fi
11128
11129                 if test $have_ssleay = no ; then
11130                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11131 echo "configure:11132: checking for ssl3_accept in -lssl" >&5
11132 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11133 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11134   echo $ac_n "(cached) $ac_c" 1>&6
11135 else
11136   ac_save_LIBS="$LIBS"
11137 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11138 cat > conftest.$ac_ext <<EOF
11139 #line 11140 "configure"
11140 #include "confdefs.h"
11141 /* Override any gcc2 internal prototype to avoid an error.  */
11142 /* We use char because int might match the return type of a gcc2
11143     builtin and then its argument prototype would still apply.  */
11144 char ssl3_accept();
11145
11146 int main() {
11147 ssl3_accept()
11148 ; return 0; }
11149 EOF
11150 if { (eval echo configure:11151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11151   rm -rf conftest*
11152   eval "ac_cv_lib_$ac_lib_var=yes"
11153 else
11154   echo "configure: failed program was:" >&5
11155   cat conftest.$ac_ext >&5
11156   rm -rf conftest*
11157   eval "ac_cv_lib_$ac_lib_var=no"
11158 fi
11159 rm -f conftest*
11160 LIBS="$ac_save_LIBS"
11161
11162 fi
11163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11164   echo "$ac_t""yes" 1>&6
11165   have_ssleay=yes
11166                                 need_rsaref=yes
11167 else
11168   echo "$ac_t""no" 1>&6
11169 have_ssleay=no
11170 fi
11171
11172                 fi
11173
11174                 if test $have_ssleay = yes ; then
11175                         ol_with_tls=found
11176                         ol_link_tls=yes
11177
11178                         cat >> confdefs.h <<\EOF
11179 #define HAVE_SSLEAY 1
11180 EOF
11181
11182
11183                         if test $need_rsaref = yes; then
11184                                 cat >> confdefs.h <<\EOF
11185 #define HAVE_RSAREF 1
11186 EOF
11187
11188
11189                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11190                         else
11191                                 TLS_LIBS="-lssl -lcrypto"
11192                         fi
11193                 fi
11194         fi
11195
11196 else
11197         echo "configure: warning: TLS data protection not supported!" 1>&2
11198 fi
11199
11200 if test $ol_link_tls = yes ; then
11201         cat >> confdefs.h <<\EOF
11202 #define HAVE_TLS 1
11203 EOF
11204
11205
11206 elif test $ol_with_tls = auto ; then
11207         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11208         echo "configure: warning: TLS data protection not supported!" 1>&2
11209
11210 elif test $ol_with_tls != no ; then
11211         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11212 fi
11213
11214 if test $ol_enable_lmpasswd != no; then
11215         if test $ol_link_tls != yes ; then
11216                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11217         fi
11218
11219         cat >> confdefs.h <<\EOF
11220 #define SLAPD_LMHASH 1
11221 EOF
11222
11223 fi
11224
11225 ol_link_threads=no
11226
11227 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11228         -o $ol_with_threads = nt ; then
11229
11230         
11231         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11232 echo "configure:11233: checking for _beginthread" >&5
11233 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11234   echo $ac_n "(cached) $ac_c" 1>&6
11235 else
11236   cat > conftest.$ac_ext <<EOF
11237 #line 11238 "configure"
11238 #include "confdefs.h"
11239 /* System header to define __stub macros and hopefully few prototypes,
11240     which can conflict with char _beginthread(); below.  */
11241 #include <assert.h>
11242 /* Override any gcc2 internal prototype to avoid an error.  */
11243 /* We use char because int might match the return type of a gcc2
11244     builtin and then its argument prototype would still apply.  */
11245 char _beginthread();
11246 char (*f)();
11247
11248 int main() {
11249
11250 /* The GNU C library defines this for functions which it implements
11251     to always fail with ENOSYS.  Some functions are actually named
11252     something starting with __ and the normal name is an alias.  */
11253 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11254 choke me
11255 #else
11256 f = _beginthread;
11257 #endif
11258
11259 ; return 0; }
11260 EOF
11261 if { (eval echo configure:11262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11262   rm -rf conftest*
11263   eval "ac_cv_func__beginthread=yes"
11264 else
11265   echo "configure: failed program was:" >&5
11266   cat conftest.$ac_ext >&5
11267   rm -rf conftest*
11268   eval "ac_cv_func__beginthread=no"
11269 fi
11270 rm -f conftest*
11271 fi
11272
11273 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11274   echo "$ac_t""yes" 1>&6
11275   :
11276 else
11277   echo "$ac_t""no" 1>&6
11278 fi
11279
11280
11281         if test $ac_cv_func__beginthread = yes ; then
11282                 cat >> confdefs.h <<\EOF
11283 #define HAVE_NT_THREADS 1
11284 EOF
11285
11286                 ol_cv_nt_threads=yes
11287         fi
11288
11289
11290         if test "$ol_cv_nt_threads" = yes ; then
11291                 ol_link_threads=nt
11292                 ol_with_threads=found
11293                 ol_with_yielding_select=yes
11294
11295                 cat >> confdefs.h <<\EOF
11296 #define HAVE_NT_SERVICE_MANAGER 1
11297 EOF
11298
11299                 cat >> confdefs.h <<\EOF
11300 #define HAVE_NT_EVENT_LOG 1
11301 EOF
11302
11303         fi
11304
11305         if test $ol_with_threads = nt ; then
11306                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11307         fi
11308 fi
11309
11310 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11311         -o $ol_with_threads = posix ; then
11312
11313         for ac_hdr in pthread.h
11314 do
11315 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11316 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11317 echo "configure:11318: checking for $ac_hdr" >&5
11318 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11319   echo $ac_n "(cached) $ac_c" 1>&6
11320 else
11321   cat > conftest.$ac_ext <<EOF
11322 #line 11323 "configure"
11323 #include "confdefs.h"
11324 #include <$ac_hdr>
11325 EOF
11326 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11327 { (eval echo configure:11328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11328 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11329 if test -z "$ac_err"; then
11330   rm -rf conftest*
11331   eval "ac_cv_header_$ac_safe=yes"
11332 else
11333   echo "$ac_err" >&5
11334   echo "configure: failed program was:" >&5
11335   cat conftest.$ac_ext >&5
11336   rm -rf conftest*
11337   eval "ac_cv_header_$ac_safe=no"
11338 fi
11339 rm -f conftest*
11340 fi
11341 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11342   echo "$ac_t""yes" 1>&6
11343     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11344   cat >> confdefs.h <<EOF
11345 #define $ac_tr_hdr 1
11346 EOF
11347  
11348 else
11349   echo "$ac_t""no" 1>&6
11350 fi
11351 done
11352
11353
11354         if test $ac_cv_header_pthread_h = yes ; then
11355                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11356 echo "configure:11357: checking POSIX thread version" >&5
11357 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11358   echo $ac_n "(cached) $ac_c" 1>&6
11359 else
11360   
11361         cat > conftest.$ac_ext <<EOF
11362 #line 11363 "configure"
11363 #include "confdefs.h"
11364
11365 #               include <pthread.h>
11366         
11367 int main() {
11368
11369                 int i = PTHREAD_CREATE_JOINABLE;
11370         
11371 ; return 0; }
11372 EOF
11373 if { (eval echo configure:11374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11374   rm -rf conftest*
11375   
11376         cat > conftest.$ac_ext <<EOF
11377 #line 11378 "configure"
11378 #include "confdefs.h"
11379 #include <pthread.h>
11380 EOF
11381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11382   egrep "pthread_detach" >/dev/null 2>&1; then
11383   rm -rf conftest*
11384   ol_cv_pthread_version=10
11385 else
11386   rm -rf conftest*
11387   ol_cv_pthread_version=8
11388 fi
11389 rm -f conftest*
11390
11391 else
11392   echo "configure: failed program was:" >&5
11393   cat conftest.$ac_ext >&5
11394   rm -rf conftest*
11395   
11396         cat > conftest.$ac_ext <<EOF
11397 #line 11398 "configure"
11398 #include "confdefs.h"
11399
11400 #               include <pthread.h>
11401 #               ifdef PTHREAD_CREATE_UNDETACHED
11402                 draft7
11403 #               endif
11404         
11405 EOF
11406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11407   egrep "draft7" >/dev/null 2>&1; then
11408   rm -rf conftest*
11409   ol_cv_pthread_version=7
11410 else
11411   rm -rf conftest*
11412   
11413         cat > conftest.$ac_ext <<EOF
11414 #line 11415 "configure"
11415 #include "confdefs.h"
11416 #include <pthread.h>
11417 EOF
11418 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11419   egrep "pthread_attr_init" >/dev/null 2>&1; then
11420   rm -rf conftest*
11421   ol_cv_pthread_version=6
11422 else
11423   rm -rf conftest*
11424   
11425         cat > conftest.$ac_ext <<EOF
11426 #line 11427 "configure"
11427 #include "confdefs.h"
11428
11429 #               include <pthread.h>
11430 #ifdef          PTHREAD_MUTEX_INITIALIZER
11431                 draft5
11432 #endif
11433         
11434 EOF
11435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11436   egrep "draft5" >/dev/null 2>&1; then
11437   rm -rf conftest*
11438   ol_cv_pthread_version=5
11439 else
11440   rm -rf conftest*
11441   ol_cv_pthread_version=4
11442 fi
11443 rm -f conftest*
11444  
11445 fi
11446 rm -f conftest*
11447  
11448 fi
11449 rm -f conftest*
11450  
11451 fi
11452 rm -f conftest*
11453
11454 fi
11455
11456 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11457
11458
11459                 if test $ol_cv_pthread_version != 0 ; then
11460                         cat >> confdefs.h <<EOF
11461 #define HAVE_PTHREADS $ol_cv_pthread_version
11462 EOF
11463
11464                 else
11465                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11466                 fi
11467
11468                 # consider threads found
11469                 ol_with_threads=found
11470
11471                 
11472         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11473 echo "configure:11474: checking for LinuxThreads pthread.h" >&5
11474 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11475   echo $ac_n "(cached) $ac_c" 1>&6
11476 else
11477   cat > conftest.$ac_ext <<EOF
11478 #line 11479 "configure"
11479 #include "confdefs.h"
11480 #include <pthread.h>
11481 EOF
11482 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11483   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11484   rm -rf conftest*
11485   ol_cv_header_linux_threads=yes
11486 else
11487   rm -rf conftest*
11488   ol_cv_header_linux_threads=no
11489 fi
11490 rm -f conftest*
11491
11492                 
11493 fi
11494
11495 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11496         if test $ol_cv_header_linux_threads = yes; then
11497                 cat >> confdefs.h <<\EOF
11498 #define HAVE_LINUX_THREADS 1
11499 EOF
11500
11501         fi
11502
11503                 
11504         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11505 echo "configure:11506: checking for GNU Pth pthread.h" >&5
11506 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11507   echo $ac_n "(cached) $ac_c" 1>&6
11508 else
11509   cat > conftest.$ac_ext <<EOF
11510 #line 11511 "configure"
11511 #include "confdefs.h"
11512 #include <pthread.h>
11513 #ifdef _POSIX_THREAD_IS_GNU_PTH
11514         __gnu_pth__;
11515 #endif
11516
11517 EOF
11518 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11519   egrep "__gnu_pth__" >/dev/null 2>&1; then
11520   rm -rf conftest*
11521   ol_cv_header_gnu_pth_pthread_h=yes
11522 else
11523   rm -rf conftest*
11524   ol_cv_header_gnu_pth_pthread_h=no
11525 fi
11526 rm -f conftest*
11527
11528                 
11529 fi
11530
11531 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11532
11533
11534                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11535                         for ac_hdr in sched.h
11536 do
11537 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11538 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11539 echo "configure:11540: checking for $ac_hdr" >&5
11540 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11541   echo $ac_n "(cached) $ac_c" 1>&6
11542 else
11543   cat > conftest.$ac_ext <<EOF
11544 #line 11545 "configure"
11545 #include "confdefs.h"
11546 #include <$ac_hdr>
11547 EOF
11548 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11549 { (eval echo configure:11550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11550 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11551 if test -z "$ac_err"; then
11552   rm -rf conftest*
11553   eval "ac_cv_header_$ac_safe=yes"
11554 else
11555   echo "$ac_err" >&5
11556   echo "configure: failed program was:" >&5
11557   cat conftest.$ac_ext >&5
11558   rm -rf conftest*
11559   eval "ac_cv_header_$ac_safe=no"
11560 fi
11561 rm -f conftest*
11562 fi
11563 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11564   echo "$ac_t""yes" 1>&6
11565     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11566   cat >> confdefs.h <<EOF
11567 #define $ac_tr_hdr 1
11568 EOF
11569  
11570 else
11571   echo "$ac_t""no" 1>&6
11572 fi
11573 done
11574
11575                 fi
11576
11577                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11578                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11579 echo "configure:11580: checking for pthread_create in default libraries" >&5
11580 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11581   echo $ac_n "(cached) $ac_c" 1>&6
11582 else
11583   
11584                 if test "$cross_compiling" = yes; then
11585   cat > conftest.$ac_ext <<EOF
11586 #line 11587 "configure"
11587 #include "confdefs.h"
11588 /* pthread test headers */
11589 #include <pthread.h>
11590 #if HAVE_PTHREADS < 7
11591 #include <errno.h>
11592 #endif
11593 #ifndef NULL
11594 #define NULL (void*)0
11595 #endif
11596
11597 static void *task(p)
11598         void *p;
11599 {
11600         return (void *) (p == NULL);
11601 }
11602
11603 int main() {
11604
11605         /* pthread test function */
11606 #ifndef PTHREAD_CREATE_DETACHED
11607 #define PTHREAD_CREATE_DETACHED 1
11608 #endif
11609         pthread_t t;
11610         int status;
11611         int detach = PTHREAD_CREATE_DETACHED;
11612
11613 #if HAVE_PTHREADS > 4
11614         /* Final pthreads */
11615         pthread_attr_t attr;
11616
11617         status = pthread_attr_init(&attr);
11618         if( status ) return status;
11619
11620 #if HAVE_PTHREADS < 7
11621         status = pthread_attr_setdetachstate(&attr, &detach);
11622         if( status < 0 ) status = errno;
11623 #else
11624         status = pthread_attr_setdetachstate(&attr, detach);
11625 #endif
11626         if( status ) return status;
11627         status = pthread_create( &t, &attr, task, NULL );
11628 #if HAVE_PTHREADS < 7
11629         if( status < 0 ) status = errno;
11630 #endif
11631         if( status ) return status;
11632 #else
11633         /* Draft 4 pthreads */
11634         status = pthread_create( &t, pthread_attr_default, task, NULL );
11635         if( status ) return errno;
11636
11637         /* give thread a chance to complete */
11638         /* it should remain joinable and hence detachable */
11639         sleep( 1 );
11640
11641         status = pthread_detach( &t );
11642         if( status ) return errno;
11643 #endif
11644
11645 #ifdef HAVE_LINUX_THREADS
11646         pthread_kill_other_threads_np();
11647 #endif
11648
11649         return 0;
11650
11651 ; return 0; }
11652 EOF
11653 if { (eval echo configure:11654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11654   rm -rf conftest*
11655   ol_cv_pthread_create=yes
11656 else
11657   echo "configure: failed program was:" >&5
11658   cat conftest.$ac_ext >&5
11659   rm -rf conftest*
11660   ol_cv_pthread_create=no
11661 fi
11662 rm -f conftest*
11663 else
11664   cat > conftest.$ac_ext <<EOF
11665 #line 11666 "configure"
11666 #include "confdefs.h"
11667 /* pthread test headers */
11668 #include <pthread.h>
11669 #if HAVE_PTHREADS < 7
11670 #include <errno.h>
11671 #endif
11672 #ifndef NULL
11673 #define NULL (void*)0
11674 #endif
11675
11676 static void *task(p)
11677         void *p;
11678 {
11679         return (void *) (p == NULL);
11680 }
11681
11682
11683 int main(argc, argv)
11684         int argc;
11685         char **argv;
11686 {
11687
11688         /* pthread test function */
11689 #ifndef PTHREAD_CREATE_DETACHED
11690 #define PTHREAD_CREATE_DETACHED 1
11691 #endif
11692         pthread_t t;
11693         int status;
11694         int detach = PTHREAD_CREATE_DETACHED;
11695
11696 #if HAVE_PTHREADS > 4
11697         /* Final pthreads */
11698         pthread_attr_t attr;
11699
11700         status = pthread_attr_init(&attr);
11701         if( status ) return status;
11702
11703 #if HAVE_PTHREADS < 7
11704         status = pthread_attr_setdetachstate(&attr, &detach);
11705         if( status < 0 ) status = errno;
11706 #else
11707         status = pthread_attr_setdetachstate(&attr, detach);
11708 #endif
11709         if( status ) return status;
11710         status = pthread_create( &t, &attr, task, NULL );
11711 #if HAVE_PTHREADS < 7
11712         if( status < 0 ) status = errno;
11713 #endif
11714         if( status ) return status;
11715 #else
11716         /* Draft 4 pthreads */
11717         status = pthread_create( &t, pthread_attr_default, task, NULL );
11718         if( status ) return errno;
11719
11720         /* give thread a chance to complete */
11721         /* it should remain joinable and hence detachable */
11722         sleep( 1 );
11723
11724         status = pthread_detach( &t );
11725         if( status ) return errno;
11726 #endif
11727
11728 #ifdef HAVE_LINUX_THREADS
11729         pthread_kill_other_threads_np();
11730 #endif
11731
11732         return 0;
11733
11734 }
11735
11736 EOF
11737 if { (eval echo configure:11738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11738 then
11739   ol_cv_pthread_create=yes
11740 else
11741   echo "configure: failed program was:" >&5
11742   cat conftest.$ac_ext >&5
11743   rm -fr conftest*
11744   ol_cv_pthread_create=no
11745 fi
11746 rm -fr conftest*
11747 fi
11748
11749 fi
11750
11751 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11752
11753                 if test $ol_cv_pthread_create != no ; then
11754                         ol_link_threads=posix
11755                         ol_link_pthreads=""
11756                 fi
11757                 
11758                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11759 if test "$ol_link_threads" = no ; then
11760         # try -kthread
11761         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11762 echo "configure:11763: checking for pthread link with -kthread" >&5
11763 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11764   echo $ac_n "(cached) $ac_c" 1>&6
11765 else
11766   
11767                 # save the flags
11768                 ol_LIBS="$LIBS"
11769                 LIBS="-kthread $LIBS"
11770
11771                 if test "$cross_compiling" = yes; then
11772   cat > conftest.$ac_ext <<EOF
11773 #line 11774 "configure"
11774 #include "confdefs.h"
11775 /* pthread test headers */
11776 #include <pthread.h>
11777 #if HAVE_PTHREADS < 7
11778 #include <errno.h>
11779 #endif
11780 #ifndef NULL
11781 #define NULL (void*)0
11782 #endif
11783
11784 static void *task(p)
11785         void *p;
11786 {
11787         return (void *) (p == NULL);
11788 }
11789
11790 int main() {
11791
11792         /* pthread test function */
11793 #ifndef PTHREAD_CREATE_DETACHED
11794 #define PTHREAD_CREATE_DETACHED 1
11795 #endif
11796         pthread_t t;
11797         int status;
11798         int detach = PTHREAD_CREATE_DETACHED;
11799
11800 #if HAVE_PTHREADS > 4
11801         /* Final pthreads */
11802         pthread_attr_t attr;
11803
11804         status = pthread_attr_init(&attr);
11805         if( status ) return status;
11806
11807 #if HAVE_PTHREADS < 7
11808         status = pthread_attr_setdetachstate(&attr, &detach);
11809         if( status < 0 ) status = errno;
11810 #else
11811         status = pthread_attr_setdetachstate(&attr, detach);
11812 #endif
11813         if( status ) return status;
11814         status = pthread_create( &t, &attr, task, NULL );
11815 #if HAVE_PTHREADS < 7
11816         if( status < 0 ) status = errno;
11817 #endif
11818         if( status ) return status;
11819 #else
11820         /* Draft 4 pthreads */
11821         status = pthread_create( &t, pthread_attr_default, task, NULL );
11822         if( status ) return errno;
11823
11824         /* give thread a chance to complete */
11825         /* it should remain joinable and hence detachable */
11826         sleep( 1 );
11827
11828         status = pthread_detach( &t );
11829         if( status ) return errno;
11830 #endif
11831
11832 #ifdef HAVE_LINUX_THREADS
11833         pthread_kill_other_threads_np();
11834 #endif
11835
11836         return 0;
11837
11838 ; return 0; }
11839 EOF
11840 if { (eval echo configure:11841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11841   rm -rf conftest*
11842   ol_cv_pthread_kthread=yes
11843 else
11844   echo "configure: failed program was:" >&5
11845   cat conftest.$ac_ext >&5
11846   rm -rf conftest*
11847   ol_cv_pthread_kthread=no
11848 fi
11849 rm -f conftest*
11850 else
11851   cat > conftest.$ac_ext <<EOF
11852 #line 11853 "configure"
11853 #include "confdefs.h"
11854 /* pthread test headers */
11855 #include <pthread.h>
11856 #if HAVE_PTHREADS < 7
11857 #include <errno.h>
11858 #endif
11859 #ifndef NULL
11860 #define NULL (void*)0
11861 #endif
11862
11863 static void *task(p)
11864         void *p;
11865 {
11866         return (void *) (p == NULL);
11867 }
11868
11869
11870 int main(argc, argv)
11871         int argc;
11872         char **argv;
11873 {
11874
11875         /* pthread test function */
11876 #ifndef PTHREAD_CREATE_DETACHED
11877 #define PTHREAD_CREATE_DETACHED 1
11878 #endif
11879         pthread_t t;
11880         int status;
11881         int detach = PTHREAD_CREATE_DETACHED;
11882
11883 #if HAVE_PTHREADS > 4
11884         /* Final pthreads */
11885         pthread_attr_t attr;
11886
11887         status = pthread_attr_init(&attr);
11888         if( status ) return status;
11889
11890 #if HAVE_PTHREADS < 7
11891         status = pthread_attr_setdetachstate(&attr, &detach);
11892         if( status < 0 ) status = errno;
11893 #else
11894         status = pthread_attr_setdetachstate(&attr, detach);
11895 #endif
11896         if( status ) return status;
11897         status = pthread_create( &t, &attr, task, NULL );
11898 #if HAVE_PTHREADS < 7
11899         if( status < 0 ) status = errno;
11900 #endif
11901         if( status ) return status;
11902 #else
11903         /* Draft 4 pthreads */
11904         status = pthread_create( &t, pthread_attr_default, task, NULL );
11905         if( status ) return errno;
11906
11907         /* give thread a chance to complete */
11908         /* it should remain joinable and hence detachable */
11909         sleep( 1 );
11910
11911         status = pthread_detach( &t );
11912         if( status ) return errno;
11913 #endif
11914
11915 #ifdef HAVE_LINUX_THREADS
11916         pthread_kill_other_threads_np();
11917 #endif
11918
11919         return 0;
11920
11921 }
11922
11923 EOF
11924 if { (eval echo configure:11925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11925 then
11926   ol_cv_pthread_kthread=yes
11927 else
11928   echo "configure: failed program was:" >&5
11929   cat conftest.$ac_ext >&5
11930   rm -fr conftest*
11931   ol_cv_pthread_kthread=no
11932 fi
11933 rm -fr conftest*
11934 fi
11935
11936
11937                 # restore the LIBS
11938                 LIBS="$ol_LIBS"
11939         
11940 fi
11941
11942 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11943
11944         if test $ol_cv_pthread_kthread = yes ; then
11945                 ol_link_pthreads="-kthread"
11946                 ol_link_threads=posix
11947         fi
11948 fi
11949
11950                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11951 if test "$ol_link_threads" = no ; then
11952         # try -pthread
11953         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11954 echo "configure:11955: checking for pthread link with -pthread" >&5
11955 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11956   echo $ac_n "(cached) $ac_c" 1>&6
11957 else
11958   
11959                 # save the flags
11960                 ol_LIBS="$LIBS"
11961                 LIBS="-pthread $LIBS"
11962
11963                 if test "$cross_compiling" = yes; then
11964   cat > conftest.$ac_ext <<EOF
11965 #line 11966 "configure"
11966 #include "confdefs.h"
11967 /* pthread test headers */
11968 #include <pthread.h>
11969 #if HAVE_PTHREADS < 7
11970 #include <errno.h>
11971 #endif
11972 #ifndef NULL
11973 #define NULL (void*)0
11974 #endif
11975
11976 static void *task(p)
11977         void *p;
11978 {
11979         return (void *) (p == NULL);
11980 }
11981
11982 int main() {
11983
11984         /* pthread test function */
11985 #ifndef PTHREAD_CREATE_DETACHED
11986 #define PTHREAD_CREATE_DETACHED 1
11987 #endif
11988         pthread_t t;
11989         int status;
11990         int detach = PTHREAD_CREATE_DETACHED;
11991
11992 #if HAVE_PTHREADS > 4
11993         /* Final pthreads */
11994         pthread_attr_t attr;
11995
11996         status = pthread_attr_init(&attr);
11997         if( status ) return status;
11998
11999 #if HAVE_PTHREADS < 7
12000         status = pthread_attr_setdetachstate(&attr, &detach);
12001         if( status < 0 ) status = errno;
12002 #else
12003         status = pthread_attr_setdetachstate(&attr, detach);
12004 #endif
12005         if( status ) return status;
12006         status = pthread_create( &t, &attr, task, NULL );
12007 #if HAVE_PTHREADS < 7
12008         if( status < 0 ) status = errno;
12009 #endif
12010         if( status ) return status;
12011 #else
12012         /* Draft 4 pthreads */
12013         status = pthread_create( &t, pthread_attr_default, task, NULL );
12014         if( status ) return errno;
12015
12016         /* give thread a chance to complete */
12017         /* it should remain joinable and hence detachable */
12018         sleep( 1 );
12019
12020         status = pthread_detach( &t );
12021         if( status ) return errno;
12022 #endif
12023
12024 #ifdef HAVE_LINUX_THREADS
12025         pthread_kill_other_threads_np();
12026 #endif
12027
12028         return 0;
12029
12030 ; return 0; }
12031 EOF
12032 if { (eval echo configure:12033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12033   rm -rf conftest*
12034   ol_cv_pthread_pthread=yes
12035 else
12036   echo "configure: failed program was:" >&5
12037   cat conftest.$ac_ext >&5
12038   rm -rf conftest*
12039   ol_cv_pthread_pthread=no
12040 fi
12041 rm -f conftest*
12042 else
12043   cat > conftest.$ac_ext <<EOF
12044 #line 12045 "configure"
12045 #include "confdefs.h"
12046 /* pthread test headers */
12047 #include <pthread.h>
12048 #if HAVE_PTHREADS < 7
12049 #include <errno.h>
12050 #endif
12051 #ifndef NULL
12052 #define NULL (void*)0
12053 #endif
12054
12055 static void *task(p)
12056         void *p;
12057 {
12058         return (void *) (p == NULL);
12059 }
12060
12061
12062 int main(argc, argv)
12063         int argc;
12064         char **argv;
12065 {
12066
12067         /* pthread test function */
12068 #ifndef PTHREAD_CREATE_DETACHED
12069 #define PTHREAD_CREATE_DETACHED 1
12070 #endif
12071         pthread_t t;
12072         int status;
12073         int detach = PTHREAD_CREATE_DETACHED;
12074
12075 #if HAVE_PTHREADS > 4
12076         /* Final pthreads */
12077         pthread_attr_t attr;
12078
12079         status = pthread_attr_init(&attr);
12080         if( status ) return status;
12081
12082 #if HAVE_PTHREADS < 7
12083         status = pthread_attr_setdetachstate(&attr, &detach);
12084         if( status < 0 ) status = errno;
12085 #else
12086         status = pthread_attr_setdetachstate(&attr, detach);
12087 #endif
12088         if( status ) return status;
12089         status = pthread_create( &t, &attr, task, NULL );
12090 #if HAVE_PTHREADS < 7
12091         if( status < 0 ) status = errno;
12092 #endif
12093         if( status ) return status;
12094 #else
12095         /* Draft 4 pthreads */
12096         status = pthread_create( &t, pthread_attr_default, task, NULL );
12097         if( status ) return errno;
12098
12099         /* give thread a chance to complete */
12100         /* it should remain joinable and hence detachable */
12101         sleep( 1 );
12102
12103         status = pthread_detach( &t );
12104         if( status ) return errno;
12105 #endif
12106
12107 #ifdef HAVE_LINUX_THREADS
12108         pthread_kill_other_threads_np();
12109 #endif
12110
12111         return 0;
12112
12113 }
12114
12115 EOF
12116 if { (eval echo configure:12117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12117 then
12118   ol_cv_pthread_pthread=yes
12119 else
12120   echo "configure: failed program was:" >&5
12121   cat conftest.$ac_ext >&5
12122   rm -fr conftest*
12123   ol_cv_pthread_pthread=no
12124 fi
12125 rm -fr conftest*
12126 fi
12127
12128
12129                 # restore the LIBS
12130                 LIBS="$ol_LIBS"
12131         
12132 fi
12133
12134 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12135
12136         if test $ol_cv_pthread_pthread = yes ; then
12137                 ol_link_pthreads="-pthread"
12138                 ol_link_threads=posix
12139         fi
12140 fi
12141
12142                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12143 if test "$ol_link_threads" = no ; then
12144         # try -pthreads
12145         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12146 echo "configure:12147: checking for pthread link with -pthreads" >&5
12147 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12148   echo $ac_n "(cached) $ac_c" 1>&6
12149 else
12150   
12151                 # save the flags
12152                 ol_LIBS="$LIBS"
12153                 LIBS="-pthreads $LIBS"
12154
12155                 if test "$cross_compiling" = yes; then
12156   cat > conftest.$ac_ext <<EOF
12157 #line 12158 "configure"
12158 #include "confdefs.h"
12159 /* pthread test headers */
12160 #include <pthread.h>
12161 #if HAVE_PTHREADS < 7
12162 #include <errno.h>
12163 #endif
12164 #ifndef NULL
12165 #define NULL (void*)0
12166 #endif
12167
12168 static void *task(p)
12169         void *p;
12170 {
12171         return (void *) (p == NULL);
12172 }
12173
12174 int main() {
12175
12176         /* pthread test function */
12177 #ifndef PTHREAD_CREATE_DETACHED
12178 #define PTHREAD_CREATE_DETACHED 1
12179 #endif
12180         pthread_t t;
12181         int status;
12182         int detach = PTHREAD_CREATE_DETACHED;
12183
12184 #if HAVE_PTHREADS > 4
12185         /* Final pthreads */
12186         pthread_attr_t attr;
12187
12188         status = pthread_attr_init(&attr);
12189         if( status ) return status;
12190
12191 #if HAVE_PTHREADS < 7
12192         status = pthread_attr_setdetachstate(&attr, &detach);
12193         if( status < 0 ) status = errno;
12194 #else
12195         status = pthread_attr_setdetachstate(&attr, detach);
12196 #endif
12197         if( status ) return status;
12198         status = pthread_create( &t, &attr, task, NULL );
12199 #if HAVE_PTHREADS < 7
12200         if( status < 0 ) status = errno;
12201 #endif
12202         if( status ) return status;
12203 #else
12204         /* Draft 4 pthreads */
12205         status = pthread_create( &t, pthread_attr_default, task, NULL );
12206         if( status ) return errno;
12207
12208         /* give thread a chance to complete */
12209         /* it should remain joinable and hence detachable */
12210         sleep( 1 );
12211
12212         status = pthread_detach( &t );
12213         if( status ) return errno;
12214 #endif
12215
12216 #ifdef HAVE_LINUX_THREADS
12217         pthread_kill_other_threads_np();
12218 #endif
12219
12220         return 0;
12221
12222 ; return 0; }
12223 EOF
12224 if { (eval echo configure:12225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12225   rm -rf conftest*
12226   ol_cv_pthread_pthreads=yes
12227 else
12228   echo "configure: failed program was:" >&5
12229   cat conftest.$ac_ext >&5
12230   rm -rf conftest*
12231   ol_cv_pthread_pthreads=no
12232 fi
12233 rm -f conftest*
12234 else
12235   cat > conftest.$ac_ext <<EOF
12236 #line 12237 "configure"
12237 #include "confdefs.h"
12238 /* pthread test headers */
12239 #include <pthread.h>
12240 #if HAVE_PTHREADS < 7
12241 #include <errno.h>
12242 #endif
12243 #ifndef NULL
12244 #define NULL (void*)0
12245 #endif
12246
12247 static void *task(p)
12248         void *p;
12249 {
12250         return (void *) (p == NULL);
12251 }
12252
12253
12254 int main(argc, argv)
12255         int argc;
12256         char **argv;
12257 {
12258
12259         /* pthread test function */
12260 #ifndef PTHREAD_CREATE_DETACHED
12261 #define PTHREAD_CREATE_DETACHED 1
12262 #endif
12263         pthread_t t;
12264         int status;
12265         int detach = PTHREAD_CREATE_DETACHED;
12266
12267 #if HAVE_PTHREADS > 4
12268         /* Final pthreads */
12269         pthread_attr_t attr;
12270
12271         status = pthread_attr_init(&attr);
12272         if( status ) return status;
12273
12274 #if HAVE_PTHREADS < 7
12275         status = pthread_attr_setdetachstate(&attr, &detach);
12276         if( status < 0 ) status = errno;
12277 #else
12278         status = pthread_attr_setdetachstate(&attr, detach);
12279 #endif
12280         if( status ) return status;
12281         status = pthread_create( &t, &attr, task, NULL );
12282 #if HAVE_PTHREADS < 7
12283         if( status < 0 ) status = errno;
12284 #endif
12285         if( status ) return status;
12286 #else
12287         /* Draft 4 pthreads */
12288         status = pthread_create( &t, pthread_attr_default, task, NULL );
12289         if( status ) return errno;
12290
12291         /* give thread a chance to complete */
12292         /* it should remain joinable and hence detachable */
12293         sleep( 1 );
12294
12295         status = pthread_detach( &t );
12296         if( status ) return errno;
12297 #endif
12298
12299 #ifdef HAVE_LINUX_THREADS
12300         pthread_kill_other_threads_np();
12301 #endif
12302
12303         return 0;
12304
12305 }
12306
12307 EOF
12308 if { (eval echo configure:12309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12309 then
12310   ol_cv_pthread_pthreads=yes
12311 else
12312   echo "configure: failed program was:" >&5
12313   cat conftest.$ac_ext >&5
12314   rm -fr conftest*
12315   ol_cv_pthread_pthreads=no
12316 fi
12317 rm -fr conftest*
12318 fi
12319
12320
12321                 # restore the LIBS
12322                 LIBS="$ol_LIBS"
12323         
12324 fi
12325
12326 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12327
12328         if test $ol_cv_pthread_pthreads = yes ; then
12329                 ol_link_pthreads="-pthreads"
12330                 ol_link_threads=posix
12331         fi
12332 fi
12333
12334                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12335 if test "$ol_link_threads" = no ; then
12336         # try -mthreads
12337         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12338 echo "configure:12339: checking for pthread link with -mthreads" >&5
12339 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12340   echo $ac_n "(cached) $ac_c" 1>&6
12341 else
12342   
12343                 # save the flags
12344                 ol_LIBS="$LIBS"
12345                 LIBS="-mthreads $LIBS"
12346
12347                 if test "$cross_compiling" = yes; then
12348   cat > conftest.$ac_ext <<EOF
12349 #line 12350 "configure"
12350 #include "confdefs.h"
12351 /* pthread test headers */
12352 #include <pthread.h>
12353 #if HAVE_PTHREADS < 7
12354 #include <errno.h>
12355 #endif
12356 #ifndef NULL
12357 #define NULL (void*)0
12358 #endif
12359
12360 static void *task(p)
12361         void *p;
12362 {
12363         return (void *) (p == NULL);
12364 }
12365
12366 int main() {
12367
12368         /* pthread test function */
12369 #ifndef PTHREAD_CREATE_DETACHED
12370 #define PTHREAD_CREATE_DETACHED 1
12371 #endif
12372         pthread_t t;
12373         int status;
12374         int detach = PTHREAD_CREATE_DETACHED;
12375
12376 #if HAVE_PTHREADS > 4
12377         /* Final pthreads */
12378         pthread_attr_t attr;
12379
12380         status = pthread_attr_init(&attr);
12381         if( status ) return status;
12382
12383 #if HAVE_PTHREADS < 7
12384         status = pthread_attr_setdetachstate(&attr, &detach);
12385         if( status < 0 ) status = errno;
12386 #else
12387         status = pthread_attr_setdetachstate(&attr, detach);
12388 #endif
12389         if( status ) return status;
12390         status = pthread_create( &t, &attr, task, NULL );
12391 #if HAVE_PTHREADS < 7
12392         if( status < 0 ) status = errno;
12393 #endif
12394         if( status ) return status;
12395 #else
12396         /* Draft 4 pthreads */
12397         status = pthread_create( &t, pthread_attr_default, task, NULL );
12398         if( status ) return errno;
12399
12400         /* give thread a chance to complete */
12401         /* it should remain joinable and hence detachable */
12402         sleep( 1 );
12403
12404         status = pthread_detach( &t );
12405         if( status ) return errno;
12406 #endif
12407
12408 #ifdef HAVE_LINUX_THREADS
12409         pthread_kill_other_threads_np();
12410 #endif
12411
12412         return 0;
12413
12414 ; return 0; }
12415 EOF
12416 if { (eval echo configure:12417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12417   rm -rf conftest*
12418   ol_cv_pthread_mthreads=yes
12419 else
12420   echo "configure: failed program was:" >&5
12421   cat conftest.$ac_ext >&5
12422   rm -rf conftest*
12423   ol_cv_pthread_mthreads=no
12424 fi
12425 rm -f conftest*
12426 else
12427   cat > conftest.$ac_ext <<EOF
12428 #line 12429 "configure"
12429 #include "confdefs.h"
12430 /* pthread test headers */
12431 #include <pthread.h>
12432 #if HAVE_PTHREADS < 7
12433 #include <errno.h>
12434 #endif
12435 #ifndef NULL
12436 #define NULL (void*)0
12437 #endif
12438
12439 static void *task(p)
12440         void *p;
12441 {
12442         return (void *) (p == NULL);
12443 }
12444
12445
12446 int main(argc, argv)
12447         int argc;
12448         char **argv;
12449 {
12450
12451         /* pthread test function */
12452 #ifndef PTHREAD_CREATE_DETACHED
12453 #define PTHREAD_CREATE_DETACHED 1
12454 #endif
12455         pthread_t t;
12456         int status;
12457         int detach = PTHREAD_CREATE_DETACHED;
12458
12459 #if HAVE_PTHREADS > 4
12460         /* Final pthreads */
12461         pthread_attr_t attr;
12462
12463         status = pthread_attr_init(&attr);
12464         if( status ) return status;
12465
12466 #if HAVE_PTHREADS < 7
12467         status = pthread_attr_setdetachstate(&attr, &detach);
12468         if( status < 0 ) status = errno;
12469 #else
12470         status = pthread_attr_setdetachstate(&attr, detach);
12471 #endif
12472         if( status ) return status;
12473         status = pthread_create( &t, &attr, task, NULL );
12474 #if HAVE_PTHREADS < 7
12475         if( status < 0 ) status = errno;
12476 #endif
12477         if( status ) return status;
12478 #else
12479         /* Draft 4 pthreads */
12480         status = pthread_create( &t, pthread_attr_default, task, NULL );
12481         if( status ) return errno;
12482
12483         /* give thread a chance to complete */
12484         /* it should remain joinable and hence detachable */
12485         sleep( 1 );
12486
12487         status = pthread_detach( &t );
12488         if( status ) return errno;
12489 #endif
12490
12491 #ifdef HAVE_LINUX_THREADS
12492         pthread_kill_other_threads_np();
12493 #endif
12494
12495         return 0;
12496
12497 }
12498
12499 EOF
12500 if { (eval echo configure:12501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12501 then
12502   ol_cv_pthread_mthreads=yes
12503 else
12504   echo "configure: failed program was:" >&5
12505   cat conftest.$ac_ext >&5
12506   rm -fr conftest*
12507   ol_cv_pthread_mthreads=no
12508 fi
12509 rm -fr conftest*
12510 fi
12511
12512
12513                 # restore the LIBS
12514                 LIBS="$ol_LIBS"
12515         
12516 fi
12517
12518 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12519
12520         if test $ol_cv_pthread_mthreads = yes ; then
12521                 ol_link_pthreads="-mthreads"
12522                 ol_link_threads=posix
12523         fi
12524 fi
12525
12526                 # Pthread try link: -thread (ol_cv_pthread_thread)
12527 if test "$ol_link_threads" = no ; then
12528         # try -thread
12529         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12530 echo "configure:12531: checking for pthread link with -thread" >&5
12531 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12532   echo $ac_n "(cached) $ac_c" 1>&6
12533 else
12534   
12535                 # save the flags
12536                 ol_LIBS="$LIBS"
12537                 LIBS="-thread $LIBS"
12538
12539                 if test "$cross_compiling" = yes; then
12540   cat > conftest.$ac_ext <<EOF
12541 #line 12542 "configure"
12542 #include "confdefs.h"
12543 /* pthread test headers */
12544 #include <pthread.h>
12545 #if HAVE_PTHREADS < 7
12546 #include <errno.h>
12547 #endif
12548 #ifndef NULL
12549 #define NULL (void*)0
12550 #endif
12551
12552 static void *task(p)
12553         void *p;
12554 {
12555         return (void *) (p == NULL);
12556 }
12557
12558 int main() {
12559
12560         /* pthread test function */
12561 #ifndef PTHREAD_CREATE_DETACHED
12562 #define PTHREAD_CREATE_DETACHED 1
12563 #endif
12564         pthread_t t;
12565         int status;
12566         int detach = PTHREAD_CREATE_DETACHED;
12567
12568 #if HAVE_PTHREADS > 4
12569         /* Final pthreads */
12570         pthread_attr_t attr;
12571
12572         status = pthread_attr_init(&attr);
12573         if( status ) return status;
12574
12575 #if HAVE_PTHREADS < 7
12576         status = pthread_attr_setdetachstate(&attr, &detach);
12577         if( status < 0 ) status = errno;
12578 #else
12579         status = pthread_attr_setdetachstate(&attr, detach);
12580 #endif
12581         if( status ) return status;
12582         status = pthread_create( &t, &attr, task, NULL );
12583 #if HAVE_PTHREADS < 7
12584         if( status < 0 ) status = errno;
12585 #endif
12586         if( status ) return status;
12587 #else
12588         /* Draft 4 pthreads */
12589         status = pthread_create( &t, pthread_attr_default, task, NULL );
12590         if( status ) return errno;
12591
12592         /* give thread a chance to complete */
12593         /* it should remain joinable and hence detachable */
12594         sleep( 1 );
12595
12596         status = pthread_detach( &t );
12597         if( status ) return errno;
12598 #endif
12599
12600 #ifdef HAVE_LINUX_THREADS
12601         pthread_kill_other_threads_np();
12602 #endif
12603
12604         return 0;
12605
12606 ; return 0; }
12607 EOF
12608 if { (eval echo configure:12609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12609   rm -rf conftest*
12610   ol_cv_pthread_thread=yes
12611 else
12612   echo "configure: failed program was:" >&5
12613   cat conftest.$ac_ext >&5
12614   rm -rf conftest*
12615   ol_cv_pthread_thread=no
12616 fi
12617 rm -f conftest*
12618 else
12619   cat > conftest.$ac_ext <<EOF
12620 #line 12621 "configure"
12621 #include "confdefs.h"
12622 /* pthread test headers */
12623 #include <pthread.h>
12624 #if HAVE_PTHREADS < 7
12625 #include <errno.h>
12626 #endif
12627 #ifndef NULL
12628 #define NULL (void*)0
12629 #endif
12630
12631 static void *task(p)
12632         void *p;
12633 {
12634         return (void *) (p == NULL);
12635 }
12636
12637
12638 int main(argc, argv)
12639         int argc;
12640         char **argv;
12641 {
12642
12643         /* pthread test function */
12644 #ifndef PTHREAD_CREATE_DETACHED
12645 #define PTHREAD_CREATE_DETACHED 1
12646 #endif
12647         pthread_t t;
12648         int status;
12649         int detach = PTHREAD_CREATE_DETACHED;
12650
12651 #if HAVE_PTHREADS > 4
12652         /* Final pthreads */
12653         pthread_attr_t attr;
12654
12655         status = pthread_attr_init(&attr);
12656         if( status ) return status;
12657
12658 #if HAVE_PTHREADS < 7
12659         status = pthread_attr_setdetachstate(&attr, &detach);
12660         if( status < 0 ) status = errno;
12661 #else
12662         status = pthread_attr_setdetachstate(&attr, detach);
12663 #endif
12664         if( status ) return status;
12665         status = pthread_create( &t, &attr, task, NULL );
12666 #if HAVE_PTHREADS < 7
12667         if( status < 0 ) status = errno;
12668 #endif
12669         if( status ) return status;
12670 #else
12671         /* Draft 4 pthreads */
12672         status = pthread_create( &t, pthread_attr_default, task, NULL );
12673         if( status ) return errno;
12674
12675         /* give thread a chance to complete */
12676         /* it should remain joinable and hence detachable */
12677         sleep( 1 );
12678
12679         status = pthread_detach( &t );
12680         if( status ) return errno;
12681 #endif
12682
12683 #ifdef HAVE_LINUX_THREADS
12684         pthread_kill_other_threads_np();
12685 #endif
12686
12687         return 0;
12688
12689 }
12690
12691 EOF
12692 if { (eval echo configure:12693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12693 then
12694   ol_cv_pthread_thread=yes
12695 else
12696   echo "configure: failed program was:" >&5
12697   cat conftest.$ac_ext >&5
12698   rm -fr conftest*
12699   ol_cv_pthread_thread=no
12700 fi
12701 rm -fr conftest*
12702 fi
12703
12704
12705                 # restore the LIBS
12706                 LIBS="$ol_LIBS"
12707         
12708 fi
12709
12710 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12711
12712         if test $ol_cv_pthread_thread = yes ; then
12713                 ol_link_pthreads="-thread"
12714                 ol_link_threads=posix
12715         fi
12716 fi
12717
12718
12719                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12720 if test "$ol_link_threads" = no ; then
12721         # try -lpthread -lmach -lexc -lc_r
12722         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12723 echo "configure:12724: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12724 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12725   echo $ac_n "(cached) $ac_c" 1>&6
12726 else
12727   
12728                 # save the flags
12729                 ol_LIBS="$LIBS"
12730                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12731
12732                 if test "$cross_compiling" = yes; then
12733   cat > conftest.$ac_ext <<EOF
12734 #line 12735 "configure"
12735 #include "confdefs.h"
12736 /* pthread test headers */
12737 #include <pthread.h>
12738 #if HAVE_PTHREADS < 7
12739 #include <errno.h>
12740 #endif
12741 #ifndef NULL
12742 #define NULL (void*)0
12743 #endif
12744
12745 static void *task(p)
12746         void *p;
12747 {
12748         return (void *) (p == NULL);
12749 }
12750
12751 int main() {
12752
12753         /* pthread test function */
12754 #ifndef PTHREAD_CREATE_DETACHED
12755 #define PTHREAD_CREATE_DETACHED 1
12756 #endif
12757         pthread_t t;
12758         int status;
12759         int detach = PTHREAD_CREATE_DETACHED;
12760
12761 #if HAVE_PTHREADS > 4
12762         /* Final pthreads */
12763         pthread_attr_t attr;
12764
12765         status = pthread_attr_init(&attr);
12766         if( status ) return status;
12767
12768 #if HAVE_PTHREADS < 7
12769         status = pthread_attr_setdetachstate(&attr, &detach);
12770         if( status < 0 ) status = errno;
12771 #else
12772         status = pthread_attr_setdetachstate(&attr, detach);
12773 #endif
12774         if( status ) return status;
12775         status = pthread_create( &t, &attr, task, NULL );
12776 #if HAVE_PTHREADS < 7
12777         if( status < 0 ) status = errno;
12778 #endif
12779         if( status ) return status;
12780 #else
12781         /* Draft 4 pthreads */
12782         status = pthread_create( &t, pthread_attr_default, task, NULL );
12783         if( status ) return errno;
12784
12785         /* give thread a chance to complete */
12786         /* it should remain joinable and hence detachable */
12787         sleep( 1 );
12788
12789         status = pthread_detach( &t );
12790         if( status ) return errno;
12791 #endif
12792
12793 #ifdef HAVE_LINUX_THREADS
12794         pthread_kill_other_threads_np();
12795 #endif
12796
12797         return 0;
12798
12799 ; return 0; }
12800 EOF
12801 if { (eval echo configure:12802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12802   rm -rf conftest*
12803   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12804 else
12805   echo "configure: failed program was:" >&5
12806   cat conftest.$ac_ext >&5
12807   rm -rf conftest*
12808   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12809 fi
12810 rm -f conftest*
12811 else
12812   cat > conftest.$ac_ext <<EOF
12813 #line 12814 "configure"
12814 #include "confdefs.h"
12815 /* pthread test headers */
12816 #include <pthread.h>
12817 #if HAVE_PTHREADS < 7
12818 #include <errno.h>
12819 #endif
12820 #ifndef NULL
12821 #define NULL (void*)0
12822 #endif
12823
12824 static void *task(p)
12825         void *p;
12826 {
12827         return (void *) (p == NULL);
12828 }
12829
12830
12831 int main(argc, argv)
12832         int argc;
12833         char **argv;
12834 {
12835
12836         /* pthread test function */
12837 #ifndef PTHREAD_CREATE_DETACHED
12838 #define PTHREAD_CREATE_DETACHED 1
12839 #endif
12840         pthread_t t;
12841         int status;
12842         int detach = PTHREAD_CREATE_DETACHED;
12843
12844 #if HAVE_PTHREADS > 4
12845         /* Final pthreads */
12846         pthread_attr_t attr;
12847
12848         status = pthread_attr_init(&attr);
12849         if( status ) return status;
12850
12851 #if HAVE_PTHREADS < 7
12852         status = pthread_attr_setdetachstate(&attr, &detach);
12853         if( status < 0 ) status = errno;
12854 #else
12855         status = pthread_attr_setdetachstate(&attr, detach);
12856 #endif
12857         if( status ) return status;
12858         status = pthread_create( &t, &attr, task, NULL );
12859 #if HAVE_PTHREADS < 7
12860         if( status < 0 ) status = errno;
12861 #endif
12862         if( status ) return status;
12863 #else
12864         /* Draft 4 pthreads */
12865         status = pthread_create( &t, pthread_attr_default, task, NULL );
12866         if( status ) return errno;
12867
12868         /* give thread a chance to complete */
12869         /* it should remain joinable and hence detachable */
12870         sleep( 1 );
12871
12872         status = pthread_detach( &t );
12873         if( status ) return errno;
12874 #endif
12875
12876 #ifdef HAVE_LINUX_THREADS
12877         pthread_kill_other_threads_np();
12878 #endif
12879
12880         return 0;
12881
12882 }
12883
12884 EOF
12885 if { (eval echo configure:12886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12886 then
12887   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12888 else
12889   echo "configure: failed program was:" >&5
12890   cat conftest.$ac_ext >&5
12891   rm -fr conftest*
12892   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12893 fi
12894 rm -fr conftest*
12895 fi
12896
12897
12898                 # restore the LIBS
12899                 LIBS="$ol_LIBS"
12900         
12901 fi
12902
12903 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12904
12905         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12906                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12907                 ol_link_threads=posix
12908         fi
12909 fi
12910
12911                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12912 if test "$ol_link_threads" = no ; then
12913         # try -lpthread -lmach -lexc
12914         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12915 echo "configure:12916: checking for pthread link with -lpthread -lmach -lexc" >&5
12916 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12917   echo $ac_n "(cached) $ac_c" 1>&6
12918 else
12919   
12920                 # save the flags
12921                 ol_LIBS="$LIBS"
12922                 LIBS="-lpthread -lmach -lexc $LIBS"
12923
12924                 if test "$cross_compiling" = yes; then
12925   cat > conftest.$ac_ext <<EOF
12926 #line 12927 "configure"
12927 #include "confdefs.h"
12928 /* pthread test headers */
12929 #include <pthread.h>
12930 #if HAVE_PTHREADS < 7
12931 #include <errno.h>
12932 #endif
12933 #ifndef NULL
12934 #define NULL (void*)0
12935 #endif
12936
12937 static void *task(p)
12938         void *p;
12939 {
12940         return (void *) (p == NULL);
12941 }
12942
12943 int main() {
12944
12945         /* pthread test function */
12946 #ifndef PTHREAD_CREATE_DETACHED
12947 #define PTHREAD_CREATE_DETACHED 1
12948 #endif
12949         pthread_t t;
12950         int status;
12951         int detach = PTHREAD_CREATE_DETACHED;
12952
12953 #if HAVE_PTHREADS > 4
12954         /* Final pthreads */
12955         pthread_attr_t attr;
12956
12957         status = pthread_attr_init(&attr);
12958         if( status ) return status;
12959
12960 #if HAVE_PTHREADS < 7
12961         status = pthread_attr_setdetachstate(&attr, &detach);
12962         if( status < 0 ) status = errno;
12963 #else
12964         status = pthread_attr_setdetachstate(&attr, detach);
12965 #endif
12966         if( status ) return status;
12967         status = pthread_create( &t, &attr, task, NULL );
12968 #if HAVE_PTHREADS < 7
12969         if( status < 0 ) status = errno;
12970 #endif
12971         if( status ) return status;
12972 #else
12973         /* Draft 4 pthreads */
12974         status = pthread_create( &t, pthread_attr_default, task, NULL );
12975         if( status ) return errno;
12976
12977         /* give thread a chance to complete */
12978         /* it should remain joinable and hence detachable */
12979         sleep( 1 );
12980
12981         status = pthread_detach( &t );
12982         if( status ) return errno;
12983 #endif
12984
12985 #ifdef HAVE_LINUX_THREADS
12986         pthread_kill_other_threads_np();
12987 #endif
12988
12989         return 0;
12990
12991 ; return 0; }
12992 EOF
12993 if { (eval echo configure:12994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12994   rm -rf conftest*
12995   ol_cv_pthread_lpthread_lmach_lexc=yes
12996 else
12997   echo "configure: failed program was:" >&5
12998   cat conftest.$ac_ext >&5
12999   rm -rf conftest*
13000   ol_cv_pthread_lpthread_lmach_lexc=no
13001 fi
13002 rm -f conftest*
13003 else
13004   cat > conftest.$ac_ext <<EOF
13005 #line 13006 "configure"
13006 #include "confdefs.h"
13007 /* pthread test headers */
13008 #include <pthread.h>
13009 #if HAVE_PTHREADS < 7
13010 #include <errno.h>
13011 #endif
13012 #ifndef NULL
13013 #define NULL (void*)0
13014 #endif
13015
13016 static void *task(p)
13017         void *p;
13018 {
13019         return (void *) (p == NULL);
13020 }
13021
13022
13023 int main(argc, argv)
13024         int argc;
13025         char **argv;
13026 {
13027
13028         /* pthread test function */
13029 #ifndef PTHREAD_CREATE_DETACHED
13030 #define PTHREAD_CREATE_DETACHED 1
13031 #endif
13032         pthread_t t;
13033         int status;
13034         int detach = PTHREAD_CREATE_DETACHED;
13035
13036 #if HAVE_PTHREADS > 4
13037         /* Final pthreads */
13038         pthread_attr_t attr;
13039
13040         status = pthread_attr_init(&attr);
13041         if( status ) return status;
13042
13043 #if HAVE_PTHREADS < 7
13044         status = pthread_attr_setdetachstate(&attr, &detach);
13045         if( status < 0 ) status = errno;
13046 #else
13047         status = pthread_attr_setdetachstate(&attr, detach);
13048 #endif
13049         if( status ) return status;
13050         status = pthread_create( &t, &attr, task, NULL );
13051 #if HAVE_PTHREADS < 7
13052         if( status < 0 ) status = errno;
13053 #endif
13054         if( status ) return status;
13055 #else
13056         /* Draft 4 pthreads */
13057         status = pthread_create( &t, pthread_attr_default, task, NULL );
13058         if( status ) return errno;
13059
13060         /* give thread a chance to complete */
13061         /* it should remain joinable and hence detachable */
13062         sleep( 1 );
13063
13064         status = pthread_detach( &t );
13065         if( status ) return errno;
13066 #endif
13067
13068 #ifdef HAVE_LINUX_THREADS
13069         pthread_kill_other_threads_np();
13070 #endif
13071
13072         return 0;
13073
13074 }
13075
13076 EOF
13077 if { (eval echo configure:13078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13078 then
13079   ol_cv_pthread_lpthread_lmach_lexc=yes
13080 else
13081   echo "configure: failed program was:" >&5
13082   cat conftest.$ac_ext >&5
13083   rm -fr conftest*
13084   ol_cv_pthread_lpthread_lmach_lexc=no
13085 fi
13086 rm -fr conftest*
13087 fi
13088
13089
13090                 # restore the LIBS
13091                 LIBS="$ol_LIBS"
13092         
13093 fi
13094
13095 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13096
13097         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13098                 ol_link_pthreads="-lpthread -lmach -lexc"
13099                 ol_link_threads=posix
13100         fi
13101 fi
13102
13103
13104                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13105 if test "$ol_link_threads" = no ; then
13106         # try -lpthread -Wl,-woff,85
13107         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13108 echo "configure:13109: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13109 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13110   echo $ac_n "(cached) $ac_c" 1>&6
13111 else
13112   
13113                 # save the flags
13114                 ol_LIBS="$LIBS"
13115                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13116
13117                 if test "$cross_compiling" = yes; then
13118   cat > conftest.$ac_ext <<EOF
13119 #line 13120 "configure"
13120 #include "confdefs.h"
13121 /* pthread test headers */
13122 #include <pthread.h>
13123 #if HAVE_PTHREADS < 7
13124 #include <errno.h>
13125 #endif
13126 #ifndef NULL
13127 #define NULL (void*)0
13128 #endif
13129
13130 static void *task(p)
13131         void *p;
13132 {
13133         return (void *) (p == NULL);
13134 }
13135
13136 int main() {
13137
13138         /* pthread test function */
13139 #ifndef PTHREAD_CREATE_DETACHED
13140 #define PTHREAD_CREATE_DETACHED 1
13141 #endif
13142         pthread_t t;
13143         int status;
13144         int detach = PTHREAD_CREATE_DETACHED;
13145
13146 #if HAVE_PTHREADS > 4
13147         /* Final pthreads */
13148         pthread_attr_t attr;
13149
13150         status = pthread_attr_init(&attr);
13151         if( status ) return status;
13152
13153 #if HAVE_PTHREADS < 7
13154         status = pthread_attr_setdetachstate(&attr, &detach);
13155         if( status < 0 ) status = errno;
13156 #else
13157         status = pthread_attr_setdetachstate(&attr, detach);
13158 #endif
13159         if( status ) return status;
13160         status = pthread_create( &t, &attr, task, NULL );
13161 #if HAVE_PTHREADS < 7
13162         if( status < 0 ) status = errno;
13163 #endif
13164         if( status ) return status;
13165 #else
13166         /* Draft 4 pthreads */
13167         status = pthread_create( &t, pthread_attr_default, task, NULL );
13168         if( status ) return errno;
13169
13170         /* give thread a chance to complete */
13171         /* it should remain joinable and hence detachable */
13172         sleep( 1 );
13173
13174         status = pthread_detach( &t );
13175         if( status ) return errno;
13176 #endif
13177
13178 #ifdef HAVE_LINUX_THREADS
13179         pthread_kill_other_threads_np();
13180 #endif
13181
13182         return 0;
13183
13184 ; return 0; }
13185 EOF
13186 if { (eval echo configure:13187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13187   rm -rf conftest*
13188   ol_cv_pthread_lib_lpthread_woff=yes
13189 else
13190   echo "configure: failed program was:" >&5
13191   cat conftest.$ac_ext >&5
13192   rm -rf conftest*
13193   ol_cv_pthread_lib_lpthread_woff=no
13194 fi
13195 rm -f conftest*
13196 else
13197   cat > conftest.$ac_ext <<EOF
13198 #line 13199 "configure"
13199 #include "confdefs.h"
13200 /* pthread test headers */
13201 #include <pthread.h>
13202 #if HAVE_PTHREADS < 7
13203 #include <errno.h>
13204 #endif
13205 #ifndef NULL
13206 #define NULL (void*)0
13207 #endif
13208
13209 static void *task(p)
13210         void *p;
13211 {
13212         return (void *) (p == NULL);
13213 }
13214
13215
13216 int main(argc, argv)
13217         int argc;
13218         char **argv;
13219 {
13220
13221         /* pthread test function */
13222 #ifndef PTHREAD_CREATE_DETACHED
13223 #define PTHREAD_CREATE_DETACHED 1
13224 #endif
13225         pthread_t t;
13226         int status;
13227         int detach = PTHREAD_CREATE_DETACHED;
13228
13229 #if HAVE_PTHREADS > 4
13230         /* Final pthreads */
13231         pthread_attr_t attr;
13232
13233         status = pthread_attr_init(&attr);
13234         if( status ) return status;
13235
13236 #if HAVE_PTHREADS < 7
13237         status = pthread_attr_setdetachstate(&attr, &detach);
13238         if( status < 0 ) status = errno;
13239 #else
13240         status = pthread_attr_setdetachstate(&attr, detach);
13241 #endif
13242         if( status ) return status;
13243         status = pthread_create( &t, &attr, task, NULL );
13244 #if HAVE_PTHREADS < 7
13245         if( status < 0 ) status = errno;
13246 #endif
13247         if( status ) return status;
13248 #else
13249         /* Draft 4 pthreads */
13250         status = pthread_create( &t, pthread_attr_default, task, NULL );
13251         if( status ) return errno;
13252
13253         /* give thread a chance to complete */
13254         /* it should remain joinable and hence detachable */
13255         sleep( 1 );
13256
13257         status = pthread_detach( &t );
13258         if( status ) return errno;
13259 #endif
13260
13261 #ifdef HAVE_LINUX_THREADS
13262         pthread_kill_other_threads_np();
13263 #endif
13264
13265         return 0;
13266
13267 }
13268
13269 EOF
13270 if { (eval echo configure:13271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13271 then
13272   ol_cv_pthread_lib_lpthread_woff=yes
13273 else
13274   echo "configure: failed program was:" >&5
13275   cat conftest.$ac_ext >&5
13276   rm -fr conftest*
13277   ol_cv_pthread_lib_lpthread_woff=no
13278 fi
13279 rm -fr conftest*
13280 fi
13281
13282
13283                 # restore the LIBS
13284                 LIBS="$ol_LIBS"
13285         
13286 fi
13287
13288 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13289
13290         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13291                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13292                 ol_link_threads=posix
13293         fi
13294 fi
13295
13296
13297                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13298 if test "$ol_link_threads" = no ; then
13299         # try -lpthread
13300         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13301 echo "configure:13302: checking for pthread link with -lpthread" >&5
13302 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13303   echo $ac_n "(cached) $ac_c" 1>&6
13304 else
13305   
13306                 # save the flags
13307                 ol_LIBS="$LIBS"
13308                 LIBS="-lpthread $LIBS"
13309
13310                 if test "$cross_compiling" = yes; then
13311   cat > conftest.$ac_ext <<EOF
13312 #line 13313 "configure"
13313 #include "confdefs.h"
13314 /* pthread test headers */
13315 #include <pthread.h>
13316 #if HAVE_PTHREADS < 7
13317 #include <errno.h>
13318 #endif
13319 #ifndef NULL
13320 #define NULL (void*)0
13321 #endif
13322
13323 static void *task(p)
13324         void *p;
13325 {
13326         return (void *) (p == NULL);
13327 }
13328
13329 int main() {
13330
13331         /* pthread test function */
13332 #ifndef PTHREAD_CREATE_DETACHED
13333 #define PTHREAD_CREATE_DETACHED 1
13334 #endif
13335         pthread_t t;
13336         int status;
13337         int detach = PTHREAD_CREATE_DETACHED;
13338
13339 #if HAVE_PTHREADS > 4
13340         /* Final pthreads */
13341         pthread_attr_t attr;
13342
13343         status = pthread_attr_init(&attr);
13344         if( status ) return status;
13345
13346 #if HAVE_PTHREADS < 7
13347         status = pthread_attr_setdetachstate(&attr, &detach);
13348         if( status < 0 ) status = errno;
13349 #else
13350         status = pthread_attr_setdetachstate(&attr, detach);
13351 #endif
13352         if( status ) return status;
13353         status = pthread_create( &t, &attr, task, NULL );
13354 #if HAVE_PTHREADS < 7
13355         if( status < 0 ) status = errno;
13356 #endif
13357         if( status ) return status;
13358 #else
13359         /* Draft 4 pthreads */
13360         status = pthread_create( &t, pthread_attr_default, task, NULL );
13361         if( status ) return errno;
13362
13363         /* give thread a chance to complete */
13364         /* it should remain joinable and hence detachable */
13365         sleep( 1 );
13366
13367         status = pthread_detach( &t );
13368         if( status ) return errno;
13369 #endif
13370
13371 #ifdef HAVE_LINUX_THREADS
13372         pthread_kill_other_threads_np();
13373 #endif
13374
13375         return 0;
13376
13377 ; return 0; }
13378 EOF
13379 if { (eval echo configure:13380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13380   rm -rf conftest*
13381   ol_cv_pthread_lpthread=yes
13382 else
13383   echo "configure: failed program was:" >&5
13384   cat conftest.$ac_ext >&5
13385   rm -rf conftest*
13386   ol_cv_pthread_lpthread=no
13387 fi
13388 rm -f conftest*
13389 else
13390   cat > conftest.$ac_ext <<EOF
13391 #line 13392 "configure"
13392 #include "confdefs.h"
13393 /* pthread test headers */
13394 #include <pthread.h>
13395 #if HAVE_PTHREADS < 7
13396 #include <errno.h>
13397 #endif
13398 #ifndef NULL
13399 #define NULL (void*)0
13400 #endif
13401
13402 static void *task(p)
13403         void *p;
13404 {
13405         return (void *) (p == NULL);
13406 }
13407
13408
13409 int main(argc, argv)
13410         int argc;
13411         char **argv;
13412 {
13413
13414         /* pthread test function */
13415 #ifndef PTHREAD_CREATE_DETACHED
13416 #define PTHREAD_CREATE_DETACHED 1
13417 #endif
13418         pthread_t t;
13419         int status;
13420         int detach = PTHREAD_CREATE_DETACHED;
13421
13422 #if HAVE_PTHREADS > 4
13423         /* Final pthreads */
13424         pthread_attr_t attr;
13425
13426         status = pthread_attr_init(&attr);
13427         if( status ) return status;
13428
13429 #if HAVE_PTHREADS < 7
13430         status = pthread_attr_setdetachstate(&attr, &detach);
13431         if( status < 0 ) status = errno;
13432 #else
13433         status = pthread_attr_setdetachstate(&attr, detach);
13434 #endif
13435         if( status ) return status;
13436         status = pthread_create( &t, &attr, task, NULL );
13437 #if HAVE_PTHREADS < 7
13438         if( status < 0 ) status = errno;
13439 #endif
13440         if( status ) return status;
13441 #else
13442         /* Draft 4 pthreads */
13443         status = pthread_create( &t, pthread_attr_default, task, NULL );
13444         if( status ) return errno;
13445
13446         /* give thread a chance to complete */
13447         /* it should remain joinable and hence detachable */
13448         sleep( 1 );
13449
13450         status = pthread_detach( &t );
13451         if( status ) return errno;
13452 #endif
13453
13454 #ifdef HAVE_LINUX_THREADS
13455         pthread_kill_other_threads_np();
13456 #endif
13457
13458         return 0;
13459
13460 }
13461
13462 EOF
13463 if { (eval echo configure:13464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13464 then
13465   ol_cv_pthread_lpthread=yes
13466 else
13467   echo "configure: failed program was:" >&5
13468   cat conftest.$ac_ext >&5
13469   rm -fr conftest*
13470   ol_cv_pthread_lpthread=no
13471 fi
13472 rm -fr conftest*
13473 fi
13474
13475
13476                 # restore the LIBS
13477                 LIBS="$ol_LIBS"
13478         
13479 fi
13480
13481 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13482
13483         if test $ol_cv_pthread_lpthread = yes ; then
13484                 ol_link_pthreads="-lpthread"
13485                 ol_link_threads=posix
13486         fi
13487 fi
13488
13489                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13490 if test "$ol_link_threads" = no ; then
13491         # try -lc_r
13492         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13493 echo "configure:13494: checking for pthread link with -lc_r" >&5
13494 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13495   echo $ac_n "(cached) $ac_c" 1>&6
13496 else
13497   
13498                 # save the flags
13499                 ol_LIBS="$LIBS"
13500                 LIBS="-lc_r $LIBS"
13501
13502                 if test "$cross_compiling" = yes; then
13503   cat > conftest.$ac_ext <<EOF
13504 #line 13505 "configure"
13505 #include "confdefs.h"
13506 /* pthread test headers */
13507 #include <pthread.h>
13508 #if HAVE_PTHREADS < 7
13509 #include <errno.h>
13510 #endif
13511 #ifndef NULL
13512 #define NULL (void*)0
13513 #endif
13514
13515 static void *task(p)
13516         void *p;
13517 {
13518         return (void *) (p == NULL);
13519 }
13520
13521 int main() {
13522
13523         /* pthread test function */
13524 #ifndef PTHREAD_CREATE_DETACHED
13525 #define PTHREAD_CREATE_DETACHED 1
13526 #endif
13527         pthread_t t;
13528         int status;
13529         int detach = PTHREAD_CREATE_DETACHED;
13530
13531 #if HAVE_PTHREADS > 4
13532         /* Final pthreads */
13533         pthread_attr_t attr;
13534
13535         status = pthread_attr_init(&attr);
13536         if( status ) return status;
13537
13538 #if HAVE_PTHREADS < 7
13539         status = pthread_attr_setdetachstate(&attr, &detach);
13540         if( status < 0 ) status = errno;
13541 #else
13542         status = pthread_attr_setdetachstate(&attr, detach);
13543 #endif
13544         if( status ) return status;
13545         status = pthread_create( &t, &attr, task, NULL );
13546 #if HAVE_PTHREADS < 7
13547         if( status < 0 ) status = errno;
13548 #endif
13549         if( status ) return status;
13550 #else
13551         /* Draft 4 pthreads */
13552         status = pthread_create( &t, pthread_attr_default, task, NULL );
13553         if( status ) return errno;
13554
13555         /* give thread a chance to complete */
13556         /* it should remain joinable and hence detachable */
13557         sleep( 1 );
13558
13559         status = pthread_detach( &t );
13560         if( status ) return errno;
13561 #endif
13562
13563 #ifdef HAVE_LINUX_THREADS
13564         pthread_kill_other_threads_np();
13565 #endif
13566
13567         return 0;
13568
13569 ; return 0; }
13570 EOF
13571 if { (eval echo configure:13572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13572   rm -rf conftest*
13573   ol_cv_pthread_lc_r=yes
13574 else
13575   echo "configure: failed program was:" >&5
13576   cat conftest.$ac_ext >&5
13577   rm -rf conftest*
13578   ol_cv_pthread_lc_r=no
13579 fi
13580 rm -f conftest*
13581 else
13582   cat > conftest.$ac_ext <<EOF
13583 #line 13584 "configure"
13584 #include "confdefs.h"
13585 /* pthread test headers */
13586 #include <pthread.h>
13587 #if HAVE_PTHREADS < 7
13588 #include <errno.h>
13589 #endif
13590 #ifndef NULL
13591 #define NULL (void*)0
13592 #endif
13593
13594 static void *task(p)
13595         void *p;
13596 {
13597         return (void *) (p == NULL);
13598 }
13599
13600
13601 int main(argc, argv)
13602         int argc;
13603         char **argv;
13604 {
13605
13606         /* pthread test function */
13607 #ifndef PTHREAD_CREATE_DETACHED
13608 #define PTHREAD_CREATE_DETACHED 1
13609 #endif
13610         pthread_t t;
13611         int status;
13612         int detach = PTHREAD_CREATE_DETACHED;
13613
13614 #if HAVE_PTHREADS > 4
13615         /* Final pthreads */
13616         pthread_attr_t attr;
13617
13618         status = pthread_attr_init(&attr);
13619         if( status ) return status;
13620
13621 #if HAVE_PTHREADS < 7
13622         status = pthread_attr_setdetachstate(&attr, &detach);
13623         if( status < 0 ) status = errno;
13624 #else
13625         status = pthread_attr_setdetachstate(&attr, detach);
13626 #endif
13627         if( status ) return status;
13628         status = pthread_create( &t, &attr, task, NULL );
13629 #if HAVE_PTHREADS < 7
13630         if( status < 0 ) status = errno;
13631 #endif
13632         if( status ) return status;
13633 #else
13634         /* Draft 4 pthreads */
13635         status = pthread_create( &t, pthread_attr_default, task, NULL );
13636         if( status ) return errno;
13637
13638         /* give thread a chance to complete */
13639         /* it should remain joinable and hence detachable */
13640         sleep( 1 );
13641
13642         status = pthread_detach( &t );
13643         if( status ) return errno;
13644 #endif
13645
13646 #ifdef HAVE_LINUX_THREADS
13647         pthread_kill_other_threads_np();
13648 #endif
13649
13650         return 0;
13651
13652 }
13653
13654 EOF
13655 if { (eval echo configure:13656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13656 then
13657   ol_cv_pthread_lc_r=yes
13658 else
13659   echo "configure: failed program was:" >&5
13660   cat conftest.$ac_ext >&5
13661   rm -fr conftest*
13662   ol_cv_pthread_lc_r=no
13663 fi
13664 rm -fr conftest*
13665 fi
13666
13667
13668                 # restore the LIBS
13669                 LIBS="$ol_LIBS"
13670         
13671 fi
13672
13673 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13674
13675         if test $ol_cv_pthread_lc_r = yes ; then
13676                 ol_link_pthreads="-lc_r"
13677                 ol_link_threads=posix
13678         fi
13679 fi
13680
13681
13682                 # Pthread try link: -threads (ol_cv_pthread_threads)
13683 if test "$ol_link_threads" = no ; then
13684         # try -threads
13685         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13686 echo "configure:13687: checking for pthread link with -threads" >&5
13687 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13688   echo $ac_n "(cached) $ac_c" 1>&6
13689 else
13690   
13691                 # save the flags
13692                 ol_LIBS="$LIBS"
13693                 LIBS="-threads $LIBS"
13694
13695                 if test "$cross_compiling" = yes; then
13696   cat > conftest.$ac_ext <<EOF
13697 #line 13698 "configure"
13698 #include "confdefs.h"
13699 /* pthread test headers */
13700 #include <pthread.h>
13701 #if HAVE_PTHREADS < 7
13702 #include <errno.h>
13703 #endif
13704 #ifndef NULL
13705 #define NULL (void*)0
13706 #endif
13707
13708 static void *task(p)
13709         void *p;
13710 {
13711         return (void *) (p == NULL);
13712 }
13713
13714 int main() {
13715
13716         /* pthread test function */
13717 #ifndef PTHREAD_CREATE_DETACHED
13718 #define PTHREAD_CREATE_DETACHED 1
13719 #endif
13720         pthread_t t;
13721         int status;
13722         int detach = PTHREAD_CREATE_DETACHED;
13723
13724 #if HAVE_PTHREADS > 4
13725         /* Final pthreads */
13726         pthread_attr_t attr;
13727
13728         status = pthread_attr_init(&attr);
13729         if( status ) return status;
13730
13731 #if HAVE_PTHREADS < 7
13732         status = pthread_attr_setdetachstate(&attr, &detach);
13733         if( status < 0 ) status = errno;
13734 #else
13735         status = pthread_attr_setdetachstate(&attr, detach);
13736 #endif
13737         if( status ) return status;
13738         status = pthread_create( &t, &attr, task, NULL );
13739 #if HAVE_PTHREADS < 7
13740         if( status < 0 ) status = errno;
13741 #endif
13742         if( status ) return status;
13743 #else
13744         /* Draft 4 pthreads */
13745         status = pthread_create( &t, pthread_attr_default, task, NULL );
13746         if( status ) return errno;
13747
13748         /* give thread a chance to complete */
13749         /* it should remain joinable and hence detachable */
13750         sleep( 1 );
13751
13752         status = pthread_detach( &t );
13753         if( status ) return errno;
13754 #endif
13755
13756 #ifdef HAVE_LINUX_THREADS
13757         pthread_kill_other_threads_np();
13758 #endif
13759
13760         return 0;
13761
13762 ; return 0; }
13763 EOF
13764 if { (eval echo configure:13765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13765   rm -rf conftest*
13766   ol_cv_pthread_threads=yes
13767 else
13768   echo "configure: failed program was:" >&5
13769   cat conftest.$ac_ext >&5
13770   rm -rf conftest*
13771   ol_cv_pthread_threads=no
13772 fi
13773 rm -f conftest*
13774 else
13775   cat > conftest.$ac_ext <<EOF
13776 #line 13777 "configure"
13777 #include "confdefs.h"
13778 /* pthread test headers */
13779 #include <pthread.h>
13780 #if HAVE_PTHREADS < 7
13781 #include <errno.h>
13782 #endif
13783 #ifndef NULL
13784 #define NULL (void*)0
13785 #endif
13786
13787 static void *task(p)
13788         void *p;
13789 {
13790         return (void *) (p == NULL);
13791 }
13792
13793
13794 int main(argc, argv)
13795         int argc;
13796         char **argv;
13797 {
13798
13799         /* pthread test function */
13800 #ifndef PTHREAD_CREATE_DETACHED
13801 #define PTHREAD_CREATE_DETACHED 1
13802 #endif
13803         pthread_t t;
13804         int status;
13805         int detach = PTHREAD_CREATE_DETACHED;
13806
13807 #if HAVE_PTHREADS > 4
13808         /* Final pthreads */
13809         pthread_attr_t attr;
13810
13811         status = pthread_attr_init(&attr);
13812         if( status ) return status;
13813
13814 #if HAVE_PTHREADS < 7
13815         status = pthread_attr_setdetachstate(&attr, &detach);
13816         if( status < 0 ) status = errno;
13817 #else
13818         status = pthread_attr_setdetachstate(&attr, detach);
13819 #endif
13820         if( status ) return status;
13821         status = pthread_create( &t, &attr, task, NULL );
13822 #if HAVE_PTHREADS < 7
13823         if( status < 0 ) status = errno;
13824 #endif
13825         if( status ) return status;
13826 #else
13827         /* Draft 4 pthreads */
13828         status = pthread_create( &t, pthread_attr_default, task, NULL );
13829         if( status ) return errno;
13830
13831         /* give thread a chance to complete */
13832         /* it should remain joinable and hence detachable */
13833         sleep( 1 );
13834
13835         status = pthread_detach( &t );
13836         if( status ) return errno;
13837 #endif
13838
13839 #ifdef HAVE_LINUX_THREADS
13840         pthread_kill_other_threads_np();
13841 #endif
13842
13843         return 0;
13844
13845 }
13846
13847 EOF
13848 if { (eval echo configure:13849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13849 then
13850   ol_cv_pthread_threads=yes
13851 else
13852   echo "configure: failed program was:" >&5
13853   cat conftest.$ac_ext >&5
13854   rm -fr conftest*
13855   ol_cv_pthread_threads=no
13856 fi
13857 rm -fr conftest*
13858 fi
13859
13860
13861                 # restore the LIBS
13862                 LIBS="$ol_LIBS"
13863         
13864 fi
13865
13866 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13867
13868         if test $ol_cv_pthread_threads = yes ; then
13869                 ol_link_pthreads="-threads"
13870                 ol_link_threads=posix
13871         fi
13872 fi
13873
13874
13875                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13876 if test "$ol_link_threads" = no ; then
13877         # try -lpthreads -lmach -lexc -lc_r
13878         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13879 echo "configure:13880: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13880 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13881   echo $ac_n "(cached) $ac_c" 1>&6
13882 else
13883   
13884                 # save the flags
13885                 ol_LIBS="$LIBS"
13886                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13887
13888                 if test "$cross_compiling" = yes; then
13889   cat > conftest.$ac_ext <<EOF
13890 #line 13891 "configure"
13891 #include "confdefs.h"
13892 /* pthread test headers */
13893 #include <pthread.h>
13894 #if HAVE_PTHREADS < 7
13895 #include <errno.h>
13896 #endif
13897 #ifndef NULL
13898 #define NULL (void*)0
13899 #endif
13900
13901 static void *task(p)
13902         void *p;
13903 {
13904         return (void *) (p == NULL);
13905 }
13906
13907 int main() {
13908
13909         /* pthread test function */
13910 #ifndef PTHREAD_CREATE_DETACHED
13911 #define PTHREAD_CREATE_DETACHED 1
13912 #endif
13913         pthread_t t;
13914         int status;
13915         int detach = PTHREAD_CREATE_DETACHED;
13916
13917 #if HAVE_PTHREADS > 4
13918         /* Final pthreads */
13919         pthread_attr_t attr;
13920
13921         status = pthread_attr_init(&attr);
13922         if( status ) return status;
13923
13924 #if HAVE_PTHREADS < 7
13925         status = pthread_attr_setdetachstate(&attr, &detach);
13926         if( status < 0 ) status = errno;
13927 #else
13928         status = pthread_attr_setdetachstate(&attr, detach);
13929 #endif
13930         if( status ) return status;
13931         status = pthread_create( &t, &attr, task, NULL );
13932 #if HAVE_PTHREADS < 7
13933         if( status < 0 ) status = errno;
13934 #endif
13935         if( status ) return status;
13936 #else
13937         /* Draft 4 pthreads */
13938         status = pthread_create( &t, pthread_attr_default, task, NULL );
13939         if( status ) return errno;
13940
13941         /* give thread a chance to complete */
13942         /* it should remain joinable and hence detachable */
13943         sleep( 1 );
13944
13945         status = pthread_detach( &t );
13946         if( status ) return errno;
13947 #endif
13948
13949 #ifdef HAVE_LINUX_THREADS
13950         pthread_kill_other_threads_np();
13951 #endif
13952
13953         return 0;
13954
13955 ; return 0; }
13956 EOF
13957 if { (eval echo configure:13958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13958   rm -rf conftest*
13959   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13960 else
13961   echo "configure: failed program was:" >&5
13962   cat conftest.$ac_ext >&5
13963   rm -rf conftest*
13964   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13965 fi
13966 rm -f conftest*
13967 else
13968   cat > conftest.$ac_ext <<EOF
13969 #line 13970 "configure"
13970 #include "confdefs.h"
13971 /* pthread test headers */
13972 #include <pthread.h>
13973 #if HAVE_PTHREADS < 7
13974 #include <errno.h>
13975 #endif
13976 #ifndef NULL
13977 #define NULL (void*)0
13978 #endif
13979
13980 static void *task(p)
13981         void *p;
13982 {
13983         return (void *) (p == NULL);
13984 }
13985
13986
13987 int main(argc, argv)
13988         int argc;
13989         char **argv;
13990 {
13991
13992         /* pthread test function */
13993 #ifndef PTHREAD_CREATE_DETACHED
13994 #define PTHREAD_CREATE_DETACHED 1
13995 #endif
13996         pthread_t t;
13997         int status;
13998         int detach = PTHREAD_CREATE_DETACHED;
13999
14000 #if HAVE_PTHREADS > 4
14001         /* Final pthreads */
14002         pthread_attr_t attr;
14003
14004         status = pthread_attr_init(&attr);
14005         if( status ) return status;
14006
14007 #if HAVE_PTHREADS < 7
14008         status = pthread_attr_setdetachstate(&attr, &detach);
14009         if( status < 0 ) status = errno;
14010 #else
14011         status = pthread_attr_setdetachstate(&attr, detach);
14012 #endif
14013         if( status ) return status;
14014         status = pthread_create( &t, &attr, task, NULL );
14015 #if HAVE_PTHREADS < 7
14016         if( status < 0 ) status = errno;
14017 #endif
14018         if( status ) return status;
14019 #else
14020         /* Draft 4 pthreads */
14021         status = pthread_create( &t, pthread_attr_default, task, NULL );
14022         if( status ) return errno;
14023
14024         /* give thread a chance to complete */
14025         /* it should remain joinable and hence detachable */
14026         sleep( 1 );
14027
14028         status = pthread_detach( &t );
14029         if( status ) return errno;
14030 #endif
14031
14032 #ifdef HAVE_LINUX_THREADS
14033         pthread_kill_other_threads_np();
14034 #endif
14035
14036         return 0;
14037
14038 }
14039
14040 EOF
14041 if { (eval echo configure:14042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14042 then
14043   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14044 else
14045   echo "configure: failed program was:" >&5
14046   cat conftest.$ac_ext >&5
14047   rm -fr conftest*
14048   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14049 fi
14050 rm -fr conftest*
14051 fi
14052
14053
14054                 # restore the LIBS
14055                 LIBS="$ol_LIBS"
14056         
14057 fi
14058
14059 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14060
14061         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14062                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14063                 ol_link_threads=posix
14064         fi
14065 fi
14066
14067                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14068 if test "$ol_link_threads" = no ; then
14069         # try -lpthreads -lmach -lexc
14070         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14071 echo "configure:14072: checking for pthread link with -lpthreads -lmach -lexc" >&5
14072 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14073   echo $ac_n "(cached) $ac_c" 1>&6
14074 else
14075   
14076                 # save the flags
14077                 ol_LIBS="$LIBS"
14078                 LIBS="-lpthreads -lmach -lexc $LIBS"
14079
14080                 if test "$cross_compiling" = yes; then
14081   cat > conftest.$ac_ext <<EOF
14082 #line 14083 "configure"
14083 #include "confdefs.h"
14084 /* pthread test headers */
14085 #include <pthread.h>
14086 #if HAVE_PTHREADS < 7
14087 #include <errno.h>
14088 #endif
14089 #ifndef NULL
14090 #define NULL (void*)0
14091 #endif
14092
14093 static void *task(p)
14094         void *p;
14095 {
14096         return (void *) (p == NULL);
14097 }
14098
14099 int main() {
14100
14101         /* pthread test function */
14102 #ifndef PTHREAD_CREATE_DETACHED
14103 #define PTHREAD_CREATE_DETACHED 1
14104 #endif
14105         pthread_t t;
14106         int status;
14107         int detach = PTHREAD_CREATE_DETACHED;
14108
14109 #if HAVE_PTHREADS > 4
14110         /* Final pthreads */
14111         pthread_attr_t attr;
14112
14113         status = pthread_attr_init(&attr);
14114         if( status ) return status;
14115
14116 #if HAVE_PTHREADS < 7
14117         status = pthread_attr_setdetachstate(&attr, &detach);
14118         if( status < 0 ) status = errno;
14119 #else
14120         status = pthread_attr_setdetachstate(&attr, detach);
14121 #endif
14122         if( status ) return status;
14123         status = pthread_create( &t, &attr, task, NULL );
14124 #if HAVE_PTHREADS < 7
14125         if( status < 0 ) status = errno;
14126 #endif
14127         if( status ) return status;
14128 #else
14129         /* Draft 4 pthreads */
14130         status = pthread_create( &t, pthread_attr_default, task, NULL );
14131         if( status ) return errno;
14132
14133         /* give thread a chance to complete */
14134         /* it should remain joinable and hence detachable */
14135         sleep( 1 );
14136
14137         status = pthread_detach( &t );
14138         if( status ) return errno;
14139 #endif
14140
14141 #ifdef HAVE_LINUX_THREADS
14142         pthread_kill_other_threads_np();
14143 #endif
14144
14145         return 0;
14146
14147 ; return 0; }
14148 EOF
14149 if { (eval echo configure:14150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14150   rm -rf conftest*
14151   ol_cv_pthread_lpthreads_lmach_lexc=yes
14152 else
14153   echo "configure: failed program was:" >&5
14154   cat conftest.$ac_ext >&5
14155   rm -rf conftest*
14156   ol_cv_pthread_lpthreads_lmach_lexc=no
14157 fi
14158 rm -f conftest*
14159 else
14160   cat > conftest.$ac_ext <<EOF
14161 #line 14162 "configure"
14162 #include "confdefs.h"
14163 /* pthread test headers */
14164 #include <pthread.h>
14165 #if HAVE_PTHREADS < 7
14166 #include <errno.h>
14167 #endif
14168 #ifndef NULL
14169 #define NULL (void*)0
14170 #endif
14171
14172 static void *task(p)
14173         void *p;
14174 {
14175         return (void *) (p == NULL);
14176 }
14177
14178
14179 int main(argc, argv)
14180         int argc;
14181         char **argv;
14182 {
14183
14184         /* pthread test function */
14185 #ifndef PTHREAD_CREATE_DETACHED
14186 #define PTHREAD_CREATE_DETACHED 1
14187 #endif
14188         pthread_t t;
14189         int status;
14190         int detach = PTHREAD_CREATE_DETACHED;
14191
14192 #if HAVE_PTHREADS > 4
14193         /* Final pthreads */
14194         pthread_attr_t attr;
14195
14196         status = pthread_attr_init(&attr);
14197         if( status ) return status;
14198
14199 #if HAVE_PTHREADS < 7
14200         status = pthread_attr_setdetachstate(&attr, &detach);
14201         if( status < 0 ) status = errno;
14202 #else
14203         status = pthread_attr_setdetachstate(&attr, detach);
14204 #endif
14205         if( status ) return status;
14206         status = pthread_create( &t, &attr, task, NULL );
14207 #if HAVE_PTHREADS < 7
14208         if( status < 0 ) status = errno;
14209 #endif
14210         if( status ) return status;
14211 #else
14212         /* Draft 4 pthreads */
14213         status = pthread_create( &t, pthread_attr_default, task, NULL );
14214         if( status ) return errno;
14215
14216         /* give thread a chance to complete */
14217         /* it should remain joinable and hence detachable */
14218         sleep( 1 );
14219
14220         status = pthread_detach( &t );
14221         if( status ) return errno;
14222 #endif
14223
14224 #ifdef HAVE_LINUX_THREADS
14225         pthread_kill_other_threads_np();
14226 #endif
14227
14228         return 0;
14229
14230 }
14231
14232 EOF
14233 if { (eval echo configure:14234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14234 then
14235   ol_cv_pthread_lpthreads_lmach_lexc=yes
14236 else
14237   echo "configure: failed program was:" >&5
14238   cat conftest.$ac_ext >&5
14239   rm -fr conftest*
14240   ol_cv_pthread_lpthreads_lmach_lexc=no
14241 fi
14242 rm -fr conftest*
14243 fi
14244
14245
14246                 # restore the LIBS
14247                 LIBS="$ol_LIBS"
14248         
14249 fi
14250
14251 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14252
14253         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14254                 ol_link_pthreads="-lpthreads -lmach -lexc"
14255                 ol_link_threads=posix
14256         fi
14257 fi
14258
14259                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14260 if test "$ol_link_threads" = no ; then
14261         # try -lpthreads -lexc
14262         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14263 echo "configure:14264: checking for pthread link with -lpthreads -lexc" >&5
14264 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14265   echo $ac_n "(cached) $ac_c" 1>&6
14266 else
14267   
14268                 # save the flags
14269                 ol_LIBS="$LIBS"
14270                 LIBS="-lpthreads -lexc $LIBS"
14271
14272                 if test "$cross_compiling" = yes; then
14273   cat > conftest.$ac_ext <<EOF
14274 #line 14275 "configure"
14275 #include "confdefs.h"
14276 /* pthread test headers */
14277 #include <pthread.h>
14278 #if HAVE_PTHREADS < 7
14279 #include <errno.h>
14280 #endif
14281 #ifndef NULL
14282 #define NULL (void*)0
14283 #endif
14284
14285 static void *task(p)
14286         void *p;
14287 {
14288         return (void *) (p == NULL);
14289 }
14290
14291 int main() {
14292
14293         /* pthread test function */
14294 #ifndef PTHREAD_CREATE_DETACHED
14295 #define PTHREAD_CREATE_DETACHED 1
14296 #endif
14297         pthread_t t;
14298         int status;
14299         int detach = PTHREAD_CREATE_DETACHED;
14300
14301 #if HAVE_PTHREADS > 4
14302         /* Final pthreads */
14303         pthread_attr_t attr;
14304
14305         status = pthread_attr_init(&attr);
14306         if( status ) return status;
14307
14308 #if HAVE_PTHREADS < 7
14309         status = pthread_attr_setdetachstate(&attr, &detach);
14310         if( status < 0 ) status = errno;
14311 #else
14312         status = pthread_attr_setdetachstate(&attr, detach);
14313 #endif
14314         if( status ) return status;
14315         status = pthread_create( &t, &attr, task, NULL );
14316 #if HAVE_PTHREADS < 7
14317         if( status < 0 ) status = errno;
14318 #endif
14319         if( status ) return status;
14320 #else
14321         /* Draft 4 pthreads */
14322         status = pthread_create( &t, pthread_attr_default, task, NULL );
14323         if( status ) return errno;
14324
14325         /* give thread a chance to complete */
14326         /* it should remain joinable and hence detachable */
14327         sleep( 1 );
14328
14329         status = pthread_detach( &t );
14330         if( status ) return errno;
14331 #endif
14332
14333 #ifdef HAVE_LINUX_THREADS
14334         pthread_kill_other_threads_np();
14335 #endif
14336
14337         return 0;
14338
14339 ; return 0; }
14340 EOF
14341 if { (eval echo configure:14342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14342   rm -rf conftest*
14343   ol_cv_pthread_lpthreads_lexc=yes
14344 else
14345   echo "configure: failed program was:" >&5
14346   cat conftest.$ac_ext >&5
14347   rm -rf conftest*
14348   ol_cv_pthread_lpthreads_lexc=no
14349 fi
14350 rm -f conftest*
14351 else
14352   cat > conftest.$ac_ext <<EOF
14353 #line 14354 "configure"
14354 #include "confdefs.h"
14355 /* pthread test headers */
14356 #include <pthread.h>
14357 #if HAVE_PTHREADS < 7
14358 #include <errno.h>
14359 #endif
14360 #ifndef NULL
14361 #define NULL (void*)0
14362 #endif
14363
14364 static void *task(p)
14365         void *p;
14366 {
14367         return (void *) (p == NULL);
14368 }
14369
14370
14371 int main(argc, argv)
14372         int argc;
14373         char **argv;
14374 {
14375
14376         /* pthread test function */
14377 #ifndef PTHREAD_CREATE_DETACHED
14378 #define PTHREAD_CREATE_DETACHED 1
14379 #endif
14380         pthread_t t;
14381         int status;
14382         int detach = PTHREAD_CREATE_DETACHED;
14383
14384 #if HAVE_PTHREADS > 4
14385         /* Final pthreads */
14386         pthread_attr_t attr;
14387
14388         status = pthread_attr_init(&attr);
14389         if( status ) return status;
14390
14391 #if HAVE_PTHREADS < 7
14392         status = pthread_attr_setdetachstate(&attr, &detach);
14393         if( status < 0 ) status = errno;
14394 #else
14395         status = pthread_attr_setdetachstate(&attr, detach);
14396 #endif
14397         if( status ) return status;
14398         status = pthread_create( &t, &attr, task, NULL );
14399 #if HAVE_PTHREADS < 7
14400         if( status < 0 ) status = errno;
14401 #endif
14402         if( status ) return status;
14403 #else
14404         /* Draft 4 pthreads */
14405         status = pthread_create( &t, pthread_attr_default, task, NULL );
14406         if( status ) return errno;
14407
14408         /* give thread a chance to complete */
14409         /* it should remain joinable and hence detachable */
14410         sleep( 1 );
14411
14412         status = pthread_detach( &t );
14413         if( status ) return errno;
14414 #endif
14415
14416 #ifdef HAVE_LINUX_THREADS
14417         pthread_kill_other_threads_np();
14418 #endif
14419
14420         return 0;
14421
14422 }
14423
14424 EOF
14425 if { (eval echo configure:14426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14426 then
14427   ol_cv_pthread_lpthreads_lexc=yes
14428 else
14429   echo "configure: failed program was:" >&5
14430   cat conftest.$ac_ext >&5
14431   rm -fr conftest*
14432   ol_cv_pthread_lpthreads_lexc=no
14433 fi
14434 rm -fr conftest*
14435 fi
14436
14437
14438                 # restore the LIBS
14439                 LIBS="$ol_LIBS"
14440         
14441 fi
14442
14443 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14444
14445         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14446                 ol_link_pthreads="-lpthreads -lexc"
14447                 ol_link_threads=posix
14448         fi
14449 fi
14450
14451
14452                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14453 if test "$ol_link_threads" = no ; then
14454         # try -lpthreads
14455         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14456 echo "configure:14457: checking for pthread link with -lpthreads" >&5
14457 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14458   echo $ac_n "(cached) $ac_c" 1>&6
14459 else
14460   
14461                 # save the flags
14462                 ol_LIBS="$LIBS"
14463                 LIBS="-lpthreads $LIBS"
14464
14465                 if test "$cross_compiling" = yes; then
14466   cat > conftest.$ac_ext <<EOF
14467 #line 14468 "configure"
14468 #include "confdefs.h"
14469 /* pthread test headers */
14470 #include <pthread.h>
14471 #if HAVE_PTHREADS < 7
14472 #include <errno.h>
14473 #endif
14474 #ifndef NULL
14475 #define NULL (void*)0
14476 #endif
14477
14478 static void *task(p)
14479         void *p;
14480 {
14481         return (void *) (p == NULL);
14482 }
14483
14484 int main() {
14485
14486         /* pthread test function */
14487 #ifndef PTHREAD_CREATE_DETACHED
14488 #define PTHREAD_CREATE_DETACHED 1
14489 #endif
14490         pthread_t t;
14491         int status;
14492         int detach = PTHREAD_CREATE_DETACHED;
14493
14494 #if HAVE_PTHREADS > 4
14495         /* Final pthreads */
14496         pthread_attr_t attr;
14497
14498         status = pthread_attr_init(&attr);
14499         if( status ) return status;
14500
14501 #if HAVE_PTHREADS < 7
14502         status = pthread_attr_setdetachstate(&attr, &detach);
14503         if( status < 0 ) status = errno;
14504 #else
14505         status = pthread_attr_setdetachstate(&attr, detach);
14506 #endif
14507         if( status ) return status;
14508         status = pthread_create( &t, &attr, task, NULL );
14509 #if HAVE_PTHREADS < 7
14510         if( status < 0 ) status = errno;
14511 #endif
14512         if( status ) return status;
14513 #else
14514         /* Draft 4 pthreads */
14515         status = pthread_create( &t, pthread_attr_default, task, NULL );
14516         if( status ) return errno;
14517
14518         /* give thread a chance to complete */
14519         /* it should remain joinable and hence detachable */
14520         sleep( 1 );
14521
14522         status = pthread_detach( &t );
14523         if( status ) return errno;
14524 #endif
14525
14526 #ifdef HAVE_LINUX_THREADS
14527         pthread_kill_other_threads_np();
14528 #endif
14529
14530         return 0;
14531
14532 ; return 0; }
14533 EOF
14534 if { (eval echo configure:14535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14535   rm -rf conftest*
14536   ol_cv_pthread_lib_lpthreads=yes
14537 else
14538   echo "configure: failed program was:" >&5
14539   cat conftest.$ac_ext >&5
14540   rm -rf conftest*
14541   ol_cv_pthread_lib_lpthreads=no
14542 fi
14543 rm -f conftest*
14544 else
14545   cat > conftest.$ac_ext <<EOF
14546 #line 14547 "configure"
14547 #include "confdefs.h"
14548 /* pthread test headers */
14549 #include <pthread.h>
14550 #if HAVE_PTHREADS < 7
14551 #include <errno.h>
14552 #endif
14553 #ifndef NULL
14554 #define NULL (void*)0
14555 #endif
14556
14557 static void *task(p)
14558         void *p;
14559 {
14560         return (void *) (p == NULL);
14561 }
14562
14563
14564 int main(argc, argv)
14565         int argc;
14566         char **argv;
14567 {
14568
14569         /* pthread test function */
14570 #ifndef PTHREAD_CREATE_DETACHED
14571 #define PTHREAD_CREATE_DETACHED 1
14572 #endif
14573         pthread_t t;
14574         int status;
14575         int detach = PTHREAD_CREATE_DETACHED;
14576
14577 #if HAVE_PTHREADS > 4
14578         /* Final pthreads */
14579         pthread_attr_t attr;
14580
14581         status = pthread_attr_init(&attr);
14582         if( status ) return status;
14583
14584 #if HAVE_PTHREADS < 7
14585         status = pthread_attr_setdetachstate(&attr, &detach);
14586         if( status < 0 ) status = errno;
14587 #else
14588         status = pthread_attr_setdetachstate(&attr, detach);
14589 #endif
14590         if( status ) return status;
14591         status = pthread_create( &t, &attr, task, NULL );
14592 #if HAVE_PTHREADS < 7
14593         if( status < 0 ) status = errno;
14594 #endif
14595         if( status ) return status;
14596 #else
14597         /* Draft 4 pthreads */
14598         status = pthread_create( &t, pthread_attr_default, task, NULL );
14599         if( status ) return errno;
14600
14601         /* give thread a chance to complete */
14602         /* it should remain joinable and hence detachable */
14603         sleep( 1 );
14604
14605         status = pthread_detach( &t );
14606         if( status ) return errno;
14607 #endif
14608
14609 #ifdef HAVE_LINUX_THREADS
14610         pthread_kill_other_threads_np();
14611 #endif
14612
14613         return 0;
14614
14615 }
14616
14617 EOF
14618 if { (eval echo configure:14619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14619 then
14620   ol_cv_pthread_lib_lpthreads=yes
14621 else
14622   echo "configure: failed program was:" >&5
14623   cat conftest.$ac_ext >&5
14624   rm -fr conftest*
14625   ol_cv_pthread_lib_lpthreads=no
14626 fi
14627 rm -fr conftest*
14628 fi
14629
14630
14631                 # restore the LIBS
14632                 LIBS="$ol_LIBS"
14633         
14634 fi
14635
14636 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14637
14638         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14639                 ol_link_pthreads="-lpthreads"
14640                 ol_link_threads=posix
14641         fi
14642 fi
14643
14644
14645                 if test $ol_link_threads != no ; then
14646                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14647
14648                                                 save_CPPFLAGS="$CPPFLAGS"
14649                         save_LIBS="$LIBS"
14650                         LIBS="$LTHREAD_LIBS $LIBS"
14651
14652                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14653 do
14654 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14655 echo "configure:14656: checking for $ac_func" >&5
14656 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14657   echo $ac_n "(cached) $ac_c" 1>&6
14658 else
14659   cat > conftest.$ac_ext <<EOF
14660 #line 14661 "configure"
14661 #include "confdefs.h"
14662 /* System header to define __stub macros and hopefully few prototypes,
14663     which can conflict with char $ac_func(); below.  */
14664 #include <assert.h>
14665 /* Override any gcc2 internal prototype to avoid an error.  */
14666 /* We use char because int might match the return type of a gcc2
14667     builtin and then its argument prototype would still apply.  */
14668 char $ac_func();
14669 char (*f)();
14670
14671 int main() {
14672
14673 /* The GNU C library defines this for functions which it implements
14674     to always fail with ENOSYS.  Some functions are actually named
14675     something starting with __ and the normal name is an alias.  */
14676 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14677 choke me
14678 #else
14679 f = $ac_func;
14680 #endif
14681
14682 ; return 0; }
14683 EOF
14684 if { (eval echo configure:14685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14685   rm -rf conftest*
14686   eval "ac_cv_func_$ac_func=yes"
14687 else
14688   echo "configure: failed program was:" >&5
14689   cat conftest.$ac_ext >&5
14690   rm -rf conftest*
14691   eval "ac_cv_func_$ac_func=no"
14692 fi
14693 rm -f conftest*
14694 fi
14695
14696 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14697   echo "$ac_t""yes" 1>&6
14698     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14699   cat >> confdefs.h <<EOF
14700 #define $ac_tr_func 1
14701 EOF
14702  
14703 else
14704   echo "$ac_t""no" 1>&6
14705 fi
14706 done
14707
14708
14709                         if test $ac_cv_func_sched_yield = no -a \
14710                                 $ac_cv_func_pthread_yield = no -a \
14711                                 $ac_cv_func_thr_yield = no ; then
14712                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14713 echo "configure:14714: checking for sched_yield in -lrt" >&5
14714 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14715 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14716   echo $ac_n "(cached) $ac_c" 1>&6
14717 else
14718   ac_save_LIBS="$LIBS"
14719 LIBS="-lrt  $LIBS"
14720 cat > conftest.$ac_ext <<EOF
14721 #line 14722 "configure"
14722 #include "confdefs.h"
14723 /* Override any gcc2 internal prototype to avoid an error.  */
14724 /* We use char because int might match the return type of a gcc2
14725     builtin and then its argument prototype would still apply.  */
14726 char sched_yield();
14727
14728 int main() {
14729 sched_yield()
14730 ; return 0; }
14731 EOF
14732 if { (eval echo configure:14733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14733   rm -rf conftest*
14734   eval "ac_cv_lib_$ac_lib_var=yes"
14735 else
14736   echo "configure: failed program was:" >&5
14737   cat conftest.$ac_ext >&5
14738   rm -rf conftest*
14739   eval "ac_cv_lib_$ac_lib_var=no"
14740 fi
14741 rm -f conftest*
14742 LIBS="$ac_save_LIBS"
14743
14744 fi
14745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14746   echo "$ac_t""yes" 1>&6
14747   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14748                                         cat >> confdefs.h <<\EOF
14749 #define HAVE_SCHED_YIELD 1
14750 EOF
14751
14752                                         ac_cv_func_sched_yield=yes
14753 else
14754   echo "$ac_t""no" 1>&6
14755 ac_cv_func_sched_yield=no
14756 fi
14757
14758                         fi
14759                         if test $ac_cv_func_sched_yield = no -a \
14760                                 $ac_cv_func_pthread_yield = no -a \
14761                                 "$ac_cv_func_thr_yield" = no ; then
14762                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14763                         fi
14764
14765                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14766 do
14767 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14768 echo "configure:14769: checking for $ac_func" >&5
14769 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14770   echo $ac_n "(cached) $ac_c" 1>&6
14771 else
14772   cat > conftest.$ac_ext <<EOF
14773 #line 14774 "configure"
14774 #include "confdefs.h"
14775 /* System header to define __stub macros and hopefully few prototypes,
14776     which can conflict with char $ac_func(); below.  */
14777 #include <assert.h>
14778 /* Override any gcc2 internal prototype to avoid an error.  */
14779 /* We use char because int might match the return type of a gcc2
14780     builtin and then its argument prototype would still apply.  */
14781 char $ac_func();
14782 char (*f)();
14783
14784 int main() {
14785
14786 /* The GNU C library defines this for functions which it implements
14787     to always fail with ENOSYS.  Some functions are actually named
14788     something starting with __ and the normal name is an alias.  */
14789 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14790 choke me
14791 #else
14792 f = $ac_func;
14793 #endif
14794
14795 ; return 0; }
14796 EOF
14797 if { (eval echo configure:14798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14798   rm -rf conftest*
14799   eval "ac_cv_func_$ac_func=yes"
14800 else
14801   echo "configure: failed program was:" >&5
14802   cat conftest.$ac_ext >&5
14803   rm -rf conftest*
14804   eval "ac_cv_func_$ac_func=no"
14805 fi
14806 rm -f conftest*
14807 fi
14808
14809 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14810   echo "$ac_t""yes" 1>&6
14811     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14812   cat >> confdefs.h <<EOF
14813 #define $ac_tr_func 1
14814 EOF
14815  
14816 else
14817   echo "$ac_t""no" 1>&6
14818 fi
14819 done
14820
14821
14822                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14823 echo "configure:14824: checking for pthread_detach with <pthread.h>" >&5
14824 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14825   echo $ac_n "(cached) $ac_c" 1>&6
14826 else
14827   
14828                                                                 cat > conftest.$ac_ext <<EOF
14829 #line 14830 "configure"
14830 #include "confdefs.h"
14831
14832 #include <pthread.h>
14833 #ifndef NULL
14834 #define NULL (void*)0
14835 #endif
14836
14837 int main() {
14838 pthread_detach(NULL);
14839 ; return 0; }
14840 EOF
14841 if { (eval echo configure:14842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14842   rm -rf conftest*
14843   ol_cv_func_pthread_detach=yes
14844 else
14845   echo "configure: failed program was:" >&5
14846   cat conftest.$ac_ext >&5
14847   rm -rf conftest*
14848   ol_cv_func_pthread_detach=no
14849 fi
14850 rm -f conftest*
14851                         
14852 fi
14853
14854 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14855
14856                         if test $ol_cv_func_pthread_detach = no ; then
14857                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14858                         fi
14859
14860                         cat >> confdefs.h <<\EOF
14861 #define HAVE_PTHREAD_DETACH 1
14862 EOF
14863
14864
14865                                                 for ac_func in \
14866                                 pthread_setconcurrency \
14867                                 pthread_getconcurrency \
14868                                 thr_setconcurrency \
14869                                 thr_getconcurrency \
14870                         
14871 do
14872 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14873 echo "configure:14874: checking for $ac_func" >&5
14874 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14875   echo $ac_n "(cached) $ac_c" 1>&6
14876 else
14877   cat > conftest.$ac_ext <<EOF
14878 #line 14879 "configure"
14879 #include "confdefs.h"
14880 /* System header to define __stub macros and hopefully few prototypes,
14881     which can conflict with char $ac_func(); below.  */
14882 #include <assert.h>
14883 /* Override any gcc2 internal prototype to avoid an error.  */
14884 /* We use char because int might match the return type of a gcc2
14885     builtin and then its argument prototype would still apply.  */
14886 char $ac_func();
14887 char (*f)();
14888
14889 int main() {
14890
14891 /* The GNU C library defines this for functions which it implements
14892     to always fail with ENOSYS.  Some functions are actually named
14893     something starting with __ and the normal name is an alias.  */
14894 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14895 choke me
14896 #else
14897 f = $ac_func;
14898 #endif
14899
14900 ; return 0; }
14901 EOF
14902 if { (eval echo configure:14903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14903   rm -rf conftest*
14904   eval "ac_cv_func_$ac_func=yes"
14905 else
14906   echo "configure: failed program was:" >&5
14907   cat conftest.$ac_ext >&5
14908   rm -rf conftest*
14909   eval "ac_cv_func_$ac_func=no"
14910 fi
14911 rm -f conftest*
14912 fi
14913
14914 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14915   echo "$ac_t""yes" 1>&6
14916     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14917   cat >> confdefs.h <<EOF
14918 #define $ac_tr_func 1
14919 EOF
14920  
14921 else
14922   echo "$ac_t""no" 1>&6
14923 fi
14924 done
14925
14926
14927                         
14928         for ac_func in pthread_kill_other_threads_np
14929 do
14930 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14931 echo "configure:14932: checking for $ac_func" >&5
14932 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14933   echo $ac_n "(cached) $ac_c" 1>&6
14934 else
14935   cat > conftest.$ac_ext <<EOF
14936 #line 14937 "configure"
14937 #include "confdefs.h"
14938 /* System header to define __stub macros and hopefully few prototypes,
14939     which can conflict with char $ac_func(); below.  */
14940 #include <assert.h>
14941 /* Override any gcc2 internal prototype to avoid an error.  */
14942 /* We use char because int might match the return type of a gcc2
14943     builtin and then its argument prototype would still apply.  */
14944 char $ac_func();
14945 char (*f)();
14946
14947 int main() {
14948
14949 /* The GNU C library defines this for functions which it implements
14950     to always fail with ENOSYS.  Some functions are actually named
14951     something starting with __ and the normal name is an alias.  */
14952 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14953 choke me
14954 #else
14955 f = $ac_func;
14956 #endif
14957
14958 ; return 0; }
14959 EOF
14960 if { (eval echo configure:14961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14961   rm -rf conftest*
14962   eval "ac_cv_func_$ac_func=yes"
14963 else
14964   echo "configure: failed program was:" >&5
14965   cat conftest.$ac_ext >&5
14966   rm -rf conftest*
14967   eval "ac_cv_func_$ac_func=no"
14968 fi
14969 rm -f conftest*
14970 fi
14971
14972 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14973   echo "$ac_t""yes" 1>&6
14974     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14975   cat >> confdefs.h <<EOF
14976 #define $ac_tr_func 1
14977 EOF
14978  
14979 else
14980   echo "$ac_t""no" 1>&6
14981 fi
14982 done
14983
14984         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14985 echo "configure:14986: checking for LinuxThreads implementation" >&5
14986 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14987   echo $ac_n "(cached) $ac_c" 1>&6
14988 else
14989   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14990 fi
14991
14992 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14993
14994                         
14995         
14996         
14997         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14998 echo "configure:14999: checking for LinuxThreads consistency" >&5
14999 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15000   echo $ac_n "(cached) $ac_c" 1>&6
15001 else
15002   
15003                 if test $ol_cv_header_linux_threads = yes -a \
15004                         $ol_cv_sys_linux_threads = yes; then
15005                         ol_cv_linux_threads=yes
15006                 elif test $ol_cv_header_linux_threads = no -a \
15007                         $ol_cv_sys_linux_threads = no; then
15008                         ol_cv_linux_threads=no
15009                 else
15010                         ol_cv_linux_threads=error
15011                 fi
15012         
15013 fi
15014
15015 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15016
15017
15018                         if test $ol_cv_linux_threads = error; then
15019                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15020                         fi
15021
15022                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15023 echo "configure:15024: checking if pthread_create() works" >&5
15024 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15025   echo $ac_n "(cached) $ac_c" 1>&6
15026 else
15027   
15028                         if test "$cross_compiling" = yes; then
15029                                 ol_cv_pthread_create_works=yes
15030 else
15031   cat > conftest.$ac_ext <<EOF
15032 #line 15033 "configure"
15033 #include "confdefs.h"
15034 /* pthread test headers */
15035 #include <pthread.h>
15036 #if HAVE_PTHREADS < 7
15037 #include <errno.h>
15038 #endif
15039 #ifndef NULL
15040 #define NULL (void*)0
15041 #endif
15042
15043 static void *task(p)
15044         void *p;
15045 {
15046         return (void *) (p == NULL);
15047 }
15048
15049
15050 int main(argc, argv)
15051         int argc;
15052         char **argv;
15053 {
15054
15055         /* pthread test function */
15056 #ifndef PTHREAD_CREATE_DETACHED
15057 #define PTHREAD_CREATE_DETACHED 1
15058 #endif
15059         pthread_t t;
15060         int status;
15061         int detach = PTHREAD_CREATE_DETACHED;
15062
15063 #if HAVE_PTHREADS > 4
15064         /* Final pthreads */
15065         pthread_attr_t attr;
15066
15067         status = pthread_attr_init(&attr);
15068         if( status ) return status;
15069
15070 #if HAVE_PTHREADS < 7
15071         status = pthread_attr_setdetachstate(&attr, &detach);
15072         if( status < 0 ) status = errno;
15073 #else
15074         status = pthread_attr_setdetachstate(&attr, detach);
15075 #endif
15076         if( status ) return status;
15077         status = pthread_create( &t, &attr, task, NULL );
15078 #if HAVE_PTHREADS < 7
15079         if( status < 0 ) status = errno;
15080 #endif
15081         if( status ) return status;
15082 #else
15083         /* Draft 4 pthreads */
15084         status = pthread_create( &t, pthread_attr_default, task, NULL );
15085         if( status ) return errno;
15086
15087         /* give thread a chance to complete */
15088         /* it should remain joinable and hence detachable */
15089         sleep( 1 );
15090
15091         status = pthread_detach( &t );
15092         if( status ) return errno;
15093 #endif
15094
15095 #ifdef HAVE_LINUX_THREADS
15096         pthread_kill_other_threads_np();
15097 #endif
15098
15099         return 0;
15100
15101 }
15102
15103 EOF
15104 if { (eval echo configure:15105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15105 then
15106   ol_cv_pthread_create_works=yes
15107 else
15108   echo "configure: failed program was:" >&5
15109   cat conftest.$ac_ext >&5
15110   rm -fr conftest*
15111   ol_cv_pthread_create_works=no
15112 fi
15113 rm -fr conftest*
15114 fi
15115
15116 fi
15117
15118 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15119
15120                         if test $ol_cv_pthread_create_works = no ; then
15121                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15122                         fi
15123
15124                                                 if test $ol_with_yielding_select = auto ; then
15125                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15126 echo "configure:15127: checking if select yields when using pthreads" >&5
15127 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15128   echo $ac_n "(cached) $ac_c" 1>&6
15129 else
15130   
15131                                 if test "$cross_compiling" = yes; then
15132   ol_cv_pthread_select_yields=cross
15133 else
15134   cat > conftest.$ac_ext <<EOF
15135 #line 15136 "configure"
15136 #include "confdefs.h"
15137
15138 #include <sys/types.h>
15139 #include <sys/time.h>
15140 #include <unistd.h>
15141 #include <pthread.h>
15142 #ifndef NULL
15143 #define NULL (void*) 0
15144 #endif
15145
15146 static int fildes[2];
15147
15148 static void *task(p)
15149         void *p;
15150 {
15151         int i;
15152         struct timeval tv;
15153
15154         fd_set rfds;
15155
15156         tv.tv_sec=10;
15157         tv.tv_usec=0;
15158
15159         FD_ZERO(&rfds);
15160         FD_SET(fildes[0], &rfds);
15161
15162         /* we're not interested in any fds */
15163         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15164
15165         if(i < 0) {
15166                 perror("select");
15167                 exit(10);
15168         }
15169
15170         exit(0); /* if we exit here, the select blocked the whole process */
15171 }
15172
15173 int main(argc, argv)
15174         int argc;
15175         char **argv;
15176 {
15177         pthread_t t;
15178
15179         /* create a pipe to select */
15180         if(pipe(&fildes[0])) {
15181                 perror("select");
15182                 exit(1);
15183         }
15184
15185 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15186         (void) pthread_setconcurrency(2);
15187 #else
15188 #ifdef HAVE_THR_SETCONCURRENCY
15189         /* Set Solaris LWP concurrency to 2 */
15190         thr_setconcurrency(2);
15191 #endif
15192 #endif
15193
15194 #if HAVE_PTHREADS < 6
15195         pthread_create(&t, pthread_attr_default, task, NULL);
15196 #else
15197         pthread_create(&t, NULL, task, NULL);
15198 #endif
15199
15200         /* make sure task runs first */
15201 #if HAVE_THR_YIELD
15202         thr_yield();
15203 #elif defined( HAVE_SCHED_YIELD )
15204         sched_yield();
15205 #elif defined( HAVE_PTHREAD_YIELD )
15206         pthread_yield();
15207 #endif
15208
15209         exit(2);
15210 }
15211 EOF
15212 if { (eval echo configure:15213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15213 then
15214   ol_cv_pthread_select_yields=no
15215 else
15216   echo "configure: failed program was:" >&5
15217   cat conftest.$ac_ext >&5
15218   rm -fr conftest*
15219   ol_cv_pthread_select_yields=yes
15220 fi
15221 rm -fr conftest*
15222 fi
15223
15224 fi
15225
15226 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15227
15228                                 if test $ol_cv_pthread_select_yields = cross ; then
15229                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15230                                 fi
15231
15232                                 if test $ol_cv_pthread_select_yields = yes ; then
15233                                         ol_with_yielding_select=yes
15234                                 fi
15235                         fi
15236
15237                                                 CPPFLAGS="$save_CPPFLAGS"
15238                         LIBS="$save_LIBS"
15239                 else
15240                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15241                 fi
15242         fi
15243
15244         if test $ol_with_threads = posix ; then
15245                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15246         fi
15247 fi
15248
15249 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15250         -o $ol_with_threads = mach ; then
15251
15252                 for ac_hdr in mach/cthreads.h cthreads.h
15253 do
15254 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15255 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15256 echo "configure:15257: checking for $ac_hdr" >&5
15257 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15258   echo $ac_n "(cached) $ac_c" 1>&6
15259 else
15260   cat > conftest.$ac_ext <<EOF
15261 #line 15262 "configure"
15262 #include "confdefs.h"
15263 #include <$ac_hdr>
15264 EOF
15265 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15266 { (eval echo configure:15267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15267 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15268 if test -z "$ac_err"; then
15269   rm -rf conftest*
15270   eval "ac_cv_header_$ac_safe=yes"
15271 else
15272   echo "$ac_err" >&5
15273   echo "configure: failed program was:" >&5
15274   cat conftest.$ac_ext >&5
15275   rm -rf conftest*
15276   eval "ac_cv_header_$ac_safe=no"
15277 fi
15278 rm -f conftest*
15279 fi
15280 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15281   echo "$ac_t""yes" 1>&6
15282     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15283   cat >> confdefs.h <<EOF
15284 #define $ac_tr_hdr 1
15285 EOF
15286  
15287 else
15288   echo "$ac_t""no" 1>&6
15289 fi
15290 done
15291
15292         if test $ac_cv_header_mach_cthreads_h = yes ; then
15293                 ol_with_threads=found
15294
15295                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15296 echo "configure:15297: checking for cthread_fork" >&5
15297 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15298   echo $ac_n "(cached) $ac_c" 1>&6
15299 else
15300   cat > conftest.$ac_ext <<EOF
15301 #line 15302 "configure"
15302 #include "confdefs.h"
15303 /* System header to define __stub macros and hopefully few prototypes,
15304     which can conflict with char cthread_fork(); below.  */
15305 #include <assert.h>
15306 /* Override any gcc2 internal prototype to avoid an error.  */
15307 /* We use char because int might match the return type of a gcc2
15308     builtin and then its argument prototype would still apply.  */
15309 char cthread_fork();
15310 char (*f)();
15311
15312 int main() {
15313
15314 /* The GNU C library defines this for functions which it implements
15315     to always fail with ENOSYS.  Some functions are actually named
15316     something starting with __ and the normal name is an alias.  */
15317 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15318 choke me
15319 #else
15320 f = cthread_fork;
15321 #endif
15322
15323 ; return 0; }
15324 EOF
15325 if { (eval echo configure:15326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15326   rm -rf conftest*
15327   eval "ac_cv_func_cthread_fork=yes"
15328 else
15329   echo "configure: failed program was:" >&5
15330   cat conftest.$ac_ext >&5
15331   rm -rf conftest*
15332   eval "ac_cv_func_cthread_fork=no"
15333 fi
15334 rm -f conftest*
15335 fi
15336
15337 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15338   echo "$ac_t""yes" 1>&6
15339   ol_link_threads=yes
15340 else
15341   echo "$ac_t""no" 1>&6
15342 fi
15343
15344
15345                 if test $ol_link_threads = no ; then
15346                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15347 echo "configure:15348: checking for cthread_fork with -all_load" >&5
15348 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15349   echo $ac_n "(cached) $ac_c" 1>&6
15350 else
15351   
15352                                                                 save_LIBS="$LIBS"
15353                                 LIBS="-all_load $LIBS"
15354                                 cat > conftest.$ac_ext <<EOF
15355 #line 15356 "configure"
15356 #include "confdefs.h"
15357 #include <mach/cthreads.h>
15358 int main() {
15359
15360                                         cthread_fork((void *)0, (void *)0);
15361                                         
15362 ; return 0; }
15363 EOF
15364 if { (eval echo configure:15365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15365   rm -rf conftest*
15366   ol_cv_cthread_all_load=yes
15367 else
15368   echo "configure: failed program was:" >&5
15369   cat conftest.$ac_ext >&5
15370   rm -rf conftest*
15371   ol_cv_cthread_all_load=no
15372 fi
15373 rm -f conftest*
15374                                                                 LIBS="$save_LIBS"
15375                         
15376 fi
15377
15378 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15379
15380                         if test $ol_cv_cthread_all_load = yes ; then
15381                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15382                                 ol_link_threads=mach
15383                                 ol_with_threads=found
15384                         fi
15385                 fi
15386
15387         elif test $ac_cv_header_cthreads_h = yes ; then
15388                                 
15389                 ol_with_threads=found
15390  
15391                                 save_LIBS="$LIBS"
15392                 LIBS="$LIBS -lthreads"
15393                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15394 echo "configure:15395: checking for cthread_fork" >&5
15395 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15396   echo $ac_n "(cached) $ac_c" 1>&6
15397 else
15398   cat > conftest.$ac_ext <<EOF
15399 #line 15400 "configure"
15400 #include "confdefs.h"
15401 /* System header to define __stub macros and hopefully few prototypes,
15402     which can conflict with char cthread_fork(); below.  */
15403 #include <assert.h>
15404 /* Override any gcc2 internal prototype to avoid an error.  */
15405 /* We use char because int might match the return type of a gcc2
15406     builtin and then its argument prototype would still apply.  */
15407 char cthread_fork();
15408 char (*f)();
15409
15410 int main() {
15411
15412 /* The GNU C library defines this for functions which it implements
15413     to always fail with ENOSYS.  Some functions are actually named
15414     something starting with __ and the normal name is an alias.  */
15415 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15416 choke me
15417 #else
15418 f = cthread_fork;
15419 #endif
15420
15421 ; return 0; }
15422 EOF
15423 if { (eval echo configure:15424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15424   rm -rf conftest*
15425   eval "ac_cv_func_cthread_fork=yes"
15426 else
15427   echo "configure: failed program was:" >&5
15428   cat conftest.$ac_ext >&5
15429   rm -rf conftest*
15430   eval "ac_cv_func_cthread_fork=no"
15431 fi
15432 rm -f conftest*
15433 fi
15434
15435 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15436   echo "$ac_t""yes" 1>&6
15437   ol_link_threads=yes
15438 else
15439   echo "$ac_t""no" 1>&6
15440 fi
15441
15442                 LIBS="$save_LIBS"
15443
15444                 if test $ol_link_threads = yes ; then
15445                         LTHREAD_LIBS="-lthreads"
15446                         ol_link_threads=mach
15447                         ol_with_threads=found
15448                 else
15449                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15450                 fi
15451
15452         elif test $ol_with_threads = mach ; then
15453                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15454         fi
15455
15456         if test $ol_link_threads = mach ; then
15457                 cat >> confdefs.h <<\EOF
15458 #define HAVE_MACH_CTHREADS 1
15459 EOF
15460
15461         elif test $ol_with_threads = found ; then
15462                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15463         fi
15464 fi
15465
15466 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15467         -o $ol_with_threads = pth ; then
15468
15469         for ac_hdr in pth.h
15470 do
15471 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15472 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15473 echo "configure:15474: checking for $ac_hdr" >&5
15474 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15475   echo $ac_n "(cached) $ac_c" 1>&6
15476 else
15477   cat > conftest.$ac_ext <<EOF
15478 #line 15479 "configure"
15479 #include "confdefs.h"
15480 #include <$ac_hdr>
15481 EOF
15482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15483 { (eval echo configure:15484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15484 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15485 if test -z "$ac_err"; then
15486   rm -rf conftest*
15487   eval "ac_cv_header_$ac_safe=yes"
15488 else
15489   echo "$ac_err" >&5
15490   echo "configure: failed program was:" >&5
15491   cat conftest.$ac_ext >&5
15492   rm -rf conftest*
15493   eval "ac_cv_header_$ac_safe=no"
15494 fi
15495 rm -f conftest*
15496 fi
15497 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15498   echo "$ac_t""yes" 1>&6
15499     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15500   cat >> confdefs.h <<EOF
15501 #define $ac_tr_hdr 1
15502 EOF
15503  
15504 else
15505   echo "$ac_t""no" 1>&6
15506 fi
15507 done
15508
15509
15510         if test $ac_cv_header_pth_h = yes ; then
15511                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15512 echo "configure:15513: checking for pth_version in -lpth" >&5
15513 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15514 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15515   echo $ac_n "(cached) $ac_c" 1>&6
15516 else
15517   ac_save_LIBS="$LIBS"
15518 LIBS="-lpth  $LIBS"
15519 cat > conftest.$ac_ext <<EOF
15520 #line 15521 "configure"
15521 #include "confdefs.h"
15522 /* Override any gcc2 internal prototype to avoid an error.  */
15523 /* We use char because int might match the return type of a gcc2
15524     builtin and then its argument prototype would still apply.  */
15525 char pth_version();
15526
15527 int main() {
15528 pth_version()
15529 ; return 0; }
15530 EOF
15531 if { (eval echo configure:15532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15532   rm -rf conftest*
15533   eval "ac_cv_lib_$ac_lib_var=yes"
15534 else
15535   echo "configure: failed program was:" >&5
15536   cat conftest.$ac_ext >&5
15537   rm -rf conftest*
15538   eval "ac_cv_lib_$ac_lib_var=no"
15539 fi
15540 rm -f conftest*
15541 LIBS="$ac_save_LIBS"
15542
15543 fi
15544 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15545   echo "$ac_t""yes" 1>&6
15546   have_pth=yes
15547 else
15548   echo "$ac_t""no" 1>&6
15549 have_pth=no
15550 fi
15551
15552
15553                 if test $have_pth = yes ; then
15554                         cat >> confdefs.h <<\EOF
15555 #define HAVE_GNU_PTH 1
15556 EOF
15557
15558                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15559                         ol_link_threads=pth
15560                         ol_with_threads=found
15561
15562                         if test $ol_with_yielding_select = auto ; then
15563                                 ol_with_yielding_select=yes
15564                         fi
15565                 fi
15566         fi
15567 fi
15568
15569 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15570         -o $ol_with_threads = lwp ; then
15571
15572                 for ac_hdr in thread.h synch.h
15573 do
15574 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15575 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15576 echo "configure:15577: checking for $ac_hdr" >&5
15577 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15578   echo $ac_n "(cached) $ac_c" 1>&6
15579 else
15580   cat > conftest.$ac_ext <<EOF
15581 #line 15582 "configure"
15582 #include "confdefs.h"
15583 #include <$ac_hdr>
15584 EOF
15585 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15586 { (eval echo configure:15587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15587 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15588 if test -z "$ac_err"; then
15589   rm -rf conftest*
15590   eval "ac_cv_header_$ac_safe=yes"
15591 else
15592   echo "$ac_err" >&5
15593   echo "configure: failed program was:" >&5
15594   cat conftest.$ac_ext >&5
15595   rm -rf conftest*
15596   eval "ac_cv_header_$ac_safe=no"
15597 fi
15598 rm -f conftest*
15599 fi
15600 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15601   echo "$ac_t""yes" 1>&6
15602     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15603   cat >> confdefs.h <<EOF
15604 #define $ac_tr_hdr 1
15605 EOF
15606  
15607 else
15608   echo "$ac_t""no" 1>&6
15609 fi
15610 done
15611
15612         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15613                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15614 echo "configure:15615: checking for thr_create in -lthread" >&5
15615 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15616 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15617   echo $ac_n "(cached) $ac_c" 1>&6
15618 else
15619   ac_save_LIBS="$LIBS"
15620 LIBS="-lthread  $LIBS"
15621 cat > conftest.$ac_ext <<EOF
15622 #line 15623 "configure"
15623 #include "confdefs.h"
15624 /* Override any gcc2 internal prototype to avoid an error.  */
15625 /* We use char because int might match the return type of a gcc2
15626     builtin and then its argument prototype would still apply.  */
15627 char thr_create();
15628
15629 int main() {
15630 thr_create()
15631 ; return 0; }
15632 EOF
15633 if { (eval echo configure:15634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15634   rm -rf conftest*
15635   eval "ac_cv_lib_$ac_lib_var=yes"
15636 else
15637   echo "configure: failed program was:" >&5
15638   cat conftest.$ac_ext >&5
15639   rm -rf conftest*
15640   eval "ac_cv_lib_$ac_lib_var=no"
15641 fi
15642 rm -f conftest*
15643 LIBS="$ac_save_LIBS"
15644
15645 fi
15646 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15647   echo "$ac_t""yes" 1>&6
15648   have_thr=yes
15649 else
15650   echo "$ac_t""no" 1>&6
15651 have_thr=no
15652 fi
15653
15654
15655                 if test $have_thr = yes ; then
15656                         cat >> confdefs.h <<\EOF
15657 #define HAVE_THR 1
15658 EOF
15659
15660                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15661                         ol_link_threads=thr
15662
15663                         if test $ol_with_yielding_select = auto ; then
15664                                 ol_with_yielding_select=yes
15665                         fi
15666
15667                                                 for ac_func in \
15668                                 thr_setconcurrency \
15669                                 thr_getconcurrency \
15670                         
15671 do
15672 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15673 echo "configure:15674: checking for $ac_func" >&5
15674 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15675   echo $ac_n "(cached) $ac_c" 1>&6
15676 else
15677   cat > conftest.$ac_ext <<EOF
15678 #line 15679 "configure"
15679 #include "confdefs.h"
15680 /* System header to define __stub macros and hopefully few prototypes,
15681     which can conflict with char $ac_func(); below.  */
15682 #include <assert.h>
15683 /* Override any gcc2 internal prototype to avoid an error.  */
15684 /* We use char because int might match the return type of a gcc2
15685     builtin and then its argument prototype would still apply.  */
15686 char $ac_func();
15687 char (*f)();
15688
15689 int main() {
15690
15691 /* The GNU C library defines this for functions which it implements
15692     to always fail with ENOSYS.  Some functions are actually named
15693     something starting with __ and the normal name is an alias.  */
15694 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15695 choke me
15696 #else
15697 f = $ac_func;
15698 #endif
15699
15700 ; return 0; }
15701 EOF
15702 if { (eval echo configure:15703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15703   rm -rf conftest*
15704   eval "ac_cv_func_$ac_func=yes"
15705 else
15706   echo "configure: failed program was:" >&5
15707   cat conftest.$ac_ext >&5
15708   rm -rf conftest*
15709   eval "ac_cv_func_$ac_func=no"
15710 fi
15711 rm -f conftest*
15712 fi
15713
15714 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15715   echo "$ac_t""yes" 1>&6
15716     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15717   cat >> confdefs.h <<EOF
15718 #define $ac_tr_func 1
15719 EOF
15720  
15721 else
15722   echo "$ac_t""no" 1>&6
15723 fi
15724 done
15725
15726                 fi
15727         fi
15728
15729                 for ac_hdr in lwp/lwp.h
15730 do
15731 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15732 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15733 echo "configure:15734: checking for $ac_hdr" >&5
15734 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15735   echo $ac_n "(cached) $ac_c" 1>&6
15736 else
15737   cat > conftest.$ac_ext <<EOF
15738 #line 15739 "configure"
15739 #include "confdefs.h"
15740 #include <$ac_hdr>
15741 EOF
15742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15743 { (eval echo configure:15744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15745 if test -z "$ac_err"; then
15746   rm -rf conftest*
15747   eval "ac_cv_header_$ac_safe=yes"
15748 else
15749   echo "$ac_err" >&5
15750   echo "configure: failed program was:" >&5
15751   cat conftest.$ac_ext >&5
15752   rm -rf conftest*
15753   eval "ac_cv_header_$ac_safe=no"
15754 fi
15755 rm -f conftest*
15756 fi
15757 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15758   echo "$ac_t""yes" 1>&6
15759     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15760   cat >> confdefs.h <<EOF
15761 #define $ac_tr_hdr 1
15762 EOF
15763  
15764 else
15765   echo "$ac_t""no" 1>&6
15766 fi
15767 done
15768
15769         if test $ac_cv_header_lwp_lwp_h = yes ; then
15770                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15771 echo "configure:15772: checking for lwp_create in -llwp" >&5
15772 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15773 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15774   echo $ac_n "(cached) $ac_c" 1>&6
15775 else
15776   ac_save_LIBS="$LIBS"
15777 LIBS="-llwp  $LIBS"
15778 cat > conftest.$ac_ext <<EOF
15779 #line 15780 "configure"
15780 #include "confdefs.h"
15781 /* Override any gcc2 internal prototype to avoid an error.  */
15782 /* We use char because int might match the return type of a gcc2
15783     builtin and then its argument prototype would still apply.  */
15784 char lwp_create();
15785
15786 int main() {
15787 lwp_create()
15788 ; return 0; }
15789 EOF
15790 if { (eval echo configure:15791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15791   rm -rf conftest*
15792   eval "ac_cv_lib_$ac_lib_var=yes"
15793 else
15794   echo "configure: failed program was:" >&5
15795   cat conftest.$ac_ext >&5
15796   rm -rf conftest*
15797   eval "ac_cv_lib_$ac_lib_var=no"
15798 fi
15799 rm -f conftest*
15800 LIBS="$ac_save_LIBS"
15801
15802 fi
15803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15804   echo "$ac_t""yes" 1>&6
15805   have_lwp=yes
15806 else
15807   echo "$ac_t""no" 1>&6
15808 have_lwp=no
15809 fi
15810
15811
15812                 if test $have_lwp = yes ; then
15813                         cat >> confdefs.h <<\EOF
15814 #define HAVE_LWP 1
15815 EOF
15816
15817                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15818                         ol_link_threads=lwp
15819
15820                         if test $ol_with_yielding_select = auto ; then
15821                                 ol_with_yielding_select=no
15822                         fi
15823                 fi
15824         fi
15825 fi
15826
15827 if test $ol_with_yielding_select = yes ; then
15828         cat >> confdefs.h <<\EOF
15829 #define HAVE_YIELDING_SELECT 1
15830 EOF
15831
15832 fi
15833
15834 if test $ol_with_threads = manual ; then
15835                 ol_link_threads=yes
15836
15837         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15838
15839         for ac_hdr in pthread.h sched.h
15840 do
15841 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15842 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15843 echo "configure:15844: checking for $ac_hdr" >&5
15844 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15845   echo $ac_n "(cached) $ac_c" 1>&6
15846 else
15847   cat > conftest.$ac_ext <<EOF
15848 #line 15849 "configure"
15849 #include "confdefs.h"
15850 #include <$ac_hdr>
15851 EOF
15852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15853 { (eval echo configure:15854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15855 if test -z "$ac_err"; then
15856   rm -rf conftest*
15857   eval "ac_cv_header_$ac_safe=yes"
15858 else
15859   echo "$ac_err" >&5
15860   echo "configure: failed program was:" >&5
15861   cat conftest.$ac_ext >&5
15862   rm -rf conftest*
15863   eval "ac_cv_header_$ac_safe=no"
15864 fi
15865 rm -f conftest*
15866 fi
15867 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15868   echo "$ac_t""yes" 1>&6
15869     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15870   cat >> confdefs.h <<EOF
15871 #define $ac_tr_hdr 1
15872 EOF
15873  
15874 else
15875   echo "$ac_t""no" 1>&6
15876 fi
15877 done
15878
15879         for ac_func in sched_yield pthread_yield
15880 do
15881 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15882 echo "configure:15883: checking for $ac_func" >&5
15883 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15884   echo $ac_n "(cached) $ac_c" 1>&6
15885 else
15886   cat > conftest.$ac_ext <<EOF
15887 #line 15888 "configure"
15888 #include "confdefs.h"
15889 /* System header to define __stub macros and hopefully few prototypes,
15890     which can conflict with char $ac_func(); below.  */
15891 #include <assert.h>
15892 /* Override any gcc2 internal prototype to avoid an error.  */
15893 /* We use char because int might match the return type of a gcc2
15894     builtin and then its argument prototype would still apply.  */
15895 char $ac_func();
15896 char (*f)();
15897
15898 int main() {
15899
15900 /* The GNU C library defines this for functions which it implements
15901     to always fail with ENOSYS.  Some functions are actually named
15902     something starting with __ and the normal name is an alias.  */
15903 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15904 choke me
15905 #else
15906 f = $ac_func;
15907 #endif
15908
15909 ; return 0; }
15910 EOF
15911 if { (eval echo configure:15912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15912   rm -rf conftest*
15913   eval "ac_cv_func_$ac_func=yes"
15914 else
15915   echo "configure: failed program was:" >&5
15916   cat conftest.$ac_ext >&5
15917   rm -rf conftest*
15918   eval "ac_cv_func_$ac_func=no"
15919 fi
15920 rm -f conftest*
15921 fi
15922
15923 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15924   echo "$ac_t""yes" 1>&6
15925     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15926   cat >> confdefs.h <<EOF
15927 #define $ac_tr_func 1
15928 EOF
15929  
15930 else
15931   echo "$ac_t""no" 1>&6
15932 fi
15933 done
15934
15935         
15936         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15937 echo "configure:15938: checking for LinuxThreads pthread.h" >&5
15938 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15939   echo $ac_n "(cached) $ac_c" 1>&6
15940 else
15941   cat > conftest.$ac_ext <<EOF
15942 #line 15943 "configure"
15943 #include "confdefs.h"
15944 #include <pthread.h>
15945 EOF
15946 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15947   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15948   rm -rf conftest*
15949   ol_cv_header_linux_threads=yes
15950 else
15951   rm -rf conftest*
15952   ol_cv_header_linux_threads=no
15953 fi
15954 rm -f conftest*
15955
15956                 
15957 fi
15958
15959 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15960         if test $ol_cv_header_linux_threads = yes; then
15961                 cat >> confdefs.h <<\EOF
15962 #define HAVE_LINUX_THREADS 1
15963 EOF
15964
15965         fi
15966
15967
15968         for ac_hdr in mach/cthreads.h
15969 do
15970 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15971 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15972 echo "configure:15973: checking for $ac_hdr" >&5
15973 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15974   echo $ac_n "(cached) $ac_c" 1>&6
15975 else
15976   cat > conftest.$ac_ext <<EOF
15977 #line 15978 "configure"
15978 #include "confdefs.h"
15979 #include <$ac_hdr>
15980 EOF
15981 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15982 { (eval echo configure:15983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15983 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15984 if test -z "$ac_err"; then
15985   rm -rf conftest*
15986   eval "ac_cv_header_$ac_safe=yes"
15987 else
15988   echo "$ac_err" >&5
15989   echo "configure: failed program was:" >&5
15990   cat conftest.$ac_ext >&5
15991   rm -rf conftest*
15992   eval "ac_cv_header_$ac_safe=no"
15993 fi
15994 rm -f conftest*
15995 fi
15996 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15997   echo "$ac_t""yes" 1>&6
15998     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15999   cat >> confdefs.h <<EOF
16000 #define $ac_tr_hdr 1
16001 EOF
16002  
16003 else
16004   echo "$ac_t""no" 1>&6
16005 fi
16006 done
16007
16008         for ac_hdr in lwp/lwp.h
16009 do
16010 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16011 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16012 echo "configure:16013: checking for $ac_hdr" >&5
16013 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16014   echo $ac_n "(cached) $ac_c" 1>&6
16015 else
16016   cat > conftest.$ac_ext <<EOF
16017 #line 16018 "configure"
16018 #include "confdefs.h"
16019 #include <$ac_hdr>
16020 EOF
16021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16022 { (eval echo configure:16023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16024 if test -z "$ac_err"; then
16025   rm -rf conftest*
16026   eval "ac_cv_header_$ac_safe=yes"
16027 else
16028   echo "$ac_err" >&5
16029   echo "configure: failed program was:" >&5
16030   cat conftest.$ac_ext >&5
16031   rm -rf conftest*
16032   eval "ac_cv_header_$ac_safe=no"
16033 fi
16034 rm -f conftest*
16035 fi
16036 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16037   echo "$ac_t""yes" 1>&6
16038     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16039   cat >> confdefs.h <<EOF
16040 #define $ac_tr_hdr 1
16041 EOF
16042  
16043 else
16044   echo "$ac_t""no" 1>&6
16045 fi
16046 done
16047
16048         for ac_hdr in thread.h synch.h
16049 do
16050 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16051 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16052 echo "configure:16053: checking for $ac_hdr" >&5
16053 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16054   echo $ac_n "(cached) $ac_c" 1>&6
16055 else
16056   cat > conftest.$ac_ext <<EOF
16057 #line 16058 "configure"
16058 #include "confdefs.h"
16059 #include <$ac_hdr>
16060 EOF
16061 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16062 { (eval echo configure:16063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16063 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16064 if test -z "$ac_err"; then
16065   rm -rf conftest*
16066   eval "ac_cv_header_$ac_safe=yes"
16067 else
16068   echo "$ac_err" >&5
16069   echo "configure: failed program was:" >&5
16070   cat conftest.$ac_ext >&5
16071   rm -rf conftest*
16072   eval "ac_cv_header_$ac_safe=no"
16073 fi
16074 rm -f conftest*
16075 fi
16076 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16077   echo "$ac_t""yes" 1>&6
16078     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16079   cat >> confdefs.h <<EOF
16080 #define $ac_tr_hdr 1
16081 EOF
16082  
16083 else
16084   echo "$ac_t""no" 1>&6
16085 fi
16086 done
16087
16088 fi
16089
16090 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16091                         cat >> confdefs.h <<\EOF
16092 #define REENTRANT 1
16093 EOF
16094
16095         cat >> confdefs.h <<\EOF
16096 #define _REENTRANT 1
16097 EOF
16098
16099         cat >> confdefs.h <<\EOF
16100 #define THREAD_SAFE 1
16101 EOF
16102
16103         cat >> confdefs.h <<\EOF
16104 #define _THREAD_SAFE 1
16105 EOF
16106
16107         cat >> confdefs.h <<\EOF
16108 #define THREADSAFE 1
16109 EOF
16110
16111         cat >> confdefs.h <<\EOF
16112 #define _THREADSAFE 1
16113 EOF
16114
16115         cat >> confdefs.h <<\EOF
16116 #define _SGI_MP_SOURCE 1
16117 EOF
16118
16119
16120                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16121 echo "configure:16122: checking for thread specific errno" >&5
16122 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16123   echo $ac_n "(cached) $ac_c" 1>&6
16124 else
16125   
16126                 cat > conftest.$ac_ext <<EOF
16127 #line 16128 "configure"
16128 #include "confdefs.h"
16129 #include <errno.h>
16130 int main() {
16131 errno = 0;
16132 ; return 0; }
16133 EOF
16134 if { (eval echo configure:16135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16135   rm -rf conftest*
16136   ol_cv_errno_thread_specific=yes
16137 else
16138   echo "configure: failed program was:" >&5
16139   cat conftest.$ac_ext >&5
16140   rm -rf conftest*
16141   ol_cv_errno_thread_specific=no
16142 fi
16143 rm -f conftest*
16144         
16145 fi
16146
16147 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16148
16149                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16150 echo "configure:16151: checking for thread specific h_errno" >&5
16151 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16152   echo $ac_n "(cached) $ac_c" 1>&6
16153 else
16154   
16155                 cat > conftest.$ac_ext <<EOF
16156 #line 16157 "configure"
16157 #include "confdefs.h"
16158 #include <netdb.h>
16159 int main() {
16160 h_errno = 0;
16161 ; return 0; }
16162 EOF
16163 if { (eval echo configure:16164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16164   rm -rf conftest*
16165   ol_cv_h_errno_thread_specific=yes
16166 else
16167   echo "configure: failed program was:" >&5
16168   cat conftest.$ac_ext >&5
16169   rm -rf conftest*
16170   ol_cv_h_errno_thread_specific=no
16171 fi
16172 rm -f conftest*
16173         
16174 fi
16175
16176 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16177
16178         if test $ol_cv_errno_thread_specific != yes \
16179                 -o $ol_cv_h_errno_thread_specific != yes ; then
16180                 LIBS="$LTHREAD_LIBS $LIBS"
16181                 LTHREAD_LIBS=""
16182         fi
16183
16184 fi  
16185
16186 if test $ol_link_threads = no ; then
16187         if test $ol_with_threads = yes ; then
16188                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16189         fi
16190
16191         if test $ol_with_threads = auto ; then
16192                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16193                 ol_with_threads=no
16194         fi
16195
16196         cat >> confdefs.h <<\EOF
16197 #define NO_THREADS 1
16198 EOF
16199
16200         LTHREAD_LIBS=""
16201 fi
16202
16203 if test $ol_link_threads != no ; then
16204         cat >> confdefs.h <<\EOF
16205 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16206 EOF
16207
16208 fi
16209
16210 for ac_func in \
16211         ctime_r                 \
16212         gethostbyname_r gethostbyaddr_r \
16213
16214 do
16215 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16216 echo "configure:16217: checking for $ac_func" >&5
16217 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16218   echo $ac_n "(cached) $ac_c" 1>&6
16219 else
16220   cat > conftest.$ac_ext <<EOF
16221 #line 16222 "configure"
16222 #include "confdefs.h"
16223 /* System header to define __stub macros and hopefully few prototypes,
16224     which can conflict with char $ac_func(); below.  */
16225 #include <assert.h>
16226 /* Override any gcc2 internal prototype to avoid an error.  */
16227 /* We use char because int might match the return type of a gcc2
16228     builtin and then its argument prototype would still apply.  */
16229 char $ac_func();
16230 char (*f)();
16231
16232 int main() {
16233
16234 /* The GNU C library defines this for functions which it implements
16235     to always fail with ENOSYS.  Some functions are actually named
16236     something starting with __ and the normal name is an alias.  */
16237 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16238 choke me
16239 #else
16240 f = $ac_func;
16241 #endif
16242
16243 ; return 0; }
16244 EOF
16245 if { (eval echo configure:16246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16246   rm -rf conftest*
16247   eval "ac_cv_func_$ac_func=yes"
16248 else
16249   echo "configure: failed program was:" >&5
16250   cat conftest.$ac_ext >&5
16251   rm -rf conftest*
16252   eval "ac_cv_func_$ac_func=no"
16253 fi
16254 rm -f conftest*
16255 fi
16256
16257 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16258   echo "$ac_t""yes" 1>&6
16259     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16260   cat >> confdefs.h <<EOF
16261 #define $ac_tr_func 1
16262 EOF
16263  
16264 else
16265   echo "$ac_t""no" 1>&6
16266 fi
16267 done
16268
16269
16270 if test "$ac_cv_func_ctime_r" = no ; then
16271         ol_cv_func_ctime_r_nargs=0
16272 else
16273         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16274 echo "configure:16275: checking number of arguments of ctime_r" >&5
16275 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16276   echo $ac_n "(cached) $ac_c" 1>&6
16277 else
16278   cat > conftest.$ac_ext <<EOF
16279 #line 16280 "configure"
16280 #include "confdefs.h"
16281 #include <time.h>
16282 int main() {
16283 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16284 ; return 0; }
16285 EOF
16286 if { (eval echo configure:16287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16287   rm -rf conftest*
16288   ol_cv_func_ctime_r_nargs3=yes
16289 else
16290   echo "configure: failed program was:" >&5
16291   cat conftest.$ac_ext >&5
16292   rm -rf conftest*
16293   ol_cv_func_ctime_r_nargs3=no
16294 fi
16295 rm -f conftest*
16296
16297         cat > conftest.$ac_ext <<EOF
16298 #line 16299 "configure"
16299 #include "confdefs.h"
16300 #include <time.h>
16301 int main() {
16302 time_t ti; char *buffer; ctime_r(&ti,buffer);
16303 ; return 0; }
16304 EOF
16305 if { (eval echo configure:16306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16306   rm -rf conftest*
16307   ol_cv_func_ctime_r_nargs2=yes
16308 else
16309   echo "configure: failed program was:" >&5
16310   cat conftest.$ac_ext >&5
16311   rm -rf conftest*
16312   ol_cv_func_ctime_r_nargs2=no
16313 fi
16314 rm -f conftest*
16315
16316         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16317                 $ol_cv_func_ctime_r_nargs2 = no ; then
16318
16319                 ol_cv_func_ctime_r_nargs=3
16320
16321         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16322                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16323
16324                 ol_cv_func_ctime_r_nargs=2
16325
16326         else
16327                 ol_cv_func_ctime_r_nargs=0
16328         fi
16329   
16330 fi
16331
16332 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16333
16334   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16335         cat >> confdefs.h <<EOF
16336 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16337 EOF
16338
16339   fi
16340
16341 fi
16342
16343 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16344         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16345 echo "configure:16346: checking number of arguments of gethostbyname_r" >&5
16346 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16347   echo $ac_n "(cached) $ac_c" 1>&6
16348 else
16349   cat > conftest.$ac_ext <<EOF
16350 #line 16351 "configure"
16351 #include "confdefs.h"
16352 #include <sys/types.h>
16353 #include <sys/socket.h>
16354 #include <netinet/in.h>
16355 #include <netdb.h>
16356 #define BUFSIZE (sizeof(struct hostent)+10)
16357 int main() {
16358 struct hostent hent; char buffer[BUFSIZE];
16359                 int bufsize=BUFSIZE;int h_errno;
16360                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16361                         buffer, bufsize, &h_errno);
16362 ; return 0; }
16363 EOF
16364 if { (eval echo configure:16365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16365   rm -rf conftest*
16366   ol_cv_func_gethostbyname_r_nargs5=yes
16367 else
16368   echo "configure: failed program was:" >&5
16369   cat conftest.$ac_ext >&5
16370   rm -rf conftest*
16371   ol_cv_func_gethostbyname_r_nargs5=no
16372 fi
16373 rm -f conftest*
16374
16375         cat > conftest.$ac_ext <<EOF
16376 #line 16377 "configure"
16377 #include "confdefs.h"
16378 #include <sys/types.h>
16379 #include <sys/socket.h>
16380 #include <netinet/in.h>
16381 #include <netdb.h>
16382 #define BUFSIZE (sizeof(struct hostent)+10)
16383 int main() {
16384 struct hostent hent;struct hostent *rhent;
16385                 char buffer[BUFSIZE];
16386                 int bufsize=BUFSIZE;int h_errno;
16387                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16388                         &rhent, &h_errno);
16389 ; return 0; }
16390 EOF
16391 if { (eval echo configure:16392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16392   rm -rf conftest*
16393   ol_cv_func_gethostbyname_r_nargs6=yes
16394 else
16395   echo "configure: failed program was:" >&5
16396   cat conftest.$ac_ext >&5
16397   rm -rf conftest*
16398   ol_cv_func_gethostbyname_r_nargs6=no
16399 fi
16400 rm -f conftest*
16401
16402         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16403                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16404
16405                 ol_cv_func_gethostbyname_r_nargs=5
16406
16407         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16408                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16409
16410                 ol_cv_func_gethostbyname_r_nargs=6
16411
16412         else
16413                 ol_cv_func_gethostbyname_r_nargs=0
16414         fi
16415   
16416 fi
16417
16418 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16419   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16420         cat >> confdefs.h <<EOF
16421 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16422 EOF
16423
16424   fi
16425
16426 else
16427         ol_cv_func_gethostbyname_r_nargs=0
16428 fi
16429  
16430 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16431         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16432 echo "configure:16433: checking number of arguments of gethostbyaddr_r" >&5
16433 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16434   echo $ac_n "(cached) $ac_c" 1>&6
16435 else
16436   cat > conftest.$ac_ext <<EOF
16437 #line 16438 "configure"
16438 #include "confdefs.h"
16439 #include <sys/types.h>
16440 #include <sys/socket.h>
16441 #include <netinet/in.h>
16442 #include <netdb.h>
16443 #define BUFSIZE (sizeof(struct hostent)+10)
16444 int main() {
16445 struct hostent hent; char buffer[BUFSIZE]; 
16446             struct in_addr add;
16447             size_t alen=sizeof(struct in_addr);
16448             int bufsize=BUFSIZE;int h_errno;
16449                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16450                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16451 ; return 0; }
16452 EOF
16453 if { (eval echo configure:16454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16454   rm -rf conftest*
16455   ol_cv_func_gethostbyaddr_r_nargs7=yes
16456 else
16457   echo "configure: failed program was:" >&5
16458   cat conftest.$ac_ext >&5
16459   rm -rf conftest*
16460   ol_cv_func_gethostbyaddr_r_nargs7=no
16461 fi
16462 rm -f conftest*
16463
16464         cat > conftest.$ac_ext <<EOF
16465 #line 16466 "configure"
16466 #include "confdefs.h"
16467 #include <sys/types.h>
16468 #include <sys/socket.h>
16469 #include <netinet/in.h>
16470 #include <netdb.h>
16471 #define BUFSIZE (sizeof(struct hostent)+10)
16472 int main() {
16473 struct hostent hent;
16474                 struct hostent *rhent; char buffer[BUFSIZE]; 
16475                 struct in_addr add;
16476                 size_t alen=sizeof(struct in_addr);
16477                 int bufsize=BUFSIZE;int h_errno;
16478                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16479                         alen, AF_INET, &hent, buffer, bufsize, 
16480                         &rhent, &h_errno);
16481 ; return 0; }
16482 EOF
16483 if { (eval echo configure:16484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16484   rm -rf conftest*
16485   ol_cv_func_gethostbyaddr_r_nargs8=yes
16486 else
16487   echo "configure: failed program was:" >&5
16488   cat conftest.$ac_ext >&5
16489   rm -rf conftest*
16490   ol_cv_func_gethostbyaddr_r_nargs8=no
16491 fi
16492 rm -f conftest*
16493
16494         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16495                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16496
16497                 ol_cv_func_gethostbyaddr_r_nargs=7
16498
16499         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16500                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16501
16502                 ol_cv_func_gethostbyaddr_r_nargs=8
16503
16504         else
16505                 ol_cv_func_gethostbyaddr_r_nargs=0
16506         fi
16507   
16508 fi
16509
16510 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16511   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16512     cat >> confdefs.h <<EOF
16513 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16514 EOF
16515
16516   fi
16517
16518 else
16519         ol_cv_func_gethostbyaddr_r_nargs=0
16520 fi
16521
16522 ol_link_ldbm=no 
16523
16524 if test $ol_with_ldbm_api = auto \
16525         -o $ol_with_ldbm_api = berkeley \
16526         -o $ol_with_ldbm_api = bcompat ; then
16527
16528         if test $ol_with_ldbm_api = bcompat; then \
16529                 for ac_hdr in db_185.h db.h
16530 do
16531 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16532 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16533 echo "configure:16534: checking for $ac_hdr" >&5
16534 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16535   echo $ac_n "(cached) $ac_c" 1>&6
16536 else
16537   cat > conftest.$ac_ext <<EOF
16538 #line 16539 "configure"
16539 #include "confdefs.h"
16540 #include <$ac_hdr>
16541 EOF
16542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16543 { (eval echo configure:16544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16545 if test -z "$ac_err"; then
16546   rm -rf conftest*
16547   eval "ac_cv_header_$ac_safe=yes"
16548 else
16549   echo "$ac_err" >&5
16550   echo "configure: failed program was:" >&5
16551   cat conftest.$ac_ext >&5
16552   rm -rf conftest*
16553   eval "ac_cv_header_$ac_safe=no"
16554 fi
16555 rm -f conftest*
16556 fi
16557 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16558   echo "$ac_t""yes" 1>&6
16559     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16560   cat >> confdefs.h <<EOF
16561 #define $ac_tr_hdr 1
16562 EOF
16563  
16564 else
16565   echo "$ac_t""no" 1>&6
16566 fi
16567 done
16568
16569 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16570         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16571 echo "configure:16572: checking if Berkeley DB header compatibility" >&5
16572 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16573   echo $ac_n "(cached) $ac_c" 1>&6
16574 else
16575   
16576                 cat > conftest.$ac_ext <<EOF
16577 #line 16578 "configure"
16578 #include "confdefs.h"
16579
16580 #if HAVE_DB_185_H
16581 #       include <db_185.h>
16582 #else
16583 #       include <db.h>
16584 #endif
16585
16586  /* this check could be improved */
16587 #ifndef DB_VERSION_MAJOR
16588 #       define DB_VERSION_MAJOR 1
16589 #endif
16590
16591 #if DB_VERSION_MAJOR == 1 
16592         __db_version_1
16593 #endif
16594
16595 EOF
16596 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16597   egrep "__db_version_1" >/dev/null 2>&1; then
16598   rm -rf conftest*
16599   ol_cv_header_db1=yes
16600 else
16601   rm -rf conftest*
16602   ol_cv_header_db1=no
16603 fi
16604 rm -f conftest*
16605
16606 fi
16607
16608 echo "$ac_t""$ol_cv_header_db1" 1>&6
16609
16610         if test $ol_cv_header_db1 = yes ; then
16611                 ol_cv_lib_db=no
16612 if test $ol_cv_lib_db = no ; then
16613         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16614 echo "configure:16615: checking for Berkeley DB link (default)" >&5
16615 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16616   echo $ac_n "(cached) $ac_c" 1>&6
16617 else
16618   
16619         ol_DB_LIB=
16620         ol_LIBS=$LIBS
16621         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16622
16623         cat > conftest.$ac_ext <<EOF
16624 #line 16625 "configure"
16625 #include "confdefs.h"
16626
16627 #ifdef HAVE_DB_185_H
16628 # include <db_185.h>
16629 #else
16630 # include <db.h>
16631 #endif
16632
16633 #ifndef DB_VERSION_MAJOR
16634 # define DB_VERSION_MAJOR 1
16635 #endif
16636
16637 #ifndef NULL
16638 #define NULL ((void*)0)
16639 #endif
16640
16641 int main() {
16642
16643 #if DB_VERSION_MAJOR > 1
16644         {
16645                 char *version;
16646                 int major, minor, patch;
16647
16648                 version = db_version( &major, &minor, &patch );
16649
16650                 if( major != DB_VERSION_MAJOR ||
16651                         minor < DB_VERSION_MINOR )
16652                 {
16653                         printf("Berkeley DB version mismatch\n"
16654                                 "\texpected: %s\n\tgot: %s\n",
16655                                 DB_VERSION_STRING, version);
16656                         return 1;
16657                 }
16658         }
16659 #endif
16660
16661 #if DB_VERSION_MAJOR > 2
16662         db_env_create( NULL, 0 );
16663 #elif DB_VERSION_MAJOR > 1
16664         db_appexit( NULL );
16665 #else
16666         (void) dbopen( NULL, 0, 0, 0, NULL);
16667 #endif
16668
16669 ; return 0; }
16670 EOF
16671 if { (eval echo configure:16672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16672   rm -rf conftest*
16673   ol_cv_db_none=yes
16674 else
16675   echo "configure: failed program was:" >&5
16676   cat conftest.$ac_ext >&5
16677   rm -rf conftest*
16678   ol_cv_db_none=no
16679 fi
16680 rm -f conftest*
16681
16682         LIBS="$ol_LIBS"
16683
16684 fi
16685
16686 echo "$ac_t""$ol_cv_db_none" 1>&6
16687
16688         if test $ol_cv_db_none = yes ; then
16689                 ol_cv_lib_db=yes
16690         fi
16691 fi
16692
16693 if test $ol_cv_lib_db = no ; then
16694         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16695 echo "configure:16696: checking for Berkeley DB link (-ldb41)" >&5
16696 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16697   echo $ac_n "(cached) $ac_c" 1>&6
16698 else
16699   
16700         ol_DB_LIB=-ldb41
16701         ol_LIBS=$LIBS
16702         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16703
16704         cat > conftest.$ac_ext <<EOF
16705 #line 16706 "configure"
16706 #include "confdefs.h"
16707
16708 #ifdef HAVE_DB_185_H
16709 # include <db_185.h>
16710 #else
16711 # include <db.h>
16712 #endif
16713
16714 #ifndef DB_VERSION_MAJOR
16715 # define DB_VERSION_MAJOR 1
16716 #endif
16717
16718 #ifndef NULL
16719 #define NULL ((void*)0)
16720 #endif
16721
16722 int main() {
16723
16724 #if DB_VERSION_MAJOR > 1
16725         {
16726                 char *version;
16727                 int major, minor, patch;
16728
16729                 version = db_version( &major, &minor, &patch );
16730
16731                 if( major != DB_VERSION_MAJOR ||
16732                         minor < DB_VERSION_MINOR )
16733                 {
16734                         printf("Berkeley DB version mismatch\n"
16735                                 "\texpected: %s\n\tgot: %s\n",
16736                                 DB_VERSION_STRING, version);
16737                         return 1;
16738                 }
16739         }
16740 #endif
16741
16742 #if DB_VERSION_MAJOR > 2
16743         db_env_create( NULL, 0 );
16744 #elif DB_VERSION_MAJOR > 1
16745         db_appexit( NULL );
16746 #else
16747         (void) dbopen( NULL, 0, 0, 0, NULL);
16748 #endif
16749
16750 ; return 0; }
16751 EOF
16752 if { (eval echo configure:16753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16753   rm -rf conftest*
16754   ol_cv_db_db41=yes
16755 else
16756   echo "configure: failed program was:" >&5
16757   cat conftest.$ac_ext >&5
16758   rm -rf conftest*
16759   ol_cv_db_db41=no
16760 fi
16761 rm -f conftest*
16762
16763         LIBS="$ol_LIBS"
16764
16765 fi
16766
16767 echo "$ac_t""$ol_cv_db_db41" 1>&6
16768
16769         if test $ol_cv_db_db41 = yes ; then
16770                 ol_cv_lib_db=-ldb41
16771         fi
16772 fi
16773
16774 if test $ol_cv_lib_db = no ; then
16775         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16776 echo "configure:16777: checking for Berkeley DB link (-ldb-41)" >&5
16777 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16778   echo $ac_n "(cached) $ac_c" 1>&6
16779 else
16780   
16781         ol_DB_LIB=-ldb-41
16782         ol_LIBS=$LIBS
16783         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16784
16785         cat > conftest.$ac_ext <<EOF
16786 #line 16787 "configure"
16787 #include "confdefs.h"
16788
16789 #ifdef HAVE_DB_185_H
16790 # include <db_185.h>
16791 #else
16792 # include <db.h>
16793 #endif
16794
16795 #ifndef DB_VERSION_MAJOR
16796 # define DB_VERSION_MAJOR 1
16797 #endif
16798
16799 #ifndef NULL
16800 #define NULL ((void*)0)
16801 #endif
16802
16803 int main() {
16804
16805 #if DB_VERSION_MAJOR > 1
16806         {
16807                 char *version;
16808                 int major, minor, patch;
16809
16810                 version = db_version( &major, &minor, &patch );
16811
16812                 if( major != DB_VERSION_MAJOR ||
16813                         minor < DB_VERSION_MINOR )
16814                 {
16815                         printf("Berkeley DB version mismatch\n"
16816                                 "\texpected: %s\n\tgot: %s\n",
16817                                 DB_VERSION_STRING, version);
16818                         return 1;
16819                 }
16820         }
16821 #endif
16822
16823 #if DB_VERSION_MAJOR > 2
16824         db_env_create( NULL, 0 );
16825 #elif DB_VERSION_MAJOR > 1
16826         db_appexit( NULL );
16827 #else
16828         (void) dbopen( NULL, 0, 0, 0, NULL);
16829 #endif
16830
16831 ; return 0; }
16832 EOF
16833 if { (eval echo configure:16834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16834   rm -rf conftest*
16835   ol_cv_db_db_41=yes
16836 else
16837   echo "configure: failed program was:" >&5
16838   cat conftest.$ac_ext >&5
16839   rm -rf conftest*
16840   ol_cv_db_db_41=no
16841 fi
16842 rm -f conftest*
16843
16844         LIBS="$ol_LIBS"
16845
16846 fi
16847
16848 echo "$ac_t""$ol_cv_db_db_41" 1>&6
16849
16850         if test $ol_cv_db_db_41 = yes ; then
16851                 ol_cv_lib_db=-ldb-41
16852         fi
16853 fi
16854
16855 if test $ol_cv_lib_db = no ; then
16856         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
16857 echo "configure:16858: checking for Berkeley DB link (-ldb-4.1)" >&5
16858 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
16859   echo $ac_n "(cached) $ac_c" 1>&6
16860 else
16861   
16862         ol_DB_LIB=-ldb-4.1
16863         ol_LIBS=$LIBS
16864         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16865
16866         cat > conftest.$ac_ext <<EOF
16867 #line 16868 "configure"
16868 #include "confdefs.h"
16869
16870 #ifdef HAVE_DB_185_H
16871 # include <db_185.h>
16872 #else
16873 # include <db.h>
16874 #endif
16875
16876 #ifndef DB_VERSION_MAJOR
16877 # define DB_VERSION_MAJOR 1
16878 #endif
16879
16880 #ifndef NULL
16881 #define NULL ((void*)0)
16882 #endif
16883
16884 int main() {
16885
16886 #if DB_VERSION_MAJOR > 1
16887         {
16888                 char *version;
16889                 int major, minor, patch;
16890
16891                 version = db_version( &major, &minor, &patch );
16892
16893                 if( major != DB_VERSION_MAJOR ||
16894                         minor < DB_VERSION_MINOR )
16895                 {
16896                         printf("Berkeley DB version mismatch\n"
16897                                 "\texpected: %s\n\tgot: %s\n",
16898                                 DB_VERSION_STRING, version);
16899                         return 1;
16900                 }
16901         }
16902 #endif
16903
16904 #if DB_VERSION_MAJOR > 2
16905         db_env_create( NULL, 0 );
16906 #elif DB_VERSION_MAJOR > 1
16907         db_appexit( NULL );
16908 #else
16909         (void) dbopen( NULL, 0, 0, 0, NULL);
16910 #endif
16911
16912 ; return 0; }
16913 EOF
16914 if { (eval echo configure:16915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16915   rm -rf conftest*
16916   ol_cv_db_db_4_dot_1=yes
16917 else
16918   echo "configure: failed program was:" >&5
16919   cat conftest.$ac_ext >&5
16920   rm -rf conftest*
16921   ol_cv_db_db_4_dot_1=no
16922 fi
16923 rm -f conftest*
16924
16925         LIBS="$ol_LIBS"
16926
16927 fi
16928
16929 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
16930
16931         if test $ol_cv_db_db_4_dot_1 = yes ; then
16932                 ol_cv_lib_db=-ldb-4.1
16933         fi
16934 fi
16935
16936 if test $ol_cv_lib_db = no ; then
16937         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
16938 echo "configure:16939: checking for Berkeley DB link (-ldb-4-1)" >&5
16939 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
16940   echo $ac_n "(cached) $ac_c" 1>&6
16941 else
16942   
16943         ol_DB_LIB=-ldb-4-1
16944         ol_LIBS=$LIBS
16945         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16946
16947         cat > conftest.$ac_ext <<EOF
16948 #line 16949 "configure"
16949 #include "confdefs.h"
16950
16951 #ifdef HAVE_DB_185_H
16952 # include <db_185.h>
16953 #else
16954 # include <db.h>
16955 #endif
16956
16957 #ifndef DB_VERSION_MAJOR
16958 # define DB_VERSION_MAJOR 1
16959 #endif
16960
16961 #ifndef NULL
16962 #define NULL ((void*)0)
16963 #endif
16964
16965 int main() {
16966
16967 #if DB_VERSION_MAJOR > 1
16968         {
16969                 char *version;
16970                 int major, minor, patch;
16971
16972                 version = db_version( &major, &minor, &patch );
16973
16974                 if( major != DB_VERSION_MAJOR ||
16975                         minor < DB_VERSION_MINOR )
16976                 {
16977                         printf("Berkeley DB version mismatch\n"
16978                                 "\texpected: %s\n\tgot: %s\n",
16979                                 DB_VERSION_STRING, version);
16980                         return 1;
16981                 }
16982         }
16983 #endif
16984
16985 #if DB_VERSION_MAJOR > 2
16986         db_env_create( NULL, 0 );
16987 #elif DB_VERSION_MAJOR > 1
16988         db_appexit( NULL );
16989 #else
16990         (void) dbopen( NULL, 0, 0, 0, NULL);
16991 #endif
16992
16993 ; return 0; }
16994 EOF
16995 if { (eval echo configure:16996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16996   rm -rf conftest*
16997   ol_cv_db_db_4_1=yes
16998 else
16999   echo "configure: failed program was:" >&5
17000   cat conftest.$ac_ext >&5
17001   rm -rf conftest*
17002   ol_cv_db_db_4_1=no
17003 fi
17004 rm -f conftest*
17005
17006         LIBS="$ol_LIBS"
17007
17008 fi
17009
17010 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17011
17012         if test $ol_cv_db_db_4_1 = yes ; then
17013                 ol_cv_lib_db=-ldb-4-1
17014         fi
17015 fi
17016
17017 if test $ol_cv_lib_db = no ; then
17018         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17019 echo "configure:17020: checking for Berkeley DB link (-ldb-4)" >&5
17020 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17021   echo $ac_n "(cached) $ac_c" 1>&6
17022 else
17023   
17024         ol_DB_LIB=-ldb-4
17025         ol_LIBS=$LIBS
17026         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17027
17028         cat > conftest.$ac_ext <<EOF
17029 #line 17030 "configure"
17030 #include "confdefs.h"
17031
17032 #ifdef HAVE_DB_185_H
17033 # include <db_185.h>
17034 #else
17035 # include <db.h>
17036 #endif
17037
17038 #ifndef DB_VERSION_MAJOR
17039 # define DB_VERSION_MAJOR 1
17040 #endif
17041
17042 #ifndef NULL
17043 #define NULL ((void*)0)
17044 #endif
17045
17046 int main() {
17047
17048 #if DB_VERSION_MAJOR > 1
17049         {
17050                 char *version;
17051                 int major, minor, patch;
17052
17053                 version = db_version( &major, &minor, &patch );
17054
17055                 if( major != DB_VERSION_MAJOR ||
17056                         minor < DB_VERSION_MINOR )
17057                 {
17058                         printf("Berkeley DB version mismatch\n"
17059                                 "\texpected: %s\n\tgot: %s\n",
17060                                 DB_VERSION_STRING, version);
17061                         return 1;
17062                 }
17063         }
17064 #endif
17065
17066 #if DB_VERSION_MAJOR > 2
17067         db_env_create( NULL, 0 );
17068 #elif DB_VERSION_MAJOR > 1
17069         db_appexit( NULL );
17070 #else
17071         (void) dbopen( NULL, 0, 0, 0, NULL);
17072 #endif
17073
17074 ; return 0; }
17075 EOF
17076 if { (eval echo configure:17077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17077   rm -rf conftest*
17078   ol_cv_db_db_4=yes
17079 else
17080   echo "configure: failed program was:" >&5
17081   cat conftest.$ac_ext >&5
17082   rm -rf conftest*
17083   ol_cv_db_db_4=no
17084 fi
17085 rm -f conftest*
17086
17087         LIBS="$ol_LIBS"
17088
17089 fi
17090
17091 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17092
17093         if test $ol_cv_db_db_4 = yes ; then
17094                 ol_cv_lib_db=-ldb-4
17095         fi
17096 fi
17097
17098 if test $ol_cv_lib_db = no ; then
17099         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17100 echo "configure:17101: checking for Berkeley DB link (-ldb4)" >&5
17101 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17102   echo $ac_n "(cached) $ac_c" 1>&6
17103 else
17104   
17105         ol_DB_LIB=-ldb4
17106         ol_LIBS=$LIBS
17107         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17108
17109         cat > conftest.$ac_ext <<EOF
17110 #line 17111 "configure"
17111 #include "confdefs.h"
17112
17113 #ifdef HAVE_DB_185_H
17114 # include <db_185.h>
17115 #else
17116 # include <db.h>
17117 #endif
17118
17119 #ifndef DB_VERSION_MAJOR
17120 # define DB_VERSION_MAJOR 1
17121 #endif
17122
17123 #ifndef NULL
17124 #define NULL ((void*)0)
17125 #endif
17126
17127 int main() {
17128
17129 #if DB_VERSION_MAJOR > 1
17130         {
17131                 char *version;
17132                 int major, minor, patch;
17133
17134                 version = db_version( &major, &minor, &patch );
17135
17136                 if( major != DB_VERSION_MAJOR ||
17137                         minor < DB_VERSION_MINOR )
17138                 {
17139                         printf("Berkeley DB version mismatch\n"
17140                                 "\texpected: %s\n\tgot: %s\n",
17141                                 DB_VERSION_STRING, version);
17142                         return 1;
17143                 }
17144         }
17145 #endif
17146
17147 #if DB_VERSION_MAJOR > 2
17148         db_env_create( NULL, 0 );
17149 #elif DB_VERSION_MAJOR > 1
17150         db_appexit( NULL );
17151 #else
17152         (void) dbopen( NULL, 0, 0, 0, NULL);
17153 #endif
17154
17155 ; return 0; }
17156 EOF
17157 if { (eval echo configure:17158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17158   rm -rf conftest*
17159   ol_cv_db_db4=yes
17160 else
17161   echo "configure: failed program was:" >&5
17162   cat conftest.$ac_ext >&5
17163   rm -rf conftest*
17164   ol_cv_db_db4=no
17165 fi
17166 rm -f conftest*
17167
17168         LIBS="$ol_LIBS"
17169
17170 fi
17171
17172 echo "$ac_t""$ol_cv_db_db4" 1>&6
17173
17174         if test $ol_cv_db_db4 = yes ; then
17175                 ol_cv_lib_db=-ldb4
17176         fi
17177 fi
17178
17179 if test $ol_cv_lib_db = no ; then
17180         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17181 echo "configure:17182: checking for Berkeley DB link (-ldb)" >&5
17182 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17183   echo $ac_n "(cached) $ac_c" 1>&6
17184 else
17185   
17186         ol_DB_LIB=-ldb
17187         ol_LIBS=$LIBS
17188         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17189
17190         cat > conftest.$ac_ext <<EOF
17191 #line 17192 "configure"
17192 #include "confdefs.h"
17193
17194 #ifdef HAVE_DB_185_H
17195 # include <db_185.h>
17196 #else
17197 # include <db.h>
17198 #endif
17199
17200 #ifndef DB_VERSION_MAJOR
17201 # define DB_VERSION_MAJOR 1
17202 #endif
17203
17204 #ifndef NULL
17205 #define NULL ((void*)0)
17206 #endif
17207
17208 int main() {
17209
17210 #if DB_VERSION_MAJOR > 1
17211         {
17212                 char *version;
17213                 int major, minor, patch;
17214
17215                 version = db_version( &major, &minor, &patch );
17216
17217                 if( major != DB_VERSION_MAJOR ||
17218                         minor < DB_VERSION_MINOR )
17219                 {
17220                         printf("Berkeley DB version mismatch\n"
17221                                 "\texpected: %s\n\tgot: %s\n",
17222                                 DB_VERSION_STRING, version);
17223                         return 1;
17224                 }
17225         }
17226 #endif
17227
17228 #if DB_VERSION_MAJOR > 2
17229         db_env_create( NULL, 0 );
17230 #elif DB_VERSION_MAJOR > 1
17231         db_appexit( NULL );
17232 #else
17233         (void) dbopen( NULL, 0, 0, 0, NULL);
17234 #endif
17235
17236 ; return 0; }
17237 EOF
17238 if { (eval echo configure:17239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17239   rm -rf conftest*
17240   ol_cv_db_db=yes
17241 else
17242   echo "configure: failed program was:" >&5
17243   cat conftest.$ac_ext >&5
17244   rm -rf conftest*
17245   ol_cv_db_db=no
17246 fi
17247 rm -f conftest*
17248
17249         LIBS="$ol_LIBS"
17250
17251 fi
17252
17253 echo "$ac_t""$ol_cv_db_db" 1>&6
17254
17255         if test $ol_cv_db_db = yes ; then
17256                 ol_cv_lib_db=-ldb
17257         fi
17258 fi
17259
17260 if test $ol_cv_lib_db = no ; then
17261         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17262 echo "configure:17263: checking for Berkeley DB link (-ldb3)" >&5
17263 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17264   echo $ac_n "(cached) $ac_c" 1>&6
17265 else
17266   
17267         ol_DB_LIB=-ldb3
17268         ol_LIBS=$LIBS
17269         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17270
17271         cat > conftest.$ac_ext <<EOF
17272 #line 17273 "configure"
17273 #include "confdefs.h"
17274
17275 #ifdef HAVE_DB_185_H
17276 # include <db_185.h>
17277 #else
17278 # include <db.h>
17279 #endif
17280
17281 #ifndef DB_VERSION_MAJOR
17282 # define DB_VERSION_MAJOR 1
17283 #endif
17284
17285 #ifndef NULL
17286 #define NULL ((void*)0)
17287 #endif
17288
17289 int main() {
17290
17291 #if DB_VERSION_MAJOR > 1
17292         {
17293                 char *version;
17294                 int major, minor, patch;
17295
17296                 version = db_version( &major, &minor, &patch );
17297
17298                 if( major != DB_VERSION_MAJOR ||
17299                         minor < DB_VERSION_MINOR )
17300                 {
17301                         printf("Berkeley DB version mismatch\n"
17302                                 "\texpected: %s\n\tgot: %s\n",
17303                                 DB_VERSION_STRING, version);
17304                         return 1;
17305                 }
17306         }
17307 #endif
17308
17309 #if DB_VERSION_MAJOR > 2
17310         db_env_create( NULL, 0 );
17311 #elif DB_VERSION_MAJOR > 1
17312         db_appexit( NULL );
17313 #else
17314         (void) dbopen( NULL, 0, 0, 0, NULL);
17315 #endif
17316
17317 ; return 0; }
17318 EOF
17319 if { (eval echo configure:17320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17320   rm -rf conftest*
17321   ol_cv_db_db3=yes
17322 else
17323   echo "configure: failed program was:" >&5
17324   cat conftest.$ac_ext >&5
17325   rm -rf conftest*
17326   ol_cv_db_db3=no
17327 fi
17328 rm -f conftest*
17329
17330         LIBS="$ol_LIBS"
17331
17332 fi
17333
17334 echo "$ac_t""$ol_cv_db_db3" 1>&6
17335
17336         if test $ol_cv_db_db3 = yes ; then
17337                 ol_cv_lib_db=-ldb3
17338         fi
17339 fi
17340
17341 if test $ol_cv_lib_db = no ; then
17342         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17343 echo "configure:17344: checking for Berkeley DB link (-ldb-3)" >&5
17344 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17345   echo $ac_n "(cached) $ac_c" 1>&6
17346 else
17347   
17348         ol_DB_LIB=-ldb-3
17349         ol_LIBS=$LIBS
17350         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17351
17352         cat > conftest.$ac_ext <<EOF
17353 #line 17354 "configure"
17354 #include "confdefs.h"
17355
17356 #ifdef HAVE_DB_185_H
17357 # include <db_185.h>
17358 #else
17359 # include <db.h>
17360 #endif
17361
17362 #ifndef DB_VERSION_MAJOR
17363 # define DB_VERSION_MAJOR 1
17364 #endif
17365
17366 #ifndef NULL
17367 #define NULL ((void*)0)
17368 #endif
17369
17370 int main() {
17371
17372 #if DB_VERSION_MAJOR > 1
17373         {
17374                 char *version;
17375                 int major, minor, patch;
17376
17377                 version = db_version( &major, &minor, &patch );
17378
17379                 if( major != DB_VERSION_MAJOR ||
17380                         minor < DB_VERSION_MINOR )
17381                 {
17382                         printf("Berkeley DB version mismatch\n"
17383                                 "\texpected: %s\n\tgot: %s\n",
17384                                 DB_VERSION_STRING, version);
17385                         return 1;
17386                 }
17387         }
17388 #endif
17389
17390 #if DB_VERSION_MAJOR > 2
17391         db_env_create( NULL, 0 );
17392 #elif DB_VERSION_MAJOR > 1
17393         db_appexit( NULL );
17394 #else
17395         (void) dbopen( NULL, 0, 0, 0, NULL);
17396 #endif
17397
17398 ; return 0; }
17399 EOF
17400 if { (eval echo configure:17401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17401   rm -rf conftest*
17402   ol_cv_db_db_3=yes
17403 else
17404   echo "configure: failed program was:" >&5
17405   cat conftest.$ac_ext >&5
17406   rm -rf conftest*
17407   ol_cv_db_db_3=no
17408 fi
17409 rm -f conftest*
17410
17411         LIBS="$ol_LIBS"
17412
17413 fi
17414
17415 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17416
17417         if test $ol_cv_db_db_3 = yes ; then
17418                 ol_cv_lib_db=-ldb-3
17419         fi
17420 fi
17421
17422 if test $ol_cv_lib_db = no ; then
17423         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17424 echo "configure:17425: checking for Berkeley DB link (-ldb2)" >&5
17425 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17426   echo $ac_n "(cached) $ac_c" 1>&6
17427 else
17428   
17429         ol_DB_LIB=-ldb2
17430         ol_LIBS=$LIBS
17431         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17432
17433         cat > conftest.$ac_ext <<EOF
17434 #line 17435 "configure"
17435 #include "confdefs.h"
17436
17437 #ifdef HAVE_DB_185_H
17438 # include <db_185.h>
17439 #else
17440 # include <db.h>
17441 #endif
17442
17443 #ifndef DB_VERSION_MAJOR
17444 # define DB_VERSION_MAJOR 1
17445 #endif
17446
17447 #ifndef NULL
17448 #define NULL ((void*)0)
17449 #endif
17450
17451 int main() {
17452
17453 #if DB_VERSION_MAJOR > 1
17454         {
17455                 char *version;
17456                 int major, minor, patch;
17457
17458                 version = db_version( &major, &minor, &patch );
17459
17460                 if( major != DB_VERSION_MAJOR ||
17461                         minor < DB_VERSION_MINOR )
17462                 {
17463                         printf("Berkeley DB version mismatch\n"
17464                                 "\texpected: %s\n\tgot: %s\n",
17465                                 DB_VERSION_STRING, version);
17466                         return 1;
17467                 }
17468         }
17469 #endif
17470
17471 #if DB_VERSION_MAJOR > 2
17472         db_env_create( NULL, 0 );
17473 #elif DB_VERSION_MAJOR > 1
17474         db_appexit( NULL );
17475 #else
17476         (void) dbopen( NULL, 0, 0, 0, NULL);
17477 #endif
17478
17479 ; return 0; }
17480 EOF
17481 if { (eval echo configure:17482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17482   rm -rf conftest*
17483   ol_cv_db_db2=yes
17484 else
17485   echo "configure: failed program was:" >&5
17486   cat conftest.$ac_ext >&5
17487   rm -rf conftest*
17488   ol_cv_db_db2=no
17489 fi
17490 rm -f conftest*
17491
17492         LIBS="$ol_LIBS"
17493
17494 fi
17495
17496 echo "$ac_t""$ol_cv_db_db2" 1>&6
17497
17498         if test $ol_cv_db_db2 = yes ; then
17499                 ol_cv_lib_db=-ldb2
17500         fi
17501 fi
17502
17503 if test $ol_cv_lib_db = no ; then
17504         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17505 echo "configure:17506: checking for Berkeley DB link (-ldb-2)" >&5
17506 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17507   echo $ac_n "(cached) $ac_c" 1>&6
17508 else
17509   
17510         ol_DB_LIB=-ldb-2
17511         ol_LIBS=$LIBS
17512         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17513
17514         cat > conftest.$ac_ext <<EOF
17515 #line 17516 "configure"
17516 #include "confdefs.h"
17517
17518 #ifdef HAVE_DB_185_H
17519 # include <db_185.h>
17520 #else
17521 # include <db.h>
17522 #endif
17523
17524 #ifndef DB_VERSION_MAJOR
17525 # define DB_VERSION_MAJOR 1
17526 #endif
17527
17528 #ifndef NULL
17529 #define NULL ((void*)0)
17530 #endif
17531
17532 int main() {
17533
17534 #if DB_VERSION_MAJOR > 1
17535         {
17536                 char *version;
17537                 int major, minor, patch;
17538
17539                 version = db_version( &major, &minor, &patch );
17540
17541                 if( major != DB_VERSION_MAJOR ||
17542                         minor < DB_VERSION_MINOR )
17543                 {
17544                         printf("Berkeley DB version mismatch\n"
17545                                 "\texpected: %s\n\tgot: %s\n",
17546                                 DB_VERSION_STRING, version);
17547                         return 1;
17548                 }
17549         }
17550 #endif
17551
17552 #if DB_VERSION_MAJOR > 2
17553         db_env_create( NULL, 0 );
17554 #elif DB_VERSION_MAJOR > 1
17555         db_appexit( NULL );
17556 #else
17557         (void) dbopen( NULL, 0, 0, 0, NULL);
17558 #endif
17559
17560 ; return 0; }
17561 EOF
17562 if { (eval echo configure:17563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17563   rm -rf conftest*
17564   ol_cv_db_db_2=yes
17565 else
17566   echo "configure: failed program was:" >&5
17567   cat conftest.$ac_ext >&5
17568   rm -rf conftest*
17569   ol_cv_db_db_2=no
17570 fi
17571 rm -f conftest*
17572
17573         LIBS="$ol_LIBS"
17574
17575 fi
17576
17577 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17578
17579         if test $ol_cv_db_db_2 = yes ; then
17580                 ol_cv_lib_db=-ldb-2
17581         fi
17582 fi
17583
17584 if test $ol_cv_lib_db = no ; then
17585         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17586 echo "configure:17587: checking for Berkeley DB link (-ldb1)" >&5
17587 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17588   echo $ac_n "(cached) $ac_c" 1>&6
17589 else
17590   
17591         ol_DB_LIB=-ldb1
17592         ol_LIBS=$LIBS
17593         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17594
17595         cat > conftest.$ac_ext <<EOF
17596 #line 17597 "configure"
17597 #include "confdefs.h"
17598
17599 #ifdef HAVE_DB_185_H
17600 # include <db_185.h>
17601 #else
17602 # include <db.h>
17603 #endif
17604
17605 #ifndef DB_VERSION_MAJOR
17606 # define DB_VERSION_MAJOR 1
17607 #endif
17608
17609 #ifndef NULL
17610 #define NULL ((void*)0)
17611 #endif
17612
17613 int main() {
17614
17615 #if DB_VERSION_MAJOR > 1
17616         {
17617                 char *version;
17618                 int major, minor, patch;
17619
17620                 version = db_version( &major, &minor, &patch );
17621
17622                 if( major != DB_VERSION_MAJOR ||
17623                         minor < DB_VERSION_MINOR )
17624                 {
17625                         printf("Berkeley DB version mismatch\n"
17626                                 "\texpected: %s\n\tgot: %s\n",
17627                                 DB_VERSION_STRING, version);
17628                         return 1;
17629                 }
17630         }
17631 #endif
17632
17633 #if DB_VERSION_MAJOR > 2
17634         db_env_create( NULL, 0 );
17635 #elif DB_VERSION_MAJOR > 1
17636         db_appexit( NULL );
17637 #else
17638         (void) dbopen( NULL, 0, 0, 0, NULL);
17639 #endif
17640
17641 ; return 0; }
17642 EOF
17643 if { (eval echo configure:17644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17644   rm -rf conftest*
17645   ol_cv_db_db1=yes
17646 else
17647   echo "configure: failed program was:" >&5
17648   cat conftest.$ac_ext >&5
17649   rm -rf conftest*
17650   ol_cv_db_db1=no
17651 fi
17652 rm -f conftest*
17653
17654         LIBS="$ol_LIBS"
17655
17656 fi
17657
17658 echo "$ac_t""$ol_cv_db_db1" 1>&6
17659
17660         if test $ol_cv_db_db1 = yes ; then
17661                 ol_cv_lib_db=-ldb1
17662         fi
17663 fi
17664
17665 if test $ol_cv_lib_db = no ; then
17666         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17667 echo "configure:17668: checking for Berkeley DB link (-ldb-1)" >&5
17668 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17669   echo $ac_n "(cached) $ac_c" 1>&6
17670 else
17671   
17672         ol_DB_LIB=-ldb-1
17673         ol_LIBS=$LIBS
17674         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17675
17676         cat > conftest.$ac_ext <<EOF
17677 #line 17678 "configure"
17678 #include "confdefs.h"
17679
17680 #ifdef HAVE_DB_185_H
17681 # include <db_185.h>
17682 #else
17683 # include <db.h>
17684 #endif
17685
17686 #ifndef DB_VERSION_MAJOR
17687 # define DB_VERSION_MAJOR 1
17688 #endif
17689
17690 #ifndef NULL
17691 #define NULL ((void*)0)
17692 #endif
17693
17694 int main() {
17695
17696 #if DB_VERSION_MAJOR > 1
17697         {
17698                 char *version;
17699                 int major, minor, patch;
17700
17701                 version = db_version( &major, &minor, &patch );
17702
17703                 if( major != DB_VERSION_MAJOR ||
17704                         minor < DB_VERSION_MINOR )
17705                 {
17706                         printf("Berkeley DB version mismatch\n"
17707                                 "\texpected: %s\n\tgot: %s\n",
17708                                 DB_VERSION_STRING, version);
17709                         return 1;
17710                 }
17711         }
17712 #endif
17713
17714 #if DB_VERSION_MAJOR > 2
17715         db_env_create( NULL, 0 );
17716 #elif DB_VERSION_MAJOR > 1
17717         db_appexit( NULL );
17718 #else
17719         (void) dbopen( NULL, 0, 0, 0, NULL);
17720 #endif
17721
17722 ; return 0; }
17723 EOF
17724 if { (eval echo configure:17725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17725   rm -rf conftest*
17726   ol_cv_db_db_1=yes
17727 else
17728   echo "configure: failed program was:" >&5
17729   cat conftest.$ac_ext >&5
17730   rm -rf conftest*
17731   ol_cv_db_db_1=no
17732 fi
17733 rm -f conftest*
17734
17735         LIBS="$ol_LIBS"
17736
17737 fi
17738
17739 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17740
17741         if test $ol_cv_db_db_1 = yes ; then
17742                 ol_cv_lib_db=-ldb-1
17743         fi
17744 fi
17745
17746
17747                 if test "$ol_cv_lib_db" != no ; then
17748                         ol_cv_berkeley_db=yes
17749                 fi
17750         fi
17751 fi
17752
17753         else
17754                 ol_cv_berkeley_db=no
17755 for ac_hdr in db.h
17756 do
17757 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17758 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17759 echo "configure:17760: checking for $ac_hdr" >&5
17760 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17761   echo $ac_n "(cached) $ac_c" 1>&6
17762 else
17763   cat > conftest.$ac_ext <<EOF
17764 #line 17765 "configure"
17765 #include "confdefs.h"
17766 #include <$ac_hdr>
17767 EOF
17768 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17769 { (eval echo configure:17770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17770 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17771 if test -z "$ac_err"; then
17772   rm -rf conftest*
17773   eval "ac_cv_header_$ac_safe=yes"
17774 else
17775   echo "$ac_err" >&5
17776   echo "configure: failed program was:" >&5
17777   cat conftest.$ac_ext >&5
17778   rm -rf conftest*
17779   eval "ac_cv_header_$ac_safe=no"
17780 fi
17781 rm -f conftest*
17782 fi
17783 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17784   echo "$ac_t""yes" 1>&6
17785     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17786   cat >> confdefs.h <<EOF
17787 #define $ac_tr_hdr 1
17788 EOF
17789  
17790 else
17791   echo "$ac_t""no" 1>&6
17792 fi
17793 done
17794
17795 if test $ac_cv_header_db_h = yes; then
17796         ol_cv_lib_db=no
17797 if test $ol_cv_lib_db = no ; then
17798         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17799 echo "configure:17800: checking for Berkeley DB link (default)" >&5
17800 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17801   echo $ac_n "(cached) $ac_c" 1>&6
17802 else
17803   
17804         ol_DB_LIB=
17805         ol_LIBS=$LIBS
17806         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17807
17808         cat > conftest.$ac_ext <<EOF
17809 #line 17810 "configure"
17810 #include "confdefs.h"
17811
17812 #ifdef HAVE_DB_185_H
17813 # include <db_185.h>
17814 #else
17815 # include <db.h>
17816 #endif
17817
17818 #ifndef DB_VERSION_MAJOR
17819 # define DB_VERSION_MAJOR 1
17820 #endif
17821
17822 #ifndef NULL
17823 #define NULL ((void*)0)
17824 #endif
17825
17826 int main() {
17827
17828 #if DB_VERSION_MAJOR > 1
17829         {
17830                 char *version;
17831                 int major, minor, patch;
17832
17833                 version = db_version( &major, &minor, &patch );
17834
17835                 if( major != DB_VERSION_MAJOR ||
17836                         minor < DB_VERSION_MINOR )
17837                 {
17838                         printf("Berkeley DB version mismatch\n"
17839                                 "\texpected: %s\n\tgot: %s\n",
17840                                 DB_VERSION_STRING, version);
17841                         return 1;
17842                 }
17843         }
17844 #endif
17845
17846 #if DB_VERSION_MAJOR > 2
17847         db_env_create( NULL, 0 );
17848 #elif DB_VERSION_MAJOR > 1
17849         db_appexit( NULL );
17850 #else
17851         (void) dbopen( NULL, 0, 0, 0, NULL);
17852 #endif
17853
17854 ; return 0; }
17855 EOF
17856 if { (eval echo configure:17857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17857   rm -rf conftest*
17858   ol_cv_db_none=yes
17859 else
17860   echo "configure: failed program was:" >&5
17861   cat conftest.$ac_ext >&5
17862   rm -rf conftest*
17863   ol_cv_db_none=no
17864 fi
17865 rm -f conftest*
17866
17867         LIBS="$ol_LIBS"
17868
17869 fi
17870
17871 echo "$ac_t""$ol_cv_db_none" 1>&6
17872
17873         if test $ol_cv_db_none = yes ; then
17874                 ol_cv_lib_db=yes
17875         fi
17876 fi
17877
17878 if test $ol_cv_lib_db = no ; then
17879         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17880 echo "configure:17881: checking for Berkeley DB link (-ldb41)" >&5
17881 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17882   echo $ac_n "(cached) $ac_c" 1>&6
17883 else
17884   
17885         ol_DB_LIB=-ldb41
17886         ol_LIBS=$LIBS
17887         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17888
17889         cat > conftest.$ac_ext <<EOF
17890 #line 17891 "configure"
17891 #include "confdefs.h"
17892
17893 #ifdef HAVE_DB_185_H
17894 # include <db_185.h>
17895 #else
17896 # include <db.h>
17897 #endif
17898
17899 #ifndef DB_VERSION_MAJOR
17900 # define DB_VERSION_MAJOR 1
17901 #endif
17902
17903 #ifndef NULL
17904 #define NULL ((void*)0)
17905 #endif
17906
17907 int main() {
17908
17909 #if DB_VERSION_MAJOR > 1
17910         {
17911                 char *version;
17912                 int major, minor, patch;
17913
17914                 version = db_version( &major, &minor, &patch );
17915
17916                 if( major != DB_VERSION_MAJOR ||
17917                         minor < DB_VERSION_MINOR )
17918                 {
17919                         printf("Berkeley DB version mismatch\n"
17920                                 "\texpected: %s\n\tgot: %s\n",
17921                                 DB_VERSION_STRING, version);
17922                         return 1;
17923                 }
17924         }
17925 #endif
17926
17927 #if DB_VERSION_MAJOR > 2
17928         db_env_create( NULL, 0 );
17929 #elif DB_VERSION_MAJOR > 1
17930         db_appexit( NULL );
17931 #else
17932         (void) dbopen( NULL, 0, 0, 0, NULL);
17933 #endif
17934
17935 ; return 0; }
17936 EOF
17937 if { (eval echo configure:17938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17938   rm -rf conftest*
17939   ol_cv_db_db41=yes
17940 else
17941   echo "configure: failed program was:" >&5
17942   cat conftest.$ac_ext >&5
17943   rm -rf conftest*
17944   ol_cv_db_db41=no
17945 fi
17946 rm -f conftest*
17947
17948         LIBS="$ol_LIBS"
17949
17950 fi
17951
17952 echo "$ac_t""$ol_cv_db_db41" 1>&6
17953
17954         if test $ol_cv_db_db41 = yes ; then
17955                 ol_cv_lib_db=-ldb41
17956         fi
17957 fi
17958
17959 if test $ol_cv_lib_db = no ; then
17960         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17961 echo "configure:17962: checking for Berkeley DB link (-ldb-41)" >&5
17962 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17963   echo $ac_n "(cached) $ac_c" 1>&6
17964 else
17965   
17966         ol_DB_LIB=-ldb-41
17967         ol_LIBS=$LIBS
17968         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17969
17970         cat > conftest.$ac_ext <<EOF
17971 #line 17972 "configure"
17972 #include "confdefs.h"
17973
17974 #ifdef HAVE_DB_185_H
17975 # include <db_185.h>
17976 #else
17977 # include <db.h>
17978 #endif
17979
17980 #ifndef DB_VERSION_MAJOR
17981 # define DB_VERSION_MAJOR 1
17982 #endif
17983
17984 #ifndef NULL
17985 #define NULL ((void*)0)
17986 #endif
17987
17988 int main() {
17989
17990 #if DB_VERSION_MAJOR > 1
17991         {
17992                 char *version;
17993                 int major, minor, patch;
17994
17995                 version = db_version( &major, &minor, &patch );
17996
17997                 if( major != DB_VERSION_MAJOR ||
17998                         minor < DB_VERSION_MINOR )
17999                 {
18000                         printf("Berkeley DB version mismatch\n"
18001                                 "\texpected: %s\n\tgot: %s\n",
18002                                 DB_VERSION_STRING, version);
18003                         return 1;
18004                 }
18005         }
18006 #endif
18007
18008 #if DB_VERSION_MAJOR > 2
18009         db_env_create( NULL, 0 );
18010 #elif DB_VERSION_MAJOR > 1
18011         db_appexit( NULL );
18012 #else
18013         (void) dbopen( NULL, 0, 0, 0, NULL);
18014 #endif
18015
18016 ; return 0; }
18017 EOF
18018 if { (eval echo configure:18019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18019   rm -rf conftest*
18020   ol_cv_db_db_41=yes
18021 else
18022   echo "configure: failed program was:" >&5
18023   cat conftest.$ac_ext >&5
18024   rm -rf conftest*
18025   ol_cv_db_db_41=no
18026 fi
18027 rm -f conftest*
18028
18029         LIBS="$ol_LIBS"
18030
18031 fi
18032
18033 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18034
18035         if test $ol_cv_db_db_41 = yes ; then
18036                 ol_cv_lib_db=-ldb-41
18037         fi
18038 fi
18039
18040 if test $ol_cv_lib_db = no ; then
18041         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18042 echo "configure:18043: checking for Berkeley DB link (-ldb-4.1)" >&5
18043 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18044   echo $ac_n "(cached) $ac_c" 1>&6
18045 else
18046   
18047         ol_DB_LIB=-ldb-4.1
18048         ol_LIBS=$LIBS
18049         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18050
18051         cat > conftest.$ac_ext <<EOF
18052 #line 18053 "configure"
18053 #include "confdefs.h"
18054
18055 #ifdef HAVE_DB_185_H
18056 # include <db_185.h>
18057 #else
18058 # include <db.h>
18059 #endif
18060
18061 #ifndef DB_VERSION_MAJOR
18062 # define DB_VERSION_MAJOR 1
18063 #endif
18064
18065 #ifndef NULL
18066 #define NULL ((void*)0)
18067 #endif
18068
18069 int main() {
18070
18071 #if DB_VERSION_MAJOR > 1
18072         {
18073                 char *version;
18074                 int major, minor, patch;
18075
18076                 version = db_version( &major, &minor, &patch );
18077
18078                 if( major != DB_VERSION_MAJOR ||
18079                         minor < DB_VERSION_MINOR )
18080                 {
18081                         printf("Berkeley DB version mismatch\n"
18082                                 "\texpected: %s\n\tgot: %s\n",
18083                                 DB_VERSION_STRING, version);
18084                         return 1;
18085                 }
18086         }
18087 #endif
18088
18089 #if DB_VERSION_MAJOR > 2
18090         db_env_create( NULL, 0 );
18091 #elif DB_VERSION_MAJOR > 1
18092         db_appexit( NULL );
18093 #else
18094         (void) dbopen( NULL, 0, 0, 0, NULL);
18095 #endif
18096
18097 ; return 0; }
18098 EOF
18099 if { (eval echo configure:18100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18100   rm -rf conftest*
18101   ol_cv_db_db_4_dot_1=yes
18102 else
18103   echo "configure: failed program was:" >&5
18104   cat conftest.$ac_ext >&5
18105   rm -rf conftest*
18106   ol_cv_db_db_4_dot_1=no
18107 fi
18108 rm -f conftest*
18109
18110         LIBS="$ol_LIBS"
18111
18112 fi
18113
18114 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18115
18116         if test $ol_cv_db_db_4_dot_1 = yes ; then
18117                 ol_cv_lib_db=-ldb-4.1
18118         fi
18119 fi
18120
18121 if test $ol_cv_lib_db = no ; then
18122         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18123 echo "configure:18124: checking for Berkeley DB link (-ldb-4-1)" >&5
18124 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18125   echo $ac_n "(cached) $ac_c" 1>&6
18126 else
18127   
18128         ol_DB_LIB=-ldb-4-1
18129         ol_LIBS=$LIBS
18130         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18131
18132         cat > conftest.$ac_ext <<EOF
18133 #line 18134 "configure"
18134 #include "confdefs.h"
18135
18136 #ifdef HAVE_DB_185_H
18137 # include <db_185.h>
18138 #else
18139 # include <db.h>
18140 #endif
18141
18142 #ifndef DB_VERSION_MAJOR
18143 # define DB_VERSION_MAJOR 1
18144 #endif
18145
18146 #ifndef NULL
18147 #define NULL ((void*)0)
18148 #endif
18149
18150 int main() {
18151
18152 #if DB_VERSION_MAJOR > 1
18153         {
18154                 char *version;
18155                 int major, minor, patch;
18156
18157                 version = db_version( &major, &minor, &patch );
18158
18159                 if( major != DB_VERSION_MAJOR ||
18160                         minor < DB_VERSION_MINOR )
18161                 {
18162                         printf("Berkeley DB version mismatch\n"
18163                                 "\texpected: %s\n\tgot: %s\n",
18164                                 DB_VERSION_STRING, version);
18165                         return 1;
18166                 }
18167         }
18168 #endif
18169
18170 #if DB_VERSION_MAJOR > 2
18171         db_env_create( NULL, 0 );
18172 #elif DB_VERSION_MAJOR > 1
18173         db_appexit( NULL );
18174 #else
18175         (void) dbopen( NULL, 0, 0, 0, NULL);
18176 #endif
18177
18178 ; return 0; }
18179 EOF
18180 if { (eval echo configure:18181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18181   rm -rf conftest*
18182   ol_cv_db_db_4_1=yes
18183 else
18184   echo "configure: failed program was:" >&5
18185   cat conftest.$ac_ext >&5
18186   rm -rf conftest*
18187   ol_cv_db_db_4_1=no
18188 fi
18189 rm -f conftest*
18190
18191         LIBS="$ol_LIBS"
18192
18193 fi
18194
18195 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18196
18197         if test $ol_cv_db_db_4_1 = yes ; then
18198                 ol_cv_lib_db=-ldb-4-1
18199         fi
18200 fi
18201
18202 if test $ol_cv_lib_db = no ; then
18203         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18204 echo "configure:18205: checking for Berkeley DB link (-ldb-4)" >&5
18205 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18206   echo $ac_n "(cached) $ac_c" 1>&6
18207 else
18208   
18209         ol_DB_LIB=-ldb-4
18210         ol_LIBS=$LIBS
18211         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18212
18213         cat > conftest.$ac_ext <<EOF
18214 #line 18215 "configure"
18215 #include "confdefs.h"
18216
18217 #ifdef HAVE_DB_185_H
18218 # include <db_185.h>
18219 #else
18220 # include <db.h>
18221 #endif
18222
18223 #ifndef DB_VERSION_MAJOR
18224 # define DB_VERSION_MAJOR 1
18225 #endif
18226
18227 #ifndef NULL
18228 #define NULL ((void*)0)
18229 #endif
18230
18231 int main() {
18232
18233 #if DB_VERSION_MAJOR > 1
18234         {
18235                 char *version;
18236                 int major, minor, patch;
18237
18238                 version = db_version( &major, &minor, &patch );
18239
18240                 if( major != DB_VERSION_MAJOR ||
18241                         minor < DB_VERSION_MINOR )
18242                 {
18243                         printf("Berkeley DB version mismatch\n"
18244                                 "\texpected: %s\n\tgot: %s\n",
18245                                 DB_VERSION_STRING, version);
18246                         return 1;
18247                 }
18248         }
18249 #endif
18250
18251 #if DB_VERSION_MAJOR > 2
18252         db_env_create( NULL, 0 );
18253 #elif DB_VERSION_MAJOR > 1
18254         db_appexit( NULL );
18255 #else
18256         (void) dbopen( NULL, 0, 0, 0, NULL);
18257 #endif
18258
18259 ; return 0; }
18260 EOF
18261 if { (eval echo configure:18262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18262   rm -rf conftest*
18263   ol_cv_db_db_4=yes
18264 else
18265   echo "configure: failed program was:" >&5
18266   cat conftest.$ac_ext >&5
18267   rm -rf conftest*
18268   ol_cv_db_db_4=no
18269 fi
18270 rm -f conftest*
18271
18272         LIBS="$ol_LIBS"
18273
18274 fi
18275
18276 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18277
18278         if test $ol_cv_db_db_4 = yes ; then
18279                 ol_cv_lib_db=-ldb-4
18280         fi
18281 fi
18282
18283 if test $ol_cv_lib_db = no ; then
18284         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18285 echo "configure:18286: checking for Berkeley DB link (-ldb4)" >&5
18286 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18287   echo $ac_n "(cached) $ac_c" 1>&6
18288 else
18289   
18290         ol_DB_LIB=-ldb4
18291         ol_LIBS=$LIBS
18292         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18293
18294         cat > conftest.$ac_ext <<EOF
18295 #line 18296 "configure"
18296 #include "confdefs.h"
18297
18298 #ifdef HAVE_DB_185_H
18299 # include <db_185.h>
18300 #else
18301 # include <db.h>
18302 #endif
18303
18304 #ifndef DB_VERSION_MAJOR
18305 # define DB_VERSION_MAJOR 1
18306 #endif
18307
18308 #ifndef NULL
18309 #define NULL ((void*)0)
18310 #endif
18311
18312 int main() {
18313
18314 #if DB_VERSION_MAJOR > 1
18315         {
18316                 char *version;
18317                 int major, minor, patch;
18318
18319                 version = db_version( &major, &minor, &patch );
18320
18321                 if( major != DB_VERSION_MAJOR ||
18322                         minor < DB_VERSION_MINOR )
18323                 {
18324                         printf("Berkeley DB version mismatch\n"
18325                                 "\texpected: %s\n\tgot: %s\n",
18326                                 DB_VERSION_STRING, version);
18327                         return 1;
18328                 }
18329         }
18330 #endif
18331
18332 #if DB_VERSION_MAJOR > 2
18333         db_env_create( NULL, 0 );
18334 #elif DB_VERSION_MAJOR > 1
18335         db_appexit( NULL );
18336 #else
18337         (void) dbopen( NULL, 0, 0, 0, NULL);
18338 #endif
18339
18340 ; return 0; }
18341 EOF
18342 if { (eval echo configure:18343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18343   rm -rf conftest*
18344   ol_cv_db_db4=yes
18345 else
18346   echo "configure: failed program was:" >&5
18347   cat conftest.$ac_ext >&5
18348   rm -rf conftest*
18349   ol_cv_db_db4=no
18350 fi
18351 rm -f conftest*
18352
18353         LIBS="$ol_LIBS"
18354
18355 fi
18356
18357 echo "$ac_t""$ol_cv_db_db4" 1>&6
18358
18359         if test $ol_cv_db_db4 = yes ; then
18360                 ol_cv_lib_db=-ldb4
18361         fi
18362 fi
18363
18364 if test $ol_cv_lib_db = no ; then
18365         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18366 echo "configure:18367: checking for Berkeley DB link (-ldb)" >&5
18367 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18368   echo $ac_n "(cached) $ac_c" 1>&6
18369 else
18370   
18371         ol_DB_LIB=-ldb
18372         ol_LIBS=$LIBS
18373         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18374
18375         cat > conftest.$ac_ext <<EOF
18376 #line 18377 "configure"
18377 #include "confdefs.h"
18378
18379 #ifdef HAVE_DB_185_H
18380 # include <db_185.h>
18381 #else
18382 # include <db.h>
18383 #endif
18384
18385 #ifndef DB_VERSION_MAJOR
18386 # define DB_VERSION_MAJOR 1
18387 #endif
18388
18389 #ifndef NULL
18390 #define NULL ((void*)0)
18391 #endif
18392
18393 int main() {
18394
18395 #if DB_VERSION_MAJOR > 1
18396         {
18397                 char *version;
18398                 int major, minor, patch;
18399
18400                 version = db_version( &major, &minor, &patch );
18401
18402                 if( major != DB_VERSION_MAJOR ||
18403                         minor < DB_VERSION_MINOR )
18404                 {
18405                         printf("Berkeley DB version mismatch\n"
18406                                 "\texpected: %s\n\tgot: %s\n",
18407                                 DB_VERSION_STRING, version);
18408                         return 1;
18409                 }
18410         }
18411 #endif
18412
18413 #if DB_VERSION_MAJOR > 2
18414         db_env_create( NULL, 0 );
18415 #elif DB_VERSION_MAJOR > 1
18416         db_appexit( NULL );
18417 #else
18418         (void) dbopen( NULL, 0, 0, 0, NULL);
18419 #endif
18420
18421 ; return 0; }
18422 EOF
18423 if { (eval echo configure:18424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18424   rm -rf conftest*
18425   ol_cv_db_db=yes
18426 else
18427   echo "configure: failed program was:" >&5
18428   cat conftest.$ac_ext >&5
18429   rm -rf conftest*
18430   ol_cv_db_db=no
18431 fi
18432 rm -f conftest*
18433
18434         LIBS="$ol_LIBS"
18435
18436 fi
18437
18438 echo "$ac_t""$ol_cv_db_db" 1>&6
18439
18440         if test $ol_cv_db_db = yes ; then
18441                 ol_cv_lib_db=-ldb
18442         fi
18443 fi
18444
18445 if test $ol_cv_lib_db = no ; then
18446         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18447 echo "configure:18448: checking for Berkeley DB link (-ldb3)" >&5
18448 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18449   echo $ac_n "(cached) $ac_c" 1>&6
18450 else
18451   
18452         ol_DB_LIB=-ldb3
18453         ol_LIBS=$LIBS
18454         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18455
18456         cat > conftest.$ac_ext <<EOF
18457 #line 18458 "configure"
18458 #include "confdefs.h"
18459
18460 #ifdef HAVE_DB_185_H
18461 # include <db_185.h>
18462 #else
18463 # include <db.h>
18464 #endif
18465
18466 #ifndef DB_VERSION_MAJOR
18467 # define DB_VERSION_MAJOR 1
18468 #endif
18469
18470 #ifndef NULL
18471 #define NULL ((void*)0)
18472 #endif
18473
18474 int main() {
18475
18476 #if DB_VERSION_MAJOR > 1
18477         {
18478                 char *version;
18479                 int major, minor, patch;
18480
18481                 version = db_version( &major, &minor, &patch );
18482
18483                 if( major != DB_VERSION_MAJOR ||
18484                         minor < DB_VERSION_MINOR )
18485                 {
18486                         printf("Berkeley DB version mismatch\n"
18487                                 "\texpected: %s\n\tgot: %s\n",
18488                                 DB_VERSION_STRING, version);
18489                         return 1;
18490                 }
18491         }
18492 #endif
18493
18494 #if DB_VERSION_MAJOR > 2
18495         db_env_create( NULL, 0 );
18496 #elif DB_VERSION_MAJOR > 1
18497         db_appexit( NULL );
18498 #else
18499         (void) dbopen( NULL, 0, 0, 0, NULL);
18500 #endif
18501
18502 ; return 0; }
18503 EOF
18504 if { (eval echo configure:18505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18505   rm -rf conftest*
18506   ol_cv_db_db3=yes
18507 else
18508   echo "configure: failed program was:" >&5
18509   cat conftest.$ac_ext >&5
18510   rm -rf conftest*
18511   ol_cv_db_db3=no
18512 fi
18513 rm -f conftest*
18514
18515         LIBS="$ol_LIBS"
18516
18517 fi
18518
18519 echo "$ac_t""$ol_cv_db_db3" 1>&6
18520
18521         if test $ol_cv_db_db3 = yes ; then
18522                 ol_cv_lib_db=-ldb3
18523         fi
18524 fi
18525
18526 if test $ol_cv_lib_db = no ; then
18527         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18528 echo "configure:18529: checking for Berkeley DB link (-ldb-3)" >&5
18529 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18530   echo $ac_n "(cached) $ac_c" 1>&6
18531 else
18532   
18533         ol_DB_LIB=-ldb-3
18534         ol_LIBS=$LIBS
18535         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18536
18537         cat > conftest.$ac_ext <<EOF
18538 #line 18539 "configure"
18539 #include "confdefs.h"
18540
18541 #ifdef HAVE_DB_185_H
18542 # include <db_185.h>
18543 #else
18544 # include <db.h>
18545 #endif
18546
18547 #ifndef DB_VERSION_MAJOR
18548 # define DB_VERSION_MAJOR 1
18549 #endif
18550
18551 #ifndef NULL
18552 #define NULL ((void*)0)
18553 #endif
18554
18555 int main() {
18556
18557 #if DB_VERSION_MAJOR > 1
18558         {
18559                 char *version;
18560                 int major, minor, patch;
18561
18562                 version = db_version( &major, &minor, &patch );
18563
18564                 if( major != DB_VERSION_MAJOR ||
18565                         minor < DB_VERSION_MINOR )
18566                 {
18567                         printf("Berkeley DB version mismatch\n"
18568                                 "\texpected: %s\n\tgot: %s\n",
18569                                 DB_VERSION_STRING, version);
18570                         return 1;
18571                 }
18572         }
18573 #endif
18574
18575 #if DB_VERSION_MAJOR > 2
18576         db_env_create( NULL, 0 );
18577 #elif DB_VERSION_MAJOR > 1
18578         db_appexit( NULL );
18579 #else
18580         (void) dbopen( NULL, 0, 0, 0, NULL);
18581 #endif
18582
18583 ; return 0; }
18584 EOF
18585 if { (eval echo configure:18586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18586   rm -rf conftest*
18587   ol_cv_db_db_3=yes
18588 else
18589   echo "configure: failed program was:" >&5
18590   cat conftest.$ac_ext >&5
18591   rm -rf conftest*
18592   ol_cv_db_db_3=no
18593 fi
18594 rm -f conftest*
18595
18596         LIBS="$ol_LIBS"
18597
18598 fi
18599
18600 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18601
18602         if test $ol_cv_db_db_3 = yes ; then
18603                 ol_cv_lib_db=-ldb-3
18604         fi
18605 fi
18606
18607 if test $ol_cv_lib_db = no ; then
18608         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18609 echo "configure:18610: checking for Berkeley DB link (-ldb2)" >&5
18610 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18611   echo $ac_n "(cached) $ac_c" 1>&6
18612 else
18613   
18614         ol_DB_LIB=-ldb2
18615         ol_LIBS=$LIBS
18616         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18617
18618         cat > conftest.$ac_ext <<EOF
18619 #line 18620 "configure"
18620 #include "confdefs.h"
18621
18622 #ifdef HAVE_DB_185_H
18623 # include <db_185.h>
18624 #else
18625 # include <db.h>
18626 #endif
18627
18628 #ifndef DB_VERSION_MAJOR
18629 # define DB_VERSION_MAJOR 1
18630 #endif
18631
18632 #ifndef NULL
18633 #define NULL ((void*)0)
18634 #endif
18635
18636 int main() {
18637
18638 #if DB_VERSION_MAJOR > 1
18639         {
18640                 char *version;
18641                 int major, minor, patch;
18642
18643                 version = db_version( &major, &minor, &patch );
18644
18645                 if( major != DB_VERSION_MAJOR ||
18646                         minor < DB_VERSION_MINOR )
18647                 {
18648                         printf("Berkeley DB version mismatch\n"
18649                                 "\texpected: %s\n\tgot: %s\n",
18650                                 DB_VERSION_STRING, version);
18651                         return 1;
18652                 }
18653         }
18654 #endif
18655
18656 #if DB_VERSION_MAJOR > 2
18657         db_env_create( NULL, 0 );
18658 #elif DB_VERSION_MAJOR > 1
18659         db_appexit( NULL );
18660 #else
18661         (void) dbopen( NULL, 0, 0, 0, NULL);
18662 #endif
18663
18664 ; return 0; }
18665 EOF
18666 if { (eval echo configure:18667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18667   rm -rf conftest*
18668   ol_cv_db_db2=yes
18669 else
18670   echo "configure: failed program was:" >&5
18671   cat conftest.$ac_ext >&5
18672   rm -rf conftest*
18673   ol_cv_db_db2=no
18674 fi
18675 rm -f conftest*
18676
18677         LIBS="$ol_LIBS"
18678
18679 fi
18680
18681 echo "$ac_t""$ol_cv_db_db2" 1>&6
18682
18683         if test $ol_cv_db_db2 = yes ; then
18684                 ol_cv_lib_db=-ldb2
18685         fi
18686 fi
18687
18688 if test $ol_cv_lib_db = no ; then
18689         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18690 echo "configure:18691: checking for Berkeley DB link (-ldb-2)" >&5
18691 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18692   echo $ac_n "(cached) $ac_c" 1>&6
18693 else
18694   
18695         ol_DB_LIB=-ldb-2
18696         ol_LIBS=$LIBS
18697         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18698
18699         cat > conftest.$ac_ext <<EOF
18700 #line 18701 "configure"
18701 #include "confdefs.h"
18702
18703 #ifdef HAVE_DB_185_H
18704 # include <db_185.h>
18705 #else
18706 # include <db.h>
18707 #endif
18708
18709 #ifndef DB_VERSION_MAJOR
18710 # define DB_VERSION_MAJOR 1
18711 #endif
18712
18713 #ifndef NULL
18714 #define NULL ((void*)0)
18715 #endif
18716
18717 int main() {
18718
18719 #if DB_VERSION_MAJOR > 1
18720         {
18721                 char *version;
18722                 int major, minor, patch;
18723
18724                 version = db_version( &major, &minor, &patch );
18725
18726                 if( major != DB_VERSION_MAJOR ||
18727                         minor < DB_VERSION_MINOR )
18728                 {
18729                         printf("Berkeley DB version mismatch\n"
18730                                 "\texpected: %s\n\tgot: %s\n",
18731                                 DB_VERSION_STRING, version);
18732                         return 1;
18733                 }
18734         }
18735 #endif
18736
18737 #if DB_VERSION_MAJOR > 2
18738         db_env_create( NULL, 0 );
18739 #elif DB_VERSION_MAJOR > 1
18740         db_appexit( NULL );
18741 #else
18742         (void) dbopen( NULL, 0, 0, 0, NULL);
18743 #endif
18744
18745 ; return 0; }
18746 EOF
18747 if { (eval echo configure:18748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18748   rm -rf conftest*
18749   ol_cv_db_db_2=yes
18750 else
18751   echo "configure: failed program was:" >&5
18752   cat conftest.$ac_ext >&5
18753   rm -rf conftest*
18754   ol_cv_db_db_2=no
18755 fi
18756 rm -f conftest*
18757
18758         LIBS="$ol_LIBS"
18759
18760 fi
18761
18762 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18763
18764         if test $ol_cv_db_db_2 = yes ; then
18765                 ol_cv_lib_db=-ldb-2
18766         fi
18767 fi
18768
18769 if test $ol_cv_lib_db = no ; then
18770         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18771 echo "configure:18772: checking for Berkeley DB link (-ldb1)" >&5
18772 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18773   echo $ac_n "(cached) $ac_c" 1>&6
18774 else
18775   
18776         ol_DB_LIB=-ldb1
18777         ol_LIBS=$LIBS
18778         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18779
18780         cat > conftest.$ac_ext <<EOF
18781 #line 18782 "configure"
18782 #include "confdefs.h"
18783
18784 #ifdef HAVE_DB_185_H
18785 # include <db_185.h>
18786 #else
18787 # include <db.h>
18788 #endif
18789
18790 #ifndef DB_VERSION_MAJOR
18791 # define DB_VERSION_MAJOR 1
18792 #endif
18793
18794 #ifndef NULL
18795 #define NULL ((void*)0)
18796 #endif
18797
18798 int main() {
18799
18800 #if DB_VERSION_MAJOR > 1
18801         {
18802                 char *version;
18803                 int major, minor, patch;
18804
18805                 version = db_version( &major, &minor, &patch );
18806
18807                 if( major != DB_VERSION_MAJOR ||
18808                         minor < DB_VERSION_MINOR )
18809                 {
18810                         printf("Berkeley DB version mismatch\n"
18811                                 "\texpected: %s\n\tgot: %s\n",
18812                                 DB_VERSION_STRING, version);
18813                         return 1;
18814                 }
18815         }
18816 #endif
18817
18818 #if DB_VERSION_MAJOR > 2
18819         db_env_create( NULL, 0 );
18820 #elif DB_VERSION_MAJOR > 1
18821         db_appexit( NULL );
18822 #else
18823         (void) dbopen( NULL, 0, 0, 0, NULL);
18824 #endif
18825
18826 ; return 0; }
18827 EOF
18828 if { (eval echo configure:18829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18829   rm -rf conftest*
18830   ol_cv_db_db1=yes
18831 else
18832   echo "configure: failed program was:" >&5
18833   cat conftest.$ac_ext >&5
18834   rm -rf conftest*
18835   ol_cv_db_db1=no
18836 fi
18837 rm -f conftest*
18838
18839         LIBS="$ol_LIBS"
18840
18841 fi
18842
18843 echo "$ac_t""$ol_cv_db_db1" 1>&6
18844
18845         if test $ol_cv_db_db1 = yes ; then
18846                 ol_cv_lib_db=-ldb1
18847         fi
18848 fi
18849
18850 if test $ol_cv_lib_db = no ; then
18851         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18852 echo "configure:18853: checking for Berkeley DB link (-ldb-1)" >&5
18853 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18854   echo $ac_n "(cached) $ac_c" 1>&6
18855 else
18856   
18857         ol_DB_LIB=-ldb-1
18858         ol_LIBS=$LIBS
18859         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18860
18861         cat > conftest.$ac_ext <<EOF
18862 #line 18863 "configure"
18863 #include "confdefs.h"
18864
18865 #ifdef HAVE_DB_185_H
18866 # include <db_185.h>
18867 #else
18868 # include <db.h>
18869 #endif
18870
18871 #ifndef DB_VERSION_MAJOR
18872 # define DB_VERSION_MAJOR 1
18873 #endif
18874
18875 #ifndef NULL
18876 #define NULL ((void*)0)
18877 #endif
18878
18879 int main() {
18880
18881 #if DB_VERSION_MAJOR > 1
18882         {
18883                 char *version;
18884                 int major, minor, patch;
18885
18886                 version = db_version( &major, &minor, &patch );
18887
18888                 if( major != DB_VERSION_MAJOR ||
18889                         minor < DB_VERSION_MINOR )
18890                 {
18891                         printf("Berkeley DB version mismatch\n"
18892                                 "\texpected: %s\n\tgot: %s\n",
18893                                 DB_VERSION_STRING, version);
18894                         return 1;
18895                 }
18896         }
18897 #endif
18898
18899 #if DB_VERSION_MAJOR > 2
18900         db_env_create( NULL, 0 );
18901 #elif DB_VERSION_MAJOR > 1
18902         db_appexit( NULL );
18903 #else
18904         (void) dbopen( NULL, 0, 0, 0, NULL);
18905 #endif
18906
18907 ; return 0; }
18908 EOF
18909 if { (eval echo configure:18910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18910   rm -rf conftest*
18911   ol_cv_db_db_1=yes
18912 else
18913   echo "configure: failed program was:" >&5
18914   cat conftest.$ac_ext >&5
18915   rm -rf conftest*
18916   ol_cv_db_db_1=no
18917 fi
18918 rm -f conftest*
18919
18920         LIBS="$ol_LIBS"
18921
18922 fi
18923
18924 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18925
18926         if test $ol_cv_db_db_1 = yes ; then
18927                 ol_cv_lib_db=-ldb-1
18928         fi
18929 fi
18930
18931
18932         if test "$ol_cv_lib_db" != no ; then
18933                 ol_cv_berkeley_db=yes
18934                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18935 echo "configure:18936: checking for Berkeley DB thread support" >&5
18936 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18937   echo $ac_n "(cached) $ac_c" 1>&6
18938 else
18939   
18940         ol_LIBS="$LIBS"
18941         LIBS="$LTHREAD_LIBS $LIBS"
18942         if test $ol_cv_lib_db != yes ; then
18943                 LIBS="$ol_cv_lib_db $LIBS"
18944         fi
18945
18946         if test "$cross_compiling" = yes; then
18947   ol_cv_berkeley_db_thread=cross
18948 else
18949   cat > conftest.$ac_ext <<EOF
18950 #line 18951 "configure"
18951 #include "confdefs.h"
18952
18953 #ifdef HAVE_DB_185_H
18954         choke me;
18955 #else
18956 #include <db.h>
18957 #endif
18958 #ifndef NULL
18959 #define NULL ((void *)0)
18960 #endif
18961 main()
18962 {
18963         int rc;
18964         u_int32_t flags = DB_CREATE |
18965 #ifdef DB_PRIVATE
18966                 DB_PRIVATE |
18967 #endif
18968                 DB_THREAD;
18969
18970 #if DB_VERSION_MAJOR > 2
18971         DB_ENV *env = NULL;
18972
18973         rc = db_env_create( &env, 0 );
18974
18975         flags |= DB_INIT_MPOOL;
18976 #ifdef DB_MPOOL_PRIVATE
18977         flags |= DB_MPOOL_PRIVATE;
18978 #endif
18979
18980         if( rc ) {
18981                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18982                 return rc;
18983         }
18984
18985 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18986         rc = env->open( env, NULL, flags, 0 );
18987 #else
18988         rc = env->open( env, NULL, NULL, flags, 0 );
18989 #endif
18990
18991         if ( rc == 0 ) {
18992                 rc = env->close( env, 0 );
18993         }
18994
18995         if( rc ) {
18996                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18997                 return rc;
18998         }
18999
19000 #else
19001         DB_ENV env;
19002         memset( &env, '\0', sizeof(env) );
19003
19004         rc = db_appinit( NULL, NULL, &env, flags );
19005
19006         if( rc == 0 ) {
19007                 db_appexit( &env );
19008         }
19009
19010         unlink("__db_mpool.share");
19011         unlink("__db_lock.share");
19012 #endif
19013
19014         return rc;
19015 }
19016 EOF
19017 if { (eval echo configure:19018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19018 then
19019   ol_cv_berkeley_db_thread=yes
19020 else
19021   echo "configure: failed program was:" >&5
19022   cat conftest.$ac_ext >&5
19023   rm -fr conftest*
19024   ol_cv_berkeley_db_thread=no
19025 fi
19026 rm -fr conftest*
19027 fi
19028
19029
19030         LIBS="$ol_LIBS"
19031
19032 fi
19033
19034 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19035
19036         if test $ol_cv_berkeley_db_thread != no ; then
19037                 cat >> confdefs.h <<\EOF
19038 #define HAVE_BERKELEY_DB_THREAD 1
19039 EOF
19040
19041         fi
19042
19043         fi
19044 fi
19045
19046         fi
19047
19048         if test $ol_cv_berkeley_db != no ; then
19049                 cat >> confdefs.h <<\EOF
19050 #define HAVE_BERKELEY_DB 1
19051 EOF
19052
19053
19054                 ol_link_ldbm=berkeley
19055                 ol_with_ldbm_api=berkeley
19056
19057                 if test $ol_with_ldbm_type = hash ; then
19058                         cat >> confdefs.h <<\EOF
19059 #define LDBM_USE_DBHASH 1
19060 EOF
19061
19062                 else
19063                         cat >> confdefs.h <<\EOF
19064 #define LDBM_USE_DBBTREE 1
19065 EOF
19066
19067                 fi
19068
19069                                                 if test $ol_cv_lib_db != yes ; then
19070                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19071                 fi
19072         fi
19073 fi
19074
19075 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19076         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19077 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19078         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19079 echo "configure:19080: checking Berkeley DB version for BDB backend" >&5
19080 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19081   echo $ac_n "(cached) $ac_c" 1>&6
19082 else
19083   
19084         cat > conftest.$ac_ext <<EOF
19085 #line 19086 "configure"
19086 #include "confdefs.h"
19087
19088 #include <db.h>
19089
19090  /* this check could be improved */
19091 #ifndef DB_VERSION_MAJOR
19092 #       define DB_VERSION_MAJOR 1
19093 #endif
19094 #ifndef DB_VERSION_MINOR
19095 #       define DB_VERSION_MINOR 0
19096 #endif
19097
19098 /* require 4.1 or later */
19099 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
19100         __db_version_compat
19101 #endif
19102         
19103 EOF
19104 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19105   egrep "__db_version_compat" >/dev/null 2>&1; then
19106   rm -rf conftest*
19107   ol_cv_bdb_compat=yes
19108 else
19109   rm -rf conftest*
19110   ol_cv_bdb_compat=no
19111 fi
19112 rm -f conftest*
19113
19114 fi
19115
19116 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19117
19118
19119         if test $ol_cv_bdb_compat = yes ; then
19120                 ol_enable_bdb=yes
19121         elif test $ol_enable_bdb = yes ; then
19122                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19123         else
19124                 ol_enable_bdb=no
19125         fi
19126 fi
19127 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19128         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19129 fi
19130
19131 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19132         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19133         ol_with_ldbm_api=none
19134 fi
19135
19136 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19137         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19138 echo "configure:19139: checking for MDBM library" >&5
19139 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19140   echo $ac_n "(cached) $ac_c" 1>&6
19141 else
19142         ol_LIBS="$LIBS"
19143         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19144 echo "configure:19145: checking for mdbm_set_chain" >&5
19145 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19146   echo $ac_n "(cached) $ac_c" 1>&6
19147 else
19148   cat > conftest.$ac_ext <<EOF
19149 #line 19150 "configure"
19150 #include "confdefs.h"
19151 /* System header to define __stub macros and hopefully few prototypes,
19152     which can conflict with char mdbm_set_chain(); below.  */
19153 #include <assert.h>
19154 /* Override any gcc2 internal prototype to avoid an error.  */
19155 /* We use char because int might match the return type of a gcc2
19156     builtin and then its argument prototype would still apply.  */
19157 char mdbm_set_chain();
19158 char (*f)();
19159
19160 int main() {
19161
19162 /* The GNU C library defines this for functions which it implements
19163     to always fail with ENOSYS.  Some functions are actually named
19164     something starting with __ and the normal name is an alias.  */
19165 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19166 choke me
19167 #else
19168 f = mdbm_set_chain;
19169 #endif
19170
19171 ; return 0; }
19172 EOF
19173 if { (eval echo configure:19174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19174   rm -rf conftest*
19175   eval "ac_cv_func_mdbm_set_chain=yes"
19176 else
19177   echo "configure: failed program was:" >&5
19178   cat conftest.$ac_ext >&5
19179   rm -rf conftest*
19180   eval "ac_cv_func_mdbm_set_chain=no"
19181 fi
19182 rm -f conftest*
19183 fi
19184
19185 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19186   echo "$ac_t""yes" 1>&6
19187   ol_cv_lib_mdbm=yes
19188 else
19189   echo "$ac_t""no" 1>&6
19190
19191                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19192 echo "configure:19193: checking for mdbm_set_chain in -lmdbm" >&5
19193 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19194 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19195   echo $ac_n "(cached) $ac_c" 1>&6
19196 else
19197   ac_save_LIBS="$LIBS"
19198 LIBS="-lmdbm  $LIBS"
19199 cat > conftest.$ac_ext <<EOF
19200 #line 19201 "configure"
19201 #include "confdefs.h"
19202 /* Override any gcc2 internal prototype to avoid an error.  */
19203 /* We use char because int might match the return type of a gcc2
19204     builtin and then its argument prototype would still apply.  */
19205 char mdbm_set_chain();
19206
19207 int main() {
19208 mdbm_set_chain()
19209 ; return 0; }
19210 EOF
19211 if { (eval echo configure:19212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19212   rm -rf conftest*
19213   eval "ac_cv_lib_$ac_lib_var=yes"
19214 else
19215   echo "configure: failed program was:" >&5
19216   cat conftest.$ac_ext >&5
19217   rm -rf conftest*
19218   eval "ac_cv_lib_$ac_lib_var=no"
19219 fi
19220 rm -f conftest*
19221 LIBS="$ac_save_LIBS"
19222
19223 fi
19224 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19225   echo "$ac_t""yes" 1>&6
19226   ol_cv_lib_mdbm=-lmdbm
19227 else
19228   echo "$ac_t""no" 1>&6
19229 ol_cv_lib_mdbm=no
19230 fi
19231
19232         
19233 fi
19234
19235         LIBS="$ol_LIBS"
19236
19237 fi
19238
19239 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19240
19241
19242  for ac_hdr in mdbm.h
19243 do
19244 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19245 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19246 echo "configure:19247: checking for $ac_hdr" >&5
19247 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19248   echo $ac_n "(cached) $ac_c" 1>&6
19249 else
19250   cat > conftest.$ac_ext <<EOF
19251 #line 19252 "configure"
19252 #include "confdefs.h"
19253 #include <$ac_hdr>
19254 EOF
19255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19256 { (eval echo configure:19257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19258 if test -z "$ac_err"; then
19259   rm -rf conftest*
19260   eval "ac_cv_header_$ac_safe=yes"
19261 else
19262   echo "$ac_err" >&5
19263   echo "configure: failed program was:" >&5
19264   cat conftest.$ac_ext >&5
19265   rm -rf conftest*
19266   eval "ac_cv_header_$ac_safe=no"
19267 fi
19268 rm -f conftest*
19269 fi
19270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19271   echo "$ac_t""yes" 1>&6
19272     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19273   cat >> confdefs.h <<EOF
19274 #define $ac_tr_hdr 1
19275 EOF
19276  
19277 else
19278   echo "$ac_t""no" 1>&6
19279 fi
19280 done
19281
19282  echo $ac_n "checking for db""... $ac_c" 1>&6
19283 echo "configure:19284: checking for db" >&5
19284 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19285   echo $ac_n "(cached) $ac_c" 1>&6
19286 else
19287   
19288         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19289                 ol_cv_mdbm=no
19290         else
19291                 ol_cv_mdbm=yes
19292         fi
19293
19294 fi
19295
19296 echo "$ac_t""$ol_cv_mdbm" 1>&6
19297  if test $ol_cv_mdbm = yes ; then
19298         cat >> confdefs.h <<\EOF
19299 #define HAVE_MDBM 1
19300 EOF
19301
19302  fi
19303
19304
19305         if test $ol_cv_mdbm = yes ; then
19306                 ol_link_ldbm=mdbm
19307                 ol_with_ldbm_api=mdbm
19308                 if test $ol_cv_lib_mdbm != yes ; then
19309                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19310                 fi
19311         fi
19312 fi
19313
19314 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19315         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19316 echo "configure:19317: checking for GDBM library" >&5
19317 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19318   echo $ac_n "(cached) $ac_c" 1>&6
19319 else
19320         ol_LIBS="$LIBS"
19321         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19322 echo "configure:19323: checking for gdbm_open" >&5
19323 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19324   echo $ac_n "(cached) $ac_c" 1>&6
19325 else
19326   cat > conftest.$ac_ext <<EOF
19327 #line 19328 "configure"
19328 #include "confdefs.h"
19329 /* System header to define __stub macros and hopefully few prototypes,
19330     which can conflict with char gdbm_open(); below.  */
19331 #include <assert.h>
19332 /* Override any gcc2 internal prototype to avoid an error.  */
19333 /* We use char because int might match the return type of a gcc2
19334     builtin and then its argument prototype would still apply.  */
19335 char gdbm_open();
19336 char (*f)();
19337
19338 int main() {
19339
19340 /* The GNU C library defines this for functions which it implements
19341     to always fail with ENOSYS.  Some functions are actually named
19342     something starting with __ and the normal name is an alias.  */
19343 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19344 choke me
19345 #else
19346 f = gdbm_open;
19347 #endif
19348
19349 ; return 0; }
19350 EOF
19351 if { (eval echo configure:19352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19352   rm -rf conftest*
19353   eval "ac_cv_func_gdbm_open=yes"
19354 else
19355   echo "configure: failed program was:" >&5
19356   cat conftest.$ac_ext >&5
19357   rm -rf conftest*
19358   eval "ac_cv_func_gdbm_open=no"
19359 fi
19360 rm -f conftest*
19361 fi
19362
19363 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19364   echo "$ac_t""yes" 1>&6
19365   ol_cv_lib_gdbm=yes
19366 else
19367   echo "$ac_t""no" 1>&6
19368
19369                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19370 echo "configure:19371: checking for gdbm_open in -lgdbm" >&5
19371 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19372 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19373   echo $ac_n "(cached) $ac_c" 1>&6
19374 else
19375   ac_save_LIBS="$LIBS"
19376 LIBS="-lgdbm  $LIBS"
19377 cat > conftest.$ac_ext <<EOF
19378 #line 19379 "configure"
19379 #include "confdefs.h"
19380 /* Override any gcc2 internal prototype to avoid an error.  */
19381 /* We use char because int might match the return type of a gcc2
19382     builtin and then its argument prototype would still apply.  */
19383 char gdbm_open();
19384
19385 int main() {
19386 gdbm_open()
19387 ; return 0; }
19388 EOF
19389 if { (eval echo configure:19390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19390   rm -rf conftest*
19391   eval "ac_cv_lib_$ac_lib_var=yes"
19392 else
19393   echo "configure: failed program was:" >&5
19394   cat conftest.$ac_ext >&5
19395   rm -rf conftest*
19396   eval "ac_cv_lib_$ac_lib_var=no"
19397 fi
19398 rm -f conftest*
19399 LIBS="$ac_save_LIBS"
19400
19401 fi
19402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19403   echo "$ac_t""yes" 1>&6
19404   ol_cv_lib_gdbm=-lgdbm
19405 else
19406   echo "$ac_t""no" 1>&6
19407 ol_cv_lib_gdbm=no
19408 fi
19409
19410         
19411 fi
19412
19413         LIBS="$ol_LIBS"
19414
19415 fi
19416
19417 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19418
19419
19420  for ac_hdr in gdbm.h
19421 do
19422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19424 echo "configure:19425: checking for $ac_hdr" >&5
19425 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19426   echo $ac_n "(cached) $ac_c" 1>&6
19427 else
19428   cat > conftest.$ac_ext <<EOF
19429 #line 19430 "configure"
19430 #include "confdefs.h"
19431 #include <$ac_hdr>
19432 EOF
19433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19434 { (eval echo configure:19435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19436 if test -z "$ac_err"; then
19437   rm -rf conftest*
19438   eval "ac_cv_header_$ac_safe=yes"
19439 else
19440   echo "$ac_err" >&5
19441   echo "configure: failed program was:" >&5
19442   cat conftest.$ac_ext >&5
19443   rm -rf conftest*
19444   eval "ac_cv_header_$ac_safe=no"
19445 fi
19446 rm -f conftest*
19447 fi
19448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19449   echo "$ac_t""yes" 1>&6
19450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19451   cat >> confdefs.h <<EOF
19452 #define $ac_tr_hdr 1
19453 EOF
19454  
19455 else
19456   echo "$ac_t""no" 1>&6
19457 fi
19458 done
19459
19460  echo $ac_n "checking for db""... $ac_c" 1>&6
19461 echo "configure:19462: checking for db" >&5
19462 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19463   echo $ac_n "(cached) $ac_c" 1>&6
19464 else
19465   
19466         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19467                 ol_cv_gdbm=no
19468         else
19469                 ol_cv_gdbm=yes
19470         fi
19471
19472 fi
19473
19474 echo "$ac_t""$ol_cv_gdbm" 1>&6
19475  if test $ol_cv_gdbm = yes ; then
19476         cat >> confdefs.h <<\EOF
19477 #define HAVE_GDBM 1
19478 EOF
19479
19480  fi
19481
19482
19483         if test $ol_cv_gdbm = yes ; then
19484                 ol_link_ldbm=gdbm
19485                 ol_with_ldbm_api=gdbm
19486
19487                 if test $ol_cv_lib_gdbm != yes ; then
19488                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19489                 fi
19490         fi
19491 fi
19492
19493 if test $ol_with_ldbm_api = ndbm ; then
19494         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19495 echo "configure:19496: checking for NDBM library" >&5
19496 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19497   echo $ac_n "(cached) $ac_c" 1>&6
19498 else
19499         ol_LIBS="$LIBS"
19500         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19501 echo "configure:19502: checking for dbm_open" >&5
19502 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19503   echo $ac_n "(cached) $ac_c" 1>&6
19504 else
19505   cat > conftest.$ac_ext <<EOF
19506 #line 19507 "configure"
19507 #include "confdefs.h"
19508 /* System header to define __stub macros and hopefully few prototypes,
19509     which can conflict with char dbm_open(); below.  */
19510 #include <assert.h>
19511 /* Override any gcc2 internal prototype to avoid an error.  */
19512 /* We use char because int might match the return type of a gcc2
19513     builtin and then its argument prototype would still apply.  */
19514 char dbm_open();
19515 char (*f)();
19516
19517 int main() {
19518
19519 /* The GNU C library defines this for functions which it implements
19520     to always fail with ENOSYS.  Some functions are actually named
19521     something starting with __ and the normal name is an alias.  */
19522 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19523 choke me
19524 #else
19525 f = dbm_open;
19526 #endif
19527
19528 ; return 0; }
19529 EOF
19530 if { (eval echo configure:19531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19531   rm -rf conftest*
19532   eval "ac_cv_func_dbm_open=yes"
19533 else
19534   echo "configure: failed program was:" >&5
19535   cat conftest.$ac_ext >&5
19536   rm -rf conftest*
19537   eval "ac_cv_func_dbm_open=no"
19538 fi
19539 rm -f conftest*
19540 fi
19541
19542 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19543   echo "$ac_t""yes" 1>&6
19544   ol_cv_lib_ndbm=yes
19545 else
19546   echo "$ac_t""no" 1>&6
19547
19548                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19549 echo "configure:19550: checking for dbm_open in -lndbm" >&5
19550 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19551 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19552   echo $ac_n "(cached) $ac_c" 1>&6
19553 else
19554   ac_save_LIBS="$LIBS"
19555 LIBS="-lndbm  $LIBS"
19556 cat > conftest.$ac_ext <<EOF
19557 #line 19558 "configure"
19558 #include "confdefs.h"
19559 /* Override any gcc2 internal prototype to avoid an error.  */
19560 /* We use char because int might match the return type of a gcc2
19561     builtin and then its argument prototype would still apply.  */
19562 char dbm_open();
19563
19564 int main() {
19565 dbm_open()
19566 ; return 0; }
19567 EOF
19568 if { (eval echo configure:19569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19569   rm -rf conftest*
19570   eval "ac_cv_lib_$ac_lib_var=yes"
19571 else
19572   echo "configure: failed program was:" >&5
19573   cat conftest.$ac_ext >&5
19574   rm -rf conftest*
19575   eval "ac_cv_lib_$ac_lib_var=no"
19576 fi
19577 rm -f conftest*
19578 LIBS="$ac_save_LIBS"
19579
19580 fi
19581 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19582   echo "$ac_t""yes" 1>&6
19583   ol_cv_lib_ndbm=-lndbm
19584 else
19585   echo "$ac_t""no" 1>&6
19586
19587                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19588 echo "configure:19589: checking for dbm_open in -ldbm" >&5
19589 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19590 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19591   echo $ac_n "(cached) $ac_c" 1>&6
19592 else
19593   ac_save_LIBS="$LIBS"
19594 LIBS="-ldbm  $LIBS"
19595 cat > conftest.$ac_ext <<EOF
19596 #line 19597 "configure"
19597 #include "confdefs.h"
19598 /* Override any gcc2 internal prototype to avoid an error.  */
19599 /* We use char because int might match the return type of a gcc2
19600     builtin and then its argument prototype would still apply.  */
19601 char dbm_open();
19602
19603 int main() {
19604 dbm_open()
19605 ; return 0; }
19606 EOF
19607 if { (eval echo configure:19608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19608   rm -rf conftest*
19609   eval "ac_cv_lib_$ac_lib_var=yes"
19610 else
19611   echo "configure: failed program was:" >&5
19612   cat conftest.$ac_ext >&5
19613   rm -rf conftest*
19614   eval "ac_cv_lib_$ac_lib_var=no"
19615 fi
19616 rm -f conftest*
19617 LIBS="$ac_save_LIBS"
19618
19619 fi
19620 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19621   echo "$ac_t""yes" 1>&6
19622   ol_cv_lib_ndbm=-ldbm
19623 else
19624   echo "$ac_t""no" 1>&6
19625 ol_cv_lib_ndbm=no
19626 fi
19627                 
19628 fi
19629
19630         
19631 fi
19632
19633         LIBS="$ol_LIBS"
19634
19635 fi
19636
19637 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19638
19639
19640  for ac_hdr in ndbm.h
19641 do
19642 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19643 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19644 echo "configure:19645: checking for $ac_hdr" >&5
19645 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19646   echo $ac_n "(cached) $ac_c" 1>&6
19647 else
19648   cat > conftest.$ac_ext <<EOF
19649 #line 19650 "configure"
19650 #include "confdefs.h"
19651 #include <$ac_hdr>
19652 EOF
19653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19654 { (eval echo configure:19655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19656 if test -z "$ac_err"; then
19657   rm -rf conftest*
19658   eval "ac_cv_header_$ac_safe=yes"
19659 else
19660   echo "$ac_err" >&5
19661   echo "configure: failed program was:" >&5
19662   cat conftest.$ac_ext >&5
19663   rm -rf conftest*
19664   eval "ac_cv_header_$ac_safe=no"
19665 fi
19666 rm -f conftest*
19667 fi
19668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19669   echo "$ac_t""yes" 1>&6
19670     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19671   cat >> confdefs.h <<EOF
19672 #define $ac_tr_hdr 1
19673 EOF
19674  
19675 else
19676   echo "$ac_t""no" 1>&6
19677 fi
19678 done
19679
19680  echo $ac_n "checking for db""... $ac_c" 1>&6
19681 echo "configure:19682: checking for db" >&5
19682 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19683   echo $ac_n "(cached) $ac_c" 1>&6
19684 else
19685   
19686         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19687                 ol_cv_ndbm=no
19688         else
19689                 ol_cv_ndbm=yes
19690         fi
19691
19692 fi
19693
19694 echo "$ac_t""$ol_cv_ndbm" 1>&6
19695  if test $ol_cv_ndbm = yes ; then
19696         cat >> confdefs.h <<\EOF
19697 #define HAVE_NDBM 1
19698 EOF
19699
19700  fi
19701
19702
19703         if test $ol_cv_ndbm = yes ; then
19704                 ol_link_ldbm=ndbm
19705                 ol_with_ldbm_api=ndbm
19706
19707                 if test $ol_cv_lib_ndbm != yes ; then
19708                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19709                 fi
19710         fi
19711 fi
19712
19713 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19714         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19715         if test $ol_enable_ldbm = yes ; then
19716                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19717         fi
19718
19719         echo "configure: warning: disabling LDBM" 1>&2
19720         ol_enable_ldbm=no
19721 fi
19722
19723
19724 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19725         BUILD_LIBS_DYNAMIC=shared
19726         cat >> confdefs.h <<\EOF
19727 #define LDAP_LIBS_DYNAMIC 1
19728 EOF
19729
19730         LTSTATIC=""
19731 else
19732         BUILD_LIBS_DYNAMIC=static
19733         LTSTATIC="-static"
19734 fi
19735
19736 if test $ol_enable_wrappers != no ; then
19737         for ac_hdr in tcpd.h
19738 do
19739 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19740 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19741 echo "configure:19742: checking for $ac_hdr" >&5
19742 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19743   echo $ac_n "(cached) $ac_c" 1>&6
19744 else
19745   cat > conftest.$ac_ext <<EOF
19746 #line 19747 "configure"
19747 #include "confdefs.h"
19748 #include <$ac_hdr>
19749 EOF
19750 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19751 { (eval echo configure:19752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19752 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19753 if test -z "$ac_err"; then
19754   rm -rf conftest*
19755   eval "ac_cv_header_$ac_safe=yes"
19756 else
19757   echo "$ac_err" >&5
19758   echo "configure: failed program was:" >&5
19759   cat conftest.$ac_ext >&5
19760   rm -rf conftest*
19761   eval "ac_cv_header_$ac_safe=no"
19762 fi
19763 rm -f conftest*
19764 fi
19765 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19766   echo "$ac_t""yes" 1>&6
19767     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19768   cat >> confdefs.h <<EOF
19769 #define $ac_tr_hdr 1
19770 EOF
19771  
19772                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19773 echo "configure:19774: checking for TCP wrappers library" >&5
19774                 save_LIBS="$LIBS"
19775                 LIBS="$LIBS -lwrap"
19776                 cat > conftest.$ac_ext <<EOF
19777 #line 19778 "configure"
19778 #include "confdefs.h"
19779
19780 #include <tcpd.h>
19781 int allow_severity = 0;
19782 int deny_severity  = 0;
19783
19784 struct request_info *req;
19785                 
19786 int main() {
19787
19788 hosts_access(req)
19789                 
19790 ; return 0; }
19791 EOF
19792 if { (eval echo configure:19793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19793   rm -rf conftest*
19794   echo "$ac_t""-lwrap" 1>&6
19795                 have_wrappers=yes
19796                 LIBS="$save_LIBS"
19797 else
19798   echo "configure: failed program was:" >&5
19799   cat conftest.$ac_ext >&5
19800   rm -rf conftest*
19801   
19802                                 LIBS="$LIBS -lnsl"
19803                 cat > conftest.$ac_ext <<EOF
19804 #line 19805 "configure"
19805 #include "confdefs.h"
19806
19807 #include <tcpd.h>
19808 int allow_severity = 0;
19809 int deny_severity  = 0;
19810
19811 struct request_info *req;
19812                 
19813 int main() {
19814
19815 hosts_access(req)
19816                 
19817 ; return 0; }
19818 EOF
19819 if { (eval echo configure:19820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19820   rm -rf conftest*
19821   echo "$ac_t""-lwrap -lnsl" 1>&6
19822                 have_wrappers=yes
19823                 LIBS="$save_LIBS -lnsl"
19824 else
19825   echo "configure: failed program was:" >&5
19826   cat conftest.$ac_ext >&5
19827   rm -rf conftest*
19828   
19829                 echo "$ac_t""no" 1>&6
19830                 have_wrappers=no
19831                 LIBS=$save_LIBS
19832 fi
19833 rm -f conftest*
19834 fi
19835 rm -f conftest*
19836 else
19837   echo "$ac_t""no" 1>&6
19838 have_wrappers=no
19839 fi
19840 done
19841
19842
19843         if test $have_wrappers = yes ; then
19844                 cat >> confdefs.h <<\EOF
19845 #define HAVE_TCPD 1
19846 EOF
19847
19848                 WRAP_LIBS="-lwrap"
19849         elif test $ol_enable_wrappers = yes ; then
19850                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19851         else
19852                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19853                 WRAP_LIBS=""
19854         fi
19855 fi
19856
19857 if test $ol_enable_syslog != no ; then
19858         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19859 echo "configure:19860: checking for openlog" >&5
19860 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19861   echo $ac_n "(cached) $ac_c" 1>&6
19862 else
19863   cat > conftest.$ac_ext <<EOF
19864 #line 19865 "configure"
19865 #include "confdefs.h"
19866 /* System header to define __stub macros and hopefully few prototypes,
19867     which can conflict with char openlog(); below.  */
19868 #include <assert.h>
19869 /* Override any gcc2 internal prototype to avoid an error.  */
19870 /* We use char because int might match the return type of a gcc2
19871     builtin and then its argument prototype would still apply.  */
19872 char openlog();
19873 char (*f)();
19874
19875 int main() {
19876
19877 /* The GNU C library defines this for functions which it implements
19878     to always fail with ENOSYS.  Some functions are actually named
19879     something starting with __ and the normal name is an alias.  */
19880 #if defined (__stub_openlog) || defined (__stub___openlog)
19881 choke me
19882 #else
19883 f = openlog;
19884 #endif
19885
19886 ; return 0; }
19887 EOF
19888 if { (eval echo configure:19889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19889   rm -rf conftest*
19890   eval "ac_cv_func_openlog=yes"
19891 else
19892   echo "configure: failed program was:" >&5
19893   cat conftest.$ac_ext >&5
19894   rm -rf conftest*
19895   eval "ac_cv_func_openlog=no"
19896 fi
19897 rm -f conftest*
19898 fi
19899
19900 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19901   echo "$ac_t""yes" 1>&6
19902   :
19903 else
19904   echo "$ac_t""no" 1>&6
19905 fi
19906
19907         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19908                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19909         fi
19910         ol_enable_syslog=$ac_cv_func_openlog
19911 fi
19912
19913
19914 ol_link_sql=no
19915 if test $ol_enable_sql != no ; then
19916         for ac_hdr in sql.h sqlext.h
19917 do
19918 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19919 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19920 echo "configure:19921: checking for $ac_hdr" >&5
19921 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19922   echo $ac_n "(cached) $ac_c" 1>&6
19923 else
19924   cat > conftest.$ac_ext <<EOF
19925 #line 19926 "configure"
19926 #include "confdefs.h"
19927 #include <$ac_hdr>
19928 EOF
19929 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19930 { (eval echo configure:19931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19931 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19932 if test -z "$ac_err"; then
19933   rm -rf conftest*
19934   eval "ac_cv_header_$ac_safe=yes"
19935 else
19936   echo "$ac_err" >&5
19937   echo "configure: failed program was:" >&5
19938   cat conftest.$ac_ext >&5
19939   rm -rf conftest*
19940   eval "ac_cv_header_$ac_safe=no"
19941 fi
19942 rm -f conftest*
19943 fi
19944 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19945   echo "$ac_t""yes" 1>&6
19946     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19947   cat >> confdefs.h <<EOF
19948 #define $ac_tr_hdr 1
19949 EOF
19950  
19951 else
19952   echo "$ac_t""no" 1>&6
19953 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
19954         
19955 fi
19956 done
19957
19958
19959         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19960 echo "configure:19961: checking for SQLDriverConnect in -liodbc" >&5
19961 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19962 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19963   echo $ac_n "(cached) $ac_c" 1>&6
19964 else
19965   ac_save_LIBS="$LIBS"
19966 LIBS="-liodbc  $LIBS"
19967 cat > conftest.$ac_ext <<EOF
19968 #line 19969 "configure"
19969 #include "confdefs.h"
19970 /* Override any gcc2 internal prototype to avoid an error.  */
19971 /* We use char because int might match the return type of a gcc2
19972     builtin and then its argument prototype would still apply.  */
19973 char SQLDriverConnect();
19974
19975 int main() {
19976 SQLDriverConnect()
19977 ; return 0; }
19978 EOF
19979 if { (eval echo configure:19980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19980   rm -rf conftest*
19981   eval "ac_cv_lib_$ac_lib_var=yes"
19982 else
19983   echo "configure: failed program was:" >&5
19984   cat conftest.$ac_ext >&5
19985   rm -rf conftest*
19986   eval "ac_cv_lib_$ac_lib_var=no"
19987 fi
19988 rm -f conftest*
19989 LIBS="$ac_save_LIBS"
19990
19991 fi
19992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19993   echo "$ac_t""yes" 1>&6
19994   have_iodbc=yes
19995 else
19996   echo "$ac_t""no" 1>&6
19997 have_iodbc=no
19998 fi
19999
20000         if test $have_iodbc = yes ; then
20001                 ol_link_sql="-liodbc"
20002         else
20003                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20004 echo "configure:20005: checking for SQLDriverConnect in -lodbc" >&5
20005 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20006 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20007   echo $ac_n "(cached) $ac_c" 1>&6
20008 else
20009   ac_save_LIBS="$LIBS"
20010 LIBS="-lodbc  $LIBS"
20011 cat > conftest.$ac_ext <<EOF
20012 #line 20013 "configure"
20013 #include "confdefs.h"
20014 /* Override any gcc2 internal prototype to avoid an error.  */
20015 /* We use char because int might match the return type of a gcc2
20016     builtin and then its argument prototype would still apply.  */
20017 char SQLDriverConnect();
20018
20019 int main() {
20020 SQLDriverConnect()
20021 ; return 0; }
20022 EOF
20023 if { (eval echo configure:20024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20024   rm -rf conftest*
20025   eval "ac_cv_lib_$ac_lib_var=yes"
20026 else
20027   echo "configure: failed program was:" >&5
20028   cat conftest.$ac_ext >&5
20029   rm -rf conftest*
20030   eval "ac_cv_lib_$ac_lib_var=no"
20031 fi
20032 rm -f conftest*
20033 LIBS="$ac_save_LIBS"
20034
20035 fi
20036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20037   echo "$ac_t""yes" 1>&6
20038   have_odbc=yes
20039 else
20040   echo "$ac_t""no" 1>&6
20041 have_odbc=no
20042 fi
20043
20044                 if test $have_odbc = yes ; then
20045                         ol_link_sql="-lodbc"
20046                 fi
20047         fi
20048
20049         if test $ol_link_sql != no ; then
20050                 SLAPD_SQL_LIBS="$ol_link_sql"
20051
20052         elif test $ol_enable_sql != auto ; then
20053                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20054         fi
20055 fi
20056
20057 ol_link_termcap=no
20058 for ac_hdr in termcap.h ncurses.h
20059 do
20060 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20061 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20062 echo "configure:20063: checking for $ac_hdr" >&5
20063 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20064   echo $ac_n "(cached) $ac_c" 1>&6
20065 else
20066   cat > conftest.$ac_ext <<EOF
20067 #line 20068 "configure"
20068 #include "confdefs.h"
20069 #include <$ac_hdr>
20070 EOF
20071 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20072 { (eval echo configure:20073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20073 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20074 if test -z "$ac_err"; then
20075   rm -rf conftest*
20076   eval "ac_cv_header_$ac_safe=yes"
20077 else
20078   echo "$ac_err" >&5
20079   echo "configure: failed program was:" >&5
20080   cat conftest.$ac_ext >&5
20081   rm -rf conftest*
20082   eval "ac_cv_header_$ac_safe=no"
20083 fi
20084 rm -f conftest*
20085 fi
20086 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20087   echo "$ac_t""yes" 1>&6
20088     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20089   cat >> confdefs.h <<EOF
20090 #define $ac_tr_hdr 1
20091 EOF
20092  
20093 else
20094   echo "$ac_t""no" 1>&6
20095 fi
20096 done
20097
20098
20099 if test $ol_link_termcap = no ; then
20100         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
20101 echo "configure:20102: checking for tputs in -ltermcap" >&5
20102 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
20103 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20104   echo $ac_n "(cached) $ac_c" 1>&6
20105 else
20106   ac_save_LIBS="$LIBS"
20107 LIBS="-ltermcap  $LIBS"
20108 cat > conftest.$ac_ext <<EOF
20109 #line 20110 "configure"
20110 #include "confdefs.h"
20111 /* Override any gcc2 internal prototype to avoid an error.  */
20112 /* We use char because int might match the return type of a gcc2
20113     builtin and then its argument prototype would still apply.  */
20114 char tputs();
20115
20116 int main() {
20117 tputs()
20118 ; return 0; }
20119 EOF
20120 if { (eval echo configure:20121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20121   rm -rf conftest*
20122   eval "ac_cv_lib_$ac_lib_var=yes"
20123 else
20124   echo "configure: failed program was:" >&5
20125   cat conftest.$ac_ext >&5
20126   rm -rf conftest*
20127   eval "ac_cv_lib_$ac_lib_var=no"
20128 fi
20129 rm -f conftest*
20130 LIBS="$ac_save_LIBS"
20131
20132 fi
20133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20134   echo "$ac_t""yes" 1>&6
20135   have_termcap=yes
20136 else
20137   echo "$ac_t""no" 1>&6
20138 have_termcap=no
20139 fi
20140
20141         if test $have_termcap = yes ; then
20142                 cat >> confdefs.h <<\EOF
20143 #define HAVE_TERMCAP 1
20144 EOF
20145
20146                 ol_link_termcap=yes
20147                 TERMCAP_LIBS=-ltermcap
20148         fi
20149 fi
20150
20151 if test $ol_link_termcap = no ; then
20152         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20153 echo "configure:20154: checking for initscr in -lncurses" >&5
20154 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20155 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20156   echo $ac_n "(cached) $ac_c" 1>&6
20157 else
20158   ac_save_LIBS="$LIBS"
20159 LIBS="-lncurses  $LIBS"
20160 cat > conftest.$ac_ext <<EOF
20161 #line 20162 "configure"
20162 #include "confdefs.h"
20163 /* Override any gcc2 internal prototype to avoid an error.  */
20164 /* We use char because int might match the return type of a gcc2
20165     builtin and then its argument prototype would still apply.  */
20166 char initscr();
20167
20168 int main() {
20169 initscr()
20170 ; return 0; }
20171 EOF
20172 if { (eval echo configure:20173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20173   rm -rf conftest*
20174   eval "ac_cv_lib_$ac_lib_var=yes"
20175 else
20176   echo "configure: failed program was:" >&5
20177   cat conftest.$ac_ext >&5
20178   rm -rf conftest*
20179   eval "ac_cv_lib_$ac_lib_var=no"
20180 fi
20181 rm -f conftest*
20182 LIBS="$ac_save_LIBS"
20183
20184 fi
20185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20186   echo "$ac_t""yes" 1>&6
20187   have_ncurses=yes
20188 else
20189   echo "$ac_t""no" 1>&6
20190 have_ncurses=no
20191 fi
20192
20193         if test $have_ncurses = yes ; then
20194                 cat >> confdefs.h <<\EOF
20195 #define HAVE_NCURSES 1
20196 EOF
20197
20198                 ol_link_termcap=yes
20199                 TERMCAP_LIBS=-lncurses
20200         fi
20201 fi
20202
20203 if test $ol_link_termcap = no ; then
20204         cat >> confdefs.h <<\EOF
20205 #define NO_TERMCAP 1
20206 EOF
20207
20208         TERMCAP_LIBS=
20209 fi
20210
20211 ol_link_sasl=no
20212 ol_link_spasswd=no
20213 if test $ol_with_cyrus_sasl != no ; then
20214         for ac_hdr in sasl/sasl.h sasl.h
20215 do
20216 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20217 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20218 echo "configure:20219: checking for $ac_hdr" >&5
20219 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20220   echo $ac_n "(cached) $ac_c" 1>&6
20221 else
20222   cat > conftest.$ac_ext <<EOF
20223 #line 20224 "configure"
20224 #include "confdefs.h"
20225 #include <$ac_hdr>
20226 EOF
20227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20228 { (eval echo configure:20229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20230 if test -z "$ac_err"; then
20231   rm -rf conftest*
20232   eval "ac_cv_header_$ac_safe=yes"
20233 else
20234   echo "$ac_err" >&5
20235   echo "configure: failed program was:" >&5
20236   cat conftest.$ac_ext >&5
20237   rm -rf conftest*
20238   eval "ac_cv_header_$ac_safe=no"
20239 fi
20240 rm -f conftest*
20241 fi
20242 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20243   echo "$ac_t""yes" 1>&6
20244     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20245   cat >> confdefs.h <<EOF
20246 #define $ac_tr_hdr 1
20247 EOF
20248  
20249 else
20250   echo "$ac_t""no" 1>&6
20251 fi
20252 done
20253
20254
20255         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20256                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20257 echo "configure:20258: checking for sasl_client_init in -lsasl2" >&5
20258 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20259 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20260   echo $ac_n "(cached) $ac_c" 1>&6
20261 else
20262   ac_save_LIBS="$LIBS"
20263 LIBS="-lsasl2  $LIBS"
20264 cat > conftest.$ac_ext <<EOF
20265 #line 20266 "configure"
20266 #include "confdefs.h"
20267 /* Override any gcc2 internal prototype to avoid an error.  */
20268 /* We use char because int might match the return type of a gcc2
20269     builtin and then its argument prototype would still apply.  */
20270 char sasl_client_init();
20271
20272 int main() {
20273 sasl_client_init()
20274 ; return 0; }
20275 EOF
20276 if { (eval echo configure:20277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20277   rm -rf conftest*
20278   eval "ac_cv_lib_$ac_lib_var=yes"
20279 else
20280   echo "configure: failed program was:" >&5
20281   cat conftest.$ac_ext >&5
20282   rm -rf conftest*
20283   eval "ac_cv_lib_$ac_lib_var=no"
20284 fi
20285 rm -f conftest*
20286 LIBS="$ac_save_LIBS"
20287
20288 fi
20289 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20290   echo "$ac_t""yes" 1>&6
20291   ol_link_sasl="-lsasl2"
20292 else
20293   echo "$ac_t""no" 1>&6
20294 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20295 echo "configure:20296: checking for sasl_client_init in -lsasl" >&5
20296 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20297 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20298   echo $ac_n "(cached) $ac_c" 1>&6
20299 else
20300   ac_save_LIBS="$LIBS"
20301 LIBS="-lsasl  $LIBS"
20302 cat > conftest.$ac_ext <<EOF
20303 #line 20304 "configure"
20304 #include "confdefs.h"
20305 /* Override any gcc2 internal prototype to avoid an error.  */
20306 /* We use char because int might match the return type of a gcc2
20307     builtin and then its argument prototype would still apply.  */
20308 char sasl_client_init();
20309
20310 int main() {
20311 sasl_client_init()
20312 ; return 0; }
20313 EOF
20314 if { (eval echo configure:20315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20315   rm -rf conftest*
20316   eval "ac_cv_lib_$ac_lib_var=yes"
20317 else
20318   echo "configure: failed program was:" >&5
20319   cat conftest.$ac_ext >&5
20320   rm -rf conftest*
20321   eval "ac_cv_lib_$ac_lib_var=no"
20322 fi
20323 rm -f conftest*
20324 LIBS="$ac_save_LIBS"
20325
20326 fi
20327 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20328   echo "$ac_t""yes" 1>&6
20329   ol_link_sasl="-lsasl"
20330 else
20331   echo "$ac_t""no" 1>&6
20332 fi
20333
20334 fi
20335
20336         fi
20337
20338         if test $ol_link_sasl = no ; then
20339                 if test $ol_with_cyrus_sasl != auto ; then
20340                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20341                 else
20342                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20343                         echo "configure: warning: SASL authentication not supported!" 1>&2
20344                         if test $ol_link_tls = no ; then
20345                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20346                         fi
20347                 fi
20348         else
20349                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20350 echo "configure:20351: checking Cyrus SASL library version" >&5
20351 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20352   echo $ac_n "(cached) $ac_c" 1>&6
20353 else
20354   
20355         cat > conftest.$ac_ext <<EOF
20356 #line 20357 "configure"
20357 #include "confdefs.h"
20358
20359 #ifdef HAVE_SASL_SASL_H
20360 #include <sasl/sasl.h>
20361 #else
20362 #include <sasl.h>
20363 #endif
20364
20365 /* require 2.1.3 or later */
20366 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20367         char *__sasl_compat = "1.5.x okay";
20368 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20369         __sasl_compat "2.2+ or better okay (we guess)";
20370 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20371         && SASL_VERSION_STEP >=3
20372         __sasl_compat = "2.1.3+ or better okay";
20373 #endif
20374         
20375 EOF
20376 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20377   egrep "__sasl_compat" >/dev/null 2>&1; then
20378   rm -rf conftest*
20379   ol_cv_sasl_compat=yes
20380 else
20381   rm -rf conftest*
20382   ol_cv_sasl_compat=no
20383 fi
20384 rm -f conftest*
20385
20386 fi
20387
20388 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20389
20390                 if test $ol_cv_sasl_compat = no ; then
20391                         ol_link_sasl=no
20392                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20393                 fi
20394
20395                 cat >> confdefs.h <<\EOF
20396 #define HAVE_CYRUS_SASL 1
20397 EOF
20398
20399                 SASL_LIBS="$ol_link_sasl"
20400                 if test $ol_enable_spasswd != no ; then
20401                         ol_link_spasswd=yes
20402                 fi
20403
20404                 ac_save_LIBS="$LIBS"
20405                 LIBS="$LIBS $ol_link_sasl"
20406                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20407 echo "configure:20408: checking for sasl_version" >&5
20408 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20409   echo $ac_n "(cached) $ac_c" 1>&6
20410 else
20411   cat > conftest.$ac_ext <<EOF
20412 #line 20413 "configure"
20413 #include "confdefs.h"
20414 /* System header to define __stub macros and hopefully few prototypes,
20415     which can conflict with char sasl_version(); below.  */
20416 #include <assert.h>
20417 /* Override any gcc2 internal prototype to avoid an error.  */
20418 /* We use char because int might match the return type of a gcc2
20419     builtin and then its argument prototype would still apply.  */
20420 char sasl_version();
20421 char (*f)();
20422
20423 int main() {
20424
20425 /* The GNU C library defines this for functions which it implements
20426     to always fail with ENOSYS.  Some functions are actually named
20427     something starting with __ and the normal name is an alias.  */
20428 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20429 choke me
20430 #else
20431 f = sasl_version;
20432 #endif
20433
20434 ; return 0; }
20435 EOF
20436 if { (eval echo configure:20437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20437   rm -rf conftest*
20438   eval "ac_cv_func_sasl_version=yes"
20439 else
20440   echo "configure: failed program was:" >&5
20441   cat conftest.$ac_ext >&5
20442   rm -rf conftest*
20443   eval "ac_cv_func_sasl_version=no"
20444 fi
20445 rm -f conftest*
20446 fi
20447
20448 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20449   echo "$ac_t""yes" 1>&6
20450   cat >> confdefs.h <<\EOF
20451 #define HAVE_SASL_VERSION 1
20452 EOF
20453
20454 else
20455   echo "$ac_t""no" 1>&6
20456 fi
20457
20458                 LIBS="$ac_save_LIBS"
20459         fi
20460
20461 else
20462         echo "configure: warning: SASL authentication not supported!" 1>&2
20463         if test $ol_link_tls = no ; then
20464                 echo "configure: warning: Strong authentication not supported!" 1>&2
20465         fi
20466 fi
20467
20468 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20469         dev=no
20470         if test -r /dev/urandom ; then
20471                 dev="/dev/urandom";
20472         elif test -r /idev/urandom ; then
20473                 dev="/idev/urandom";
20474         elif test -r /dev/srandom ; then
20475                 dev="/dev/srandom";
20476         elif test -r /dev/random ; then
20477                 dev="/dev/random";
20478         elif test -r /idev/random ; then
20479                 dev="/idev/random";
20480         fi
20481
20482         if test $dev != no ; then
20483                 cat >> confdefs.h <<EOF
20484 #define URANDOM_DEVICE "$dev"
20485 EOF
20486
20487         fi
20488 fi
20489
20490 ol_link_fetch=no
20491 if test $ol_with_fetch != no ; then
20492         ol_LIBS=$LIBS
20493 LIBS="-lfetch -lcom_err $LIBS"
20494 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20495 echo "configure:20496: checking fetch(3) library" >&5
20496 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20497   echo $ac_n "(cached) $ac_c" 1>&6
20498 else
20499   
20500         cat > conftest.$ac_ext <<EOF
20501 #line 20502 "configure"
20502 #include "confdefs.h"
20503
20504 #include <sys/param.h>
20505 #include <stdio.h>
20506 #include <fetch.h>
20507 int main() {
20508 struct url *u = fetchParseURL("file:///"); 
20509 ; return 0; }
20510 EOF
20511 if { (eval echo configure:20512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20512   rm -rf conftest*
20513   ol_cv_lib_fetch=yes
20514 else
20515   echo "configure: failed program was:" >&5
20516   cat conftest.$ac_ext >&5
20517   rm -rf conftest*
20518   ol_cv_lib_fetch=no
20519 fi
20520 rm -f conftest*
20521 fi
20522
20523 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20524 LIBS=$ol_LIBS
20525 if test $ol_cv_lib_fetch != no ; then
20526         ol_link_fetch="-lfetch -lcom_err"
20527         cat >> confdefs.h <<\EOF
20528 #define HAVE_FETCH 1
20529 EOF
20530
20531 fi
20532
20533
20534         if test $ol_cv_lib_fetch != no ; then
20535                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20536                 ol_link_fetch=freebsd
20537
20538         elif test $ol_with_fetch != auto ; then
20539                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20540         fi 
20541 fi
20542
20543 if test $ol_enable_crypt != no ; then
20544         save_LIBS="$LIBS"
20545         LIBS="$TLS_LIBS $LIBS"
20546
20547         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20548 echo "configure:20549: checking for crypt" >&5
20549 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20550   echo $ac_n "(cached) $ac_c" 1>&6
20551 else
20552   cat > conftest.$ac_ext <<EOF
20553 #line 20554 "configure"
20554 #include "confdefs.h"
20555 /* System header to define __stub macros and hopefully few prototypes,
20556     which can conflict with char crypt(); below.  */
20557 #include <assert.h>
20558 /* Override any gcc2 internal prototype to avoid an error.  */
20559 /* We use char because int might match the return type of a gcc2
20560     builtin and then its argument prototype would still apply.  */
20561 char crypt();
20562 char (*f)();
20563
20564 int main() {
20565
20566 /* The GNU C library defines this for functions which it implements
20567     to always fail with ENOSYS.  Some functions are actually named
20568     something starting with __ and the normal name is an alias.  */
20569 #if defined (__stub_crypt) || defined (__stub___crypt)
20570 choke me
20571 #else
20572 f = crypt;
20573 #endif
20574
20575 ; return 0; }
20576 EOF
20577 if { (eval echo configure:20578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20578   rm -rf conftest*
20579   eval "ac_cv_func_crypt=yes"
20580 else
20581   echo "configure: failed program was:" >&5
20582   cat conftest.$ac_ext >&5
20583   rm -rf conftest*
20584   eval "ac_cv_func_crypt=no"
20585 fi
20586 rm -f conftest*
20587 fi
20588
20589 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20590   echo "$ac_t""yes" 1>&6
20591   have_crypt=yes
20592 else
20593   echo "$ac_t""no" 1>&6
20594
20595                 LIBS="$save_LIBS"
20596                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20597 echo "configure:20598: checking for crypt in -lcrypt" >&5
20598 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20599 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20600   echo $ac_n "(cached) $ac_c" 1>&6
20601 else
20602   ac_save_LIBS="$LIBS"
20603 LIBS="-lcrypt  $LIBS"
20604 cat > conftest.$ac_ext <<EOF
20605 #line 20606 "configure"
20606 #include "confdefs.h"
20607 /* Override any gcc2 internal prototype to avoid an error.  */
20608 /* We use char because int might match the return type of a gcc2
20609     builtin and then its argument prototype would still apply.  */
20610 char crypt();
20611
20612 int main() {
20613 crypt()
20614 ; return 0; }
20615 EOF
20616 if { (eval echo configure:20617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20617   rm -rf conftest*
20618   eval "ac_cv_lib_$ac_lib_var=yes"
20619 else
20620   echo "configure: failed program was:" >&5
20621   cat conftest.$ac_ext >&5
20622   rm -rf conftest*
20623   eval "ac_cv_lib_$ac_lib_var=no"
20624 fi
20625 rm -f conftest*
20626 LIBS="$ac_save_LIBS"
20627
20628 fi
20629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20630   echo "$ac_t""yes" 1>&6
20631   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20632                         have_crypt=yes
20633 else
20634   echo "$ac_t""no" 1>&6
20635 have_crypt=no
20636 fi
20637
20638 fi
20639
20640
20641         LIBS="$save_LIBS"
20642
20643         if test $have_crypt = yes ; then
20644                 cat >> confdefs.h <<\EOF
20645 #define HAVE_CRYPT 1
20646 EOF
20647
20648         else
20649                 echo "configure: warning: could not find crypt" 1>&2
20650                 if test $ol_enable_crypt = yes ; then
20651                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20652                 fi
20653
20654                 echo "configure: warning: disabling crypt support" 1>&2
20655                 ol_enable_crypt=no
20656         fi
20657 fi
20658
20659 if test $ol_enable_proctitle != no ; then
20660         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20661 echo "configure:20662: checking for setproctitle" >&5
20662 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20663   echo $ac_n "(cached) $ac_c" 1>&6
20664 else
20665   cat > conftest.$ac_ext <<EOF
20666 #line 20667 "configure"
20667 #include "confdefs.h"
20668 /* System header to define __stub macros and hopefully few prototypes,
20669     which can conflict with char setproctitle(); below.  */
20670 #include <assert.h>
20671 /* Override any gcc2 internal prototype to avoid an error.  */
20672 /* We use char because int might match the return type of a gcc2
20673     builtin and then its argument prototype would still apply.  */
20674 char setproctitle();
20675 char (*f)();
20676
20677 int main() {
20678
20679 /* The GNU C library defines this for functions which it implements
20680     to always fail with ENOSYS.  Some functions are actually named
20681     something starting with __ and the normal name is an alias.  */
20682 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20683 choke me
20684 #else
20685 f = setproctitle;
20686 #endif
20687
20688 ; return 0; }
20689 EOF
20690 if { (eval echo configure:20691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20691   rm -rf conftest*
20692   eval "ac_cv_func_setproctitle=yes"
20693 else
20694   echo "configure: failed program was:" >&5
20695   cat conftest.$ac_ext >&5
20696   rm -rf conftest*
20697   eval "ac_cv_func_setproctitle=no"
20698 fi
20699 rm -f conftest*
20700 fi
20701
20702 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20703   echo "$ac_t""yes" 1>&6
20704   have_setproctitle=yes
20705 else
20706   echo "$ac_t""no" 1>&6
20707
20708                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20709 echo "configure:20710: checking for setproctitle in -lutil" >&5
20710 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20711 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20712   echo $ac_n "(cached) $ac_c" 1>&6
20713 else
20714   ac_save_LIBS="$LIBS"
20715 LIBS="-lutil  $LIBS"
20716 cat > conftest.$ac_ext <<EOF
20717 #line 20718 "configure"
20718 #include "confdefs.h"
20719 /* Override any gcc2 internal prototype to avoid an error.  */
20720 /* We use char because int might match the return type of a gcc2
20721     builtin and then its argument prototype would still apply.  */
20722 char setproctitle();
20723
20724 int main() {
20725 setproctitle()
20726 ; return 0; }
20727 EOF
20728 if { (eval echo configure:20729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20729   rm -rf conftest*
20730   eval "ac_cv_lib_$ac_lib_var=yes"
20731 else
20732   echo "configure: failed program was:" >&5
20733   cat conftest.$ac_ext >&5
20734   rm -rf conftest*
20735   eval "ac_cv_lib_$ac_lib_var=no"
20736 fi
20737 rm -f conftest*
20738 LIBS="$ac_save_LIBS"
20739
20740 fi
20741 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20742   echo "$ac_t""yes" 1>&6
20743   have_setproctitle=yes
20744                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20745 else
20746   echo "$ac_t""no" 1>&6
20747 have_setproctitle=no
20748                         LIBOBJS="$LIBOBJS setproctitle.o"
20749                         LIBSRCS="$LIBSRCS setproctitle.c"
20750 fi
20751
20752 fi
20753
20754
20755         if test $have_setproctitle = yes ; then
20756                 cat >> confdefs.h <<\EOF
20757 #define HAVE_SETPROCTITLE 1
20758 EOF
20759
20760         fi
20761 fi
20762
20763 if test $ol_enable_slp != no ; then
20764         for ac_hdr in slp.h 
20765 do
20766 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20767 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20768 echo "configure:20769: checking for $ac_hdr" >&5
20769 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20770   echo $ac_n "(cached) $ac_c" 1>&6
20771 else
20772   cat > conftest.$ac_ext <<EOF
20773 #line 20774 "configure"
20774 #include "confdefs.h"
20775 #include <$ac_hdr>
20776 EOF
20777 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20778 { (eval echo configure:20779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20779 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20780 if test -z "$ac_err"; then
20781   rm -rf conftest*
20782   eval "ac_cv_header_$ac_safe=yes"
20783 else
20784   echo "$ac_err" >&5
20785   echo "configure: failed program was:" >&5
20786   cat conftest.$ac_ext >&5
20787   rm -rf conftest*
20788   eval "ac_cv_header_$ac_safe=no"
20789 fi
20790 rm -f conftest*
20791 fi
20792 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20793   echo "$ac_t""yes" 1>&6
20794     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20795   cat >> confdefs.h <<EOF
20796 #define $ac_tr_hdr 1
20797 EOF
20798  
20799 else
20800   echo "$ac_t""no" 1>&6
20801 fi
20802 done
20803
20804
20805         if test $ac_cv_header_slp_h = yes ; then
20806                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20807 echo "configure:20808: checking for SLPOpen in -lslp" >&5
20808 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20809 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20810   echo $ac_n "(cached) $ac_c" 1>&6
20811 else
20812   ac_save_LIBS="$LIBS"
20813 LIBS="-lslp  $LIBS"
20814 cat > conftest.$ac_ext <<EOF
20815 #line 20816 "configure"
20816 #include "confdefs.h"
20817 /* Override any gcc2 internal prototype to avoid an error.  */
20818 /* We use char because int might match the return type of a gcc2
20819     builtin and then its argument prototype would still apply.  */
20820 char SLPOpen();
20821
20822 int main() {
20823 SLPOpen()
20824 ; return 0; }
20825 EOF
20826 if { (eval echo configure:20827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20827   rm -rf conftest*
20828   eval "ac_cv_lib_$ac_lib_var=yes"
20829 else
20830   echo "configure: failed program was:" >&5
20831   cat conftest.$ac_ext >&5
20832   rm -rf conftest*
20833   eval "ac_cv_lib_$ac_lib_var=no"
20834 fi
20835 rm -f conftest*
20836 LIBS="$ac_save_LIBS"
20837
20838 fi
20839 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20840   echo "$ac_t""yes" 1>&6
20841   have_slp=yes
20842 else
20843   echo "$ac_t""no" 1>&6
20844 have_slp=no
20845 fi
20846
20847                 if test $have_slp = yes ; then
20848                         cat >> confdefs.h <<\EOF
20849 #define HAVE_SLP 1
20850 EOF
20851
20852                         SLAPD_SLP_LIBS=-lslp
20853                 fi
20854
20855         elif test $ol_enable_slp = yes ; then
20856                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20857         fi
20858 fi
20859
20860 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20861 echo "configure:20862: checking for ANSI C header files" >&5
20862 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20863   echo $ac_n "(cached) $ac_c" 1>&6
20864 else
20865   cat > conftest.$ac_ext <<EOF
20866 #line 20867 "configure"
20867 #include "confdefs.h"
20868 #include <stdlib.h>
20869 #include <stdarg.h>
20870 #include <string.h>
20871 #include <float.h>
20872 EOF
20873 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20874 { (eval echo configure:20875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20875 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20876 if test -z "$ac_err"; then
20877   rm -rf conftest*
20878   ac_cv_header_stdc=yes
20879 else
20880   echo "$ac_err" >&5
20881   echo "configure: failed program was:" >&5
20882   cat conftest.$ac_ext >&5
20883   rm -rf conftest*
20884   ac_cv_header_stdc=no
20885 fi
20886 rm -f conftest*
20887
20888 if test $ac_cv_header_stdc = yes; then
20889   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20890 cat > conftest.$ac_ext <<EOF
20891 #line 20892 "configure"
20892 #include "confdefs.h"
20893 #include <string.h>
20894 EOF
20895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20896   egrep "memchr" >/dev/null 2>&1; then
20897   :
20898 else
20899   rm -rf conftest*
20900   ac_cv_header_stdc=no
20901 fi
20902 rm -f conftest*
20903
20904 fi
20905
20906 if test $ac_cv_header_stdc = yes; then
20907   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20908 cat > conftest.$ac_ext <<EOF
20909 #line 20910 "configure"
20910 #include "confdefs.h"
20911 #include <stdlib.h>
20912 EOF
20913 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20914   egrep "free" >/dev/null 2>&1; then
20915   :
20916 else
20917   rm -rf conftest*
20918   ac_cv_header_stdc=no
20919 fi
20920 rm -f conftest*
20921
20922 fi
20923
20924 if test $ac_cv_header_stdc = yes; then
20925   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20926 if test "$cross_compiling" = yes; then
20927   :
20928 else
20929   cat > conftest.$ac_ext <<EOF
20930 #line 20931 "configure"
20931 #include "confdefs.h"
20932 #include <ctype.h>
20933 #if ((' ' & 0x0FF) == 0x020)
20934 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20935 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20936 #else
20937 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20938  || ('j' <= (c) && (c) <= 'r') \
20939  || ('s' <= (c) && (c) <= 'z'))
20940 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20941 #endif
20942 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20943 int main () { int i; for (i = 0; i < 256; i++)
20944 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20945 exit (0); }
20946
20947 EOF
20948 if { (eval echo configure:20949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20949 then
20950   :
20951 else
20952   echo "configure: failed program was:" >&5
20953   cat conftest.$ac_ext >&5
20954   rm -fr conftest*
20955   ac_cv_header_stdc=no
20956 fi
20957 rm -fr conftest*
20958 fi
20959
20960 fi
20961 fi
20962
20963 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20964 if test $ac_cv_header_stdc = yes; then
20965   cat >> confdefs.h <<\EOF
20966 #define STDC_HEADERS 1
20967 EOF
20968
20969 fi
20970
20971 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20972 echo "configure:20973: checking for mode_t" >&5
20973 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20974   echo $ac_n "(cached) $ac_c" 1>&6
20975 else
20976   cat > conftest.$ac_ext <<EOF
20977 #line 20978 "configure"
20978 #include "confdefs.h"
20979 #include <sys/types.h>
20980 #if STDC_HEADERS
20981 #include <stdlib.h>
20982 #include <stddef.h>
20983 #endif
20984
20985 EOF
20986 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20987   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20988   rm -rf conftest*
20989   eval "ac_cv_type_mode_t=yes"
20990 else
20991   rm -rf conftest*
20992   eval "ac_cv_type_mode_t=no"
20993 fi
20994 rm -f conftest*
20995
20996 fi
20997 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20998   echo "$ac_t""yes" 1>&6
20999 else
21000   echo "$ac_t""no" 1>&6
21001   cat >> confdefs.h <<EOF
21002 #define mode_t int
21003 EOF
21004
21005 fi
21006
21007 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21008 echo "configure:21009: checking for off_t" >&5
21009 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21010   echo $ac_n "(cached) $ac_c" 1>&6
21011 else
21012   cat > conftest.$ac_ext <<EOF
21013 #line 21014 "configure"
21014 #include "confdefs.h"
21015 #include <sys/types.h>
21016 #if STDC_HEADERS
21017 #include <stdlib.h>
21018 #include <stddef.h>
21019 #endif
21020
21021 EOF
21022 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21023   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21024   rm -rf conftest*
21025   eval "ac_cv_type_off_t=yes"
21026 else
21027   rm -rf conftest*
21028   eval "ac_cv_type_off_t=no"
21029 fi
21030 rm -f conftest*
21031
21032 fi
21033 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21034   echo "$ac_t""yes" 1>&6
21035 else
21036   echo "$ac_t""no" 1>&6
21037   cat >> confdefs.h <<EOF
21038 #define off_t long
21039 EOF
21040
21041 fi
21042
21043 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21044 echo "configure:21045: checking for pid_t" >&5
21045 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21046   echo $ac_n "(cached) $ac_c" 1>&6
21047 else
21048   cat > conftest.$ac_ext <<EOF
21049 #line 21050 "configure"
21050 #include "confdefs.h"
21051 #include <sys/types.h>
21052 #if STDC_HEADERS
21053 #include <stdlib.h>
21054 #include <stddef.h>
21055 #endif
21056
21057 EOF
21058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21059   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21060   rm -rf conftest*
21061   eval "ac_cv_type_pid_t=yes"
21062 else
21063   rm -rf conftest*
21064   eval "ac_cv_type_pid_t=no"
21065 fi
21066 rm -f conftest*
21067
21068 fi
21069 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21070   echo "$ac_t""yes" 1>&6
21071 else
21072   echo "$ac_t""no" 1>&6
21073   cat >> confdefs.h <<EOF
21074 #define pid_t int
21075 EOF
21076
21077 fi
21078
21079 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21080 echo "configure:21081: checking for ptrdiff_t" >&5
21081 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21082   echo $ac_n "(cached) $ac_c" 1>&6
21083 else
21084   cat > conftest.$ac_ext <<EOF
21085 #line 21086 "configure"
21086 #include "confdefs.h"
21087 #include <stddef.h>
21088 int main() {
21089 ptrdiff_t p
21090 ; return 0; }
21091 EOF
21092 if { (eval echo configure:21093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21093   rm -rf conftest*
21094   am_cv_type_ptrdiff_t=yes
21095 else
21096   echo "configure: failed program was:" >&5
21097   cat conftest.$ac_ext >&5
21098   rm -rf conftest*
21099   am_cv_type_ptrdiff_t=no
21100 fi
21101 rm -f conftest*
21102 fi
21103
21104 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21105    if test $am_cv_type_ptrdiff_t = yes; then
21106      cat >> confdefs.h <<\EOF
21107 #define HAVE_PTRDIFF_T 1
21108 EOF
21109
21110    fi
21111
21112 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21113 echo "configure:21114: checking return type of signal handlers" >&5
21114 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21115   echo $ac_n "(cached) $ac_c" 1>&6
21116 else
21117   cat > conftest.$ac_ext <<EOF
21118 #line 21119 "configure"
21119 #include "confdefs.h"
21120 #include <sys/types.h>
21121 #include <signal.h>
21122 #ifdef signal
21123 #undef signal
21124 #endif
21125 #ifdef __cplusplus
21126 extern "C" void (*signal (int, void (*)(int)))(int);
21127 #else
21128 void (*signal ()) ();
21129 #endif
21130
21131 int main() {
21132 int i;
21133 ; return 0; }
21134 EOF
21135 if { (eval echo configure:21136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21136   rm -rf conftest*
21137   ac_cv_type_signal=void
21138 else
21139   echo "configure: failed program was:" >&5
21140   cat conftest.$ac_ext >&5
21141   rm -rf conftest*
21142   ac_cv_type_signal=int
21143 fi
21144 rm -f conftest*
21145 fi
21146
21147 echo "$ac_t""$ac_cv_type_signal" 1>&6
21148 cat >> confdefs.h <<EOF
21149 #define RETSIGTYPE $ac_cv_type_signal
21150 EOF
21151
21152
21153 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21154 echo "configure:21155: checking for size_t" >&5
21155 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21156   echo $ac_n "(cached) $ac_c" 1>&6
21157 else
21158   cat > conftest.$ac_ext <<EOF
21159 #line 21160 "configure"
21160 #include "confdefs.h"
21161 #include <sys/types.h>
21162 #if STDC_HEADERS
21163 #include <stdlib.h>
21164 #include <stddef.h>
21165 #endif
21166
21167 EOF
21168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21169   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21170   rm -rf conftest*
21171   eval "ac_cv_type_size_t=yes"
21172 else
21173   rm -rf conftest*
21174   eval "ac_cv_type_size_t=no"
21175 fi
21176 rm -f conftest*
21177
21178 fi
21179 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21180   echo "$ac_t""yes" 1>&6
21181 else
21182   echo "$ac_t""no" 1>&6
21183   cat >> confdefs.h <<EOF
21184 #define size_t unsigned
21185 EOF
21186
21187 fi
21188
21189
21190 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21191 echo "configure:21192: checking for ssize_t" >&5
21192 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21193   echo $ac_n "(cached) $ac_c" 1>&6
21194 else
21195   cat > conftest.$ac_ext <<EOF
21196 #line 21197 "configure"
21197 #include "confdefs.h"
21198 #include <sys/types.h>
21199 #if STDC_HEADERS
21200 #include <stdlib.h>
21201 #include <stddef.h>
21202 #endif
21203
21204 EOF
21205 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21206   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21207   rm -rf conftest*
21208   eval "ac_cv_type_ssize_t=yes"
21209 else
21210   rm -rf conftest*
21211   eval "ac_cv_type_ssize_t=no"
21212 fi
21213 rm -f conftest*
21214
21215 fi
21216 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21217   echo "$ac_t""yes" 1>&6
21218 else
21219   echo "$ac_t""no" 1>&6
21220   cat >> confdefs.h <<EOF
21221 #define ssize_t signed int
21222 EOF
21223
21224 fi
21225
21226 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21227 echo "configure:21228: checking for caddr_t" >&5
21228 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21229   echo $ac_n "(cached) $ac_c" 1>&6
21230 else
21231   cat > conftest.$ac_ext <<EOF
21232 #line 21233 "configure"
21233 #include "confdefs.h"
21234 #include <sys/types.h>
21235 #if STDC_HEADERS
21236 #include <stdlib.h>
21237 #include <stddef.h>
21238 #endif
21239
21240 EOF
21241 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21242   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21243   rm -rf conftest*
21244   eval "ac_cv_type_caddr_t=yes"
21245 else
21246   rm -rf conftest*
21247   eval "ac_cv_type_caddr_t=no"
21248 fi
21249 rm -f conftest*
21250
21251 fi
21252 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21253   echo "$ac_t""yes" 1>&6
21254 else
21255   echo "$ac_t""no" 1>&6
21256   cat >> confdefs.h <<EOF
21257 #define caddr_t char *
21258 EOF
21259
21260 fi
21261
21262
21263 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21264 echo "configure:21265: checking for socklen_t" >&5
21265 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21266   echo $ac_n "(cached) $ac_c" 1>&6
21267 else
21268   cat > conftest.$ac_ext <<EOF
21269 #line 21270 "configure"
21270 #include "confdefs.h"
21271
21272 #ifdef HAVE_SYS_TYPES_H
21273 #include <sys/types.h>
21274 #endif
21275 #ifdef HAVE_SYS_SOCKET_H
21276 #include <sys/socket.h>
21277 #endif
21278
21279 int main() {
21280 socklen_t len;
21281 ; return 0; }
21282 EOF
21283 if { (eval echo configure:21284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21284   rm -rf conftest*
21285   ol_cv_type_socklen_t=yes
21286 else
21287   echo "configure: failed program was:" >&5
21288   cat conftest.$ac_ext >&5
21289   rm -rf conftest*
21290   ol_cv_type_socklen_t=no
21291 fi
21292 rm -f conftest*
21293 fi
21294
21295 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21296   if test $ol_cv_type_socklen_t = no; then
21297     cat >> confdefs.h <<\EOF
21298 #define socklen_t int
21299 EOF
21300
21301   fi
21302  
21303 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21304 echo "configure:21305: checking for member st_blksize in aggregate type struct stat" >&5
21305 if eval "test \"\${ac_cv_c_struct_member_st_blksize+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 #include <sys/stat.h>
21313 int main() {
21314 struct stat foo; foo.st_blksize;
21315 ; return 0; }
21316 EOF
21317 if { (eval echo configure:21318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21318   rm -rf conftest*
21319   ac_cv_c_struct_member_st_blksize=yes
21320 else
21321   echo "configure: failed program was:" >&5
21322   cat conftest.$ac_ext >&5
21323   rm -rf conftest*
21324   ac_cv_c_struct_member_st_blksize=no
21325 fi
21326 rm -f conftest*
21327 fi
21328
21329 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21330 st_blksize="$ac_cv_c_struct_member_st_blksize"
21331 if test $ac_cv_c_struct_member_st_blksize = yes; then
21332   cat >> confdefs.h <<\EOF
21333 #define HAVE_ST_BLKSIZE 1
21334 EOF
21335
21336 fi
21337
21338 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21339 echo "configure:21340: checking whether time.h and sys/time.h may both be included" >&5
21340 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21341   echo $ac_n "(cached) $ac_c" 1>&6
21342 else
21343   cat > conftest.$ac_ext <<EOF
21344 #line 21345 "configure"
21345 #include "confdefs.h"
21346 #include <sys/types.h>
21347 #include <sys/time.h>
21348 #include <time.h>
21349 int main() {
21350 struct tm *tp;
21351 ; return 0; }
21352 EOF
21353 if { (eval echo configure:21354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21354   rm -rf conftest*
21355   ac_cv_header_time=yes
21356 else
21357   echo "configure: failed program was:" >&5
21358   cat conftest.$ac_ext >&5
21359   rm -rf conftest*
21360   ac_cv_header_time=no
21361 fi
21362 rm -f conftest*
21363 fi
21364
21365 echo "$ac_t""$ac_cv_header_time" 1>&6
21366 if test $ac_cv_header_time = yes; then
21367   cat >> confdefs.h <<\EOF
21368 #define TIME_WITH_SYS_TIME 1
21369 EOF
21370
21371 fi
21372
21373 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21374 echo "configure:21375: checking whether struct tm is in sys/time.h or time.h" >&5
21375 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21376   echo $ac_n "(cached) $ac_c" 1>&6
21377 else
21378   cat > conftest.$ac_ext <<EOF
21379 #line 21380 "configure"
21380 #include "confdefs.h"
21381 #include <sys/types.h>
21382 #include <time.h>
21383 int main() {
21384 struct tm *tp; tp->tm_sec;
21385 ; return 0; }
21386 EOF
21387 if { (eval echo configure:21388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21388   rm -rf conftest*
21389   ac_cv_struct_tm=time.h
21390 else
21391   echo "configure: failed program was:" >&5
21392   cat conftest.$ac_ext >&5
21393   rm -rf conftest*
21394   ac_cv_struct_tm=sys/time.h
21395 fi
21396 rm -f conftest*
21397 fi
21398
21399 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21400 if test $ac_cv_struct_tm = sys/time.h; then
21401   cat >> confdefs.h <<\EOF
21402 #define TM_IN_SYS_TIME 1
21403 EOF
21404
21405 fi
21406
21407 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21408 echo "configure:21409: checking for uid_t in sys/types.h" >&5
21409 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21410   echo $ac_n "(cached) $ac_c" 1>&6
21411 else
21412   cat > conftest.$ac_ext <<EOF
21413 #line 21414 "configure"
21414 #include "confdefs.h"
21415 #include <sys/types.h>
21416 EOF
21417 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21418   egrep "uid_t" >/dev/null 2>&1; then
21419   rm -rf conftest*
21420   ac_cv_type_uid_t=yes
21421 else
21422   rm -rf conftest*
21423   ac_cv_type_uid_t=no
21424 fi
21425 rm -f conftest*
21426
21427 fi
21428
21429 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21430 if test $ac_cv_type_uid_t = no; then
21431   cat >> confdefs.h <<\EOF
21432 #define uid_t int
21433 EOF
21434
21435   cat >> confdefs.h <<\EOF
21436 #define gid_t int
21437 EOF
21438
21439 fi
21440
21441 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21442 echo "configure:21443: checking for sig_atomic_t" >&5
21443 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21444   echo $ac_n "(cached) $ac_c" 1>&6
21445 else
21446   cat > conftest.$ac_ext <<EOF
21447 #line 21448 "configure"
21448 #include "confdefs.h"
21449 #include <signal.h>
21450 int main() {
21451 sig_atomic_t atomic;
21452 ; return 0; }
21453 EOF
21454 if { (eval echo configure:21455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21455   rm -rf conftest*
21456   ol_cv_type_sig_atomic_t=yes
21457 else
21458   echo "configure: failed program was:" >&5
21459   cat conftest.$ac_ext >&5
21460   rm -rf conftest*
21461   ol_cv_type_sig_atomic_t=no
21462 fi
21463 rm -f conftest*
21464 fi
21465
21466 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21467   if test $ol_cv_type_sig_atomic_t = no; then
21468     cat >> confdefs.h <<\EOF
21469 #define sig_atomic_t int
21470 EOF
21471
21472   fi
21473  
21474
21475
21476 # test for pw_gecos in struct passwd
21477 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21478 echo "configure:21479: checking struct passwd for pw_gecos" >&5
21479 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21480   echo $ac_n "(cached) $ac_c" 1>&6
21481 else
21482   
21483         cat > conftest.$ac_ext <<EOF
21484 #line 21485 "configure"
21485 #include "confdefs.h"
21486 #include <pwd.h>
21487 int main() {
21488
21489         struct passwd pwd;
21490         pwd.pw_gecos = pwd.pw_name;
21491
21492 ; return 0; }
21493 EOF
21494 if { (eval echo configure:21495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21495   rm -rf conftest*
21496   ol_cv_struct_passwd_pw_gecos=yes
21497 else
21498   echo "configure: failed program was:" >&5
21499   cat conftest.$ac_ext >&5
21500   rm -rf conftest*
21501   ol_cv_struct_passwd_pw_gecos=no
21502 fi
21503 rm -f conftest*
21504 fi
21505
21506 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21507 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21508         cat >> confdefs.h <<\EOF
21509 #define HAVE_PW_GECOS 1
21510 EOF
21511
21512 fi
21513
21514 # test for pw_passwd in struct passwd
21515 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21516 echo "configure:21517: checking struct passwd for pw_passwd" >&5
21517 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21518   echo $ac_n "(cached) $ac_c" 1>&6
21519 else
21520   
21521         cat > conftest.$ac_ext <<EOF
21522 #line 21523 "configure"
21523 #include "confdefs.h"
21524 #include <pwd.h>
21525 int main() {
21526
21527         struct passwd pwd;
21528         pwd.pw_passwd = pwd.pw_name;
21529
21530 ; return 0; }
21531 EOF
21532 if { (eval echo configure:21533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21533   rm -rf conftest*
21534   ol_cv_struct_passwd_pw_passwd=yes
21535 else
21536   echo "configure: failed program was:" >&5
21537   cat conftest.$ac_ext >&5
21538   rm -rf conftest*
21539   ol_cv_struct_passwd_pw_passwd=no
21540 fi
21541 rm -f conftest*
21542 fi
21543
21544 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21545 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21546         cat >> confdefs.h <<\EOF
21547 #define HAVE_PW_PASSWD 1
21548 EOF
21549
21550 fi
21551
21552
21553 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21554 echo "configure:21555: checking if toupper() requires islower()" >&5
21555 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21556   echo $ac_n "(cached) $ac_c" 1>&6
21557 else
21558   
21559         if test "$cross_compiling" = yes; then
21560   ol_cv_c_upper_lower=safe
21561 else
21562   cat > conftest.$ac_ext <<EOF
21563 #line 21564 "configure"
21564 #include "confdefs.h"
21565
21566 #include <ctype.h>
21567 main()
21568 {
21569         if ('C' == toupper('C'))
21570                 exit(0);
21571         else
21572                 exit(1);
21573 }
21574 EOF
21575 if { (eval echo configure:21576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21576 then
21577   ol_cv_c_upper_lower=no
21578 else
21579   echo "configure: failed program was:" >&5
21580   cat conftest.$ac_ext >&5
21581   rm -fr conftest*
21582   ol_cv_c_upper_lower=yes
21583 fi
21584 rm -fr conftest*
21585 fi
21586
21587 fi
21588
21589 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21590 if test $ol_cv_c_upper_lower != no ; then
21591         cat >> confdefs.h <<\EOF
21592 #define C_UPPER_LOWER 1
21593 EOF
21594
21595 fi
21596
21597 echo $ac_n "checking for working const""... $ac_c" 1>&6
21598 echo "configure:21599: checking for working const" >&5
21599 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21600   echo $ac_n "(cached) $ac_c" 1>&6
21601 else
21602   cat > conftest.$ac_ext <<EOF
21603 #line 21604 "configure"
21604 #include "confdefs.h"
21605
21606 int main() {
21607
21608 /* Ultrix mips cc rejects this.  */
21609 typedef int charset[2]; const charset x;
21610 /* SunOS 4.1.1 cc rejects this.  */
21611 char const *const *ccp;
21612 char **p;
21613 /* NEC SVR4.0.2 mips cc rejects this.  */
21614 struct point {int x, y;};
21615 static struct point const zero = {0,0};
21616 /* AIX XL C 1.02.0.0 rejects this.
21617    It does not let you subtract one const X* pointer from another in an arm
21618    of an if-expression whose if-part is not a constant expression */
21619 const char *g = "string";
21620 ccp = &g + (g ? g-g : 0);
21621 /* HPUX 7.0 cc rejects these. */
21622 ++ccp;
21623 p = (char**) ccp;
21624 ccp = (char const *const *) p;
21625 { /* SCO 3.2v4 cc rejects this.  */
21626   char *t;
21627   char const *s = 0 ? (char *) 0 : (char const *) 0;
21628
21629   *t++ = 0;
21630 }
21631 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21632   int x[] = {25, 17};
21633   const int *foo = &x[0];
21634   ++foo;
21635 }
21636 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21637   typedef const int *iptr;
21638   iptr p = 0;
21639   ++p;
21640 }
21641 { /* AIX XL C 1.02.0.0 rejects this saying
21642      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21643   struct s { int j; const int *ap[3]; };
21644   struct s *b; b->j = 5;
21645 }
21646 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21647   const int foo = 10;
21648 }
21649
21650 ; return 0; }
21651 EOF
21652 if { (eval echo configure:21653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21653   rm -rf conftest*
21654   ac_cv_c_const=yes
21655 else
21656   echo "configure: failed program was:" >&5
21657   cat conftest.$ac_ext >&5
21658   rm -rf conftest*
21659   ac_cv_c_const=no
21660 fi
21661 rm -f conftest*
21662 fi
21663
21664 echo "$ac_t""$ac_cv_c_const" 1>&6
21665 if test $ac_cv_c_const = no; then
21666   cat >> confdefs.h <<\EOF
21667 #define const 
21668 EOF
21669
21670 fi
21671
21672 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21673 echo "configure:21674: checking if compiler understands volatile" >&5
21674 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21675   echo $ac_n "(cached) $ac_c" 1>&6
21676 else
21677   cat > conftest.$ac_ext <<EOF
21678 #line 21679 "configure"
21679 #include "confdefs.h"
21680 int x, y, z;
21681 int main() {
21682 volatile int a; int * volatile b = x ? &y : &z;
21683       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21684       *b = 0;
21685 ; return 0; }
21686 EOF
21687 if { (eval echo configure:21688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21688   rm -rf conftest*
21689   ol_cv_c_volatile=yes
21690 else
21691   echo "configure: failed program was:" >&5
21692   cat conftest.$ac_ext >&5
21693   rm -rf conftest*
21694   ol_cv_c_volatile=no
21695 fi
21696 rm -f conftest*
21697 fi
21698
21699 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21700   if test $ol_cv_c_volatile = yes; then
21701     : 
21702   else
21703     cat >> confdefs.h <<\EOF
21704 #define volatile 
21705 EOF
21706
21707   fi
21708  
21709
21710 if test $cross_compiling = yes ; then
21711         cat >> confdefs.h <<\EOF
21712 #define CROSS_COMPILING 1
21713 EOF
21714
21715 else
21716         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21717 echo "configure:21718: checking whether byte ordering is bigendian" >&5
21718 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21719   echo $ac_n "(cached) $ac_c" 1>&6
21720 else
21721   ac_cv_c_bigendian=unknown
21722 # See if sys/param.h defines the BYTE_ORDER macro.
21723 cat > conftest.$ac_ext <<EOF
21724 #line 21725 "configure"
21725 #include "confdefs.h"
21726 #include <sys/types.h>
21727 #include <sys/param.h>
21728 int main() {
21729
21730 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21731  bogus endian macros
21732 #endif
21733 ; return 0; }
21734 EOF
21735 if { (eval echo configure:21736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21736   rm -rf conftest*
21737   # It does; now see whether it defined to BIG_ENDIAN or not.
21738 cat > conftest.$ac_ext <<EOF
21739 #line 21740 "configure"
21740 #include "confdefs.h"
21741 #include <sys/types.h>
21742 #include <sys/param.h>
21743 int main() {
21744
21745 #if BYTE_ORDER != BIG_ENDIAN
21746  not big endian
21747 #endif
21748 ; return 0; }
21749 EOF
21750 if { (eval echo configure:21751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21751   rm -rf conftest*
21752   ac_cv_c_bigendian=yes
21753 else
21754   echo "configure: failed program was:" >&5
21755   cat conftest.$ac_ext >&5
21756   rm -rf conftest*
21757   ac_cv_c_bigendian=no
21758 fi
21759 rm -f conftest*
21760 else
21761   echo "configure: failed program was:" >&5
21762   cat conftest.$ac_ext >&5
21763 fi
21764 rm -f conftest*
21765 if test $ac_cv_c_bigendian = unknown; then
21766 if test "$cross_compiling" = yes; then
21767     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21768 else
21769   cat > conftest.$ac_ext <<EOF
21770 #line 21771 "configure"
21771 #include "confdefs.h"
21772 main () {
21773   /* Are we little or big endian?  From Harbison&Steele.  */
21774   union
21775   {
21776     long l;
21777     char c[sizeof (long)];
21778   } u;
21779   u.l = 1;
21780   exit (u.c[sizeof (long) - 1] == 1);
21781 }
21782 EOF
21783 if { (eval echo configure:21784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21784 then
21785   ac_cv_c_bigendian=no
21786 else
21787   echo "configure: failed program was:" >&5
21788   cat conftest.$ac_ext >&5
21789   rm -fr conftest*
21790   ac_cv_c_bigendian=yes
21791 fi
21792 rm -fr conftest*
21793 fi
21794
21795 fi
21796 fi
21797
21798 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21799 if test $ac_cv_c_bigendian = yes; then
21800   cat >> confdefs.h <<\EOF
21801 #define WORDS_BIGENDIAN 1
21802 EOF
21803
21804 fi
21805
21806 fi
21807
21808 echo $ac_n "checking size of short""... $ac_c" 1>&6
21809 echo "configure:21810: checking size of short" >&5 
21810 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21811   echo $ac_n "(cached) $ac_c" 1>&6
21812 else
21813   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21814   cat > conftest.$ac_ext <<EOF
21815 #line 21816 "configure"
21816 #include "confdefs.h"
21817 #include "confdefs.h" 
21818 #include <sys/types.h> 
21819  
21820
21821 int main() {
21822 switch (0) case 0: case (sizeof (short) == $ac_size):;
21823 ; return 0; }
21824 EOF
21825 if { (eval echo configure:21826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21826   rm -rf conftest*
21827   ac_cv_sizeof_short=$ac_size
21828 else
21829   echo "configure: failed program was:" >&5
21830   cat conftest.$ac_ext >&5
21831 fi
21832 rm -f conftest* 
21833   if test x$ac_cv_sizeof_short != x ; then break; fi 
21834 done 
21835
21836 fi
21837  
21838 if test x$ac_cv_sizeof_short = x ; then 
21839   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21840 fi 
21841 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21842 cat >> confdefs.h <<EOF
21843 #define SIZEOF_SHORT $ac_cv_sizeof_short
21844 EOF
21845  
21846  
21847 echo $ac_n "checking size of int""... $ac_c" 1>&6
21848 echo "configure:21849: checking size of int" >&5 
21849 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21850   echo $ac_n "(cached) $ac_c" 1>&6
21851 else
21852   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21853   cat > conftest.$ac_ext <<EOF
21854 #line 21855 "configure"
21855 #include "confdefs.h"
21856 #include "confdefs.h" 
21857 #include <sys/types.h> 
21858  
21859
21860 int main() {
21861 switch (0) case 0: case (sizeof (int) == $ac_size):;
21862 ; return 0; }
21863 EOF
21864 if { (eval echo configure:21865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21865   rm -rf conftest*
21866   ac_cv_sizeof_int=$ac_size
21867 else
21868   echo "configure: failed program was:" >&5
21869   cat conftest.$ac_ext >&5
21870 fi
21871 rm -f conftest* 
21872   if test x$ac_cv_sizeof_int != x ; then break; fi 
21873 done 
21874
21875 fi
21876  
21877 if test x$ac_cv_sizeof_int = x ; then 
21878   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21879 fi 
21880 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21881 cat >> confdefs.h <<EOF
21882 #define SIZEOF_INT $ac_cv_sizeof_int
21883 EOF
21884  
21885  
21886 echo $ac_n "checking size of long""... $ac_c" 1>&6
21887 echo "configure:21888: checking size of long" >&5 
21888 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21889   echo $ac_n "(cached) $ac_c" 1>&6
21890 else
21891   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21892   cat > conftest.$ac_ext <<EOF
21893 #line 21894 "configure"
21894 #include "confdefs.h"
21895 #include "confdefs.h" 
21896 #include <sys/types.h> 
21897  
21898
21899 int main() {
21900 switch (0) case 0: case (sizeof (long) == $ac_size):;
21901 ; return 0; }
21902 EOF
21903 if { (eval echo configure:21904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21904   rm -rf conftest*
21905   ac_cv_sizeof_long=$ac_size
21906 else
21907   echo "configure: failed program was:" >&5
21908   cat conftest.$ac_ext >&5
21909 fi
21910 rm -f conftest* 
21911   if test x$ac_cv_sizeof_long != x ; then break; fi 
21912 done 
21913
21914 fi
21915  
21916 if test x$ac_cv_sizeof_long = x ; then 
21917   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21918 fi 
21919 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21920 cat >> confdefs.h <<EOF
21921 #define SIZEOF_LONG $ac_cv_sizeof_long
21922 EOF
21923  
21924
21925
21926 if test "$ac_cv_sizeof_int" -lt 4 ; then
21927         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21928
21929         cat >> confdefs.h <<\EOF
21930 #define LBER_INT_T long
21931 EOF
21932
21933 else
21934         cat >> confdefs.h <<\EOF
21935 #define LBER_INT_T int
21936 EOF
21937
21938 fi
21939
21940 cat >> confdefs.h <<\EOF
21941 #define LBER_LEN_T long
21942 EOF
21943
21944 cat >> confdefs.h <<\EOF
21945 #define LBER_SOCKET_T int
21946 EOF
21947
21948 cat >> confdefs.h <<\EOF
21949 #define LBER_TAG_T long
21950 EOF
21951
21952
21953 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21954 echo "configure:21955: checking for 8-bit clean memcmp" >&5
21955 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21956   echo $ac_n "(cached) $ac_c" 1>&6
21957 else
21958   if test "$cross_compiling" = yes; then
21959   ac_cv_func_memcmp_clean=no
21960 else
21961   cat > conftest.$ac_ext <<EOF
21962 #line 21963 "configure"
21963 #include "confdefs.h"
21964
21965 main()
21966 {
21967   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21968   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21969 }
21970
21971 EOF
21972 if { (eval echo configure:21973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21973 then
21974   ac_cv_func_memcmp_clean=yes
21975 else
21976   echo "configure: failed program was:" >&5
21977   cat conftest.$ac_ext >&5
21978   rm -fr conftest*
21979   ac_cv_func_memcmp_clean=no
21980 fi
21981 rm -fr conftest*
21982 fi
21983
21984 fi
21985
21986 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21987 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21988
21989 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21990 echo "configure:21991: checking for strftime" >&5
21991 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21992   echo $ac_n "(cached) $ac_c" 1>&6
21993 else
21994   cat > conftest.$ac_ext <<EOF
21995 #line 21996 "configure"
21996 #include "confdefs.h"
21997 /* System header to define __stub macros and hopefully few prototypes,
21998     which can conflict with char strftime(); below.  */
21999 #include <assert.h>
22000 /* Override any gcc2 internal prototype to avoid an error.  */
22001 /* We use char because int might match the return type of a gcc2
22002     builtin and then its argument prototype would still apply.  */
22003 char strftime();
22004 char (*f)();
22005
22006 int main() {
22007
22008 /* The GNU C library defines this for functions which it implements
22009     to always fail with ENOSYS.  Some functions are actually named
22010     something starting with __ and the normal name is an alias.  */
22011 #if defined (__stub_strftime) || defined (__stub___strftime)
22012 choke me
22013 #else
22014 f = strftime;
22015 #endif
22016
22017 ; return 0; }
22018 EOF
22019 if { (eval echo configure:22020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22020   rm -rf conftest*
22021   eval "ac_cv_func_strftime=yes"
22022 else
22023   echo "configure: failed program was:" >&5
22024   cat conftest.$ac_ext >&5
22025   rm -rf conftest*
22026   eval "ac_cv_func_strftime=no"
22027 fi
22028 rm -f conftest*
22029 fi
22030
22031 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22032   echo "$ac_t""yes" 1>&6
22033   cat >> confdefs.h <<\EOF
22034 #define HAVE_STRFTIME 1
22035 EOF
22036
22037 else
22038   echo "$ac_t""no" 1>&6
22039 # strftime is in -lintl on SCO UNIX.
22040 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22041 echo "configure:22042: checking for strftime in -lintl" >&5
22042 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22043 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22044   echo $ac_n "(cached) $ac_c" 1>&6
22045 else
22046   ac_save_LIBS="$LIBS"
22047 LIBS="-lintl  $LIBS"
22048 cat > conftest.$ac_ext <<EOF
22049 #line 22050 "configure"
22050 #include "confdefs.h"
22051 /* Override any gcc2 internal prototype to avoid an error.  */
22052 /* We use char because int might match the return type of a gcc2
22053     builtin and then its argument prototype would still apply.  */
22054 char strftime();
22055
22056 int main() {
22057 strftime()
22058 ; return 0; }
22059 EOF
22060 if { (eval echo configure:22061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22061   rm -rf conftest*
22062   eval "ac_cv_lib_$ac_lib_var=yes"
22063 else
22064   echo "configure: failed program was:" >&5
22065   cat conftest.$ac_ext >&5
22066   rm -rf conftest*
22067   eval "ac_cv_lib_$ac_lib_var=no"
22068 fi
22069 rm -f conftest*
22070 LIBS="$ac_save_LIBS"
22071
22072 fi
22073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22074   echo "$ac_t""yes" 1>&6
22075   cat >> confdefs.h <<\EOF
22076 #define HAVE_STRFTIME 1
22077 EOF
22078
22079 LIBS="-lintl $LIBS"
22080 else
22081   echo "$ac_t""no" 1>&6
22082 fi
22083
22084 fi
22085
22086
22087 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22088 echo "configure:22089: checking for inet_aton()" >&5
22089 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22090   echo $ac_n "(cached) $ac_c" 1>&6
22091 else
22092   cat > conftest.$ac_ext <<EOF
22093 #line 22094 "configure"
22094 #include "confdefs.h"
22095
22096 #ifdef HAVE_SYS_TYPES_H
22097 #       include <sys/types.h>
22098 #endif
22099 #ifdef HAVE_SYS_SOCKET_H
22100 #       include <sys/socket.h>
22101 #       ifdef HAVE_SYS_SELECT_H
22102 #               include <sys/select.h>
22103 #       endif
22104 #       include <netinet/in.h>
22105 #       ifdef HAVE_ARPA_INET_H
22106 #               include <arpa/inet.h>
22107 #       endif
22108 #endif
22109
22110 int main() {
22111 struct in_addr in;
22112 int rc = inet_aton( "255.255.255.255", &in );
22113 ; return 0; }
22114 EOF
22115 if { (eval echo configure:22116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22116   rm -rf conftest*
22117   ol_cv_func_inet_aton=yes
22118 else
22119   echo "configure: failed program was:" >&5
22120   cat conftest.$ac_ext >&5
22121   rm -rf conftest*
22122   ol_cv_func_inet_aton=no
22123 fi
22124 rm -f conftest*
22125 fi
22126
22127 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22128   if test $ol_cv_func_inet_aton != no; then
22129     cat >> confdefs.h <<\EOF
22130 #define HAVE_INET_ATON 1
22131 EOF
22132
22133   fi
22134  
22135
22136 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22137 echo "configure:22138: checking for _spawnlp" >&5
22138 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22139   echo $ac_n "(cached) $ac_c" 1>&6
22140 else
22141   cat > conftest.$ac_ext <<EOF
22142 #line 22143 "configure"
22143 #include "confdefs.h"
22144 /* System header to define __stub macros and hopefully few prototypes,
22145     which can conflict with char _spawnlp(); below.  */
22146 #include <assert.h>
22147 /* Override any gcc2 internal prototype to avoid an error.  */
22148 /* We use char because int might match the return type of a gcc2
22149     builtin and then its argument prototype would still apply.  */
22150 char _spawnlp();
22151 char (*f)();
22152
22153 int main() {
22154
22155 /* The GNU C library defines this for functions which it implements
22156     to always fail with ENOSYS.  Some functions are actually named
22157     something starting with __ and the normal name is an alias.  */
22158 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22159 choke me
22160 #else
22161 f = _spawnlp;
22162 #endif
22163
22164 ; return 0; }
22165 EOF
22166 if { (eval echo configure:22167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22167   rm -rf conftest*
22168   eval "ac_cv_func__spawnlp=yes"
22169 else
22170   echo "configure: failed program was:" >&5
22171   cat conftest.$ac_ext >&5
22172   rm -rf conftest*
22173   eval "ac_cv_func__spawnlp=no"
22174 fi
22175 rm -f conftest*
22176 fi
22177
22178 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22179   echo "$ac_t""yes" 1>&6
22180   cat >> confdefs.h <<\EOF
22181 #define HAVE_SPAWNLP 1
22182 EOF
22183
22184 else
22185   echo "$ac_t""no" 1>&6
22186 fi
22187
22188
22189 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22190 echo "configure:22191: checking for _snprintf" >&5
22191 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22192   echo $ac_n "(cached) $ac_c" 1>&6
22193 else
22194   cat > conftest.$ac_ext <<EOF
22195 #line 22196 "configure"
22196 #include "confdefs.h"
22197 /* System header to define __stub macros and hopefully few prototypes,
22198     which can conflict with char _snprintf(); below.  */
22199 #include <assert.h>
22200 /* Override any gcc2 internal prototype to avoid an error.  */
22201 /* We use char because int might match the return type of a gcc2
22202     builtin and then its argument prototype would still apply.  */
22203 char _snprintf();
22204 char (*f)();
22205
22206 int main() {
22207
22208 /* The GNU C library defines this for functions which it implements
22209     to always fail with ENOSYS.  Some functions are actually named
22210     something starting with __ and the normal name is an alias.  */
22211 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22212 choke me
22213 #else
22214 f = _snprintf;
22215 #endif
22216
22217 ; return 0; }
22218 EOF
22219 if { (eval echo configure:22220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22220   rm -rf conftest*
22221   eval "ac_cv_func__snprintf=yes"
22222 else
22223   echo "configure: failed program was:" >&5
22224   cat conftest.$ac_ext >&5
22225   rm -rf conftest*
22226   eval "ac_cv_func__snprintf=no"
22227 fi
22228 rm -f conftest*
22229 fi
22230
22231 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22232   echo "$ac_t""yes" 1>&6
22233   ac_cv_func_snprintf=yes
22234         cat >> confdefs.h <<\EOF
22235 #define snprintf _snprintf
22236 EOF
22237
22238
22239 else
22240   echo "$ac_t""no" 1>&6
22241 fi
22242
22243
22244 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22245 echo "configure:22246: checking for _vsnprintf" >&5
22246 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22247   echo $ac_n "(cached) $ac_c" 1>&6
22248 else
22249   cat > conftest.$ac_ext <<EOF
22250 #line 22251 "configure"
22251 #include "confdefs.h"
22252 /* System header to define __stub macros and hopefully few prototypes,
22253     which can conflict with char _vsnprintf(); below.  */
22254 #include <assert.h>
22255 /* Override any gcc2 internal prototype to avoid an error.  */
22256 /* We use char because int might match the return type of a gcc2
22257     builtin and then its argument prototype would still apply.  */
22258 char _vsnprintf();
22259 char (*f)();
22260
22261 int main() {
22262
22263 /* The GNU C library defines this for functions which it implements
22264     to always fail with ENOSYS.  Some functions are actually named
22265     something starting with __ and the normal name is an alias.  */
22266 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22267 choke me
22268 #else
22269 f = _vsnprintf;
22270 #endif
22271
22272 ; return 0; }
22273 EOF
22274 if { (eval echo configure:22275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22275   rm -rf conftest*
22276   eval "ac_cv_func__vsnprintf=yes"
22277 else
22278   echo "configure: failed program was:" >&5
22279   cat conftest.$ac_ext >&5
22280   rm -rf conftest*
22281   eval "ac_cv_func__vsnprintf=no"
22282 fi
22283 rm -f conftest*
22284 fi
22285
22286 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22287   echo "$ac_t""yes" 1>&6
22288   ac_cv_func_vsnprintf=yes
22289         cat >> confdefs.h <<\EOF
22290 #define vsnprintf _vsnprintf
22291 EOF
22292
22293
22294 else
22295   echo "$ac_t""no" 1>&6
22296 fi
22297
22298
22299 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22300 echo "configure:22301: checking for vprintf" >&5
22301 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22302   echo $ac_n "(cached) $ac_c" 1>&6
22303 else
22304   cat > conftest.$ac_ext <<EOF
22305 #line 22306 "configure"
22306 #include "confdefs.h"
22307 /* System header to define __stub macros and hopefully few prototypes,
22308     which can conflict with char vprintf(); below.  */
22309 #include <assert.h>
22310 /* Override any gcc2 internal prototype to avoid an error.  */
22311 /* We use char because int might match the return type of a gcc2
22312     builtin and then its argument prototype would still apply.  */
22313 char vprintf();
22314 char (*f)();
22315
22316 int main() {
22317
22318 /* The GNU C library defines this for functions which it implements
22319     to always fail with ENOSYS.  Some functions are actually named
22320     something starting with __ and the normal name is an alias.  */
22321 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22322 choke me
22323 #else
22324 f = vprintf;
22325 #endif
22326
22327 ; return 0; }
22328 EOF
22329 if { (eval echo configure:22330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22330   rm -rf conftest*
22331   eval "ac_cv_func_vprintf=yes"
22332 else
22333   echo "configure: failed program was:" >&5
22334   cat conftest.$ac_ext >&5
22335   rm -rf conftest*
22336   eval "ac_cv_func_vprintf=no"
22337 fi
22338 rm -f conftest*
22339 fi
22340
22341 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22342   echo "$ac_t""yes" 1>&6
22343   cat >> confdefs.h <<\EOF
22344 #define HAVE_VPRINTF 1
22345 EOF
22346
22347 else
22348   echo "$ac_t""no" 1>&6
22349 fi
22350
22351 if test "$ac_cv_func_vprintf" != yes; then
22352 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22353 echo "configure:22354: checking for _doprnt" >&5
22354 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22355   echo $ac_n "(cached) $ac_c" 1>&6
22356 else
22357   cat > conftest.$ac_ext <<EOF
22358 #line 22359 "configure"
22359 #include "confdefs.h"
22360 /* System header to define __stub macros and hopefully few prototypes,
22361     which can conflict with char _doprnt(); below.  */
22362 #include <assert.h>
22363 /* Override any gcc2 internal prototype to avoid an error.  */
22364 /* We use char because int might match the return type of a gcc2
22365     builtin and then its argument prototype would still apply.  */
22366 char _doprnt();
22367 char (*f)();
22368
22369 int main() {
22370
22371 /* The GNU C library defines this for functions which it implements
22372     to always fail with ENOSYS.  Some functions are actually named
22373     something starting with __ and the normal name is an alias.  */
22374 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22375 choke me
22376 #else
22377 f = _doprnt;
22378 #endif
22379
22380 ; return 0; }
22381 EOF
22382 if { (eval echo configure:22383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22383   rm -rf conftest*
22384   eval "ac_cv_func__doprnt=yes"
22385 else
22386   echo "configure: failed program was:" >&5
22387   cat conftest.$ac_ext >&5
22388   rm -rf conftest*
22389   eval "ac_cv_func__doprnt=no"
22390 fi
22391 rm -f conftest*
22392 fi
22393
22394 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22395   echo "$ac_t""yes" 1>&6
22396   cat >> confdefs.h <<\EOF
22397 #define HAVE_DOPRNT 1
22398 EOF
22399
22400 else
22401   echo "$ac_t""no" 1>&6
22402 fi
22403
22404 fi
22405
22406
22407 if test $ac_cv_func_vprintf = yes ; then
22408                 for ac_func in snprintf vsnprintf
22409 do
22410 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22411 echo "configure:22412: checking for $ac_func" >&5
22412 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22413   echo $ac_n "(cached) $ac_c" 1>&6
22414 else
22415   cat > conftest.$ac_ext <<EOF
22416 #line 22417 "configure"
22417 #include "confdefs.h"
22418 /* System header to define __stub macros and hopefully few prototypes,
22419     which can conflict with char $ac_func(); below.  */
22420 #include <assert.h>
22421 /* Override any gcc2 internal prototype to avoid an error.  */
22422 /* We use char because int might match the return type of a gcc2
22423     builtin and then its argument prototype would still apply.  */
22424 char $ac_func();
22425 char (*f)();
22426
22427 int main() {
22428
22429 /* The GNU C library defines this for functions which it implements
22430     to always fail with ENOSYS.  Some functions are actually named
22431     something starting with __ and the normal name is an alias.  */
22432 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22433 choke me
22434 #else
22435 f = $ac_func;
22436 #endif
22437
22438 ; return 0; }
22439 EOF
22440 if { (eval echo configure:22441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22441   rm -rf conftest*
22442   eval "ac_cv_func_$ac_func=yes"
22443 else
22444   echo "configure: failed program was:" >&5
22445   cat conftest.$ac_ext >&5
22446   rm -rf conftest*
22447   eval "ac_cv_func_$ac_func=no"
22448 fi
22449 rm -f conftest*
22450 fi
22451
22452 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22453   echo "$ac_t""yes" 1>&6
22454     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22455   cat >> confdefs.h <<EOF
22456 #define $ac_tr_func 1
22457 EOF
22458  
22459 else
22460   echo "$ac_t""no" 1>&6
22461 fi
22462 done
22463
22464 fi
22465
22466 for ac_func in \
22467         bcopy                   \
22468         closesocket             \
22469         chroot                  \
22470         endgrent                \
22471         endpwent                \
22472         fcntl                   \
22473         flock                   \
22474         fstat                   \
22475         getdtablesize   \
22476         getgrgid                \
22477         gethostname             \
22478         getpass                 \
22479         getpassphrase   \
22480         getpwuid                \
22481         getpwnam                \
22482         getspnam                \
22483         gettimeofday    \
22484         initgroups              \
22485         lockf                   \
22486         memcpy                  \
22487         memmove                 \
22488         mkstemp                 \
22489         mktemp                  \
22490         pipe                    \
22491         read                    \
22492         recv                    \
22493         recvfrom                \
22494         setpwfile               \
22495         setgid                  \
22496         setegid                 \
22497         setsid                  \
22498         setuid                  \
22499         seteuid                 \
22500         sigaction               \
22501         signal                  \
22502         sigset                  \
22503         strdup                  \
22504         strerror                \
22505         strpbrk                 \
22506         strrchr                 \
22507         strsep                  \
22508         strstr                  \
22509         strtol                  \
22510         strtoul                 \
22511         strspn                  \
22512         sysconf                 \
22513         usleep                  \
22514         waitpid                 \
22515         wait4                   \
22516         write                   \
22517         send                    \
22518         sendmsg                 \
22519         sendto                  \
22520
22521 do
22522 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22523 echo "configure:22524: checking for $ac_func" >&5
22524 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22525   echo $ac_n "(cached) $ac_c" 1>&6
22526 else
22527   cat > conftest.$ac_ext <<EOF
22528 #line 22529 "configure"
22529 #include "confdefs.h"
22530 /* System header to define __stub macros and hopefully few prototypes,
22531     which can conflict with char $ac_func(); below.  */
22532 #include <assert.h>
22533 /* Override any gcc2 internal prototype to avoid an error.  */
22534 /* We use char because int might match the return type of a gcc2
22535     builtin and then its argument prototype would still apply.  */
22536 char $ac_func();
22537 char (*f)();
22538
22539 int main() {
22540
22541 /* The GNU C library defines this for functions which it implements
22542     to always fail with ENOSYS.  Some functions are actually named
22543     something starting with __ and the normal name is an alias.  */
22544 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22545 choke me
22546 #else
22547 f = $ac_func;
22548 #endif
22549
22550 ; return 0; }
22551 EOF
22552 if { (eval echo configure:22553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22553   rm -rf conftest*
22554   eval "ac_cv_func_$ac_func=yes"
22555 else
22556   echo "configure: failed program was:" >&5
22557   cat conftest.$ac_ext >&5
22558   rm -rf conftest*
22559   eval "ac_cv_func_$ac_func=no"
22560 fi
22561 rm -f conftest*
22562 fi
22563
22564 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22565   echo "$ac_t""yes" 1>&6
22566     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22567   cat >> confdefs.h <<EOF
22568 #define $ac_tr_func 1
22569 EOF
22570  
22571 else
22572   echo "$ac_t""no" 1>&6
22573 fi
22574 done
22575
22576
22577 for ac_func in getopt getpeereid
22578 do
22579 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22580 echo "configure:22581: checking for $ac_func" >&5
22581 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22582   echo $ac_n "(cached) $ac_c" 1>&6
22583 else
22584   cat > conftest.$ac_ext <<EOF
22585 #line 22586 "configure"
22586 #include "confdefs.h"
22587 /* System header to define __stub macros and hopefully few prototypes,
22588     which can conflict with char $ac_func(); below.  */
22589 #include <assert.h>
22590 /* Override any gcc2 internal prototype to avoid an error.  */
22591 /* We use char because int might match the return type of a gcc2
22592     builtin and then its argument prototype would still apply.  */
22593 char $ac_func();
22594 char (*f)();
22595
22596 int main() {
22597
22598 /* The GNU C library defines this for functions which it implements
22599     to always fail with ENOSYS.  Some functions are actually named
22600     something starting with __ and the normal name is an alias.  */
22601 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22602 choke me
22603 #else
22604 f = $ac_func;
22605 #endif
22606
22607 ; return 0; }
22608 EOF
22609 if { (eval echo configure:22610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22610   rm -rf conftest*
22611   eval "ac_cv_func_$ac_func=yes"
22612 else
22613   echo "configure: failed program was:" >&5
22614   cat conftest.$ac_ext >&5
22615   rm -rf conftest*
22616   eval "ac_cv_func_$ac_func=no"
22617 fi
22618 rm -f conftest*
22619 fi
22620
22621 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22622   echo "$ac_t""yes" 1>&6
22623     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22624   cat >> confdefs.h <<EOF
22625 #define $ac_tr_func 1
22626 EOF
22627  
22628 else
22629   echo "$ac_t""no" 1>&6
22630 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22631 fi
22632 done
22633
22634
22635
22636 if test "$ac_cv_func_getopt" != yes; then
22637         LIBSRCS="$LIBSRCS getopt.c"
22638 fi
22639 if test "$ac_cv_func_getpeereid" != yes; then
22640         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
22641 echo "configure:22642: checking for msg_accrights in msghdr" >&5
22642 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
22643   echo $ac_n "(cached) $ac_c" 1>&6
22644 else
22645   cat > conftest.$ac_ext <<EOF
22646 #line 22647 "configure"
22647 #include "confdefs.h"
22648 #include <sys/socket.h>
22649 int main() {
22650 struct msghdr m; m.msg_accrightslen=0
22651 ; return 0; }
22652 EOF
22653 if { (eval echo configure:22654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22654   rm -rf conftest*
22655   ol_cv_msghdr_msg_accrights=yes
22656 else
22657   echo "configure: failed program was:" >&5
22658   cat conftest.$ac_ext >&5
22659   rm -rf conftest*
22660   ol_cv_msghdr_msg_accrights=no
22661 fi
22662 rm -f conftest*
22663         
22664 fi
22665
22666 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
22667   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
22668         cat >> confdefs.h <<\EOF
22669 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
22670 EOF
22671
22672   fi
22673
22674         LIBSRCS="$LIBSRCS getpeereid.c"
22675 fi
22676 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22677         if test "$ac_cv_func_snprintf" != yes; then
22678                 cat >> confdefs.h <<\EOF
22679 #define snprintf ber_pvt_snprintf
22680 EOF
22681
22682         fi
22683         if test "$ac_cv_func_vsnprintf" != yes; then
22684                 cat >> confdefs.h <<\EOF
22685 #define vsnprintf ber_pvt_vsnprintf
22686 EOF
22687
22688         fi
22689 fi
22690
22691 # Check Configuration
22692 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22693 echo "configure:22694: checking declaration of sys_errlist" >&5
22694 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22695   echo $ac_n "(cached) $ac_c" 1>&6
22696 else
22697   
22698         cat > conftest.$ac_ext <<EOF
22699 #line 22700 "configure"
22700 #include "confdefs.h"
22701
22702 #include <stdio.h>
22703 #include <sys/types.h>
22704 #include <errno.h>
22705 #ifdef WINNT
22706 #include <stdlib.h>
22707 #endif 
22708 int main() {
22709 char *c = (char *) *sys_errlist
22710 ; return 0; }
22711 EOF
22712 if { (eval echo configure:22713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22713   rm -rf conftest*
22714   ol_cv_dcl_sys_errlist=yes
22715         ol_cv_have_sys_errlist=yes
22716 else
22717   echo "configure: failed program was:" >&5
22718   cat conftest.$ac_ext >&5
22719   rm -rf conftest*
22720   ol_cv_dcl_sys_errlist=no
22721 fi
22722 rm -f conftest*
22723 fi
22724
22725 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22726 #
22727 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22728 if test $ol_cv_dcl_sys_errlist = no ; then
22729         cat >> confdefs.h <<\EOF
22730 #define DECL_SYS_ERRLIST 1
22731 EOF
22732
22733
22734         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22735 echo "configure:22736: checking existence of sys_errlist" >&5
22736 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22737   echo $ac_n "(cached) $ac_c" 1>&6
22738 else
22739   
22740                 cat > conftest.$ac_ext <<EOF
22741 #line 22742 "configure"
22742 #include "confdefs.h"
22743 #include <errno.h>
22744 int main() {
22745 char *c = (char *) *sys_errlist
22746 ; return 0; }
22747 EOF
22748 if { (eval echo configure:22749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22749   rm -rf conftest*
22750   ol_cv_have_sys_errlist=yes
22751 else
22752   echo "configure: failed program was:" >&5
22753   cat conftest.$ac_ext >&5
22754   rm -rf conftest*
22755   ol_cv_have_sys_errlist=no
22756 fi
22757 rm -f conftest*
22758 fi
22759
22760 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22761 fi
22762 if test $ol_cv_have_sys_errlist = yes ; then
22763         cat >> confdefs.h <<\EOF
22764 #define HAVE_SYS_ERRLIST 1
22765 EOF
22766
22767 fi
22768
22769
22770
22771 if test "$ol_enable_slapi" != no ; then
22772                         for ac_hdr in ltdl.h
22773 do
22774 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22775 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22776 echo "configure:22777: checking for $ac_hdr" >&5
22777 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22778   echo $ac_n "(cached) $ac_c" 1>&6
22779 else
22780   cat > conftest.$ac_ext <<EOF
22781 #line 22782 "configure"
22782 #include "confdefs.h"
22783 #include <$ac_hdr>
22784 EOF
22785 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22786 { (eval echo configure:22787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22787 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22788 if test -z "$ac_err"; then
22789   rm -rf conftest*
22790   eval "ac_cv_header_$ac_safe=yes"
22791 else
22792   echo "$ac_err" >&5
22793   echo "configure: failed program was:" >&5
22794   cat conftest.$ac_ext >&5
22795   rm -rf conftest*
22796   eval "ac_cv_header_$ac_safe=no"
22797 fi
22798 rm -f conftest*
22799 fi
22800 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22801   echo "$ac_t""yes" 1>&6
22802     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22803   cat >> confdefs.h <<EOF
22804 #define $ac_tr_hdr 1
22805 EOF
22806  
22807 else
22808   echo "$ac_t""no" 1>&6
22809 fi
22810 done
22811
22812
22813         if test $ac_cv_header_ltdl_h != yes ; then
22814                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
22815         fi
22816         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
22817 echo "configure:22818: checking for lt_dlinit in -lltdl" >&5
22818 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
22819 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22820   echo $ac_n "(cached) $ac_c" 1>&6
22821 else
22822   ac_save_LIBS="$LIBS"
22823 LIBS="-lltdl  $LIBS"
22824 cat > conftest.$ac_ext <<EOF
22825 #line 22826 "configure"
22826 #include "confdefs.h"
22827 /* Override any gcc2 internal prototype to avoid an error.  */
22828 /* We use char because int might match the return type of a gcc2
22829     builtin and then its argument prototype would still apply.  */
22830 char lt_dlinit();
22831
22832 int main() {
22833 lt_dlinit()
22834 ; return 0; }
22835 EOF
22836 if { (eval echo configure:22837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22837   rm -rf conftest*
22838   eval "ac_cv_lib_$ac_lib_var=yes"
22839 else
22840   echo "configure: failed program was:" >&5
22841   cat conftest.$ac_ext >&5
22842   rm -rf conftest*
22843   eval "ac_cv_lib_$ac_lib_var=no"
22844 fi
22845 rm -f conftest*
22846 LIBS="$ac_save_LIBS"
22847
22848 fi
22849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22850   echo "$ac_t""yes" 1>&6
22851   
22852                 SLAPI_LIBS=-lltdl
22853                 LIBSLAPI=libslapi.a
22854                 LIBSLAPITOOLS=../libslapi.a
22855                 cat >> confdefs.h <<\EOF
22856 #define HAVE_LIBLTDL 1
22857 EOF
22858
22859         
22860 else
22861   echo "$ac_t""no" 1>&6
22862 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
22863 fi
22864
22865
22866         cat >> confdefs.h <<\EOF
22867 #define LDAP_SLAPI 1
22868 EOF
22869
22870 fi
22871
22872 if test "$ol_enable_debug" != no ; then
22873         cat >> confdefs.h <<\EOF
22874 #define LDAP_DEBUG 1
22875 EOF
22876
22877 fi
22878 if test "$ol_enable_syslog" = yes ; then
22879         cat >> confdefs.h <<\EOF
22880 #define LDAP_SYSLOG 1
22881 EOF
22882
22883 fi
22884 if test "$ol_link_kbind" != no ; then
22885         cat >> confdefs.h <<\EOF
22886 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22887 EOF
22888
22889 fi
22890 if test "$ol_enable_proctitle" != no ; then
22891         cat >> confdefs.h <<\EOF
22892 #define LDAP_PROCTITLE 1
22893 EOF
22894
22895 fi
22896 if test "$ol_enable_referrals" != no ; then
22897         cat >> confdefs.h <<\EOF
22898 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22899 EOF
22900
22901 fi
22902 if test "$ol_enable_local" != no; then
22903         cat >> confdefs.h <<\EOF
22904 #define LDAP_PF_LOCAL 1
22905 EOF
22906
22907 fi
22908 if test "$ol_link_ipv6" != no; then
22909         cat >> confdefs.h <<\EOF
22910 #define LDAP_PF_INET6 1
22911 EOF
22912
22913 fi
22914 if test "$ol_enable_cleartext" != no ; then
22915         cat >> confdefs.h <<\EOF
22916 #define SLAPD_CLEARTEXT 1
22917 EOF
22918
22919 fi
22920 if test "$ol_enable_crypt" != no ; then
22921         cat >> confdefs.h <<\EOF
22922 #define SLAPD_CRYPT 1
22923 EOF
22924
22925 fi
22926 if test "$ol_link_kpasswd" != no ; then
22927         cat >> confdefs.h <<\EOF
22928 #define SLAPD_KPASSWD 1
22929 EOF
22930
22931 fi
22932 if test "$ol_link_spasswd" != no ; then
22933         cat >> confdefs.h <<\EOF
22934 #define SLAPD_SPASSWD 1
22935 EOF
22936
22937 fi
22938 if test "$ol_enable_multimaster" != no ; then
22939         cat >> confdefs.h <<\EOF
22940 #define SLAPD_MULTIMASTER 1
22941 EOF
22942
22943 fi
22944 if test "$ol_enable_rlookups" != no ; then
22945         cat >> confdefs.h <<\EOF
22946 #define SLAPD_RLOOKUPS 1
22947 EOF
22948
22949 fi
22950 if test "$ol_enable_aci" != no ; then
22951         cat >> confdefs.h <<\EOF
22952 #define SLAPD_ACI_ENABLED 1
22953 EOF
22954
22955 fi
22956
22957 if test "$ol_link_modules" != no ; then
22958         cat >> confdefs.h <<\EOF
22959 #define SLAPD_MODULES 1
22960 EOF
22961
22962         BUILD_SLAPD=yes
22963         SLAPD_MODULES_LDFLAGS="-dlopen self"
22964 fi
22965
22966 if test "$ol_enable_bdb" != no ; then
22967         cat >> confdefs.h <<\EOF
22968 #define SLAPD_BDB 1
22969 EOF
22970
22971         BUILD_SLAPD=yes
22972         BUILD_BDB=yes
22973         if test "$ol_with_bdb_module" != static ; then
22974                 cat >> confdefs.h <<\EOF
22975 #define SLAPD_BDB_DYNAMIC 1
22976 EOF
22977
22978                 BUILD_BDB=mod
22979                 BUILD_BDB_DYNAMIC=shared
22980                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22981         else
22982                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22983         fi
22984 fi
22985
22986 if test "$ol_link_dnssrv" != no ; then
22987         cat >> confdefs.h <<\EOF
22988 #define SLAPD_DNSSRV 1
22989 EOF
22990
22991         BUILD_SLAPD=yes
22992         BUILD_DNSSRV=yes
22993         if test "$ol_with_dnssrv_module" != static ; then
22994                 cat >> confdefs.h <<\EOF
22995 #define SLAPD_DNSSRV_DYNAMIC 1
22996 EOF
22997
22998                 BUILD_DNSSRV=mod
22999                 BUILD_DNSSRV_DYNAMIC=shared
23000                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23001         else
23002                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23003         fi
23004 fi
23005
23006 if test "$ol_enable_hdb" != no ; then
23007         cat >> confdefs.h <<\EOF
23008 #define SLAPD_HDB 1
23009 EOF
23010
23011         BUILD_SLAPD=yes
23012         BUILD_HDB=yes
23013         if test "$ol_with_hdb_module" != static ; then
23014                 cat >> confdefs.h <<\EOF
23015 #define SLAPD_HDB_DYNAMIC 1
23016 EOF
23017
23018                 BUILD_HDB=mod
23019                 BUILD_HDB_DYNAMIC=shared
23020                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23021         else
23022                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23023         fi
23024 fi
23025
23026 if test "$ol_enable_ldap" != no ; then
23027         cat >> confdefs.h <<\EOF
23028 #define SLAPD_LDAP 1
23029 EOF
23030
23031         BUILD_SLAPD=yes
23032         BUILD_LDAP=yes
23033         if test "$ol_with_ldap_module" != static ; then
23034                 cat >> confdefs.h <<\EOF
23035 #define SLAPD_LDAP_DYNAMIC 1
23036 EOF
23037
23038                 BUILD_LDAP=mod
23039                 BUILD_LDAP_DYNAMIC=shared
23040                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23041         else
23042                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23043         fi
23044 fi
23045
23046 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23047         cat >> confdefs.h <<\EOF
23048 #define SLAPD_LDBM 1
23049 EOF
23050
23051         BUILD_SLAPD=yes
23052         BUILD_LDBM=yes
23053         if test "$ol_with_ldbm_module" != static ; then
23054                 cat >> confdefs.h <<\EOF
23055 #define SLAPD_LDBM_DYNAMIC 1
23056 EOF
23057
23058                 BUILD_LDBM=mod
23059                 BUILD_LDBM_DYNAMIC=shared
23060                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23061         else
23062                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23063         fi
23064 fi
23065
23066 if test "$ol_enable_meta" != no ; then
23067         if test "$ol_enable_ldap" = no ; then
23068                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23069         fi
23070         if test "$ol_enable_rewrite" = no ; then
23071                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23072         fi
23073         cat >> confdefs.h <<\EOF
23074 #define SLAPD_META 1
23075 EOF
23076
23077         BUILD_SLAPD=yes
23078         BUILD_META=yes
23079         BUILD_LDAP=yes
23080         BUILD_REWRITE=yes
23081         if test "$ol_with_meta_module" != static ; then
23082                 cat >> confdefs.h <<\EOF
23083 #define SLAPD_META_DYNAMIC 1
23084 EOF
23085
23086                 BUILD_META=mod
23087                 BUILD_META_DYNAMIC=shared
23088                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23089         else
23090                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23091         fi
23092 fi
23093
23094 if test "$ol_enable_monitor" != no ; then
23095         cat >> confdefs.h <<\EOF
23096 #define SLAPD_MONITOR 1
23097 EOF
23098
23099         BUILD_SLAPD=yes
23100         BUILD_MONITOR=yes
23101         if test "$ol_with_monitor_module" != static ; then
23102                 cat >> confdefs.h <<\EOF
23103 #define SLAPD_MONITOR_DYNAMIC 1
23104 EOF
23105
23106                 BUILD_MONITOR=mod
23107                 BUILD_MONITOR_DYNAMIC=shared
23108                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23109         else
23110                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23111         fi
23112 fi
23113
23114 if test "$ol_enable_null" != no ; then
23115         cat >> confdefs.h <<\EOF
23116 #define SLAPD_NULL 1
23117 EOF
23118
23119         BUILD_SLAPD=yes
23120         BUILD_NULL=yes
23121         if test "$ol_with_null_module" != static ; then
23122                 cat >> confdefs.h <<\EOF
23123 #define SLAPD_NULL_DYNAMIC 1
23124 EOF
23125
23126                 BUILD_NULL=mod
23127                 BUILD_NULL_DYNAMIC=shared
23128                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23129         else
23130                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23131         fi
23132 fi
23133
23134 if test "$ol_enable_passwd" != no ; then
23135         cat >> confdefs.h <<\EOF
23136 #define SLAPD_PASSWD 1
23137 EOF
23138
23139         BUILD_SLAPD=yes
23140         BUILD_PASSWD=yes
23141         if test "$ol_with_passwd_module" != static ; then
23142                 cat >> confdefs.h <<\EOF
23143 #define SLAPD_PASSWD_DYNAMIC 1
23144 EOF
23145
23146                 BUILD_PASSWD=mod
23147                 BUILD_PASSWD_DYNAMIC=shared
23148                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23149         else
23150                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23151         fi
23152 fi
23153
23154 if test "$ol_link_perl" != no ; then
23155         cat >> confdefs.h <<\EOF
23156 #define SLAPD_PERL 1
23157 EOF
23158
23159         BUILD_SLAPD=yes
23160         BUILD_PERL=yes
23161         if test "$ol_with_perl_module" != static ; then
23162                 cat >> confdefs.h <<\EOF
23163 #define SLAPD_PERL_DYNAMIC 1
23164 EOF
23165
23166                 BUILD_PERL=mod
23167                 BUILD_PERL_DYNAMIC=shared
23168                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23169         else
23170                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23171         fi
23172 fi
23173
23174 if test "$ol_enable_shell" != no ; then
23175         if test "$ol_link_thread" != no ; then
23176                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23177         fi
23178         cat >> confdefs.h <<\EOF
23179 #define SLAPD_SHELL 1
23180 EOF
23181
23182         BUILD_SLAPD=yes
23183         BUILD_SHELL=yes
23184         if test "$ol_with_shell_module" != static ; then
23185                 cat >> confdefs.h <<\EOF
23186 #define SLAPD_SHELL_DYNAMIC 1
23187 EOF
23188
23189                 BUILD_SHELL=mod
23190                 BUILD_SHELL_DYNAMIC=shared
23191                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23192         else
23193                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23194         fi
23195 fi
23196
23197 if test "$ol_link_sql" != no ; then
23198         cat >> confdefs.h <<\EOF
23199 #define SLAPD_SQL 1
23200 EOF
23201
23202         BUILD_SLAPD=yes
23203         BUILD_SQL=yes
23204         if test "$ol_with_sql_module" != static; then
23205                 cat >> confdefs.h <<\EOF
23206 #define SLAPD_SQL_DYNAMIC 1
23207 EOF
23208
23209                 BUILD_SQL=mod
23210                 BUILD_SQL_DYNAMIC=shared
23211                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23212         else
23213                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23214         fi
23215 fi
23216
23217 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23218         $BUILD_SLAPD = yes ; then
23219         BUILD_SLURPD=yes
23220 fi
23221
23222 if test "$ol_enable_rewrite" != no ; then
23223         cat >> confdefs.h <<\EOF
23224 #define ENABLE_REWRITE 1
23225 EOF
23226
23227         BUILD_REWRITE=yes
23228 fi
23229
23230 if test "$ol_enable_slapi" != no ; then
23231         cat >> confdefs.h <<\EOF
23232 #define ENABLE_SLAPI 1
23233 EOF
23234
23235         BUILD_SLAPI=yes
23236         SLAPD_SLAPI_DEPEND=libslapi.a
23237 fi
23238
23239
23240
23241 if test "$ac_cv_mingw32" = yes ; then
23242         PLAT=NT
23243         SLAPD_MODULES_LDFLAGS=
23244 else
23245         PLAT=UNIX
23246 fi
23247
23248 if test -z "$SLAPD_STATIC_BACKENDS"; then
23249         SLAPD_NO_STATIC='#'
23250 else
23251         SLAPD_NO_STATIC=
23252 fi
23253
23254
23255
23256
23257
23258
23259   
23260   
23261   
23262   
23263   
23264   
23265   
23266   
23267   
23268   
23269   
23270   
23271   
23272   
23273   
23274   
23275   
23276   
23277   
23278   
23279   
23280   
23281   
23282   
23283   
23284   
23285
23286
23287
23288
23289
23290
23291
23292
23293
23294
23295
23296
23297
23298
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
23311
23312
23313
23314
23315
23316
23317
23318
23319
23320
23321
23322
23323
23324 # Check whether --with-xxinstall or --without-xxinstall was given.
23325 if test "${with_xxinstall+set}" = set; then
23326   withval="$with_xxinstall"
23327   :
23328 fi
23329
23330
23331
23332 trap '' 1 2 15
23333
23334 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23335
23336 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23337 # Let make expand exec_prefix.
23338 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23339
23340 # Any assignment to VPATH causes Sun make to only execute
23341 # the first set of double-colon rules, so remove it if not needed.
23342 # If there is a colon in the path, we need to keep it.
23343 if test "x$srcdir" = x.; then
23344   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23345 fi
23346
23347 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23348
23349 DEFS=-DHAVE_CONFIG_H
23350
23351 # Without the "./", some shells look in PATH for config.status.
23352 : ${CONFIG_STATUS=./config.status}
23353
23354 echo creating $CONFIG_STATUS
23355 rm -f $CONFIG_STATUS
23356 cat > $CONFIG_STATUS <<EOF
23357 #! /bin/sh
23358 # Generated automatically by configure.
23359 # Run this file to recreate the current configuration.
23360 # This directory was configured as follows,
23361 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23362 #
23363 # $0 $ac_configure_args
23364 #
23365 # Compiler output produced by configure, useful for debugging
23366 # configure, is in ./config.log if it exists.
23367
23368 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23369 for ac_option
23370 do
23371   case "\$ac_option" in
23372   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23373     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23374     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23375   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23376     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23377     exit 0 ;;
23378   -help | --help | --hel | --he | --h)
23379     echo "\$ac_cs_usage"; exit 0 ;;
23380   *) echo "\$ac_cs_usage"; exit 1 ;;
23381   esac
23382 done
23383
23384 ac_given_srcdir=$srcdir
23385 ac_given_INSTALL="$INSTALL"
23386
23387 trap 'rm -fr `echo "\
23388 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23389 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23390 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23391 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23392 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23393 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23394 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23395 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23396 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23397 include/Makefile:build/top.mk:include/Makefile.in \
23398 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23399 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23400 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23401 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23402 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23403 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23404 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23405 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23406 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23407 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23408 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23409 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23410 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23411 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23412 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23413 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23414 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23415 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23416 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23417 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23418 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23419 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23420 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23421 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23422 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23423 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23424 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23425 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23426 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23427 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23428  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23429 EOF
23430 cat >> $CONFIG_STATUS <<EOF
23431
23432 # Protect against being on the right side of a sed subst in config.status.
23433 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23434  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23435 $ac_vpsub
23436 $extrasub
23437 s%@SHELL@%$SHELL%g
23438 s%@CFLAGS@%$CFLAGS%g
23439 s%@CPPFLAGS@%$CPPFLAGS%g
23440 s%@CXXFLAGS@%$CXXFLAGS%g
23441 s%@FFLAGS@%$FFLAGS%g
23442 s%@DEFS@%$DEFS%g
23443 s%@LDFLAGS@%$LDFLAGS%g
23444 s%@LIBS@%$LIBS%g
23445 s%@exec_prefix@%$exec_prefix%g
23446 s%@prefix@%$prefix%g
23447 s%@program_transform_name@%$program_transform_name%g
23448 s%@bindir@%$bindir%g
23449 s%@sbindir@%$sbindir%g
23450 s%@libexecdir@%$libexecdir%g
23451 s%@datadir@%$datadir%g
23452 s%@sysconfdir@%$sysconfdir%g
23453 s%@sharedstatedir@%$sharedstatedir%g
23454 s%@localstatedir@%$localstatedir%g
23455 s%@libdir@%$libdir%g
23456 s%@includedir@%$includedir%g
23457 s%@oldincludedir@%$oldincludedir%g
23458 s%@infodir@%$infodir%g
23459 s%@mandir@%$mandir%g
23460 s%@host@%$host%g
23461 s%@host_alias@%$host_alias%g
23462 s%@host_cpu@%$host_cpu%g
23463 s%@host_vendor@%$host_vendor%g
23464 s%@host_os@%$host_os%g
23465 s%@target@%$target%g
23466 s%@target_alias@%$target_alias%g
23467 s%@target_cpu@%$target_cpu%g
23468 s%@target_vendor@%$target_vendor%g
23469 s%@target_os@%$target_os%g
23470 s%@build@%$build%g
23471 s%@build_alias@%$build_alias%g
23472 s%@build_cpu@%$build_cpu%g
23473 s%@build_vendor@%$build_vendor%g
23474 s%@build_os@%$build_os%g
23475 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23476 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23477 s%@INSTALL_DATA@%$INSTALL_DATA%g
23478 s%@PACKAGE@%$PACKAGE%g
23479 s%@VERSION@%$VERSION%g
23480 s%@ACLOCAL@%$ACLOCAL%g
23481 s%@AUTOCONF@%$AUTOCONF%g
23482 s%@AUTOMAKE@%$AUTOMAKE%g
23483 s%@AUTOHEADER@%$AUTOHEADER%g
23484 s%@MAKEINFO@%$MAKEINFO%g
23485 s%@install_sh@%$install_sh%g
23486 s%@AMTAR@%$AMTAR%g
23487 s%@AWK@%$AWK%g
23488 s%@AMTARFLAGS@%$AMTARFLAGS%g
23489 s%@SET_MAKE@%$SET_MAKE%g
23490 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23491 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23492 s%@top_builddir@%$top_builddir%g
23493 s%@ldap_subdir@%$ldap_subdir%g
23494 s%@CC@%$CC%g
23495 s%@AR@%$AR%g
23496 s%@LN_S@%$LN_S%g
23497 s%@OBJEXT@%$OBJEXT%g
23498 s%@EXEEXT@%$EXEEXT%g
23499 s%@ECHO@%$ECHO%g
23500 s%@RANLIB@%$RANLIB%g
23501 s%@STRIP@%$STRIP%g
23502 s%@DLLTOOL@%$DLLTOOL%g
23503 s%@AS@%$AS%g
23504 s%@OBJDUMP@%$OBJDUMP%g
23505 s%@CPP@%$CPP%g
23506 s%@LIBTOOL@%$LIBTOOL%g
23507 s%@LN_H@%$LN_H%g
23508 s%@PERLBIN@%$PERLBIN%g
23509 s%@OL_MKDEP@%$OL_MKDEP%g
23510 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23511 s%@LTSTATIC@%$LTSTATIC%g
23512 s%@LIBOBJS@%$LIBOBJS%g
23513 s%@LIBSRCS@%$LIBSRCS%g
23514 s%@PLAT@%$PLAT%g
23515 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23516 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23517 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23518 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23519 s%@BUILD_BDB@%$BUILD_BDB%g
23520 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23521 s%@BUILD_HDB@%$BUILD_HDB%g
23522 s%@BUILD_LDAP@%$BUILD_LDAP%g
23523 s%@BUILD_LDBM@%$BUILD_LDBM%g
23524 s%@BUILD_META@%$BUILD_META%g
23525 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23526 s%@BUILD_NULL@%$BUILD_NULL%g
23527 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23528 s%@BUILD_PERL@%$BUILD_PERL%g
23529 s%@BUILD_SHELL@%$BUILD_SHELL%g
23530 s%@BUILD_SQL@%$BUILD_SQL%g
23531 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23532 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23533 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
23534 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23535 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23536 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23537 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23538 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23539 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23540 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23541 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23542 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23543 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23544 s%@LDAP_LIBS@%$LDAP_LIBS%g
23545 s%@LDIF_LIBS@%$LDIF_LIBS%g
23546 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23547 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23548 s%@LDBM_LIBS@%$LDBM_LIBS%g
23549 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23550 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23551 s%@WRAP_LIBS@%$WRAP_LIBS%g
23552 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23553 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23554 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23555 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23556 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23557 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23558 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23559 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23560 s%@KRB4_LIBS@%$KRB4_LIBS%g
23561 s%@KRB5_LIBS@%$KRB5_LIBS%g
23562 s%@SASL_LIBS@%$SASL_LIBS%g
23563 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23564 s%@TLS_LIBS@%$TLS_LIBS%g
23565 s%@MODULES_LIBS@%$MODULES_LIBS%g
23566 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
23567 s%@LIBSLAPI@%$LIBSLAPI%g
23568 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
23569 s%@AUTH_LIBS@%$AUTH_LIBS%g
23570 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23571 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23572 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23573 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23574
23575 CEOF
23576 EOF
23577
23578 cat >> $CONFIG_STATUS <<\EOF
23579
23580 # Split the substitutions into bite-sized pieces for seds with
23581 # small command number limits, like on Digital OSF/1 and HP-UX.
23582 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23583 ac_file=1 # Number of current file.
23584 ac_beg=1 # First line for current file.
23585 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23586 ac_more_lines=:
23587 ac_sed_cmds=""
23588 while $ac_more_lines; do
23589   if test $ac_beg -gt 1; then
23590     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23591   else
23592     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23593   fi
23594   if test ! -s conftest.s$ac_file; then
23595     ac_more_lines=false
23596     rm -f conftest.s$ac_file
23597   else
23598     if test -z "$ac_sed_cmds"; then
23599       ac_sed_cmds="sed -f conftest.s$ac_file"
23600     else
23601       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23602     fi
23603     ac_file=`expr $ac_file + 1`
23604     ac_beg=$ac_end
23605     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23606   fi
23607 done
23608 if test -z "$ac_sed_cmds"; then
23609   ac_sed_cmds=cat
23610 fi
23611 EOF
23612
23613 cat >> $CONFIG_STATUS <<EOF
23614
23615 CONFIG_FILES=\${CONFIG_FILES-"\
23616 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23617 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23618 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23619 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23620 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23621 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23622 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23623 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23624 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23625 include/Makefile:build/top.mk:include/Makefile.in \
23626 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23627 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23628 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23629 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23630 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23631 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23632 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23633 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23634 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23635 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23636 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23637 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23638 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23639 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23640 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23641 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23642 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23643 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23644 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23645 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23646 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23647 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23648 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23649 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23650 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23651 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23652 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23653 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23654 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23655 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23656 "}
23657 EOF
23658 cat >> $CONFIG_STATUS <<\EOF
23659 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23660   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23661   case "$ac_file" in
23662   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23663        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23664   *) ac_file_in="${ac_file}.in" ;;
23665   esac
23666
23667   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23668
23669   # Remove last slash and all that follows it.  Not all systems have dirname.
23670   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23671   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23672     # The file is in a subdirectory.
23673     test ! -d "$ac_dir" && mkdir "$ac_dir"
23674     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23675     # A "../" for each directory in $ac_dir_suffix.
23676     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23677   else
23678     ac_dir_suffix= ac_dots=
23679   fi
23680
23681   case "$ac_given_srcdir" in
23682   .)  srcdir=.
23683       if test -z "$ac_dots"; then top_srcdir=.
23684       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23685   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23686   *) # Relative path.
23687     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23688     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23689   esac
23690
23691   case "$ac_given_INSTALL" in
23692   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23693   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23694   esac
23695
23696   echo creating "$ac_file"
23697   rm -f "$ac_file"
23698   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23699   case "$ac_file" in
23700   *[Mm]akefile*) ac_comsub="1i\\
23701 # $configure_input" ;;
23702   *) ac_comsub= ;;
23703   esac
23704
23705   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23706   sed -e "$ac_comsub
23707 s%@configure_input@%$configure_input%g
23708 s%@srcdir@%$srcdir%g
23709 s%@top_srcdir@%$top_srcdir%g
23710 s%@INSTALL@%$INSTALL%g
23711 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23712 fi; done
23713 rm -f conftest.s*
23714
23715 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23716 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23717 #
23718 # ac_d sets the value in "#define NAME VALUE" lines.
23719 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23720 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23721 ac_dC='\3'
23722 ac_dD='%g'
23723 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23724 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23725 ac_uB='\([      ]\)%\1#\2define\3'
23726 ac_uC=' '
23727 ac_uD='\4%g'
23728 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23729 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23730 ac_eB='$%\1#\2define\3'
23731 ac_eC=' '
23732 ac_eD='%g'
23733
23734 if test "${CONFIG_HEADERS+set}" != set; then
23735 EOF
23736 cat >> $CONFIG_STATUS <<EOF
23737   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23738 EOF
23739 cat >> $CONFIG_STATUS <<\EOF
23740 fi
23741 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23742   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23743   case "$ac_file" in
23744   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23745        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23746   *) ac_file_in="${ac_file}.in" ;;
23747   esac
23748
23749   echo creating $ac_file
23750
23751   rm -f conftest.frag conftest.in conftest.out
23752   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23753   cat $ac_file_inputs > conftest.in
23754
23755 EOF
23756
23757 # Transform confdefs.h into a sed script conftest.vals that substitutes
23758 # the proper values into config.h.in to produce config.h.  And first:
23759 # Protect against being on the right side of a sed subst in config.status.
23760 # Protect against being in an unquoted here document in config.status.
23761 rm -f conftest.vals
23762 cat > conftest.hdr <<\EOF
23763 s/[\\&%]/\\&/g
23764 s%[\\$`]%\\&%g
23765 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23766 s%ac_d%ac_u%gp
23767 s%ac_u%ac_e%gp
23768 EOF
23769 sed -n -f conftest.hdr confdefs.h > conftest.vals
23770 rm -f conftest.hdr
23771
23772 # This sed command replaces #undef with comments.  This is necessary, for
23773 # example, in the case of _POSIX_SOURCE, which is predefined and required
23774 # on some systems where configure will not decide to define it.
23775 cat >> conftest.vals <<\EOF
23776 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23777 EOF
23778
23779 # Break up conftest.vals because some shells have a limit on
23780 # the size of here documents, and old seds have small limits too.
23781
23782 rm -f conftest.tail
23783 while :
23784 do
23785   ac_lines=`grep -c . conftest.vals`
23786   # grep -c gives empty output for an empty file on some AIX systems.
23787   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23788   # Write a limited-size here document to conftest.frag.
23789   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23790   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23791   echo 'CEOF
23792   sed -f conftest.frag conftest.in > conftest.out
23793   rm -f conftest.in
23794   mv conftest.out conftest.in
23795 ' >> $CONFIG_STATUS
23796   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23797   rm -f conftest.vals
23798   mv conftest.tail conftest.vals
23799 done
23800 rm -f conftest.vals
23801
23802 cat >> $CONFIG_STATUS <<\EOF
23803   rm -f conftest.frag conftest.h
23804   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23805   cat conftest.in >> conftest.h
23806   rm -f conftest.in
23807   if cmp -s $ac_file conftest.h 2>/dev/null; then
23808     echo "$ac_file is unchanged"
23809     rm -f conftest.h
23810   else
23811     # Remove last slash and all that follows it.  Not all systems have dirname.
23812       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23813       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23814       # The file is in a subdirectory.
23815       test ! -d "$ac_dir" && mkdir "$ac_dir"
23816     fi
23817     rm -f $ac_file
23818     mv conftest.h $ac_file
23819   fi
23820 fi; done
23821
23822 EOF
23823 cat >> $CONFIG_STATUS <<EOF
23824
23825 EOF
23826 cat >> $CONFIG_STATUS <<\EOF
23827
23828 date > stamp-h
23829 echo Please run \"make depend\" to build dependencies
23830
23831 exit 0
23832 EOF
23833 chmod +x $CONFIG_STATUS
23834 rm -fr confdefs* $ac_clean_files
23835 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23836