]> git.sur5r.net Git - openldap/blob - configure
ITS#2759 - Fix LRU manipulation
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.408.2.33 2003/03/05 23:48:30 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-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
36 ac_help="$ac_help
37   --enable-proctitle      enable proctitle support [yes]"
38 ac_help="$ac_help
39   --enable-ipv6           enable IPv6 support [auto]"
40 ac_help="$ac_help
41   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
42 ac_help="$ac_help
43   --enable-x-compile      enable cross compiling [no]"
44 ac_help="$ac_help
45   --with-cyrus-sasl       with Cyrus SASL support [auto]"
46 ac_help="$ac_help
47   --with-fetch            with fetch(3) URL support [auto]"
48 ac_help="$ac_help
49   --with-kerberos         with Kerberos support [auto]"
50 ac_help="$ac_help
51   --with-readline         with readline support [auto]"
52 ac_help="$ac_help
53   --with-threads          with threads [auto]"
54 ac_help="$ac_help
55   --with-tls              with TLS/SSL support [auto]"
56 ac_help="$ac_help
57   --with-yielding-select  with implicitly yielding select [auto]"
58 ac_help="$ac_help
59
60 SLAPD (Standalone LDAP Daemon) Options:"
61 ac_help="$ac_help
62   --enable-slapd          enable building slapd [yes]"
63 ac_help="$ac_help
64     --enable-aci          enable per-object ACIs (experimental) [no]"
65 ac_help="$ac_help
66     --enable-cleartext    enable cleartext passwords [yes]"
67 ac_help="$ac_help
68     --enable-crypt        enable crypt(3) passwords [no]"
69 ac_help="$ac_help
70     --enable-kpasswd      enable Kerberos password verification [no]"
71 ac_help="$ac_help
72     --enable-lmpasswd     enable LAN Manager passwords [no]"
73 ac_help="$ac_help
74     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
75 ac_help="$ac_help
76     --enable-modules      enable dynamic module support [no]"
77 ac_help="$ac_help
78     --enable-phonetic     enable phonetic/soundex [no]"
79 ac_help="$ac_help
80     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
81 ac_help="$ac_help
82     --enable-rlookups     enable reverse lookups of client hostnames [no]"
83 ac_help="$ac_help
84     --enable-slp          enable SLPv2 support [no]"
85 ac_help="$ac_help
86     --enable-wrappers     enable tcp wrapper support [no]"
87 ac_help="$ac_help
88     --enable-bdb          enable Berkeley DB backend [yes]"
89 ac_help="$ac_help
90     --with-bdb-module     module type static|dynamic [static]"
91 ac_help="$ac_help
92     --enable-dnssrv       enable dnssrv backend [no]"
93 ac_help="$ac_help
94     --with-dnssrv-module  module type static|dynamic [static]"
95 ac_help="$ac_help
96     --enable-ldap         enable ldap backend [no]"
97 ac_help="$ac_help
98     --with-ldap-module    module type static|dynamic [static]"
99 ac_help="$ac_help
100     --enable-ldbm         enable ldbm backend [no]"
101 ac_help="$ac_help
102     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
103 ac_help="$ac_help
104     --with-ldbm-module    module type static|dynamic [static]"
105 ac_help="$ac_help
106     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
107 ac_help="$ac_help
108     --enable-meta         enable metadirectory backend [no]"
109 ac_help="$ac_help
110     --with-meta-module    module type static|dynamic [static]"
111 ac_help="$ac_help
112     --enable-monitor      enable monitor backend [no]"
113 ac_help="$ac_help
114     --with-monitor-module module type static|dynamic [static]"
115 ac_help="$ac_help
116     --enable-null         enable null backend [no]"
117 ac_help="$ac_help
118     --with-null-module    module type static|dynamic [static]"
119 ac_help="$ac_help
120     --enable-passwd       enable passwd backend [no]"
121 ac_help="$ac_help
122     --with-passwd-module  module type static|dynamic [static]"
123 ac_help="$ac_help
124     --enable-perl         enable perl backend [no]"
125 ac_help="$ac_help
126     --with-perl-module    module type static|dynamic [static]"
127 ac_help="$ac_help
128     --enable-shell        enable shell backend [no]"
129 ac_help="$ac_help
130     --with-shell-module   module type static|dynamic [static]"
131 ac_help="$ac_help
132     --enable-sql          enable sql backend [no]"
133 ac_help="$ac_help
134     --with-sql-module     module type static|dynamic [static]"
135 ac_help="$ac_help
136
137 SLURPD (Replication Daemon) Options:"
138 ac_help="$ac_help
139   --enable-slurpd         enable building slurpd [auto]"
140 ac_help="$ac_help
141
142 Library Generation & Linking Options"
143 ac_help="$ac_help
144   --enable-static[=PKGS]  build static libraries [default=yes]"
145 ac_help="$ac_help
146   --enable-shared[=PKGS]  build shared libraries [default=yes]"
147 ac_help="$ac_help
148   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
149 ac_help="$ac_help
150   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
151
152 # Find the correct PATH separator.  Usually this is `:', but
153 # DJGPP uses `;' like DOS.
154 if test "X${PATH_SEPARATOR+set}" != Xset; then
155   UNAME=${UNAME-`uname 2>/dev/null`}
156   case X$UNAME in
157     *-DOS) lt_cv_sys_path_separator=';' ;;
158     *)     lt_cv_sys_path_separator=':' ;;
159   esac
160   PATH_SEPARATOR=$lt_cv_sys_path_separator
161 fi
162
163
164 # Check that we are running under the correct shell.
165 SHELL=${CONFIG_SHELL-/bin/sh}
166
167 case X$ECHO in
168 X*--fallback-echo)
169   # Remove one level of quotation (which was required for Make).
170   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
171   ;;
172 esac
173
174 echo=${ECHO-echo}
175 if test "X$1" = X--no-reexec; then
176   # Discard the --no-reexec flag, and continue.
177   shift
178 elif test "X$1" = X--fallback-echo; then
179   # Avoid inline document here, it may be left over
180   :
181 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
182   # Yippee, $echo works!
183   :
184 else
185   # Restart under the correct shell.
186   exec $SHELL "$0" --no-reexec ${1+"$@"}
187 fi
188
189 if test "X$1" = X--fallback-echo; then
190   # used as fallback echo
191   shift
192   cat <<EOF
193
194 EOF
195   exit 0
196 fi
197
198 # The HP-UX ksh and POSIX shell print the target directory to stdout
199 # if CDPATH is set.
200 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
201
202 if test -z "$ECHO"; then
203 if test "X${echo_test_string+set}" != Xset; then
204 # find a string as large as possible, as long as the shell can cope with it
205   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
206     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
207     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
208        echo_test_string="`eval $cmd`" &&
209        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
210     then
211       break
212     fi
213   done
214 fi
215
216 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
217    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
218    test "X$echo_testing_string" = "X$echo_test_string"; then
219   :
220 else
221   # The Solaris, AIX, and Digital Unix default echo programs unquote
222   # backslashes.  This makes it impossible to quote backslashes using
223   #   echo "$something" | sed 's/\\/\\\\/g'
224   #
225   # So, first we look for a working echo in the user's PATH.
226
227   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
228   for dir in $PATH /usr/ucb; do
229     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
230        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
231        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
232        test "X$echo_testing_string" = "X$echo_test_string"; then
233       echo="$dir/echo"
234       break
235     fi
236   done
237   IFS="$save_ifs"
238
239   if test "X$echo" = Xecho; then
240     # We didn't find a better echo, so look for alternatives.
241     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
242        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
243        test "X$echo_testing_string" = "X$echo_test_string"; then
244       # This shell has a builtin print -r that does the trick.
245       echo='print -r'
246     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
247          test "X$CONFIG_SHELL" != X/bin/ksh; then
248       # If we have ksh, try running configure again with it.
249       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
250       export ORIGINAL_CONFIG_SHELL
251       CONFIG_SHELL=/bin/ksh
252       export CONFIG_SHELL
253       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
254     else
255       # Try using printf.
256       echo='printf %s\n'
257       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
258          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
259          test "X$echo_testing_string" = "X$echo_test_string"; then
260         # Cool, printf works
261         :
262       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
263            test "X$echo_testing_string" = 'X\t' &&
264            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
265            test "X$echo_testing_string" = "X$echo_test_string"; then
266         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
267         export CONFIG_SHELL
268         SHELL="$CONFIG_SHELL"
269         export SHELL
270         echo="$CONFIG_SHELL $0 --fallback-echo"
271       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
272            test "X$echo_testing_string" = 'X\t' &&
273            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
274            test "X$echo_testing_string" = "X$echo_test_string"; then
275         echo="$CONFIG_SHELL $0 --fallback-echo"
276       else
277         # maybe with a smaller string...
278         prev=:
279
280         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
281           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
282           then
283             break
284           fi
285           prev="$cmd"
286         done
287
288         if test "$prev" != 'sed 50q "$0"'; then
289           echo_test_string=`eval $prev`
290           export echo_test_string
291           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
292         else
293           # Oops.  We lost completely, so just stick with echo.
294           echo=echo
295         fi
296       fi
297     fi
298   fi
299 fi
300 fi
301
302 # Copy echo and quote the copy suitably for passing to libtool from
303 # the Makefile, instead of quoting the original, which is used later.
304 ECHO=$echo
305 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
306    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
307 fi
308
309
310 ac_help="$ac_help
311   --disable-libtool-lock  avoid locking (might break parallel builds)"
312 ac_help="$ac_help
313   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
314 ac_help="$ac_help
315
316 See INSTALL file for further details."
317
318 # Initialize some variables set by options.
319 # The variables have the same names as the options, with
320 # dashes changed to underlines.
321 build=NONE
322 cache_file=./config.cache
323 exec_prefix=NONE
324 host=NONE
325 no_create=
326 nonopt=NONE
327 no_recursion=
328 prefix=NONE
329 program_prefix=NONE
330 program_suffix=NONE
331 program_transform_name=s,x,x,
332 silent=
333 site=
334 srcdir=
335 target=NONE
336 verbose=
337 x_includes=NONE
338 x_libraries=NONE
339 bindir='${exec_prefix}/bin'
340 sbindir='${exec_prefix}/sbin'
341 libexecdir='${exec_prefix}/libexec'
342 datadir='${prefix}/share'
343 sysconfdir='${prefix}/etc'
344 sharedstatedir='${prefix}/com'
345 localstatedir='${prefix}/var'
346 libdir='${exec_prefix}/lib'
347 includedir='${prefix}/include'
348 oldincludedir='/usr/include'
349 infodir='${prefix}/info'
350 mandir='${prefix}/man'
351
352 # Initialize some other variables.
353 subdirs=
354 MFLAGS= MAKEFLAGS=
355 SHELL=${CONFIG_SHELL-/bin/sh}
356 # Maximum number of lines to put in a shell here document.
357 ac_max_here_lines=12
358
359 ac_prev=
360 for ac_option
361 do
362
363   # If the previous option needs an argument, assign it.
364   if test -n "$ac_prev"; then
365     eval "$ac_prev=\$ac_option"
366     ac_prev=
367     continue
368   fi
369
370   case "$ac_option" in
371   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
372   *) ac_optarg= ;;
373   esac
374
375   # Accept the important Cygnus configure options, so we can diagnose typos.
376
377   case "$ac_option" in
378
379   -bindir | --bindir | --bindi | --bind | --bin | --bi)
380     ac_prev=bindir ;;
381   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
382     bindir="$ac_optarg" ;;
383
384   -build | --build | --buil | --bui | --bu)
385     ac_prev=build ;;
386   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
387     build="$ac_optarg" ;;
388
389   -cache-file | --cache-file | --cache-fil | --cache-fi \
390   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
391     ac_prev=cache_file ;;
392   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
393   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
394     cache_file="$ac_optarg" ;;
395
396   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
397     ac_prev=datadir ;;
398   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
399   | --da=*)
400     datadir="$ac_optarg" ;;
401
402   -disable-* | --disable-*)
403     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
404     # Reject names that are not valid shell variable names.
405     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
406       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
407     fi
408     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
409     eval "enable_${ac_feature}=no" ;;
410
411   -enable-* | --enable-*)
412     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
413     # Reject names that are not valid shell variable names.
414     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
415       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
416     fi
417     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
418     case "$ac_option" in
419       *=*) ;;
420       *) ac_optarg=yes ;;
421     esac
422     eval "enable_${ac_feature}='$ac_optarg'" ;;
423
424   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
425   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
426   | --exec | --exe | --ex)
427     ac_prev=exec_prefix ;;
428   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
429   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
430   | --exec=* | --exe=* | --ex=*)
431     exec_prefix="$ac_optarg" ;;
432
433   -gas | --gas | --ga | --g)
434     # Obsolete; use --with-gas.
435     with_gas=yes ;;
436
437   -help | --help | --hel | --he)
438     # Omit some internal or obsolete options to make the list less imposing.
439     # This message is too long to be a string in the A/UX 3.1 sh.
440     cat << EOF
441 Usage: configure [options] [host]
442 Options: [defaults in brackets after descriptions]
443 Configuration:
444   --cache-file=FILE       cache test results in FILE
445   --help                  print this message
446   --no-create             do not create output files
447   --quiet, --silent       do not print \`checking...' messages
448   --version               print the version of autoconf that created configure
449 Directory and file names:
450   --prefix=PREFIX         install architecture-independent files in PREFIX
451                           [$ac_default_prefix]
452   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
453                           [same as prefix]
454   --bindir=DIR            user executables in DIR [EPREFIX/bin]
455   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
456   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
457   --datadir=DIR           read-only architecture-independent data in DIR
458                           [PREFIX/share]
459   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
460   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
461                           [PREFIX/com]
462   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
463   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
464   --includedir=DIR        C header files in DIR [PREFIX/include]
465   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
466   --infodir=DIR           info documentation in DIR [PREFIX/info]
467   --mandir=DIR            man documentation in DIR [PREFIX/man]
468   --srcdir=DIR            find the sources in DIR [configure dir or ..]
469   --program-prefix=PREFIX prepend PREFIX to installed program names
470   --program-suffix=SUFFIX append SUFFIX to installed program names
471   --program-transform-name=PROGRAM
472                           run sed PROGRAM on installed program names
473 EOF
474     cat << EOF
475 Host type:
476   --build=BUILD           configure for building on BUILD [BUILD=HOST]
477   --host=HOST             configure for HOST [guessed]
478   --target=TARGET         configure for TARGET [TARGET=HOST]
479 Features and packages:
480   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
481   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
482   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
483   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
484   --x-includes=DIR        X include files are in DIR
485   --x-libraries=DIR       X library files are in DIR
486 EOF
487     if test -n "$ac_help"; then
488       echo "--enable and --with options recognized:$ac_help"
489     fi
490     exit 0 ;;
491
492   -host | --host | --hos | --ho)
493     ac_prev=host ;;
494   -host=* | --host=* | --hos=* | --ho=*)
495     host="$ac_optarg" ;;
496
497   -includedir | --includedir | --includedi | --included | --include \
498   | --includ | --inclu | --incl | --inc)
499     ac_prev=includedir ;;
500   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
501   | --includ=* | --inclu=* | --incl=* | --inc=*)
502     includedir="$ac_optarg" ;;
503
504   -infodir | --infodir | --infodi | --infod | --info | --inf)
505     ac_prev=infodir ;;
506   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
507     infodir="$ac_optarg" ;;
508
509   -libdir | --libdir | --libdi | --libd)
510     ac_prev=libdir ;;
511   -libdir=* | --libdir=* | --libdi=* | --libd=*)
512     libdir="$ac_optarg" ;;
513
514   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
515   | --libexe | --libex | --libe)
516     ac_prev=libexecdir ;;
517   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
518   | --libexe=* | --libex=* | --libe=*)
519     libexecdir="$ac_optarg" ;;
520
521   -localstatedir | --localstatedir | --localstatedi | --localstated \
522   | --localstate | --localstat | --localsta | --localst \
523   | --locals | --local | --loca | --loc | --lo)
524     ac_prev=localstatedir ;;
525   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
526   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
527   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
528     localstatedir="$ac_optarg" ;;
529
530   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
531     ac_prev=mandir ;;
532   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
533     mandir="$ac_optarg" ;;
534
535   -nfp | --nfp | --nf)
536     # Obsolete; use --without-fp.
537     with_fp=no ;;
538
539   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
540   | --no-cr | --no-c)
541     no_create=yes ;;
542
543   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
544   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
545     no_recursion=yes ;;
546
547   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
548   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
549   | --oldin | --oldi | --old | --ol | --o)
550     ac_prev=oldincludedir ;;
551   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
552   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
553   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
554     oldincludedir="$ac_optarg" ;;
555
556   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
557     ac_prev=prefix ;;
558   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
559     prefix="$ac_optarg" ;;
560
561   -program-prefix | --program-prefix | --program-prefi | --program-pref \
562   | --program-pre | --program-pr | --program-p)
563     ac_prev=program_prefix ;;
564   -program-prefix=* | --program-prefix=* | --program-prefi=* \
565   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
566     program_prefix="$ac_optarg" ;;
567
568   -program-suffix | --program-suffix | --program-suffi | --program-suff \
569   | --program-suf | --program-su | --program-s)
570     ac_prev=program_suffix ;;
571   -program-suffix=* | --program-suffix=* | --program-suffi=* \
572   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
573     program_suffix="$ac_optarg" ;;
574
575   -program-transform-name | --program-transform-name \
576   | --program-transform-nam | --program-transform-na \
577   | --program-transform-n | --program-transform- \
578   | --program-transform | --program-transfor \
579   | --program-transfo | --program-transf \
580   | --program-trans | --program-tran \
581   | --progr-tra | --program-tr | --program-t)
582     ac_prev=program_transform_name ;;
583   -program-transform-name=* | --program-transform-name=* \
584   | --program-transform-nam=* | --program-transform-na=* \
585   | --program-transform-n=* | --program-transform-=* \
586   | --program-transform=* | --program-transfor=* \
587   | --program-transfo=* | --program-transf=* \
588   | --program-trans=* | --program-tran=* \
589   | --progr-tra=* | --program-tr=* | --program-t=*)
590     program_transform_name="$ac_optarg" ;;
591
592   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
593   | -silent | --silent | --silen | --sile | --sil)
594     silent=yes ;;
595
596   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
597     ac_prev=sbindir ;;
598   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
599   | --sbi=* | --sb=*)
600     sbindir="$ac_optarg" ;;
601
602   -sharedstatedir | --sharedstatedir | --sharedstatedi \
603   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
604   | --sharedst | --shareds | --shared | --share | --shar \
605   | --sha | --sh)
606     ac_prev=sharedstatedir ;;
607   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
608   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
609   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
610   | --sha=* | --sh=*)
611     sharedstatedir="$ac_optarg" ;;
612
613   -site | --site | --sit)
614     ac_prev=site ;;
615   -site=* | --site=* | --sit=*)
616     site="$ac_optarg" ;;
617
618   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
619     ac_prev=srcdir ;;
620   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
621     srcdir="$ac_optarg" ;;
622
623   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
624   | --syscon | --sysco | --sysc | --sys | --sy)
625     ac_prev=sysconfdir ;;
626   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
627   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
628     sysconfdir="$ac_optarg" ;;
629
630   -target | --target | --targe | --targ | --tar | --ta | --t)
631     ac_prev=target ;;
632   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
633     target="$ac_optarg" ;;
634
635   -v | -verbose | --verbose | --verbos | --verbo | --verb)
636     verbose=yes ;;
637
638   -version | --version | --versio | --versi | --vers)
639     echo "configure generated by autoconf version 2.13.1"
640     exit 0 ;;
641
642   -with-* | --with-*)
643     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
644     # Reject names that are not valid shell variable names.
645     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
646       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
647     fi
648     ac_package=`echo $ac_package| sed 's/-/_/g'`
649     case "$ac_option" in
650       *=*) ;;
651       *) ac_optarg=yes ;;
652     esac
653     eval "with_${ac_package}='$ac_optarg'" ;;
654
655   -without-* | --without-*)
656     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
657     # Reject names that are not valid shell variable names.
658     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
659       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
660     fi
661     ac_package=`echo $ac_package| sed 's/-/_/g'`
662     eval "with_${ac_package}=no" ;;
663
664   --x)
665     # Obsolete; use --with-x.
666     with_x=yes ;;
667
668   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
669   | --x-incl | --x-inc | --x-in | --x-i)
670     ac_prev=x_includes ;;
671   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
672   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
673     x_includes="$ac_optarg" ;;
674
675   -x-libraries | --x-libraries | --x-librarie | --x-librari \
676   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
677     ac_prev=x_libraries ;;
678   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
679   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
680     x_libraries="$ac_optarg" ;;
681
682   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
683     ;;
684
685   *)
686     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
687       echo "configure: warning: $ac_option: invalid host type" 1>&2
688     fi
689     if test "x$nonopt" != xNONE; then
690       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
691     fi
692     nonopt="$ac_option"
693     ;;
694
695   esac
696 done
697
698 if test -n "$ac_prev"; then
699   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
700 fi
701
702 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
703
704 # File descriptor usage:
705 # 0 standard input
706 # 1 file creation
707 # 2 errors and warnings
708 # 3 some systems may open it to /dev/tty
709 # 4 used on the Kubota Titan
710 # 6 checking for... messages and results
711 # 5 compiler messages saved in config.log
712 if test "$silent" = yes; then
713   exec 6>/dev/null
714 else
715   exec 6>&1
716 fi
717 exec 5>./config.log
718
719 echo "\
720 This file contains any messages produced by compilers while
721 running configure, to aid debugging if configure makes a mistake.
722 " 1>&5
723
724 # Strip out --no-create and --no-recursion so they do not pile up.
725 # Also quote any args containing shell metacharacters.
726 ac_configure_args=
727 for ac_arg
728 do
729   case "$ac_arg" in
730   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
731   | --no-cr | --no-c) ;;
732   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
733   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
734   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
735   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
736   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
737   esac
738 done
739
740 # NLS nuisances.
741 # Only set these to C if already set.  These must not be set unconditionally
742 # because not all systems understand e.g. LANG=C (notably SCO).
743 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
744 # Non-C LC_CTYPE values break the ctype check.
745 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
746 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
747 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
748 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
749
750 # confdefs.h avoids OS command line length limits that DEFS can exceed.
751 rm -rf conftest* confdefs.h
752 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
753 echo > confdefs.h
754
755 # A filename unique to this package, relative to the directory that
756 # configure is in, which we can look for to find out if srcdir is correct.
757 ac_unique_file=build/version.sh
758
759 # Find the source files, if location was not specified.
760 if test -z "$srcdir"; then
761   ac_srcdir_defaulted=yes
762   # Try the directory containing this script, then its parent.
763   ac_prog=$0
764   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
765   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
766   srcdir=$ac_confdir
767   if test ! -r $srcdir/$ac_unique_file; then
768     srcdir=..
769   fi
770 else
771   ac_srcdir_defaulted=no
772 fi
773 if test ! -r $srcdir/$ac_unique_file; then
774   if test "$ac_srcdir_defaulted" = yes; then
775     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
776   else
777     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
778   fi
779 fi
780 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
781
782 # Prefer explicitly selected file to automatically selected ones.
783 if test -z "$CONFIG_SITE"; then
784   if test "x$prefix" != xNONE; then
785     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
786   else
787     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
788   fi
789 fi
790 for ac_site_file in $CONFIG_SITE; do
791   if test -r "$ac_site_file"; then
792     echo "loading site script $ac_site_file"
793     . "$ac_site_file"
794   fi
795 done
796
797
798 ac_ext=c
799 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
800 ac_cpp='$CPP $CPPFLAGS'
801 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
802 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
803 cross_compiling=$ac_cv_prog_cc_cross
804
805 ac_exeext=
806 ac_objext=o
807 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
808   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
809   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
810     ac_n= ac_c='
811 ' ac_t='        '
812   else
813     ac_n=-n ac_c= ac_t=
814   fi
815 else
816   ac_n= ac_c='\c' ac_t=
817 fi
818
819
820 # set unset (borrowed from autoconf 2.49c)
821 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
822   ol_unset=unset
823 else
824   ol_unset=false
825 fi
826 # unset CDPATH
827 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
828
829 ac_aux_dir=
830 for ac_dir in build $srcdir/build; do
831   if test -f $ac_dir/install-sh; then
832     ac_aux_dir=$ac_dir
833     ac_install_sh="$ac_aux_dir/install-sh -c"
834     break
835   elif test -f $ac_dir/install.sh; then
836     ac_aux_dir=$ac_dir
837     ac_install_sh="$ac_aux_dir/install.sh -c"
838     break
839   elif test -f $ac_dir/shtool; then
840     ac_aux_dir=$ac_dir
841     ac_install_sh="$ac_aux_dir/shtool install -c"
842     break
843   fi
844 done
845 if test -z "$ac_aux_dir"; then
846   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
847 fi
848 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
849 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
850 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
851
852 eval `$ac_aux_dir/version.sh`
853 if test -z "$OL_STRING"; then
854         { echo "configure: error: could not determine version" 1>&2; exit 1; }
855 fi
856
857 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
858         ac_cv_shtool="$ac_aux_dir/shtool"
859 else
860         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
861 fi
862
863 SHTOOL="$ac_cv_shtool"
864
865 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
866 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
867
868 OPENLDAP_CVS=""
869 if test -d $ac_aux_dir/CVS; then
870         OPENLDAP_CVS="(from CVS sources) "
871 fi
872
873 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
874
875
876 echo $ac_n "checking host system type""... $ac_c" 1>&6
877 echo "configure:878: checking host system type" >&5
878 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
879
880 # Make sure we can run config.sub.
881   if $ac_config_sub sun4 >/dev/null 2>&1; then :
882     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
883   fi
884
885   ac_cv_host_alias=$host
886   case "$ac_cv_host_alias" in
887   NONE)
888     case $nonopt in
889     NONE)
890       if ac_cv_host_alias=`$ac_config_guess`; then :
891       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
892       fi ;;
893     *) ac_cv_host_alias=$nonopt ;;
894     esac ;;
895   esac
896
897   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
898   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
899   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
900   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
901 else
902   echo $ac_n "(cached) $ac_c" 1>&6
903 fi
904
905 echo "$ac_t""$ac_cv_host" 1>&6
906
907 host=$ac_cv_host
908 host_alias=$ac_cv_host_alias
909 host_cpu=$ac_cv_host_cpu
910 host_vendor=$ac_cv_host_vendor
911 host_os=$ac_cv_host_os
912
913
914
915
916
917 echo $ac_n "checking target system type""... $ac_c" 1>&6
918 echo "configure:919: checking target system type" >&5
919 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
920
921 # Make sure we can run config.sub.
922   if $ac_config_sub sun4 >/dev/null 2>&1; then :
923     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
924   fi
925
926   ac_cv_target_alias=$target
927   case "$ac_cv_target_alias" in
928   NONE)
929     case $nonopt in
930     NONE)
931       ac_cv_target_alias=$host_alias ;;
932
933     *) ac_cv_target_alias=$nonopt ;;
934     esac ;;
935   esac
936
937   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
938   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
939   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
940   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
941 else
942   echo $ac_n "(cached) $ac_c" 1>&6
943 fi
944
945 echo "$ac_t""$ac_cv_target" 1>&6
946
947 target=$ac_cv_target
948 target_alias=$ac_cv_target_alias
949 target_cpu=$ac_cv_target_cpu
950 target_vendor=$ac_cv_target_vendor
951 target_os=$ac_cv_target_os
952
953
954
955
956
957 echo $ac_n "checking build system type""... $ac_c" 1>&6
958 echo "configure:959: checking build system type" >&5
959 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
960
961 # Make sure we can run config.sub.
962   if $ac_config_sub sun4 >/dev/null 2>&1; then :
963     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
964   fi
965
966   ac_cv_build_alias=$build
967   case "$ac_cv_build_alias" in
968   NONE)
969     case $nonopt in
970     NONE)
971       ac_cv_build_alias=$host_alias ;;
972
973     *) ac_cv_build_alias=$nonopt ;;
974     esac ;;
975   esac
976
977   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
978   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
979   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
980   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
981 else
982   echo $ac_n "(cached) $ac_c" 1>&6
983 fi
984
985 echo "$ac_t""$ac_cv_build" 1>&6
986
987 build=$ac_cv_build
988 build_alias=$ac_cv_build_alias
989 build_cpu=$ac_cv_build_cpu
990 build_vendor=$ac_cv_build_vendor
991 build_os=$ac_cv_build_os
992
993
994
995
996
997 # Do some error checking and defaulting for the host and target type.
998 # The inputs are:
999 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1000 #
1001 # The rules are:
1002 # 1. You are not allowed to specify --host, --target, and nonopt at the
1003 #    same time.
1004 # 2. Host defaults to nonopt.
1005 # 3. If nonopt is not specified, then host defaults to the current host,
1006 #    as determined by config.guess.
1007 # 4. Target and build default to nonopt.
1008 # 5. If nonopt is not specified, then target and build default to host.
1009
1010 # The aliases save the names the user supplied, while $host etc.
1011 # will get canonicalized.
1012 case $host---$target---$nonopt in
1013 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1014 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1015 esac
1016
1017 test "$host_alias" != "$target_alias" &&
1018   test "$program_prefix$program_suffix$program_transform_name" = \
1019     NONENONEs,x,x, &&
1020   program_prefix=${target_alias}-
1021
1022
1023 # Find a good install program.  We prefer a C program (faster),
1024 # so one script is as good as another.  But avoid the broken or
1025 # incompatible versions:
1026 # SysV /etc/install, /usr/sbin/install
1027 # SunOS /usr/etc/install
1028 # IRIX /sbin/install
1029 # AIX /bin/install
1030 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1031 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1032 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1033 # ./install, which can be erroneously created by make from ./install.sh.
1034 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1035 echo "configure:1036: checking for a BSD compatible install" >&5
1036 if test -z "$INSTALL"; then
1037 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1038   echo $ac_n "(cached) $ac_c" 1>&6
1039 else
1040     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1041   for ac_dir in $PATH; do
1042     # Account for people who put trailing slashes in PATH elements.
1043     case "$ac_dir/" in
1044     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1045     *)
1046       # OSF1 and SCO ODT 3.0 have their own names for install.
1047       # Don't use installbsd from OSF since it installs stuff as root
1048       # by default.
1049       for ac_prog in ginstall scoinst install; do
1050         if test -f $ac_dir/$ac_prog; then
1051           if test $ac_prog = install &&
1052             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1053             # AIX install.  It has an incompatible calling convention.
1054             :
1055           elif test $ac_prog = install &&
1056             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1057             # program-specific install script used by HP pwplus--don't use.
1058             :
1059           else
1060             ac_cv_path_install="$ac_dir/$ac_prog -c"
1061             break 2
1062           fi
1063         fi
1064       done
1065       ;;
1066     esac
1067   done
1068   IFS="$ac_save_IFS"
1069
1070 fi
1071   if test "${ac_cv_path_install+set}" = set; then
1072     INSTALL="$ac_cv_path_install"
1073   else
1074     # As a last resort, use the slow shell script.  We don't cache a
1075     # path for INSTALL within a source directory, because that will
1076     # break other packages using the cache if that directory is
1077     # removed, or if the path is relative.
1078     INSTALL="$ac_install_sh"
1079   fi
1080 fi
1081 echo "$ac_t""$INSTALL" 1>&6
1082
1083 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1084 # It thinks the first close brace ends the variable substitution.
1085 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1086
1087 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1088
1089 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1090
1091 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1092 echo "configure:1093: checking whether build environment is sane" >&5
1093 # Just in case
1094 sleep 1
1095 echo timestamp > conftestfile
1096 # Do `set' in a subshell so we don't clobber the current shell's
1097 # arguments.  Must try -L first in case configure is actually a
1098 # symlink; some systems play weird games with the mod time of symlinks
1099 # (eg FreeBSD returns the mod time of the symlink's containing
1100 # directory).
1101 if (
1102    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1103    if test "$*" = "X"; then
1104       # -L didn't work.
1105       set X `ls -t $srcdir/configure conftestfile`
1106    fi
1107    if test "$*" != "X $srcdir/configure conftestfile" \
1108       && test "$*" != "X conftestfile $srcdir/configure"; then
1109
1110       # If neither matched, then we have a broken ls.  This can happen
1111       # if, for instance, CONFIG_SHELL is bash and it inherits a
1112       # broken ls alias from the environment.  This has actually
1113       # happened.  Such a system could not be considered "sane".
1114       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1115 alias in your environment" 1>&2; exit 1; }
1116    fi
1117
1118    test "$2" = conftestfile
1119    )
1120 then
1121    # Ok.
1122    :
1123 else
1124    { echo "configure: error: newly created file is older than distributed files!
1125 Check your system clock" 1>&2; exit 1; }
1126 fi
1127 rm -f conftest*
1128 echo "$ac_t""yes" 1>&6
1129 if test "$program_transform_name" = s,x,x,; then
1130   program_transform_name=
1131 else
1132   # Double any \ or $.  echo might interpret backslashes.
1133   cat <<\EOF_SED > conftestsed
1134 s,\\,\\\\,g; s,\$,$$,g
1135 EOF_SED
1136   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1137   rm -f conftestsed
1138 fi
1139 test "$program_prefix" != NONE &&
1140   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1141 # Use a double $ so make ignores it.
1142 test "$program_suffix" != NONE &&
1143   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1144
1145 # sed with no file args requires a program.
1146 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1147
1148 for ac_prog in mawk gawk nawk awk
1149 do
1150 # Extract the first word of "$ac_prog", so it can be a program name with args.
1151 set dummy $ac_prog; ac_word=$2
1152 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1153 echo "configure:1154: checking for $ac_word" >&5
1154 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1155   echo $ac_n "(cached) $ac_c" 1>&6
1156 else
1157   if test -n "$AWK"; then
1158   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1159 else
1160   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1161   ac_dummy="$PATH"
1162   for ac_dir in $ac_dummy; do
1163     test -z "$ac_dir" && ac_dir=.
1164     if test -f $ac_dir/$ac_word; then
1165       ac_cv_prog_AWK="$ac_prog"
1166       break
1167     fi
1168   done
1169   IFS="$ac_save_ifs"
1170 fi
1171 fi
1172 AWK="$ac_cv_prog_AWK"
1173 if test -n "$AWK"; then
1174   echo "$ac_t""$AWK" 1>&6
1175 else
1176   echo "$ac_t""no" 1>&6
1177 fi
1178
1179 test -n "$AWK" && break
1180 done
1181
1182 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1183 echo "configure:1184: checking whether ${MAKE-make} sets \${MAKE}" >&5
1184 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1185 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1186   echo $ac_n "(cached) $ac_c" 1>&6
1187 else
1188   cat > conftestmake <<\EOF
1189 all:
1190         @echo 'ac_maketemp="${MAKE}"'
1191 EOF
1192 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1193 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1194 if test -n "$ac_maketemp"; then
1195   eval ac_cv_prog_make_${ac_make}_set=yes
1196 else
1197   eval ac_cv_prog_make_${ac_make}_set=no
1198 fi
1199 rm -f conftestmake
1200 fi
1201 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1202   echo "$ac_t""yes" 1>&6
1203   SET_MAKE=
1204 else
1205   echo "$ac_t""no" 1>&6
1206   SET_MAKE="MAKE=${MAKE-make}"
1207 fi
1208
1209
1210
1211 PACKAGE=$OL_PACKAGE
1212
1213 VERSION=$OL_VERSION
1214
1215 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1216   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1217 fi
1218
1219
1220
1221 missing_dir=`cd $ac_aux_dir && pwd`
1222 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1223 echo "configure:1224: checking for working aclocal" >&5
1224 # Run test in a subshell; some versions of sh will print an error if
1225 # an executable is not found, even if stderr is redirected.
1226 # Redirect stdin to placate older versions of autoconf.  Sigh.
1227 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1228    ACLOCAL=aclocal
1229    echo "$ac_t""found" 1>&6
1230 else
1231    ACLOCAL="$missing_dir/missing aclocal"
1232    echo "$ac_t""missing" 1>&6
1233 fi
1234
1235 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1236 echo "configure:1237: checking for working autoconf" >&5
1237 # Run test in a subshell; some versions of sh will print an error if
1238 # an executable is not found, even if stderr is redirected.
1239 # Redirect stdin to placate older versions of autoconf.  Sigh.
1240 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1241    AUTOCONF=autoconf
1242    echo "$ac_t""found" 1>&6
1243 else
1244    AUTOCONF="$missing_dir/missing autoconf"
1245    echo "$ac_t""missing" 1>&6
1246 fi
1247
1248 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1249 echo "configure:1250: checking for working automake" >&5
1250 # Run test in a subshell; some versions of sh will print an error if
1251 # an executable is not found, even if stderr is redirected.
1252 # Redirect stdin to placate older versions of autoconf.  Sigh.
1253 if (automake --version) < /dev/null > /dev/null 2>&1; then
1254    AUTOMAKE=automake
1255    echo "$ac_t""found" 1>&6
1256 else
1257    AUTOMAKE="$missing_dir/missing automake"
1258    echo "$ac_t""missing" 1>&6
1259 fi
1260
1261 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1262 echo "configure:1263: checking for working autoheader" >&5
1263 # Run test in a subshell; some versions of sh will print an error if
1264 # an executable is not found, even if stderr is redirected.
1265 # Redirect stdin to placate older versions of autoconf.  Sigh.
1266 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1267    AUTOHEADER=autoheader
1268    echo "$ac_t""found" 1>&6
1269 else
1270    AUTOHEADER="$missing_dir/missing autoheader"
1271    echo "$ac_t""missing" 1>&6
1272 fi
1273
1274 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1275 echo "configure:1276: checking for working makeinfo" >&5
1276 # Run test in a subshell; some versions of sh will print an error if
1277 # an executable is not found, even if stderr is redirected.
1278 # Redirect stdin to placate older versions of autoconf.  Sigh.
1279 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1280    MAKEINFO=makeinfo
1281    echo "$ac_t""found" 1>&6
1282 else
1283    MAKEINFO="$missing_dir/missing makeinfo"
1284    echo "$ac_t""missing" 1>&6
1285 fi
1286
1287 install_sh="$missing_dir/install-sh"
1288 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1289
1290 for ac_prog in gnutar gtar tar
1291 do
1292 # Extract the first word of "$ac_prog", so it can be a program name with args.
1293 set dummy $ac_prog; ac_word=$2
1294 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1295 echo "configure:1296: checking for $ac_word" >&5
1296 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1297   echo $ac_n "(cached) $ac_c" 1>&6
1298 else
1299   if test -n "$AMTAR"; then
1300   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1301 else
1302   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1303   ac_dummy="$PATH"
1304   for ac_dir in $ac_dummy; do
1305     test -z "$ac_dir" && ac_dir=.
1306     if test -f $ac_dir/$ac_word; then
1307       ac_cv_prog_AMTAR="$ac_prog"
1308       break
1309     fi
1310   done
1311   IFS="$ac_save_ifs"
1312 fi
1313 fi
1314 AMTAR="$ac_cv_prog_AMTAR"
1315 if test -n "$AMTAR"; then
1316   echo "$ac_t""$AMTAR" 1>&6
1317 else
1318   echo "$ac_t""no" 1>&6
1319 fi
1320
1321 test -n "$AMTAR" && break
1322 done
1323
1324
1325 AMTARFLAGS=
1326 if test -n "$AMTAR"; then
1327   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1328         AMTARFLAGS=o
1329   fi
1330 fi
1331
1332 cat >> confdefs.h <<EOF
1333 #define OPENLDAP_PACKAGE "$PACKAGE"
1334 EOF
1335
1336 cat >> confdefs.h <<EOF
1337 #define OPENLDAP_VERSION "$VERSION"
1338 EOF
1339
1340
1341 cat >> confdefs.h <<EOF
1342 #define LDAP_VENDOR_VERSION $OL_API_INC
1343 EOF
1344
1345 cat >> confdefs.h <<EOF
1346 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1347 EOF
1348
1349 cat >> confdefs.h <<EOF
1350 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1351 EOF
1352
1353 cat >> confdefs.h <<EOF
1354 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1355 EOF
1356
1357
1358 OPENLDAP_LIBVERSION=$OL_API_LIB
1359
1360 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1361
1362
1363
1364 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1365 echo "configure:1366: checking configure arguments" >&5
1366
1367
1368 top_builddir=`pwd`
1369
1370 ldap_subdir="/openldap"
1371
1372 # Check whether --with-subdir or --without-subdir was given.
1373 if test "${with_subdir+set}" = set; then
1374   withval="$with_subdir"
1375   case "$withval" in
1376         no) ldap_subdir=""
1377                 ;;
1378         yes)
1379                 ;;
1380         /*|\\*)
1381                 ldap_subdir="$withval"
1382                 ;;
1383         *)
1384                 ldap_subdir="/$withval"
1385                 ;;
1386 esac
1387
1388 fi
1389
1390
1391 # OpenLDAP --enable-debug
1392         # Check whether --enable-debug or --disable-debug was given.
1393 if test "${enable_debug+set}" = set; then
1394   enableval="$enable_debug"
1395   
1396         ol_arg=invalid
1397         for ol_val in auto yes no ; do
1398                 if test "$enableval" = "$ol_val" ; then
1399                         ol_arg="$ol_val"
1400                 fi
1401         done
1402         if test "$ol_arg" = "invalid" ; then
1403                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1404         fi
1405         ol_enable_debug="$ol_arg"
1406
1407 else
1408         ol_enable_debug="yes"
1409 fi
1410 # end --enable-debug
1411 # OpenLDAP --enable-syslog
1412         # Check whether --enable-syslog or --disable-syslog was given.
1413 if test "${enable_syslog+set}" = set; then
1414   enableval="$enable_syslog"
1415   
1416         ol_arg=invalid
1417         for ol_val in auto yes no ; do
1418                 if test "$enableval" = "$ol_val" ; then
1419                         ol_arg="$ol_val"
1420                 fi
1421         done
1422         if test "$ol_arg" = "invalid" ; then
1423                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1424         fi
1425         ol_enable_syslog="$ol_arg"
1426
1427 else
1428         ol_enable_syslog="auto"
1429 fi
1430 # end --enable-syslog
1431 # OpenLDAP --enable-dynamic
1432         # Check whether --enable-dynamic or --disable-dynamic was given.
1433 if test "${enable_dynamic+set}" = set; then
1434   enableval="$enable_dynamic"
1435   
1436         ol_arg=invalid
1437         for ol_val in auto yes no ; do
1438                 if test "$enableval" = "$ol_val" ; then
1439                         ol_arg="$ol_val"
1440                 fi
1441         done
1442         if test "$ol_arg" = "invalid" ; then
1443                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1444         fi
1445         ol_enable_dynamic="$ol_arg"
1446
1447 else
1448         ol_enable_dynamic="no"
1449 fi
1450 # end --enable-dynamic
1451 # OpenLDAP --enable-proctitle
1452         # Check whether --enable-proctitle or --disable-proctitle was given.
1453 if test "${enable_proctitle+set}" = set; then
1454   enableval="$enable_proctitle"
1455   
1456         ol_arg=invalid
1457         for ol_val in auto yes no ; do
1458                 if test "$enableval" = "$ol_val" ; then
1459                         ol_arg="$ol_val"
1460                 fi
1461         done
1462         if test "$ol_arg" = "invalid" ; then
1463                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1464         fi
1465         ol_enable_proctitle="$ol_arg"
1466
1467 else
1468         ol_enable_proctitle="yes"
1469 fi
1470 # end --enable-proctitle
1471 ol_enable_referrals=${ol_enable_referrals-no}
1472 ol_enable_kbind=${ol_enable_kbind-no}
1473 # OpenLDAP --enable-ipv6
1474         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1475 if test "${enable_ipv6+set}" = set; then
1476   enableval="$enable_ipv6"
1477   
1478         ol_arg=invalid
1479         for ol_val in auto yes no ; do
1480                 if test "$enableval" = "$ol_val" ; then
1481                         ol_arg="$ol_val"
1482                 fi
1483         done
1484         if test "$ol_arg" = "invalid" ; then
1485                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1486         fi
1487         ol_enable_ipv6="$ol_arg"
1488
1489 else
1490         ol_enable_ipv6="auto"
1491 fi
1492 # end --enable-ipv6
1493 # OpenLDAP --enable-local
1494         # Check whether --enable-local or --disable-local was given.
1495 if test "${enable_local+set}" = set; then
1496   enableval="$enable_local"
1497   
1498         ol_arg=invalid
1499         for ol_val in auto yes no ; do
1500                 if test "$enableval" = "$ol_val" ; then
1501                         ol_arg="$ol_val"
1502                 fi
1503         done
1504         if test "$ol_arg" = "invalid" ; then
1505                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1506         fi
1507         ol_enable_local="$ol_arg"
1508
1509 else
1510         ol_enable_local="auto"
1511 fi
1512 # end --enable-local
1513 # OpenLDAP --enable-x_compile
1514         # Check whether --enable-x_compile or --disable-x_compile was given.
1515 if test "${enable_x_compile+set}" = set; then
1516   enableval="$enable_x_compile"
1517   
1518         ol_arg=invalid
1519         for ol_val in yes no ; do
1520                 if test "$enableval" = "$ol_val" ; then
1521                         ol_arg="$ol_val"
1522                 fi
1523         done
1524         if test "$ol_arg" = "invalid" ; then
1525                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1526         fi
1527         ol_enable_x_compile="$ol_arg"
1528
1529 else
1530         ol_enable_x_compile="no"
1531 fi
1532 # end --enable-x_compile
1533
1534
1535 # OpenLDAP --with-cyrus_sasl
1536         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1537 if test "${with_cyrus_sasl+set}" = set; then
1538   withval="$with_cyrus_sasl"
1539   
1540         ol_arg=invalid
1541         for ol_val in auto yes no  ; do
1542                 if test "$withval" = "$ol_val" ; then
1543                         ol_arg="$ol_val"
1544                 fi
1545         done
1546         if test "$ol_arg" = "invalid" ; then
1547                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1548         fi
1549         ol_with_cyrus_sasl="$ol_arg"
1550
1551 else
1552         ol_with_cyrus_sasl="auto"
1553 fi
1554 # end --with-cyrus_sasl
1555
1556 # OpenLDAP --with-fetch
1557         # Check whether --with-fetch or --without-fetch was given.
1558 if test "${with_fetch+set}" = set; then
1559   withval="$with_fetch"
1560   
1561         ol_arg=invalid
1562         for ol_val in auto yes no  ; do
1563                 if test "$withval" = "$ol_val" ; then
1564                         ol_arg="$ol_val"
1565                 fi
1566         done
1567         if test "$ol_arg" = "invalid" ; then
1568                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1569         fi
1570         ol_with_fetch="$ol_arg"
1571
1572 else
1573         ol_with_fetch="auto"
1574 fi
1575 # end --with-fetch
1576
1577 # OpenLDAP --with-kerberos
1578         # Check whether --with-kerberos or --without-kerberos was given.
1579 if test "${with_kerberos+set}" = set; then
1580   withval="$with_kerberos"
1581   
1582         ol_arg=invalid
1583         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1584                 if test "$withval" = "$ol_val" ; then
1585                         ol_arg="$ol_val"
1586                 fi
1587         done
1588         if test "$ol_arg" = "invalid" ; then
1589                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1590         fi
1591         ol_with_kerberos="$ol_arg"
1592
1593 else
1594         ol_with_kerberos="auto"
1595 fi
1596 # end --with-kerberos
1597
1598 # OpenLDAP --with-readline
1599         # Check whether --with-readline or --without-readline was given.
1600 if test "${with_readline+set}" = set; then
1601   withval="$with_readline"
1602   
1603         ol_arg=invalid
1604         for ol_val in auto yes no  ; do
1605                 if test "$withval" = "$ol_val" ; then
1606                         ol_arg="$ol_val"
1607                 fi
1608         done
1609         if test "$ol_arg" = "invalid" ; then
1610                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1611         fi
1612         ol_with_readline="$ol_arg"
1613
1614 else
1615         ol_with_readline="auto"
1616 fi
1617 # end --with-readline
1618
1619 # OpenLDAP --with-threads
1620         # Check whether --with-threads or --without-threads was given.
1621 if test "${with_threads+set}" = set; then
1622   withval="$with_threads"
1623   
1624         ol_arg=invalid
1625         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1626                 if test "$withval" = "$ol_val" ; then
1627                         ol_arg="$ol_val"
1628                 fi
1629         done
1630         if test "$ol_arg" = "invalid" ; then
1631                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1632         fi
1633         ol_with_threads="$ol_arg"
1634
1635 else
1636         ol_with_threads="auto"
1637 fi
1638 # end --with-threads
1639
1640 # OpenLDAP --with-tls
1641         # Check whether --with-tls or --without-tls was given.
1642 if test "${with_tls+set}" = set; then
1643   withval="$with_tls"
1644   
1645         ol_arg=invalid
1646         for ol_val in auto ssleay openssl yes no  ; do
1647                 if test "$withval" = "$ol_val" ; then
1648                         ol_arg="$ol_val"
1649                 fi
1650         done
1651         if test "$ol_arg" = "invalid" ; then
1652                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1653         fi
1654         ol_with_tls="$ol_arg"
1655
1656 else
1657         ol_with_tls="auto"
1658 fi
1659 # end --with-tls
1660
1661 # OpenLDAP --with-yielding_select
1662         # Check whether --with-yielding_select or --without-yielding_select was given.
1663 if test "${with_yielding_select+set}" = set; then
1664   withval="$with_yielding_select"
1665   
1666         ol_arg=invalid
1667         for ol_val in auto yes no manual  ; do
1668                 if test "$withval" = "$ol_val" ; then
1669                         ol_arg="$ol_val"
1670                 fi
1671         done
1672         if test "$ol_arg" = "invalid" ; then
1673                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1674         fi
1675         ol_with_yielding_select="$ol_arg"
1676
1677 else
1678         ol_with_yielding_select="auto"
1679 fi
1680 # end --with-yielding_select
1681
1682
1683
1684 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1685 if test "${with_xxslapdoptions+set}" = set; then
1686   withval="$with_xxslapdoptions"
1687   :
1688 fi
1689
1690 # OpenLDAP --enable-slapd
1691         # Check whether --enable-slapd or --disable-slapd was given.
1692 if test "${enable_slapd+set}" = set; then
1693   enableval="$enable_slapd"
1694   
1695         ol_arg=invalid
1696         for ol_val in auto yes no ; do
1697                 if test "$enableval" = "$ol_val" ; then
1698                         ol_arg="$ol_val"
1699                 fi
1700         done
1701         if test "$ol_arg" = "invalid" ; then
1702                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1703         fi
1704         ol_enable_slapd="$ol_arg"
1705
1706 else
1707         ol_enable_slapd="yes"
1708 fi
1709 # end --enable-slapd
1710 # OpenLDAP --enable-aci
1711         # Check whether --enable-aci or --disable-aci was given.
1712 if test "${enable_aci+set}" = set; then
1713   enableval="$enable_aci"
1714   
1715         ol_arg=invalid
1716         for ol_val in auto yes no ; do
1717                 if test "$enableval" = "$ol_val" ; then
1718                         ol_arg="$ol_val"
1719                 fi
1720         done
1721         if test "$ol_arg" = "invalid" ; then
1722                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1723         fi
1724         ol_enable_aci="$ol_arg"
1725
1726 else
1727         ol_enable_aci="no"
1728 fi
1729 # end --enable-aci
1730 # OpenLDAP --enable-cleartext
1731         # Check whether --enable-cleartext or --disable-cleartext was given.
1732 if test "${enable_cleartext+set}" = set; then
1733   enableval="$enable_cleartext"
1734   
1735         ol_arg=invalid
1736         for ol_val in auto yes no ; do
1737                 if test "$enableval" = "$ol_val" ; then
1738                         ol_arg="$ol_val"
1739                 fi
1740         done
1741         if test "$ol_arg" = "invalid" ; then
1742                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1743         fi
1744         ol_enable_cleartext="$ol_arg"
1745
1746 else
1747         ol_enable_cleartext="yes"
1748 fi
1749 # end --enable-cleartext
1750 # OpenLDAP --enable-crypt
1751         # Check whether --enable-crypt or --disable-crypt was given.
1752 if test "${enable_crypt+set}" = set; then
1753   enableval="$enable_crypt"
1754   
1755         ol_arg=invalid
1756         for ol_val in auto yes no ; do
1757                 if test "$enableval" = "$ol_val" ; then
1758                         ol_arg="$ol_val"
1759                 fi
1760         done
1761         if test "$ol_arg" = "invalid" ; then
1762                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1763         fi
1764         ol_enable_crypt="$ol_arg"
1765
1766 else
1767         ol_enable_crypt="no"
1768 fi
1769 # end --enable-crypt
1770 # OpenLDAP --enable-kpasswd
1771         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1772 if test "${enable_kpasswd+set}" = set; then
1773   enableval="$enable_kpasswd"
1774   
1775         ol_arg=invalid
1776         for ol_val in auto yes no ; do
1777                 if test "$enableval" = "$ol_val" ; then
1778                         ol_arg="$ol_val"
1779                 fi
1780         done
1781         if test "$ol_arg" = "invalid" ; then
1782                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1783         fi
1784         ol_enable_kpasswd="$ol_arg"
1785
1786 else
1787         ol_enable_kpasswd="no"
1788 fi
1789 # end --enable-kpasswd
1790 # OpenLDAP --enable-lmpasswd
1791         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1792 if test "${enable_lmpasswd+set}" = set; then
1793   enableval="$enable_lmpasswd"
1794   
1795         ol_arg=invalid
1796         for ol_val in auto yes no ; do
1797                 if test "$enableval" = "$ol_val" ; then
1798                         ol_arg="$ol_val"
1799                 fi
1800         done
1801         if test "$ol_arg" = "invalid" ; then
1802                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1803         fi
1804         ol_enable_lmpasswd="$ol_arg"
1805
1806 else
1807         ol_enable_lmpasswd="no"
1808 fi
1809 # end --enable-lmpasswd
1810 # OpenLDAP --enable-spasswd
1811         # Check whether --enable-spasswd or --disable-spasswd was given.
1812 if test "${enable_spasswd+set}" = set; then
1813   enableval="$enable_spasswd"
1814   
1815         ol_arg=invalid
1816         for ol_val in auto yes no ; do
1817                 if test "$enableval" = "$ol_val" ; then
1818                         ol_arg="$ol_val"
1819                 fi
1820         done
1821         if test "$ol_arg" = "invalid" ; then
1822                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1823         fi
1824         ol_enable_spasswd="$ol_arg"
1825
1826 else
1827         ol_enable_spasswd="no"
1828 fi
1829 # end --enable-spasswd
1830 # OpenLDAP --enable-modules
1831         # Check whether --enable-modules or --disable-modules was given.
1832 if test "${enable_modules+set}" = set; then
1833   enableval="$enable_modules"
1834   
1835         ol_arg=invalid
1836         for ol_val in auto yes no ; do
1837                 if test "$enableval" = "$ol_val" ; then
1838                         ol_arg="$ol_val"
1839                 fi
1840         done
1841         if test "$ol_arg" = "invalid" ; then
1842                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1843         fi
1844         ol_enable_modules="$ol_arg"
1845
1846 else
1847         ol_enable_modules="no"
1848 fi
1849 # end --enable-modules
1850 ol_enable_multimaster=${ol_enable_multimaster-no}
1851 # OpenLDAP --enable-phonetic
1852         # Check whether --enable-phonetic or --disable-phonetic was given.
1853 if test "${enable_phonetic+set}" = set; then
1854   enableval="$enable_phonetic"
1855   
1856         ol_arg=invalid
1857         for ol_val in auto yes no ; do
1858                 if test "$enableval" = "$ol_val" ; then
1859                         ol_arg="$ol_val"
1860                 fi
1861         done
1862         if test "$ol_arg" = "invalid" ; then
1863                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1864         fi
1865         ol_enable_phonetic="$ol_arg"
1866
1867 else
1868         ol_enable_phonetic="no"
1869 fi
1870 # end --enable-phonetic
1871 # OpenLDAP --enable-rewrite
1872         # Check whether --enable-rewrite or --disable-rewrite was given.
1873 if test "${enable_rewrite+set}" = set; then
1874   enableval="$enable_rewrite"
1875   
1876         ol_arg=invalid
1877         for ol_val in auto yes no ; do
1878                 if test "$enableval" = "$ol_val" ; then
1879                         ol_arg="$ol_val"
1880                 fi
1881         done
1882         if test "$ol_arg" = "invalid" ; then
1883                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1884         fi
1885         ol_enable_rewrite="$ol_arg"
1886
1887 else
1888         ol_enable_rewrite="no"
1889 fi
1890 # end --enable-rewrite
1891 # OpenLDAP --enable-rlookups
1892         # Check whether --enable-rlookups or --disable-rlookups was given.
1893 if test "${enable_rlookups+set}" = set; then
1894   enableval="$enable_rlookups"
1895   
1896         ol_arg=invalid
1897         for ol_val in auto yes no ; do
1898                 if test "$enableval" = "$ol_val" ; then
1899                         ol_arg="$ol_val"
1900                 fi
1901         done
1902         if test "$ol_arg" = "invalid" ; then
1903                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1904         fi
1905         ol_enable_rlookups="$ol_arg"
1906
1907 else
1908         ol_enable_rlookups="no"
1909 fi
1910 # end --enable-rlookups
1911 # OpenLDAP --enable-slp
1912         # Check whether --enable-slp or --disable-slp was given.
1913 if test "${enable_slp+set}" = set; then
1914   enableval="$enable_slp"
1915   
1916         ol_arg=invalid
1917         for ol_val in auto yes no ; do
1918                 if test "$enableval" = "$ol_val" ; then
1919                         ol_arg="$ol_val"
1920                 fi
1921         done
1922         if test "$ol_arg" = "invalid" ; then
1923                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1924         fi
1925         ol_enable_slp="$ol_arg"
1926
1927 else
1928         ol_enable_slp="no"
1929 fi
1930 # end --enable-slp
1931 # OpenLDAP --enable-wrappers
1932         # Check whether --enable-wrappers or --disable-wrappers was given.
1933 if test "${enable_wrappers+set}" = set; then
1934   enableval="$enable_wrappers"
1935   
1936         ol_arg=invalid
1937         for ol_val in auto yes no ; do
1938                 if test "$enableval" = "$ol_val" ; then
1939                         ol_arg="$ol_val"
1940                 fi
1941         done
1942         if test "$ol_arg" = "invalid" ; then
1943                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1944         fi
1945         ol_enable_wrappers="$ol_arg"
1946
1947 else
1948         ol_enable_wrappers="no"
1949 fi
1950 # end --enable-wrappers
1951
1952 # OpenLDAP --enable-bdb
1953         # Check whether --enable-bdb or --disable-bdb was given.
1954 if test "${enable_bdb+set}" = set; then
1955   enableval="$enable_bdb"
1956   
1957         ol_arg=invalid
1958         for ol_val in auto yes no ; do
1959                 if test "$enableval" = "$ol_val" ; then
1960                         ol_arg="$ol_val"
1961                 fi
1962         done
1963         if test "$ol_arg" = "invalid" ; then
1964                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1965         fi
1966         ol_enable_bdb="$ol_arg"
1967
1968 else
1969         ol_enable_bdb="yes"
1970 fi
1971 # end --enable-bdb
1972 # OpenLDAP --with-bdb_module
1973         # Check whether --with-bdb_module or --without-bdb_module was given.
1974 if test "${with_bdb_module+set}" = set; then
1975   withval="$with_bdb_module"
1976   
1977         ol_arg=invalid
1978         for ol_val in static dynamic ; do
1979                 if test "$withval" = "$ol_val" ; then
1980                         ol_arg="$ol_val"
1981                 fi
1982         done
1983         if test "$ol_arg" = "invalid" ; then
1984                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1985         fi
1986         ol_with_bdb_module="$ol_arg"
1987
1988 else
1989         ol_with_bdb_module="static"
1990 fi
1991 # end --with-bdb_module
1992
1993 # OpenLDAP --enable-dnssrv
1994         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1995 if test "${enable_dnssrv+set}" = set; then
1996   enableval="$enable_dnssrv"
1997   
1998         ol_arg=invalid
1999         for ol_val in auto yes no ; do
2000                 if test "$enableval" = "$ol_val" ; then
2001                         ol_arg="$ol_val"
2002                 fi
2003         done
2004         if test "$ol_arg" = "invalid" ; then
2005                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2006         fi
2007         ol_enable_dnssrv="$ol_arg"
2008
2009 else
2010         ol_enable_dnssrv="no"
2011 fi
2012 # end --enable-dnssrv
2013 # OpenLDAP --with-dnssrv_module
2014         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2015 if test "${with_dnssrv_module+set}" = set; then
2016   withval="$with_dnssrv_module"
2017   
2018         ol_arg=invalid
2019         for ol_val in static dynamic ; do
2020                 if test "$withval" = "$ol_val" ; then
2021                         ol_arg="$ol_val"
2022                 fi
2023         done
2024         if test "$ol_arg" = "invalid" ; then
2025                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2026         fi
2027         ol_with_dnssrv_module="$ol_arg"
2028
2029 else
2030         ol_with_dnssrv_module="static"
2031 fi
2032 # end --with-dnssrv_module
2033
2034 # OpenLDAP --enable-ldap
2035         # Check whether --enable-ldap or --disable-ldap was given.
2036 if test "${enable_ldap+set}" = set; then
2037   enableval="$enable_ldap"
2038   
2039         ol_arg=invalid
2040         for ol_val in auto yes no ; do
2041                 if test "$enableval" = "$ol_val" ; then
2042                         ol_arg="$ol_val"
2043                 fi
2044         done
2045         if test "$ol_arg" = "invalid" ; then
2046                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2047         fi
2048         ol_enable_ldap="$ol_arg"
2049
2050 else
2051         ol_enable_ldap="no"
2052 fi
2053 # end --enable-ldap
2054 # OpenLDAP --with-ldap_module
2055         # Check whether --with-ldap_module or --without-ldap_module was given.
2056 if test "${with_ldap_module+set}" = set; then
2057   withval="$with_ldap_module"
2058   
2059         ol_arg=invalid
2060         for ol_val in static dynamic ; do
2061                 if test "$withval" = "$ol_val" ; then
2062                         ol_arg="$ol_val"
2063                 fi
2064         done
2065         if test "$ol_arg" = "invalid" ; then
2066                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2067         fi
2068         ol_with_ldap_module="$ol_arg"
2069
2070 else
2071         ol_with_ldap_module="static"
2072 fi
2073 # end --with-ldap_module
2074
2075 # OpenLDAP --enable-ldbm
2076         # Check whether --enable-ldbm or --disable-ldbm was given.
2077 if test "${enable_ldbm+set}" = set; then
2078   enableval="$enable_ldbm"
2079   
2080         ol_arg=invalid
2081         for ol_val in auto yes no ; do
2082                 if test "$enableval" = "$ol_val" ; then
2083                         ol_arg="$ol_val"
2084                 fi
2085         done
2086         if test "$ol_arg" = "invalid" ; then
2087                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2088         fi
2089         ol_enable_ldbm="$ol_arg"
2090
2091 else
2092         ol_enable_ldbm="no"
2093 fi
2094 # end --enable-ldbm
2095 # OpenLDAP --with-ldbm_api
2096         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2097 if test "${with_ldbm_api+set}" = set; then
2098   withval="$with_ldbm_api"
2099   
2100         ol_arg=invalid
2101         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2102                 if test "$withval" = "$ol_val" ; then
2103                         ol_arg="$ol_val"
2104                 fi
2105         done
2106         if test "$ol_arg" = "invalid" ; then
2107                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2108         fi
2109         ol_with_ldbm_api="$ol_arg"
2110
2111 else
2112         ol_with_ldbm_api="auto"
2113 fi
2114 # end --with-ldbm_api
2115
2116 # OpenLDAP --with-ldbm_module
2117         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2118 if test "${with_ldbm_module+set}" = set; then
2119   withval="$with_ldbm_module"
2120   
2121         ol_arg=invalid
2122         for ol_val in static dynamic ; do
2123                 if test "$withval" = "$ol_val" ; then
2124                         ol_arg="$ol_val"
2125                 fi
2126         done
2127         if test "$ol_arg" = "invalid" ; then
2128                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2129         fi
2130         ol_with_ldbm_module="$ol_arg"
2131
2132 else
2133         ol_with_ldbm_module="static"
2134 fi
2135 # end --with-ldbm_module
2136
2137 # OpenLDAP --with-ldbm_type
2138         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2139 if test "${with_ldbm_type+set}" = set; then
2140   withval="$with_ldbm_type"
2141   
2142         ol_arg=invalid
2143         for ol_val in auto btree hash ; do
2144                 if test "$withval" = "$ol_val" ; then
2145                         ol_arg="$ol_val"
2146                 fi
2147         done
2148         if test "$ol_arg" = "invalid" ; then
2149                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2150         fi
2151         ol_with_ldbm_type="$ol_arg"
2152
2153 else
2154         ol_with_ldbm_type="auto"
2155 fi
2156 # end --with-ldbm_type
2157
2158 # OpenLDAP --enable-meta
2159         # Check whether --enable-meta or --disable-meta was given.
2160 if test "${enable_meta+set}" = set; then
2161   enableval="$enable_meta"
2162   
2163         ol_arg=invalid
2164         for ol_val in auto yes no ; do
2165                 if test "$enableval" = "$ol_val" ; then
2166                         ol_arg="$ol_val"
2167                 fi
2168         done
2169         if test "$ol_arg" = "invalid" ; then
2170                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2171         fi
2172         ol_enable_meta="$ol_arg"
2173
2174 else
2175         ol_enable_meta="no"
2176 fi
2177 # end --enable-meta
2178 # OpenLDAP --with-meta_module
2179         # Check whether --with-meta_module or --without-meta_module was given.
2180 if test "${with_meta_module+set}" = set; then
2181   withval="$with_meta_module"
2182   
2183         ol_arg=invalid
2184         for ol_val in static dynamic ; do
2185                 if test "$withval" = "$ol_val" ; then
2186                         ol_arg="$ol_val"
2187                 fi
2188         done
2189         if test "$ol_arg" = "invalid" ; then
2190                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2191         fi
2192         ol_with_meta_module="$ol_arg"
2193
2194 else
2195         ol_with_meta_module="static"
2196 fi
2197 # end --with-meta_module
2198
2199 # OpenLDAP --enable-monitor
2200         # Check whether --enable-monitor or --disable-monitor was given.
2201 if test "${enable_monitor+set}" = set; then
2202   enableval="$enable_monitor"
2203   
2204         ol_arg=invalid
2205         for ol_val in auto yes no ; do
2206                 if test "$enableval" = "$ol_val" ; then
2207                         ol_arg="$ol_val"
2208                 fi
2209         done
2210         if test "$ol_arg" = "invalid" ; then
2211                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2212         fi
2213         ol_enable_monitor="$ol_arg"
2214
2215 else
2216         ol_enable_monitor="no"
2217 fi
2218 # end --enable-monitor
2219 # OpenLDAP --with-monitor_module
2220         # Check whether --with-monitor_module or --without-monitor_module was given.
2221 if test "${with_monitor_module+set}" = set; then
2222   withval="$with_monitor_module"
2223   
2224         ol_arg=invalid
2225         for ol_val in static dynamic ; do
2226                 if test "$withval" = "$ol_val" ; then
2227                         ol_arg="$ol_val"
2228                 fi
2229         done
2230         if test "$ol_arg" = "invalid" ; then
2231                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2232         fi
2233         ol_with_monitor_module="$ol_arg"
2234
2235 else
2236         ol_with_monitor_module="static"
2237 fi
2238 # end --with-monitor_module
2239
2240 # OpenLDAP --enable-null
2241         # Check whether --enable-null or --disable-null was given.
2242 if test "${enable_null+set}" = set; then
2243   enableval="$enable_null"
2244   
2245         ol_arg=invalid
2246         for ol_val in auto yes no ; do
2247                 if test "$enableval" = "$ol_val" ; then
2248                         ol_arg="$ol_val"
2249                 fi
2250         done
2251         if test "$ol_arg" = "invalid" ; then
2252                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2253         fi
2254         ol_enable_null="$ol_arg"
2255
2256 else
2257         ol_enable_null="no"
2258 fi
2259 # end --enable-null
2260 # OpenLDAP --with-null_module
2261         # Check whether --with-null_module or --without-null_module was given.
2262 if test "${with_null_module+set}" = set; then
2263   withval="$with_null_module"
2264   
2265         ol_arg=invalid
2266         for ol_val in static dynamic ; do
2267                 if test "$withval" = "$ol_val" ; then
2268                         ol_arg="$ol_val"
2269                 fi
2270         done
2271         if test "$ol_arg" = "invalid" ; then
2272                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2273         fi
2274         ol_with_null_module="$ol_arg"
2275
2276 else
2277         ol_with_null_module="static"
2278 fi
2279 # end --with-null_module
2280
2281 # OpenLDAP --enable-passwd
2282         # Check whether --enable-passwd or --disable-passwd was given.
2283 if test "${enable_passwd+set}" = set; then
2284   enableval="$enable_passwd"
2285   
2286         ol_arg=invalid
2287         for ol_val in auto yes no ; do
2288                 if test "$enableval" = "$ol_val" ; then
2289                         ol_arg="$ol_val"
2290                 fi
2291         done
2292         if test "$ol_arg" = "invalid" ; then
2293                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2294         fi
2295         ol_enable_passwd="$ol_arg"
2296
2297 else
2298         ol_enable_passwd="no"
2299 fi
2300 # end --enable-passwd
2301 # OpenLDAP --with-passwd_module
2302         # Check whether --with-passwd_module or --without-passwd_module was given.
2303 if test "${with_passwd_module+set}" = set; then
2304   withval="$with_passwd_module"
2305   
2306         ol_arg=invalid
2307         for ol_val in static dynamic ; do
2308                 if test "$withval" = "$ol_val" ; then
2309                         ol_arg="$ol_val"
2310                 fi
2311         done
2312         if test "$ol_arg" = "invalid" ; then
2313                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2314         fi
2315         ol_with_passwd_module="$ol_arg"
2316
2317 else
2318         ol_with_passwd_module="static"
2319 fi
2320 # end --with-passwd_module
2321
2322 # OpenLDAP --enable-perl
2323         # Check whether --enable-perl or --disable-perl was given.
2324 if test "${enable_perl+set}" = set; then
2325   enableval="$enable_perl"
2326   
2327         ol_arg=invalid
2328         for ol_val in auto yes no ; do
2329                 if test "$enableval" = "$ol_val" ; then
2330                         ol_arg="$ol_val"
2331                 fi
2332         done
2333         if test "$ol_arg" = "invalid" ; then
2334                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2335         fi
2336         ol_enable_perl="$ol_arg"
2337
2338 else
2339         ol_enable_perl="no"
2340 fi
2341 # end --enable-perl
2342 # OpenLDAP --with-perl_module
2343         # Check whether --with-perl_module or --without-perl_module was given.
2344 if test "${with_perl_module+set}" = set; then
2345   withval="$with_perl_module"
2346   
2347         ol_arg=invalid
2348         for ol_val in static dynamic ; do
2349                 if test "$withval" = "$ol_val" ; then
2350                         ol_arg="$ol_val"
2351                 fi
2352         done
2353         if test "$ol_arg" = "invalid" ; then
2354                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2355         fi
2356         ol_with_perl_module="$ol_arg"
2357
2358 else
2359         ol_with_perl_module="static"
2360 fi
2361 # end --with-perl_module
2362
2363 # OpenLDAP --enable-shell
2364         # Check whether --enable-shell or --disable-shell was given.
2365 if test "${enable_shell+set}" = set; then
2366   enableval="$enable_shell"
2367   
2368         ol_arg=invalid
2369         for ol_val in auto yes no ; do
2370                 if test "$enableval" = "$ol_val" ; then
2371                         ol_arg="$ol_val"
2372                 fi
2373         done
2374         if test "$ol_arg" = "invalid" ; then
2375                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2376         fi
2377         ol_enable_shell="$ol_arg"
2378
2379 else
2380         ol_enable_shell="no"
2381 fi
2382 # end --enable-shell
2383 # OpenLDAP --with-shell_module
2384         # Check whether --with-shell_module or --without-shell_module was given.
2385 if test "${with_shell_module+set}" = set; then
2386   withval="$with_shell_module"
2387   
2388         ol_arg=invalid
2389         for ol_val in static dynamic ; do
2390                 if test "$withval" = "$ol_val" ; then
2391                         ol_arg="$ol_val"
2392                 fi
2393         done
2394         if test "$ol_arg" = "invalid" ; then
2395                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2396         fi
2397         ol_with_shell_module="$ol_arg"
2398
2399 else
2400         ol_with_shell_module="static"
2401 fi
2402 # end --with-shell_module
2403
2404 # OpenLDAP --enable-sql
2405         # Check whether --enable-sql or --disable-sql was given.
2406 if test "${enable_sql+set}" = set; then
2407   enableval="$enable_sql"
2408   
2409         ol_arg=invalid
2410         for ol_val in auto yes no ; do
2411                 if test "$enableval" = "$ol_val" ; then
2412                         ol_arg="$ol_val"
2413                 fi
2414         done
2415         if test "$ol_arg" = "invalid" ; then
2416                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2417         fi
2418         ol_enable_sql="$ol_arg"
2419
2420 else
2421         ol_enable_sql="no"
2422 fi
2423 # end --enable-sql
2424 # OpenLDAP --with-sql_module
2425         # Check whether --with-sql_module or --without-sql_module was given.
2426 if test "${with_sql_module+set}" = set; then
2427   withval="$with_sql_module"
2428   
2429         ol_arg=invalid
2430         for ol_val in static dynamic ; do
2431                 if test "$withval" = "$ol_val" ; then
2432                         ol_arg="$ol_val"
2433                 fi
2434         done
2435         if test "$ol_arg" = "invalid" ; then
2436                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2437         fi
2438         ol_with_sql_module="$ol_arg"
2439
2440 else
2441         ol_with_sql_module="static"
2442 fi
2443 # end --with-sql_module
2444
2445
2446 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2447 if test "${with_xxslurpdoptions+set}" = set; then
2448   withval="$with_xxslurpdoptions"
2449   :
2450 fi
2451
2452 # OpenLDAP --enable-slurpd
2453         # Check whether --enable-slurpd or --disable-slurpd was given.
2454 if test "${enable_slurpd+set}" = set; then
2455   enableval="$enable_slurpd"
2456   
2457         ol_arg=invalid
2458         for ol_val in auto yes no ; do
2459                 if test "$enableval" = "$ol_val" ; then
2460                         ol_arg="$ol_val"
2461                 fi
2462         done
2463         if test "$ol_arg" = "invalid" ; then
2464                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2465         fi
2466         ol_enable_slurpd="$ol_arg"
2467
2468 else
2469         ol_enable_slurpd="auto"
2470 fi
2471 # end --enable-slurpd
2472
2473 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2474 if test "${with_xxliboptions+set}" = set; then
2475   withval="$with_xxliboptions"
2476   :
2477 fi
2478
2479 # Check whether --enable-static or --disable-static was given.
2480 if test "${enable_static+set}" = set; then
2481   enableval="$enable_static"
2482   p=${PACKAGE-default}
2483 case $enableval in
2484 yes) enable_static=yes ;;
2485 no) enable_static=no ;;
2486 *)
2487   enable_static=no
2488   # Look at the argument we got.  We use all the common list separators.
2489   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2490   for pkg in $enableval; do
2491     if test "X$pkg" = "X$p"; then
2492       enable_static=yes
2493     fi
2494   done
2495   IFS="$ac_save_ifs"
2496   ;;
2497 esac
2498 else
2499   enable_static=yes
2500 fi
2501
2502 # Check whether --enable-shared or --disable-shared was given.
2503 if test "${enable_shared+set}" = set; then
2504   enableval="$enable_shared"
2505   p=${PACKAGE-default}
2506 case $enableval in
2507 yes) enable_shared=yes ;;
2508 no) enable_shared=no ;;
2509 *)
2510   enable_shared=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_shared=yes
2516     fi
2517   done
2518   IFS="$ac_save_ifs"
2519   ;;
2520 esac
2521 else
2522   enable_shared=yes
2523 fi
2524
2525
2526
2527 # validate options
2528 if test $ol_enable_slapd = no ; then
2529                 if test $ol_enable_bdb = yes ; then
2530                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2531         fi
2532         if test $ol_enable_dnssrv = yes ; then
2533                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2534         fi
2535         if test $ol_enable_ldap = yes ; then
2536                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2537         fi
2538         if test $ol_enable_ldbm = yes ; then
2539                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2540         fi
2541         if test $ol_enable_meta = yes ; then
2542                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2543         fi
2544         if test $ol_enable_monitor = yes ; then
2545                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2546         fi
2547         if test $ol_enable_null = yes ; then
2548                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2549         fi
2550         if test $ol_enable_passwd = yes ; then
2551                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2552         fi
2553         if test $ol_enable_perl = yes ; then
2554                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2555         fi
2556         if test $ol_enable_shell = yes ; then
2557                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2558         fi
2559         if test $ol_enable_sql = yes ; then
2560                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2561         fi
2562         if test $ol_enable_modules = yes ; then
2563                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2564         fi
2565         if test $ol_enable_multimaster = yes ; then
2566                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2567         fi
2568         if test $ol_enable_wrappers = yes ; then
2569                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2570         fi
2571         if test $ol_enable_phonetic = yes ; then
2572                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2573         fi
2574         if test $ol_enable_rlookups = yes ; then
2575                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2576         fi
2577         if test $ol_enable_aci = yes ; then
2578                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2579         fi
2580         if test $ol_with_ldbm_api != auto ; then
2581                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2582         fi
2583         if test $ol_with_ldbm_type != auto ; then
2584                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2585         fi
2586         if test $ol_with_bdb_module != static ; then
2587                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2588         fi
2589         if test $ol_with_dnssrv_module != static ; then
2590                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2591         fi
2592         if test $ol_with_ldap_module != static ; then
2593                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2594         fi
2595         if test $ol_with_ldbm_module != static ; then
2596                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2597         fi
2598         if test $ol_with_meta_module != static ; then
2599                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2600         fi
2601         if test $ol_with_monitor_module != static ; then
2602                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2603         fi
2604         if test $ol_with_null_module != static ; then
2605                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2606         fi
2607         if test $ol_with_passwd_module != static ; then
2608                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2609         fi
2610         if test $ol_with_perl_module != static ; then
2611                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2612         fi
2613         if test $ol_with_shell_module != static ; then
2614                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2615         fi
2616         if test $ol_with_sql_module != static ; then
2617                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2618         fi
2619         if test $ol_enable_slurpd = yes ; then
2620                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2621         fi
2622         if test $ol_enable_rewrite = yes ; then
2623                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2624         fi
2625
2626         # force settings to no
2627         ol_enable_bdb=no
2628         ol_enable_dnssrv=no
2629         ol_enable_ldap=no
2630         ol_enable_ldbm=no
2631         ol_enable_meta=no
2632         ol_enable_monitor=no
2633         ol_enable_null=no
2634         ol_enable_passwd=no
2635         ol_enable_perl=no
2636         ol_enable_shell=no
2637         ol_enable_sql=no
2638
2639         ol_enable_modules=no
2640         ol_enable_multimaster=no
2641         ol_enable_phonetic=no
2642         ol_enable_rlookups=no
2643         ol_enable_aci=no
2644         ol_enable_wrappers=no
2645         ol_enable_dynamic=no
2646
2647         ol_with_ldbm_api=no
2648         ol_with_ldbm_type=no
2649
2650         ol_with_bdb_module=static
2651         ol_with_dnssrv_module=static
2652         ol_with_ldap_module=static
2653         ol_with_ldbm_module=static
2654         ol_with_meta_module=static
2655         ol_with_monitor_module=static
2656         ol_with_null_module=static
2657         ol_with_passwd_module=static
2658         ol_with_perl_module=static
2659         ol_with_shell_module=static
2660         ol_with_sql_module=static
2661
2662         ol_enable_slurpd=no
2663
2664         ol_enable_rewrite=no
2665
2666 elif test $ol_enable_ldbm = no ; then
2667         
2668         if test $ol_with_ldbm_api != auto ; then
2669                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2670         fi
2671
2672         if test $ol_with_ldbm_type != auto ; then
2673                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2674         fi
2675
2676         if test $ol_with_ldbm_module != static ; then
2677                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2678         fi
2679
2680         if test $ol_enable_modules != yes -a \
2681                 $ol_enable_bdb = no -a \
2682                 $ol_enable_dnssrv = no -a \
2683                 $ol_enable_ldap = no -a \
2684                 $ol_enable_meta = no -a \
2685                 $ol_enable_monitor = no -a \
2686                 $ol_enable_null = no -a \
2687                 $ol_enable_passwd = no -a \
2688                 $ol_enable_perl = no -a \
2689                 $ol_enable_shell = no -a \
2690                 $ol_enable_sql = no ; then
2691
2692                 if test $ol_enable_slapd = yes ; then
2693                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2694                 else
2695                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2696                         ol_enable_slapd=no
2697                 fi
2698         fi
2699
2700         ol_with_ldbm_api=no
2701         ol_with_ldbm_type=no
2702         ol_with_ldbm_module=static
2703
2704         if test $ol_enable_bdb != no ; then
2705                 ol_with_ldbm_api=berkeley
2706         fi
2707
2708 else
2709                 if test $ol_with_ldbm_api = gdbm -a \
2710                 $ol_with_ldbm_type = btree ; then
2711                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2712         fi
2713         if test $ol_with_ldbm_api = mdbm -a \
2714                 $ol_with_ldbm_type = btree ; then
2715                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2716         fi
2717         if test $ol_with_ldbm_api = ndbm -a \
2718                 $ol_with_ldbm_type = btree ; then
2719                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2720         fi
2721
2722         if test $ol_enable_bdb = yes ; then
2723                 if test $ol_with_ldbm_api = auto ; then
2724                         ol_with_ldbm_api=berkeley
2725                 elif test $ol_with_ldbm_api != berkeley ; then
2726                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2727                 fi
2728
2729         elif test $ol_enable_bdb = auto ; then
2730                 if test $ol_with_ldbm_api != berkeley \
2731                         -o $ol_with_ldbm_api != auto ; then
2732                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2733                         ol_enable_bdb=no
2734                 fi
2735         fi
2736 fi
2737
2738 if test $ol_enable_slurpd = yes ; then
2739                 if test $ol_with_threads = no ; then
2740                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2741         fi
2742 fi
2743
2744 if test $ol_enable_lmpasswd = yes ; then
2745         if test $ol_with_tls = no ; then
2746                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2747         fi
2748 fi
2749
2750 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2751         if test $ol_with_kerberos = no ; then
2752                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2753         elif test $ol_with_kerberos = auto ; then
2754                 ol_with_kerberos=yes
2755         fi
2756
2757 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2758         if test $ol_with_kerberos = auto ; then
2759                 ol_with_kerberos=no
2760         elif test $ol_with_kerberos != no ; then
2761                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2762                 ol_with_kerberos=no
2763         fi
2764 fi
2765
2766 if test $ol_enable_spasswd = yes ; then
2767         if test $ol_with_cyrus_sasl = no ; then
2768                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2769         fi
2770         ol_with_cyrus_sasl=yes
2771 fi
2772
2773 echo "$ac_t""done" 1>&6
2774
2775 LDAP_LIBS=
2776 LDIF_LIBS=
2777 LDBM_LIBS=
2778 LTHREAD_LIBS=
2779 LUTIL_LIBS=
2780
2781 SLAPD_LIBS=
2782 SLURPD_LIBS=
2783
2784 BUILD_SLAPD=no
2785 BUILD_SLURPD=no
2786
2787 BUILD_THREAD=no
2788
2789 BUILD_BDB=no
2790 BUILD_DNSSRV=no
2791 BUILD_LDAP=no
2792 BUILD_LDBM=no
2793 BUILD_META=no
2794 BUILD_MONITOR=no
2795 BUILD_NULL=no
2796 BUILD_PASSWD=no
2797 BUILD_PERL=no
2798 BUILD_SHELL=no
2799 BUILD_SQL=no
2800
2801 BUILD_BDB_DYNAMIC=static
2802 BUILD_DNSSRV_DYNAMIC=static
2803 BUILD_LDAP_DYNAMIC=static
2804 BUILD_LDBM_DYNAMIC=static
2805 BUILD_META_DYNAMIC=static
2806 BUILD_MONITOR_DYNAMIC=static
2807 BUILD_NULL_DYNAMIC=static
2808 BUILD_PASSWD_DYNAMIC=static
2809 BUILD_PERL_DYNAMIC=static
2810 BUILD_SHELL_DYNAMIC=static
2811 BUILD_SQL_DYNAMIC=static
2812
2813 SLAPD_MODULES_LDFLAGS=
2814 SLAPD_MODULES_CPPFLAGS=
2815
2816 SLAPD_STATIC_BACKENDS=
2817 SLAPD_DYNAMIC_BACKENDS=
2818
2819 SLAPD_PERL_LDFLAGS=
2820 MOD_PERL_LDFLAGS=
2821 PERL_CPPFLAGS=
2822
2823 SLAPD_SQL_LDFLAGS=
2824 SLAPD_SQL_LIBS=
2825 SLAPD_SQL_INCLUDES=
2826
2827 KRB4_LIBS=
2828 KRB5_LIBS=
2829 READLINE_LIBS=
2830 SASL_LIBS=
2831 TERMCAP_LIBS=
2832 TLS_LIBS=
2833 MODULES_LIBS=
2834 AUTH_LIBS=
2835
2836 SLAPD_SLP_LIBS=
2837
2838
2839 # Find a good install program.  We prefer a C program (faster),
2840 # so one script is as good as another.  But avoid the broken or
2841 # incompatible versions:
2842 # SysV /etc/install, /usr/sbin/install
2843 # SunOS /usr/etc/install
2844 # IRIX /sbin/install
2845 # AIX /bin/install
2846 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2847 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2848 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2849 # ./install, which can be erroneously created by make from ./install.sh.
2850 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2851 echo "configure:2852: checking for a BSD compatible install" >&5
2852 if test -z "$INSTALL"; then
2853 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2854   echo $ac_n "(cached) $ac_c" 1>&6
2855 else
2856     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2857   for ac_dir in $PATH; do
2858     # Account for people who put trailing slashes in PATH elements.
2859     case "$ac_dir/" in
2860     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2861     *)
2862       # OSF1 and SCO ODT 3.0 have their own names for install.
2863       # Don't use installbsd from OSF since it installs stuff as root
2864       # by default.
2865       for ac_prog in ginstall scoinst install; do
2866         if test -f $ac_dir/$ac_prog; then
2867           if test $ac_prog = install &&
2868             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2869             # AIX install.  It has an incompatible calling convention.
2870             :
2871           elif test $ac_prog = install &&
2872             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2873             # program-specific install script used by HP pwplus--don't use.
2874             :
2875           else
2876             ac_cv_path_install="$ac_dir/$ac_prog -c"
2877             break 2
2878           fi
2879         fi
2880       done
2881       ;;
2882     esac
2883   done
2884   IFS="$ac_save_IFS"
2885
2886 fi
2887   if test "${ac_cv_path_install+set}" = set; then
2888     INSTALL="$ac_cv_path_install"
2889   else
2890     # As a last resort, use the slow shell script.  We don't cache a
2891     # path for INSTALL within a source directory, because that will
2892     # break other packages using the cache if that directory is
2893     # removed, or if the path is relative.
2894     INSTALL="$ac_install_sh"
2895   fi
2896 fi
2897 echo "$ac_t""$INSTALL" 1>&6
2898
2899 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2900 # It thinks the first close brace ends the variable substitution.
2901 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2902
2903 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2904
2905 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2906
2907
2908 cat >> confdefs.h <<\EOF
2909 #define HAVE_MKVERSION 1
2910 EOF
2911
2912
2913
2914
2915 ol_aix_threads=no
2916 case "$target" in
2917 *-*-aix*)       if test -z "$CC" ; then
2918                 case "$ol_with_threads" in
2919                 auto | yes |  posix) ol_aix_threads=yes ;;
2920                 esac
2921         fi
2922 ;;
2923 esac
2924
2925 if test $ol_aix_threads = yes ; then
2926         if test -z "${CC}" ; then
2927                 for ac_prog in cc_r xlc_r cc
2928 do
2929 # Extract the first word of "$ac_prog", so it can be a program name with args.
2930 set dummy $ac_prog; ac_word=$2
2931 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2932 echo "configure:2933: checking for $ac_word" >&5
2933 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2934   echo $ac_n "(cached) $ac_c" 1>&6
2935 else
2936   if test -n "$CC"; then
2937   ac_cv_prog_CC="$CC" # Let the user override the test.
2938 else
2939   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2940   ac_dummy="$PATH"
2941   for ac_dir in $ac_dummy; do
2942     test -z "$ac_dir" && ac_dir=.
2943     if test -f $ac_dir/$ac_word; then
2944       ac_cv_prog_CC="$ac_prog"
2945       break
2946     fi
2947   done
2948   IFS="$ac_save_ifs"
2949 fi
2950 fi
2951 CC="$ac_cv_prog_CC"
2952 if test -n "$CC"; then
2953   echo "$ac_t""$CC" 1>&6
2954 else
2955   echo "$ac_t""no" 1>&6
2956 fi
2957
2958 test -n "$CC" && break
2959 done
2960
2961
2962                 if test "$CC" = cc ; then
2963                                                 if test $ol_with_threads != auto ; then
2964                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2965                         else
2966                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2967                         fi
2968                         ol_with_threads=no
2969                 fi
2970         fi
2971
2972         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2973                 ol_with_threads=posix
2974                 ol_cv_pthread_create=yes
2975         fi
2976 fi
2977
2978 if test -z "${CC}"; then
2979         for ac_prog in cc gcc
2980 do
2981 # Extract the first word of "$ac_prog", so it can be a program name with args.
2982 set dummy $ac_prog; ac_word=$2
2983 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2984 echo "configure:2985: checking for $ac_word" >&5
2985 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2986   echo $ac_n "(cached) $ac_c" 1>&6
2987 else
2988   if test -n "$CC"; then
2989   ac_cv_prog_CC="$CC" # Let the user override the test.
2990 else
2991   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2992   ac_dummy="$PATH"
2993   for ac_dir in $ac_dummy; do
2994     test -z "$ac_dir" && ac_dir=.
2995     if test -f $ac_dir/$ac_word; then
2996       ac_cv_prog_CC="$ac_prog"
2997       break
2998     fi
2999   done
3000   IFS="$ac_save_ifs"
3001 fi
3002 fi
3003 CC="$ac_cv_prog_CC"
3004 if test -n "$CC"; then
3005   echo "$ac_t""$CC" 1>&6
3006 else
3007   echo "$ac_t""no" 1>&6
3008 fi
3009
3010 test -n "$CC" && break
3011 done
3012 test -n "$CC" || CC="missing"
3013
3014
3015         if test "${CC}" = "missing" ; then
3016                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3017         fi
3018 fi
3019
3020 if test -z "${AR}"; then
3021         for ac_prog in ar gar
3022 do
3023 # Extract the first word of "$ac_prog", so it can be a program name with args.
3024 set dummy $ac_prog; ac_word=$2
3025 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3026 echo "configure:3027: checking for $ac_word" >&5
3027 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3028   echo $ac_n "(cached) $ac_c" 1>&6
3029 else
3030   if test -n "$AR"; then
3031   ac_cv_prog_AR="$AR" # Let the user override the test.
3032 else
3033   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3034   ac_dummy="$PATH"
3035   for ac_dir in $ac_dummy; do
3036     test -z "$ac_dir" && ac_dir=.
3037     if test -f $ac_dir/$ac_word; then
3038       ac_cv_prog_AR="$ac_prog"
3039       break
3040     fi
3041   done
3042   IFS="$ac_save_ifs"
3043 fi
3044 fi
3045 AR="$ac_cv_prog_AR"
3046 if test -n "$AR"; then
3047   echo "$ac_t""$AR" 1>&6
3048 else
3049   echo "$ac_t""no" 1>&6
3050 fi
3051
3052 test -n "$AR" && break
3053 done
3054 test -n "$AR" || AR="missing"
3055
3056
3057         if test "${AR}" = "missing" ; then
3058                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3059         fi
3060 fi
3061
3062
3063
3064 # Find the correct PATH separator.  Usually this is `:', but
3065 # DJGPP uses `;' like DOS.
3066 if test "X${PATH_SEPARATOR+set}" != Xset; then
3067   UNAME=${UNAME-`uname 2>/dev/null`}
3068   case X$UNAME in
3069     *-DOS) lt_cv_sys_path_separator=';' ;;
3070     *)     lt_cv_sys_path_separator=':' ;;
3071   esac
3072   PATH_SEPARATOR=$lt_cv_sys_path_separator
3073 fi
3074
3075 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3076 echo "configure:3077: checking for Cygwin environment" >&5
3077 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3078   echo $ac_n "(cached) $ac_c" 1>&6
3079 else
3080   cat > conftest.$ac_ext <<EOF
3081 #line 3082 "configure"
3082 #include "confdefs.h"
3083
3084 int main() {
3085
3086 #ifndef __CYGWIN__
3087 #define __CYGWIN__ __CYGWIN32__
3088 #endif
3089 return __CYGWIN__;
3090 ; return 0; }
3091 EOF
3092 if { (eval echo configure:3093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3093   rm -rf conftest*
3094   ac_cv_cygwin=yes
3095 else
3096   echo "configure: failed program was:" >&5
3097   cat conftest.$ac_ext >&5
3098   rm -rf conftest*
3099   ac_cv_cygwin=no
3100 fi
3101 rm -f conftest*
3102 fi
3103
3104 echo "$ac_t""$ac_cv_cygwin" 1>&6
3105 CYGWIN=
3106 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3107 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3108 echo "configure:3109: checking for mingw32 environment" >&5
3109 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3110   echo $ac_n "(cached) $ac_c" 1>&6
3111 else
3112   cat > conftest.$ac_ext <<EOF
3113 #line 3114 "configure"
3114 #include "confdefs.h"
3115
3116 int main() {
3117 return __MINGW32__;
3118 ; return 0; }
3119 EOF
3120 if { (eval echo configure:3121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3121   rm -rf conftest*
3122   ac_cv_mingw32=yes
3123 else
3124   echo "configure: failed program was:" >&5
3125   cat conftest.$ac_ext >&5
3126   rm -rf conftest*
3127   ac_cv_mingw32=no
3128 fi
3129 rm -f conftest*
3130 fi
3131
3132 echo "$ac_t""$ac_cv_mingw32" 1>&6
3133 MINGW32=
3134 test "$ac_cv_mingw32" = yes && MINGW32=yes
3135 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3136 echo "configure:3137: checking for EMX OS/2 environment" >&5
3137 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3138   echo $ac_n "(cached) $ac_c" 1>&6
3139 else
3140   cat > conftest.$ac_ext <<EOF
3141 #line 3142 "configure"
3142 #include "confdefs.h"
3143
3144 int main() {
3145 return __EMX__;
3146 ; return 0; }
3147 EOF
3148 if { (eval echo configure:3149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3149   rm -rf conftest*
3150   ac_cv_emxos2=yes
3151 else
3152   echo "configure: failed program was:" >&5
3153   cat conftest.$ac_ext >&5
3154   rm -rf conftest*
3155   ac_cv_emxos2=no
3156 fi
3157 rm -f conftest*
3158 fi
3159
3160 echo "$ac_t""$ac_cv_emxos2" 1>&6
3161 EMXOS2=
3162 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3163 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3164 echo "configure:3165: checking how to run the C preprocessor" >&5
3165 # On Suns, sometimes $CPP names a directory.
3166 if test -n "$CPP" && test -d "$CPP"; then
3167   CPP=
3168 fi
3169 if test -z "$CPP"; then
3170 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3171   echo $ac_n "(cached) $ac_c" 1>&6
3172 else
3173     # This must be in double quotes, not single quotes, because CPP may get
3174   # substituted into the Makefile and "${CC-cc}" will confuse make.
3175   CPP="${CC-cc} -E"
3176   # On the NeXT, cc -E runs the code through the compiler's parser,
3177   # not just through cpp.
3178   cat > conftest.$ac_ext <<EOF
3179 #line 3180 "configure"
3180 #include "confdefs.h"
3181 #include <assert.h>
3182 Syntax Error
3183 EOF
3184 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3185 { (eval echo configure:3186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3186 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3187 if test -z "$ac_err"; then
3188   :
3189 else
3190   echo "$ac_err" >&5
3191   echo "configure: failed program was:" >&5
3192   cat conftest.$ac_ext >&5
3193   rm -rf conftest*
3194   CPP="${CC-cc} -E -traditional-cpp"
3195   cat > conftest.$ac_ext <<EOF
3196 #line 3197 "configure"
3197 #include "confdefs.h"
3198 #include <assert.h>
3199 Syntax Error
3200 EOF
3201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3202 { (eval echo configure:3203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3203 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3204 if test -z "$ac_err"; then
3205   :
3206 else
3207   echo "$ac_err" >&5
3208   echo "configure: failed program was:" >&5
3209   cat conftest.$ac_ext >&5
3210   rm -rf conftest*
3211   CPP="${CC-cc} -nologo -E"
3212   cat > conftest.$ac_ext <<EOF
3213 #line 3214 "configure"
3214 #include "confdefs.h"
3215 #include <assert.h>
3216 Syntax Error
3217 EOF
3218 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3219 { (eval echo configure:3220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3220 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3221 if test -z "$ac_err"; then
3222   :
3223 else
3224   echo "$ac_err" >&5
3225   echo "configure: failed program was:" >&5
3226   cat conftest.$ac_ext >&5
3227   rm -rf conftest*
3228   CPP=/lib/cpp
3229 fi
3230 rm -f conftest*
3231 fi
3232 rm -f conftest*
3233 fi
3234 rm -f conftest*
3235   ac_cv_prog_CPP="$CPP"
3236 fi
3237   CPP="$ac_cv_prog_CPP"
3238 else
3239   ac_cv_prog_CPP="$CPP"
3240 fi
3241 echo "$ac_t""$CPP" 1>&6
3242
3243 # Check whether --enable-fast-install or --disable-fast-install was given.
3244 if test "${enable_fast_install+set}" = set; then
3245   enableval="$enable_fast_install"
3246   p=${PACKAGE-default}
3247 case $enableval in
3248 yes) enable_fast_install=yes ;;
3249 no) enable_fast_install=no ;;
3250 *)
3251   enable_fast_install=no
3252   # Look at the argument we got.  We use all the common list separators.
3253   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3254   for pkg in $enableval; do
3255     if test "X$pkg" = "X$p"; then
3256       enable_fast_install=yes
3257     fi
3258   done
3259   IFS="$ac_save_ifs"
3260   ;;
3261 esac
3262 else
3263   enable_fast_install=yes
3264 fi
3265
3266 # Extract the first word of "gcc", so it can be a program name with args.
3267 set dummy gcc; ac_word=$2
3268 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3269 echo "configure:3270: checking for $ac_word" >&5
3270 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3271   echo $ac_n "(cached) $ac_c" 1>&6
3272 else
3273   if test -n "$CC"; then
3274   ac_cv_prog_CC="$CC" # Let the user override the test.
3275 else
3276   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3277   ac_dummy="$PATH"
3278   for ac_dir in $ac_dummy; do
3279     test -z "$ac_dir" && ac_dir=.
3280     if test -f $ac_dir/$ac_word; then
3281       ac_cv_prog_CC="gcc"
3282       break
3283     fi
3284   done
3285   IFS="$ac_save_ifs"
3286 fi
3287 fi
3288 CC="$ac_cv_prog_CC"
3289 if test -n "$CC"; then
3290   echo "$ac_t""$CC" 1>&6
3291 else
3292   echo "$ac_t""no" 1>&6
3293 fi
3294
3295 if test -z "$CC"; then
3296   # Extract the first word of "cc", so it can be a program name with args.
3297 set dummy cc; ac_word=$2
3298 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3299 echo "configure:3300: checking for $ac_word" >&5
3300 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3301   echo $ac_n "(cached) $ac_c" 1>&6
3302 else
3303   if test -n "$CC"; then
3304   ac_cv_prog_CC="$CC" # Let the user override the test.
3305 else
3306   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3307   ac_prog_rejected=no
3308   ac_dummy="$PATH"
3309   for ac_dir in $ac_dummy; do
3310     test -z "$ac_dir" && ac_dir=.
3311     if test -f $ac_dir/$ac_word; then
3312       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3313         ac_prog_rejected=yes
3314         continue
3315       fi
3316       ac_cv_prog_CC="cc"
3317       break
3318     fi
3319   done
3320   IFS="$ac_save_ifs"
3321 if test $ac_prog_rejected = yes; then
3322   # We found a bogon in the path, so make sure we never use it.
3323   set dummy $ac_cv_prog_CC
3324   shift
3325   if test $# -gt 0; then
3326     # We chose a different compiler from the bogus one.
3327     # However, it has the same basename, so the bogon will be chosen
3328     # first if we set CC to just the basename; use the full file name.
3329     shift
3330     set dummy "$ac_dir/$ac_word" "$@"
3331     shift
3332     ac_cv_prog_CC="$@"
3333   fi
3334 fi
3335 fi
3336 fi
3337 CC="$ac_cv_prog_CC"
3338 if test -n "$CC"; then
3339   echo "$ac_t""$CC" 1>&6
3340 else
3341   echo "$ac_t""no" 1>&6
3342 fi
3343
3344   if test -z "$CC"; then
3345     case "`uname -s`" in
3346     *win32* | *WIN32* | *CYGWIN*)
3347       # Extract the first word of "cl", so it can be a program name with args.
3348 set dummy cl; ac_word=$2
3349 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3350 echo "configure:3351: checking for $ac_word" >&5
3351 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3352   echo $ac_n "(cached) $ac_c" 1>&6
3353 else
3354   if test -n "$CC"; then
3355   ac_cv_prog_CC="$CC" # Let the user override the test.
3356 else
3357   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3358   ac_dummy="$PATH"
3359   for ac_dir in $ac_dummy; do
3360     test -z "$ac_dir" && ac_dir=.
3361     if test -f $ac_dir/$ac_word; then
3362       ac_cv_prog_CC="cl"
3363       break
3364     fi
3365   done
3366   IFS="$ac_save_ifs"
3367 fi
3368 fi
3369 CC="$ac_cv_prog_CC"
3370 if test -n "$CC"; then
3371   echo "$ac_t""$CC" 1>&6
3372 else
3373   echo "$ac_t""no" 1>&6
3374 fi
3375  ;;
3376     esac
3377   fi
3378   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3379 fi
3380
3381 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3382 echo "configure:3383: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3383
3384 ac_ext=c
3385 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3386 ac_cpp='$CPP $CPPFLAGS'
3387 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3388 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3389 cross_compiling=$ac_cv_prog_cc_cross
3390
3391 cat > conftest.$ac_ext << EOF
3392
3393 #line 3394 "configure"
3394 #include "confdefs.h"
3395
3396 main(){return(0);}
3397 EOF
3398 if { (eval echo configure:3399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3399   ac_cv_prog_cc_works=yes
3400   # If we can't run a trivial program, we are probably using a cross compiler.
3401   if (./conftest; exit) 2>/dev/null; then
3402     ac_cv_prog_cc_cross=no
3403   else
3404     ac_cv_prog_cc_cross=yes
3405   fi
3406 else
3407   echo "configure: failed program was:" >&5
3408   cat conftest.$ac_ext >&5
3409   ac_cv_prog_cc_works=no
3410 fi
3411 rm -fr conftest*
3412 ac_ext=c
3413 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3414 ac_cpp='$CPP $CPPFLAGS'
3415 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3416 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3417 cross_compiling=$ac_cv_prog_cc_cross
3418
3419 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3420 if test $ac_cv_prog_cc_works = no; then
3421   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3422 fi
3423 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3424 echo "configure:3425: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3425 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3426 cross_compiling=$ac_cv_prog_cc_cross
3427
3428 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3429 echo "configure:3430: checking whether we are using GNU C" >&5
3430 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3431   echo $ac_n "(cached) $ac_c" 1>&6
3432 else
3433   cat > conftest.c <<EOF
3434 #ifdef __GNUC__
3435   yes;
3436 #endif
3437 EOF
3438 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3439   ac_cv_prog_gcc=yes
3440 else
3441   ac_cv_prog_gcc=no
3442 fi
3443 fi
3444
3445 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3446
3447 if test $ac_cv_prog_gcc = yes; then
3448   GCC=yes
3449 else
3450   GCC=
3451 fi
3452
3453 ac_test_CFLAGS="${CFLAGS+set}"
3454 ac_save_CFLAGS="$CFLAGS"
3455 CFLAGS=
3456 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3457 echo "configure:3458: checking whether ${CC-cc} accepts -g" >&5
3458 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3459   echo $ac_n "(cached) $ac_c" 1>&6
3460 else
3461   echo 'void f(){}' > conftest.c
3462 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3463   ac_cv_prog_cc_g=yes
3464 else
3465   ac_cv_prog_cc_g=no
3466 fi
3467 rm -f conftest*
3468
3469 fi
3470
3471 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3472 if test "$ac_test_CFLAGS" = set; then
3473   CFLAGS="$ac_save_CFLAGS"
3474 elif test $ac_cv_prog_cc_g = yes; then
3475   if test "$GCC" = yes; then
3476     CFLAGS="-g -O2"
3477   else
3478     CFLAGS="-g"
3479   fi
3480 else
3481   if test "$GCC" = yes; then
3482     CFLAGS="-O2"
3483   else
3484     CFLAGS=
3485   fi
3486 fi
3487
3488 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3489 if test "${with_gnu_ld+set}" = set; then
3490   withval="$with_gnu_ld"
3491   test "$withval" = no || with_gnu_ld=yes
3492 else
3493   with_gnu_ld=no
3494 fi
3495
3496 ac_prog=ld
3497 if test "$GCC" = yes; then
3498   # Check if gcc -print-prog-name=ld gives a path.
3499   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3500 echo "configure:3501: checking for ld used by GCC" >&5
3501   case $host in
3502   *-*-mingw*)
3503     # gcc leaves a trailing carriage return which upsets mingw
3504     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3505   *)
3506     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3507   esac
3508   case $ac_prog in
3509     # Accept absolute paths.
3510     [\\/]* | [A-Za-z]:[\\/]*)
3511       re_direlt='/[^/][^/]*/\.\./'
3512       # Canonicalize the path of ld
3513       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3514       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3515         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3516       done
3517       test -z "$LD" && LD="$ac_prog"
3518       ;;
3519   "")
3520     # If it fails, then pretend we aren't using GCC.
3521     ac_prog=ld
3522     ;;
3523   *)
3524     # If it is relative, then search for the first ld in PATH.
3525     with_gnu_ld=unknown
3526     ;;
3527   esac
3528 elif test "$with_gnu_ld" = yes; then
3529   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3530 echo "configure:3531: checking for GNU ld" >&5
3531 else
3532   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3533 echo "configure:3534: checking for non-GNU ld" >&5
3534 fi
3535 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3536   echo $ac_n "(cached) $ac_c" 1>&6
3537 else
3538   if test -z "$LD"; then
3539   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3540   for ac_dir in $PATH; do
3541     test -z "$ac_dir" && ac_dir=.
3542     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3543       lt_cv_path_LD="$ac_dir/$ac_prog"
3544       # Check to see if the program is GNU ld.  I'd rather use --version,
3545       # but apparently some GNU ld's only accept -v.
3546       # Break only if it was the GNU/non-GNU ld that we prefer.
3547       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3548         test "$with_gnu_ld" != no && break
3549       else
3550         test "$with_gnu_ld" != yes && break
3551       fi
3552     fi
3553   done
3554   IFS="$ac_save_ifs"
3555 else
3556   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3557 fi
3558 fi
3559
3560 LD="$lt_cv_path_LD"
3561 if test -n "$LD"; then
3562   echo "$ac_t""$LD" 1>&6
3563 else
3564   echo "$ac_t""no" 1>&6
3565 fi
3566 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3567 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3568 echo "configure:3569: checking if the linker ($LD) is GNU ld" >&5
3569 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3570   echo $ac_n "(cached) $ac_c" 1>&6
3571 else
3572   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3573 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3574   lt_cv_prog_gnu_ld=yes
3575 else
3576   lt_cv_prog_gnu_ld=no
3577 fi
3578 fi
3579
3580 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3581 with_gnu_ld=$lt_cv_prog_gnu_ld
3582
3583
3584 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3585 echo "configure:3586: checking for $LD option to reload object files" >&5
3586 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3587   echo $ac_n "(cached) $ac_c" 1>&6
3588 else
3589   lt_cv_ld_reload_flag='-r'
3590 fi
3591
3592 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3593 reload_flag=$lt_cv_ld_reload_flag
3594 test -n "$reload_flag" && reload_flag=" $reload_flag"
3595
3596 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3597 echo "configure:3598: checking for BSD-compatible nm" >&5
3598 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3599   echo $ac_n "(cached) $ac_c" 1>&6
3600 else
3601   if test -n "$NM"; then
3602   # Let the user override the test.
3603   lt_cv_path_NM="$NM"
3604 else
3605   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3606   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3607     test -z "$ac_dir" && ac_dir=.
3608     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3609     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3610       # Check to see if the nm accepts a BSD-compat flag.
3611       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3612       #   nm: unknown option "B" ignored
3613       # Tru64's nm complains that /dev/null is an invalid object file
3614       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3615         lt_cv_path_NM="$tmp_nm -B"
3616         break
3617       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3618         lt_cv_path_NM="$tmp_nm -p"
3619         break
3620       else
3621         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3622         continue # so that we can try to find one that supports BSD flags
3623       fi
3624     fi
3625   done
3626   IFS="$ac_save_ifs"
3627   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3628 fi
3629 fi
3630
3631 NM="$lt_cv_path_NM"
3632 echo "$ac_t""$NM" 1>&6
3633
3634 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3635 echo "configure:3636: checking for a sed that does not truncate output" >&5
3636 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3637   echo $ac_n "(cached) $ac_c" 1>&6
3638 else
3639   # Loop through the user's path and test for sed and gsed.
3640 # Then use that list of sed's as ones to test for truncation.
3641 as_executable_p="test -f"
3642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3643 for as_dir in $PATH
3644 do
3645   IFS=$as_save_IFS
3646   test -z "$as_dir" && as_dir=.
3647   for ac_prog in sed gsed; do
3648     for ac_exec_ext in '' $ac_executable_extensions; do
3649       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3650         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3651       fi
3652     done
3653   done
3654 done
3655
3656   # Create a temporary directory, and hook for its removal unless debugging.
3657 $debug ||
3658 {
3659   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3660   trap '{ (exit 1); exit 1; }' 1 2 13 15
3661 }
3662
3663 # Create a (secure) tmp directory for tmp files.
3664 : ${TMPDIR=/tmp}
3665 {
3666   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3667   test -n "$tmp" && test -d "$tmp"
3668 }  ||
3669 {
3670   tmp=$TMPDIR/sed$$-$RANDOM
3671   (umask 077 && mkdir $tmp)
3672 } ||
3673 {
3674    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3675    { (exit 1); exit 1; }
3676 }
3677   _max=0
3678   _count=0
3679   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3680   # along with /bin/sed that truncates output.
3681   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3682     test ! -f ${_sed} && break
3683     cat /dev/null > "$tmp/sed.in"
3684     _count=0
3685     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3686     # Check for GNU sed and select it if it is found.
3687     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3688       lt_cv_path_SED=${_sed}
3689       break
3690     fi
3691     while true; do
3692       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3693       mv "$tmp/sed.tmp" "$tmp/sed.in"
3694       cp "$tmp/sed.in" "$tmp/sed.nl"
3695       echo >>"$tmp/sed.nl"
3696       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3697       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3698       # 40000 chars as input seems more than enough
3699       test $_count -gt 10 && break
3700       _count=`expr $_count + 1`
3701       if test $_count -gt $_max; then
3702         _max=$_count
3703         lt_cv_path_SED=$_sed
3704       fi
3705     done
3706   done
3707   rm -rf "$tmp"
3708
3709 fi
3710
3711 if test "X$SED" != "X"; then
3712   lt_cv_path_SED=$SED
3713 else
3714   SED=$lt_cv_path_SED
3715 fi
3716 echo "$ac_t""$SED" 1>&6
3717
3718 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3719 echo "configure:3720: checking whether ln -s works" >&5
3720 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3721   echo $ac_n "(cached) $ac_c" 1>&6
3722 else
3723   rm -f conftestdata
3724 if ln -s X conftestdata 2>/dev/null
3725 then
3726   rm -f conftestdata
3727   ac_cv_prog_LN_S="ln -s"
3728 else
3729   ac_cv_prog_LN_S=ln
3730 fi
3731 fi
3732 LN_S="$ac_cv_prog_LN_S"
3733 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3734   echo "$ac_t""yes" 1>&6
3735 else
3736   echo "$ac_t""no" 1>&6
3737 fi
3738
3739 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3740 echo "configure:3741: checking how to recognise dependent libraries" >&5
3741 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3742   echo $ac_n "(cached) $ac_c" 1>&6
3743 else
3744   lt_cv_file_magic_cmd='$MAGIC_CMD'
3745 lt_cv_file_magic_test_file=
3746 lt_cv_deplibs_check_method='unknown'
3747 # Need to set the preceding variable on all platforms that support
3748 # interlibrary dependencies.
3749 # 'none' -- dependencies not supported.
3750 # `unknown' -- same as none, but documents that we really don't know.
3751 # 'pass_all' -- all dependencies passed with no checks.
3752 # 'test_compile' -- check by making test program.
3753 # 'file_magic [[regex]]' -- check by looking for files in library path
3754 # which responds to the $file_magic_cmd with a given egrep regex.
3755 # If you have `file' or equivalent on your system and you're not sure
3756 # whether `pass_all' will *always* work, you probably want this one.
3757
3758 case $host_os in
3759 aix4* | aix5*)
3760   lt_cv_deplibs_check_method=pass_all
3761   ;;
3762
3763 beos*)
3764   lt_cv_deplibs_check_method=pass_all
3765   ;;
3766
3767 bsdi4*)
3768   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3769   lt_cv_file_magic_cmd='/usr/bin/file -L'
3770   lt_cv_file_magic_test_file=/shlib/libc.so
3771   ;;
3772
3773 cygwin* | mingw* | pw32*)
3774   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3775   lt_cv_file_magic_cmd='$OBJDUMP -f'
3776   ;;
3777
3778 darwin* | rhapsody*)
3779   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3780   lt_cv_file_magic_cmd='/usr/bin/file -L'
3781   case "$host_os" in
3782   rhapsody* | darwin1.[012])
3783     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3784     ;;
3785   *) # Darwin 1.3 on
3786     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3787     ;;
3788   esac
3789   ;;
3790
3791 freebsd*)
3792   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3793     case $host_cpu in
3794     i*86 )
3795       # Not sure whether the presence of OpenBSD here was a mistake.
3796       # Let's accept both of them until this is cleared up.
3797       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3798       lt_cv_file_magic_cmd=/usr/bin/file
3799       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3800       ;;
3801     esac
3802   else
3803     lt_cv_deplibs_check_method=pass_all
3804   fi
3805   ;;
3806
3807 gnu*)
3808   lt_cv_deplibs_check_method=pass_all
3809   ;;
3810
3811 hpux10.20*|hpux11*)
3812   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3813   lt_cv_file_magic_cmd=/usr/bin/file
3814   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3815   ;;
3816
3817 irix5* | irix6* | nonstopux*)
3818   case $host_os in
3819   irix5* | nonstopux*)
3820     # this will be overridden with pass_all, but let us keep it just in case
3821     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3822     ;;
3823   *)
3824     case $LD in
3825     *-32|*"-32 ") libmagic=32-bit;;
3826     *-n32|*"-n32 ") libmagic=N32;;
3827     *-64|*"-64 ") libmagic=64-bit;;
3828     *) libmagic=never-match;;
3829     esac
3830     # this will be overridden with pass_all, but let us keep it just in case
3831     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3832     ;;
3833   esac
3834   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3835   lt_cv_deplibs_check_method=pass_all
3836   ;;
3837
3838 # This must be Linux ELF.
3839 linux-gnu*)
3840   case $host_cpu in
3841   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3842     lt_cv_deplibs_check_method=pass_all ;;
3843   *)
3844     # glibc up to 2.1.1 does not perform some relocations on ARM
3845     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3846   esac
3847   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3848   ;;
3849
3850 netbsd*)
3851   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3852     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3853   else
3854     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3855   fi
3856   ;;
3857
3858 newos6*)
3859   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3860   lt_cv_file_magic_cmd=/usr/bin/file
3861   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3862   ;;
3863
3864 openbsd*)
3865   lt_cv_file_magic_cmd=/usr/bin/file
3866   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3867   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3868     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3869   else
3870     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3871   fi
3872   ;;
3873
3874 osf3* | osf4* | osf5*)
3875   # this will be overridden with pass_all, but let us keep it just in case
3876   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3877   lt_cv_file_magic_test_file=/shlib/libc.so
3878   lt_cv_deplibs_check_method=pass_all
3879   ;;
3880
3881 sco3.2v5*)
3882   lt_cv_deplibs_check_method=pass_all
3883   ;;
3884
3885 solaris*)
3886   lt_cv_deplibs_check_method=pass_all
3887   lt_cv_file_magic_test_file=/lib/libc.so
3888   ;;
3889
3890 sysv5uw[78]* | sysv4*uw2*)
3891   lt_cv_deplibs_check_method=pass_all
3892   ;;
3893
3894 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3895   case $host_vendor in
3896   motorola)
3897     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]'
3898     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3899     ;;
3900   ncr)
3901     lt_cv_deplibs_check_method=pass_all
3902     ;;
3903   sequent)
3904     lt_cv_file_magic_cmd='/bin/file'
3905     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3906     ;;
3907   sni)
3908     lt_cv_file_magic_cmd='/bin/file'
3909     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3910     lt_cv_file_magic_test_file=/lib/libc.so
3911     ;;
3912   siemens)
3913     lt_cv_deplibs_check_method=pass_all
3914     ;;
3915   esac
3916   ;;
3917 esac
3918
3919 fi
3920
3921 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3922 file_magic_cmd=$lt_cv_file_magic_cmd
3923 deplibs_check_method=$lt_cv_deplibs_check_method
3924
3925 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3926 echo "configure:3927: checking for object suffix" >&5
3927 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3928   echo $ac_n "(cached) $ac_c" 1>&6
3929 else
3930   rm -f conftest*
3931 echo 'int i = 1;' > conftest.$ac_ext
3932 if { (eval echo configure:3933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3933   for ac_file in conftest.*; do
3934     case $ac_file in
3935     *.c) ;;
3936     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3937     esac
3938   done
3939 else
3940   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3941 fi
3942 rm -f conftest*
3943 fi
3944
3945 echo "$ac_t""$ac_cv_objext" 1>&6
3946 OBJEXT=$ac_cv_objext
3947 ac_objext=$ac_cv_objext
3948
3949
3950
3951
3952 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3953 echo "configure:3954: checking for executable suffix" >&5
3954 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3955   echo $ac_n "(cached) $ac_c" 1>&6
3956 else
3957   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3958   ac_cv_exeext=.exe
3959 else
3960   rm -f conftest*
3961   echo 'int main () { return 0; }' > conftest.$ac_ext
3962   ac_cv_exeext=
3963   if { (eval echo configure:3964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3964     for file in conftest.*; do
3965       case $file in
3966       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3967       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3968       esac
3969     done
3970   else
3971     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3972   fi
3973   rm -f conftest*
3974   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3975 fi
3976 fi
3977
3978 EXEEXT=""
3979 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3980 echo "$ac_t""${ac_cv_exeext}" 1>&6
3981 ac_exeext=$EXEEXT
3982
3983 if test $host != $build; then
3984   ac_tool_prefix=${host_alias}-
3985 else
3986   ac_tool_prefix=
3987 fi
3988
3989
3990
3991
3992 # Check for command to grab the raw symbol name followed by C symbol from nm.
3993 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3994 echo "configure:3995: checking command to parse $NM output" >&5
3995 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3996   echo $ac_n "(cached) $ac_c" 1>&6
3997 else
3998   
3999 # These are sane defaults that work on at least a few old systems.
4000 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4001
4002 # Character class describing NM global symbol codes.
4003 symcode='[BCDEGRST]'
4004
4005 # Regexp to match symbols that can be accessed directly from C.
4006 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4007
4008 # Transform the above into a raw symbol and a C symbol.
4009 symxfrm='\1 \2\3 \3'
4010
4011 # Transform an extracted symbol line into a proper C declaration
4012 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4013
4014 # Transform an extracted symbol line into symbol name and symbol address
4015 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'"
4016
4017 # Define system-specific variables.
4018 case $host_os in
4019 aix*)
4020   symcode='[BCDT]'
4021   ;;
4022 cygwin* | mingw* | pw32*)
4023   symcode='[ABCDGISTW]'
4024   ;;
4025 hpux*) # Its linker distinguishes data from code symbols
4026   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4027   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'"
4028   ;;
4029 irix* | nonstopux*)
4030   symcode='[BCDEGRST]'
4031   ;;
4032 osf*)
4033   symcode='[BCDEGQRST]'
4034   ;;
4035 solaris* | sysv5*)
4036   symcode='[BDT]'
4037   ;;
4038 sysv4)
4039   symcode='[DFNSTU]'
4040   ;;
4041 esac
4042
4043 # Handle CRLF in mingw tool chain
4044 opt_cr=
4045 case $host_os in
4046 mingw*)
4047   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4048   ;;
4049 esac
4050
4051 # If we're using GNU nm, then use its standard symbol codes.
4052 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4053   symcode='[ABCDGISTW]'
4054 fi
4055
4056 # Try without a prefix undercore, then with it.
4057 for ac_symprfx in "" "_"; do
4058
4059   # Write the raw and C identifiers.
4060 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4061
4062   # Check to see that the pipe works correctly.
4063   pipe_works=no
4064   rm -f conftest*
4065   cat > conftest.$ac_ext <<EOF
4066 #ifdef __cplusplus
4067 extern "C" {
4068 #endif
4069 char nm_test_var;
4070 void nm_test_func(){}
4071 #ifdef __cplusplus
4072 }
4073 #endif
4074 int main(){nm_test_var='a';nm_test_func();return(0);}
4075 EOF
4076
4077   if { (eval echo configure:4078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4078     # Now try to grab the symbols.
4079     nlist=conftest.nm
4080     if { (eval echo configure:4081: \"$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
4081       # Try sorting and uniquifying the output.
4082       if sort "$nlist" | uniq > "$nlist"T; then
4083         mv -f "$nlist"T "$nlist"
4084       else
4085         rm -f "$nlist"T
4086       fi
4087
4088       # Make sure that we snagged all the symbols we need.
4089       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4090         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4091           cat <<EOF > conftest.$ac_ext
4092 #ifdef __cplusplus
4093 extern "C" {
4094 #endif
4095
4096 EOF
4097           # Now generate the symbol file.
4098           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4099
4100           cat <<EOF >> conftest.$ac_ext
4101 #if defined (__STDC__) && __STDC__
4102 # define lt_ptr void *
4103 #else
4104 # define lt_ptr char *
4105 # define const
4106 #endif
4107
4108 /* The mapping between symbol names and symbols. */
4109 const struct {
4110   const char *name;
4111   lt_ptr address;
4112 }
4113 lt_preloaded_symbols[] =
4114 {
4115 EOF
4116           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4117           cat <<\EOF >> conftest.$ac_ext
4118   {0, (lt_ptr) 0}
4119 };
4120
4121 #ifdef __cplusplus
4122 }
4123 #endif
4124 EOF
4125           # Now try linking the two files.
4126           mv conftest.$ac_objext conftstm.$ac_objext
4127           save_LIBS="$LIBS"
4128           save_CFLAGS="$CFLAGS"
4129           LIBS="conftstm.$ac_objext"
4130           CFLAGS="$CFLAGS$no_builtin_flag"
4131           if { (eval echo configure:4132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4132             pipe_works=yes
4133           fi
4134           LIBS="$save_LIBS"
4135           CFLAGS="$save_CFLAGS"
4136         else
4137           echo "cannot find nm_test_func in $nlist" >&5
4138         fi
4139       else
4140         echo "cannot find nm_test_var in $nlist" >&5
4141       fi
4142     else
4143       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4144     fi
4145   else
4146     echo "$progname: failed program was:" >&5
4147     cat conftest.$ac_ext >&5
4148   fi
4149   rm -f conftest* conftst*
4150
4151   # Do not use the global_symbol_pipe unless it works.
4152   if test "$pipe_works" = yes; then
4153     break
4154   else
4155     lt_cv_sys_global_symbol_pipe=
4156   fi
4157 done
4158
4159 fi
4160
4161 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4162 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4163   global_symbol_to_cdecl=
4164   global_symbol_to_c_name_address=
4165 else
4166   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4167   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4168 fi
4169 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4170 then
4171   echo "$ac_t""failed" 1>&6
4172 else
4173   echo "$ac_t""ok" 1>&6
4174 fi
4175
4176 for ac_hdr in dlfcn.h
4177 do
4178 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4179 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4180 echo "configure:4181: checking for $ac_hdr" >&5
4181 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4182   echo $ac_n "(cached) $ac_c" 1>&6
4183 else
4184   cat > conftest.$ac_ext <<EOF
4185 #line 4186 "configure"
4186 #include "confdefs.h"
4187 #include <$ac_hdr>
4188 EOF
4189 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4190 { (eval echo configure:4191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4191 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4192 if test -z "$ac_err"; then
4193   rm -rf conftest*
4194   eval "ac_cv_header_$ac_safe=yes"
4195 else
4196   echo "$ac_err" >&5
4197   echo "configure: failed program was:" >&5
4198   cat conftest.$ac_ext >&5
4199   rm -rf conftest*
4200   eval "ac_cv_header_$ac_safe=no"
4201 fi
4202 rm -f conftest*
4203 fi
4204 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4205   echo "$ac_t""yes" 1>&6
4206     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4207   cat >> confdefs.h <<EOF
4208 #define $ac_tr_hdr 1
4209 EOF
4210  
4211 else
4212   echo "$ac_t""no" 1>&6
4213 fi
4214 done
4215
4216
4217
4218
4219
4220
4221 # Only perform the check for file, if the check method requires it
4222 case $deplibs_check_method in
4223 file_magic*)
4224   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4225     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4226 echo "configure:4227: checking for ${ac_tool_prefix}file" >&5
4227 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4228   echo $ac_n "(cached) $ac_c" 1>&6
4229 else
4230   case $MAGIC_CMD in
4231   /*)
4232   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4233   ;;
4234   ?:/*)
4235   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4236   ;;
4237   *)
4238   ac_save_MAGIC_CMD="$MAGIC_CMD"
4239   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4240   ac_dummy="/usr/bin:$PATH"
4241   for ac_dir in $ac_dummy; do
4242     test -z "$ac_dir" && ac_dir=.
4243     if test -f $ac_dir/${ac_tool_prefix}file; then
4244       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4245       if test -n "$file_magic_test_file"; then
4246         case $deplibs_check_method in
4247         "file_magic "*)
4248           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4249           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4250           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4251             egrep "$file_magic_regex" > /dev/null; then
4252             :
4253           else
4254             cat <<EOF 1>&2
4255
4256 *** Warning: the command libtool uses to detect shared libraries,
4257 *** $file_magic_cmd, produces output that libtool cannot recognize.
4258 *** The result is that libtool may fail to recognize shared libraries
4259 *** as such.  This will affect the creation of libtool libraries that
4260 *** depend on shared libraries, but programs linked with such libtool
4261 *** libraries will work regardless of this problem.  Nevertheless, you
4262 *** may want to report the problem to your system manager and/or to
4263 *** bug-libtool@gnu.org
4264
4265 EOF
4266           fi ;;
4267         esac
4268       fi
4269       break
4270     fi
4271   done
4272   IFS="$ac_save_ifs"
4273   MAGIC_CMD="$ac_save_MAGIC_CMD"
4274   ;;
4275 esac
4276 fi
4277
4278 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4279 if test -n "$MAGIC_CMD"; then
4280   echo "$ac_t""$MAGIC_CMD" 1>&6
4281 else
4282   echo "$ac_t""no" 1>&6
4283 fi
4284
4285 if test -z "$lt_cv_path_MAGIC_CMD"; then
4286   if test -n "$ac_tool_prefix"; then
4287     echo $ac_n "checking for file""... $ac_c" 1>&6
4288 echo "configure:4289: checking for file" >&5
4289 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4290   echo $ac_n "(cached) $ac_c" 1>&6
4291 else
4292   case $MAGIC_CMD in
4293   /*)
4294   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4295   ;;
4296   ?:/*)
4297   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4298   ;;
4299   *)
4300   ac_save_MAGIC_CMD="$MAGIC_CMD"
4301   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4302   ac_dummy="/usr/bin:$PATH"
4303   for ac_dir in $ac_dummy; do
4304     test -z "$ac_dir" && ac_dir=.
4305     if test -f $ac_dir/file; then
4306       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4307       if test -n "$file_magic_test_file"; then
4308         case $deplibs_check_method in
4309         "file_magic "*)
4310           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4311           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4312           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4313             egrep "$file_magic_regex" > /dev/null; then
4314             :
4315           else
4316             cat <<EOF 1>&2
4317
4318 *** Warning: the command libtool uses to detect shared libraries,
4319 *** $file_magic_cmd, produces output that libtool cannot recognize.
4320 *** The result is that libtool may fail to recognize shared libraries
4321 *** as such.  This will affect the creation of libtool libraries that
4322 *** depend on shared libraries, but programs linked with such libtool
4323 *** libraries will work regardless of this problem.  Nevertheless, you
4324 *** may want to report the problem to your system manager and/or to
4325 *** bug-libtool@gnu.org
4326
4327 EOF
4328           fi ;;
4329         esac
4330       fi
4331       break
4332     fi
4333   done
4334   IFS="$ac_save_ifs"
4335   MAGIC_CMD="$ac_save_MAGIC_CMD"
4336   ;;
4337 esac
4338 fi
4339
4340 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4341 if test -n "$MAGIC_CMD"; then
4342   echo "$ac_t""$MAGIC_CMD" 1>&6
4343 else
4344   echo "$ac_t""no" 1>&6
4345 fi
4346
4347   else
4348     MAGIC_CMD=:
4349   fi
4350 fi
4351
4352   fi
4353   ;;
4354 esac
4355
4356 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4357 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4359 echo "configure:4360: checking for $ac_word" >&5
4360 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4361   echo $ac_n "(cached) $ac_c" 1>&6
4362 else
4363   if test -n "$RANLIB"; then
4364   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4365 else
4366   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4367   ac_dummy="$PATH"
4368   for ac_dir in $ac_dummy; do
4369     test -z "$ac_dir" && ac_dir=.
4370     if test -f $ac_dir/$ac_word; then
4371       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4372       break
4373     fi
4374   done
4375   IFS="$ac_save_ifs"
4376 fi
4377 fi
4378 RANLIB="$ac_cv_prog_RANLIB"
4379 if test -n "$RANLIB"; then
4380   echo "$ac_t""$RANLIB" 1>&6
4381 else
4382   echo "$ac_t""no" 1>&6
4383 fi
4384
4385
4386 if test -z "$ac_cv_prog_RANLIB"; then
4387 if test -n "$ac_tool_prefix"; then
4388   # Extract the first word of "ranlib", so it can be a program name with args.
4389 set dummy ranlib; ac_word=$2
4390 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4391 echo "configure:4392: checking for $ac_word" >&5
4392 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4393   echo $ac_n "(cached) $ac_c" 1>&6
4394 else
4395   if test -n "$RANLIB"; then
4396   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4397 else
4398   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4399   ac_dummy="$PATH"
4400   for ac_dir in $ac_dummy; do
4401     test -z "$ac_dir" && ac_dir=.
4402     if test -f $ac_dir/$ac_word; then
4403       ac_cv_prog_RANLIB="ranlib"
4404       break
4405     fi
4406   done
4407   IFS="$ac_save_ifs"
4408   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4409 fi
4410 fi
4411 RANLIB="$ac_cv_prog_RANLIB"
4412 if test -n "$RANLIB"; then
4413   echo "$ac_t""$RANLIB" 1>&6
4414 else
4415   echo "$ac_t""no" 1>&6
4416 fi
4417
4418 else
4419   RANLIB=":"
4420 fi
4421 fi
4422
4423 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4424 set dummy ${ac_tool_prefix}strip; ac_word=$2
4425 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4426 echo "configure:4427: checking for $ac_word" >&5
4427 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4428   echo $ac_n "(cached) $ac_c" 1>&6
4429 else
4430   if test -n "$STRIP"; then
4431   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4432 else
4433   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4434   ac_dummy="$PATH"
4435   for ac_dir in $ac_dummy; do
4436     test -z "$ac_dir" && ac_dir=.
4437     if test -f $ac_dir/$ac_word; then
4438       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4439       break
4440     fi
4441   done
4442   IFS="$ac_save_ifs"
4443 fi
4444 fi
4445 STRIP="$ac_cv_prog_STRIP"
4446 if test -n "$STRIP"; then
4447   echo "$ac_t""$STRIP" 1>&6
4448 else
4449   echo "$ac_t""no" 1>&6
4450 fi
4451
4452
4453 if test -z "$ac_cv_prog_STRIP"; then
4454 if test -n "$ac_tool_prefix"; then
4455   # Extract the first word of "strip", so it can be a program name with args.
4456 set dummy strip; ac_word=$2
4457 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4458 echo "configure:4459: checking for $ac_word" >&5
4459 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4460   echo $ac_n "(cached) $ac_c" 1>&6
4461 else
4462   if test -n "$STRIP"; then
4463   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4464 else
4465   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4466   ac_dummy="$PATH"
4467   for ac_dir in $ac_dummy; do
4468     test -z "$ac_dir" && ac_dir=.
4469     if test -f $ac_dir/$ac_word; then
4470       ac_cv_prog_STRIP="strip"
4471       break
4472     fi
4473   done
4474   IFS="$ac_save_ifs"
4475   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4476 fi
4477 fi
4478 STRIP="$ac_cv_prog_STRIP"
4479 if test -n "$STRIP"; then
4480   echo "$ac_t""$STRIP" 1>&6
4481 else
4482   echo "$ac_t""no" 1>&6
4483 fi
4484
4485 else
4486   STRIP=":"
4487 fi
4488 fi
4489
4490
4491 enable_dlopen=yes
4492 enable_win32_dll=yes
4493
4494 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4495 if test "${enable_libtool_lock+set}" = set; then
4496   enableval="$enable_libtool_lock"
4497   :
4498 fi
4499
4500 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4501
4502 # Some flags need to be propagated to the compiler or linker for good
4503 # libtool support.
4504 case $host in
4505 *-*-irix6*)
4506   # Find out which ABI we are using.
4507   echo '#line 4508 "configure"' > conftest.$ac_ext
4508   if { (eval echo configure:4509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4509     case `/usr/bin/file conftest.$ac_objext` in
4510     *32-bit*)
4511       LD="${LD-ld} -32"
4512       ;;
4513     *N32*)
4514       LD="${LD-ld} -n32"
4515       ;;
4516     *64-bit*)
4517       LD="${LD-ld} -64"
4518       ;;
4519     esac
4520   fi
4521   rm -rf conftest*
4522   ;;
4523
4524 *-*-sco3.2v5*)
4525   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4526   SAVE_CFLAGS="$CFLAGS"
4527   CFLAGS="$CFLAGS -belf"
4528   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4529 echo "configure:4530: checking whether the C compiler needs -belf" >&5
4530 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4531   echo $ac_n "(cached) $ac_c" 1>&6
4532 else
4533   
4534      ac_ext=c
4535 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4536 ac_cpp='$CPP $CPPFLAGS'
4537 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4538 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4539 cross_compiling=$ac_cv_prog_cc_cross
4540
4541      cat > conftest.$ac_ext <<EOF
4542 #line 4543 "configure"
4543 #include "confdefs.h"
4544
4545 int main() {
4546
4547 ; return 0; }
4548 EOF
4549 if { (eval echo configure:4550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4550   rm -rf conftest*
4551   lt_cv_cc_needs_belf=yes
4552 else
4553   echo "configure: failed program was:" >&5
4554   cat conftest.$ac_ext >&5
4555   rm -rf conftest*
4556   lt_cv_cc_needs_belf=no
4557 fi
4558 rm -f conftest*
4559      ac_ext=c
4560 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4561 ac_cpp='$CPP $CPPFLAGS'
4562 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4563 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4564 cross_compiling=$ac_cv_prog_cc_cross
4565
4566 fi
4567
4568 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4569   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4570     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4571     CFLAGS="$SAVE_CFLAGS"
4572   fi
4573   ;;
4574
4575 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4576   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4577 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4578 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4579 echo "configure:4580: checking for $ac_word" >&5
4580 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4581   echo $ac_n "(cached) $ac_c" 1>&6
4582 else
4583   if test -n "$DLLTOOL"; then
4584   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4585 else
4586   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4587   ac_dummy="$PATH"
4588   for ac_dir in $ac_dummy; do
4589     test -z "$ac_dir" && ac_dir=.
4590     if test -f $ac_dir/$ac_word; then
4591       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4592       break
4593     fi
4594   done
4595   IFS="$ac_save_ifs"
4596 fi
4597 fi
4598 DLLTOOL="$ac_cv_prog_DLLTOOL"
4599 if test -n "$DLLTOOL"; then
4600   echo "$ac_t""$DLLTOOL" 1>&6
4601 else
4602   echo "$ac_t""no" 1>&6
4603 fi
4604
4605
4606 if test -z "$ac_cv_prog_DLLTOOL"; then
4607 if test -n "$ac_tool_prefix"; then
4608   # Extract the first word of "dlltool", so it can be a program name with args.
4609 set dummy dlltool; ac_word=$2
4610 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4611 echo "configure:4612: checking for $ac_word" >&5
4612 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4613   echo $ac_n "(cached) $ac_c" 1>&6
4614 else
4615   if test -n "$DLLTOOL"; then
4616   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4617 else
4618   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4619   ac_dummy="$PATH"
4620   for ac_dir in $ac_dummy; do
4621     test -z "$ac_dir" && ac_dir=.
4622     if test -f $ac_dir/$ac_word; then
4623       ac_cv_prog_DLLTOOL="dlltool"
4624       break
4625     fi
4626   done
4627   IFS="$ac_save_ifs"
4628   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4629 fi
4630 fi
4631 DLLTOOL="$ac_cv_prog_DLLTOOL"
4632 if test -n "$DLLTOOL"; then
4633   echo "$ac_t""$DLLTOOL" 1>&6
4634 else
4635   echo "$ac_t""no" 1>&6
4636 fi
4637
4638 else
4639   DLLTOOL="false"
4640 fi
4641 fi
4642
4643   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4644 set dummy ${ac_tool_prefix}as; ac_word=$2
4645 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4646 echo "configure:4647: checking for $ac_word" >&5
4647 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4648   echo $ac_n "(cached) $ac_c" 1>&6
4649 else
4650   if test -n "$AS"; then
4651   ac_cv_prog_AS="$AS" # Let the user override the test.
4652 else
4653   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4654   ac_dummy="$PATH"
4655   for ac_dir in $ac_dummy; do
4656     test -z "$ac_dir" && ac_dir=.
4657     if test -f $ac_dir/$ac_word; then
4658       ac_cv_prog_AS="${ac_tool_prefix}as"
4659       break
4660     fi
4661   done
4662   IFS="$ac_save_ifs"
4663 fi
4664 fi
4665 AS="$ac_cv_prog_AS"
4666 if test -n "$AS"; then
4667   echo "$ac_t""$AS" 1>&6
4668 else
4669   echo "$ac_t""no" 1>&6
4670 fi
4671
4672
4673 if test -z "$ac_cv_prog_AS"; then
4674 if test -n "$ac_tool_prefix"; then
4675   # Extract the first word of "as", so it can be a program name with args.
4676 set dummy as; ac_word=$2
4677 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4678 echo "configure:4679: checking for $ac_word" >&5
4679 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4680   echo $ac_n "(cached) $ac_c" 1>&6
4681 else
4682   if test -n "$AS"; then
4683   ac_cv_prog_AS="$AS" # Let the user override the test.
4684 else
4685   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4686   ac_dummy="$PATH"
4687   for ac_dir in $ac_dummy; do
4688     test -z "$ac_dir" && ac_dir=.
4689     if test -f $ac_dir/$ac_word; then
4690       ac_cv_prog_AS="as"
4691       break
4692     fi
4693   done
4694   IFS="$ac_save_ifs"
4695   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4696 fi
4697 fi
4698 AS="$ac_cv_prog_AS"
4699 if test -n "$AS"; then
4700   echo "$ac_t""$AS" 1>&6
4701 else
4702   echo "$ac_t""no" 1>&6
4703 fi
4704
4705 else
4706   AS="false"
4707 fi
4708 fi
4709
4710   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4711 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4712 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4713 echo "configure:4714: checking for $ac_word" >&5
4714 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4715   echo $ac_n "(cached) $ac_c" 1>&6
4716 else
4717   if test -n "$OBJDUMP"; then
4718   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4719 else
4720   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4721   ac_dummy="$PATH"
4722   for ac_dir in $ac_dummy; do
4723     test -z "$ac_dir" && ac_dir=.
4724     if test -f $ac_dir/$ac_word; then
4725       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4726       break
4727     fi
4728   done
4729   IFS="$ac_save_ifs"
4730 fi
4731 fi
4732 OBJDUMP="$ac_cv_prog_OBJDUMP"
4733 if test -n "$OBJDUMP"; then
4734   echo "$ac_t""$OBJDUMP" 1>&6
4735 else
4736   echo "$ac_t""no" 1>&6
4737 fi
4738
4739
4740 if test -z "$ac_cv_prog_OBJDUMP"; then
4741 if test -n "$ac_tool_prefix"; then
4742   # Extract the first word of "objdump", so it can be a program name with args.
4743 set dummy objdump; ac_word=$2
4744 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4745 echo "configure:4746: checking for $ac_word" >&5
4746 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4747   echo $ac_n "(cached) $ac_c" 1>&6
4748 else
4749   if test -n "$OBJDUMP"; then
4750   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4751 else
4752   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4753   ac_dummy="$PATH"
4754   for ac_dir in $ac_dummy; do
4755     test -z "$ac_dir" && ac_dir=.
4756     if test -f $ac_dir/$ac_word; then
4757       ac_cv_prog_OBJDUMP="objdump"
4758       break
4759     fi
4760   done
4761   IFS="$ac_save_ifs"
4762   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4763 fi
4764 fi
4765 OBJDUMP="$ac_cv_prog_OBJDUMP"
4766 if test -n "$OBJDUMP"; then
4767   echo "$ac_t""$OBJDUMP" 1>&6
4768 else
4769   echo "$ac_t""no" 1>&6
4770 fi
4771
4772 else
4773   OBJDUMP="false"
4774 fi
4775 fi
4776
4777
4778   # recent cygwin and mingw systems supply a stub DllMain which the user
4779   # can override, but on older systems we have to supply one
4780   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4781 echo "configure:4782: checking if libtool should supply DllMain function" >&5
4782 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4783   echo $ac_n "(cached) $ac_c" 1>&6
4784 else
4785   cat > conftest.$ac_ext <<EOF
4786 #line 4787 "configure"
4787 #include "confdefs.h"
4788
4789 int main() {
4790 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4791       DllMain (0, 0, 0);
4792 ; return 0; }
4793 EOF
4794 if { (eval echo configure:4795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4795   rm -rf conftest*
4796   lt_cv_need_dllmain=no
4797 else
4798   echo "configure: failed program was:" >&5
4799   cat conftest.$ac_ext >&5
4800   rm -rf conftest*
4801   lt_cv_need_dllmain=yes
4802 fi
4803 rm -f conftest*
4804 fi
4805
4806 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4807
4808   case $host/$CC in
4809   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4810     # old mingw systems require "-dll" to link a DLL, while more recent ones
4811     # require "-mdll"
4812     SAVE_CFLAGS="$CFLAGS"
4813     CFLAGS="$CFLAGS -mdll"
4814     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4815 echo "configure:4816: checking how to link DLLs" >&5
4816 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4817   echo $ac_n "(cached) $ac_c" 1>&6
4818 else
4819   cat > conftest.$ac_ext <<EOF
4820 #line 4821 "configure"
4821 #include "confdefs.h"
4822
4823 int main() {
4824
4825 ; return 0; }
4826 EOF
4827 if { (eval echo configure:4828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4828   rm -rf conftest*
4829   lt_cv_cc_dll_switch=-mdll
4830 else
4831   echo "configure: failed program was:" >&5
4832   cat conftest.$ac_ext >&5
4833   rm -rf conftest*
4834   lt_cv_cc_dll_switch=-dll
4835 fi
4836 rm -f conftest*
4837 fi
4838
4839 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4840     CFLAGS="$SAVE_CFLAGS" ;;
4841   *-*-cygwin* | *-*-pw32*)
4842     # cygwin systems need to pass --dll to the linker, and not link
4843     # crt.o which will require a WinMain@16 definition.
4844     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4845   esac
4846   ;;
4847   
4848 esac
4849
4850 # Sed substitution that helps us do robust quoting.  It backslashifies
4851 # metacharacters that are still active within double-quoted strings.
4852 Xsed='sed -e s/^X//'
4853 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4854
4855 # Same as above, but do not quote variable references.
4856 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4857
4858 # Sed substitution to delay expansion of an escaped shell variable in a
4859 # double_quote_subst'ed string.
4860 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4861
4862 # Constants:
4863 rm="rm -f"
4864
4865 # Global variables:
4866 default_ofile=libtool
4867 can_build_shared=yes
4868
4869 # All known linkers require a `.a' archive for static linking (except M$VC,
4870 # which needs '.lib').
4871 libext=a
4872 ltmain="$ac_aux_dir/ltmain.sh"
4873 ofile="$default_ofile"
4874 with_gnu_ld="$lt_cv_prog_gnu_ld"
4875 need_locks="$enable_libtool_lock"
4876
4877 old_CC="$CC"
4878 old_CFLAGS="$CFLAGS"
4879
4880 # Set sane defaults for various variables
4881 test -z "$AR" && AR=ar
4882 test -z "$AR_FLAGS" && AR_FLAGS=cru
4883 test -z "$AS" && AS=as
4884 test -z "$CC" && CC=cc
4885 test -z "$DLLTOOL" && DLLTOOL=dlltool
4886 test -z "$LD" && LD=ld
4887 test -z "$LN_S" && LN_S="ln -s"
4888 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4889 test -z "$NM" && NM=nm
4890 test -z "$OBJDUMP" && OBJDUMP=objdump
4891 test -z "$RANLIB" && RANLIB=:
4892 test -z "$STRIP" && STRIP=:
4893 test -z "$ac_objext" && ac_objext=o
4894
4895 if test x"$host" != x"$build"; then
4896   ac_tool_prefix=${host_alias}-
4897 else
4898   ac_tool_prefix=
4899 fi
4900
4901 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4902 case $host_os in
4903 linux-gnu*) ;;
4904 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4905 esac
4906
4907 case $host_os in
4908 aix3*)
4909   # AIX sometimes has problems with the GCC collect2 program.  For some
4910   # reason, if we set the COLLECT_NAMES environment variable, the problems
4911   # vanish in a puff of smoke.
4912   if test "X${COLLECT_NAMES+set}" != Xset; then
4913     COLLECT_NAMES=
4914     export COLLECT_NAMES
4915   fi
4916   ;;
4917 esac
4918
4919 # Determine commands to create old-style static archives.
4920 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4921 old_postinstall_cmds='chmod 644 $oldlib'
4922 old_postuninstall_cmds=
4923
4924 if test -n "$RANLIB"; then
4925   case $host_os in
4926   openbsd*)
4927     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4928     ;;
4929   *)
4930     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4931     ;;
4932   esac
4933   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4934 fi
4935
4936 # Allow CC to be a program name with arguments.
4937 set dummy $CC
4938 compiler="$2"
4939
4940 ## FIXME: this should be a separate macro
4941 ##
4942 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4943 echo "configure:4944: checking for objdir" >&5
4944 rm -f .libs 2>/dev/null
4945 mkdir .libs 2>/dev/null
4946 if test -d .libs; then
4947   objdir=.libs
4948 else
4949   # MS-DOS does not allow filenames that begin with a dot.
4950   objdir=_libs
4951 fi
4952 rmdir .libs 2>/dev/null
4953 echo "$ac_t""$objdir" 1>&6
4954 ##
4955 ## END FIXME
4956
4957
4958 ## FIXME: this should be a separate macro
4959 ##
4960 # Check whether --with-pic or --without-pic was given.
4961 if test "${with_pic+set}" = set; then
4962   withval="$with_pic"
4963   pic_mode="$withval"
4964 else
4965   pic_mode=default
4966 fi
4967
4968 test -z "$pic_mode" && pic_mode=default
4969
4970 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4971 # in isolation, and that seeing it set (from the cache) indicates that
4972 # the associated values are set (in the cache) correctly too.
4973 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4974 echo "configure:4975: checking for $compiler option to produce PIC" >&5
4975 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4976   echo $ac_n "(cached) $ac_c" 1>&6
4977 else
4978    lt_cv_prog_cc_pic=
4979   lt_cv_prog_cc_shlib=
4980   lt_cv_prog_cc_wl=
4981   lt_cv_prog_cc_static=
4982   lt_cv_prog_cc_no_builtin=
4983   lt_cv_prog_cc_can_build_shared=$can_build_shared
4984
4985   if test "$GCC" = yes; then
4986     lt_cv_prog_cc_wl='-Wl,'
4987     lt_cv_prog_cc_static='-static'
4988
4989     case $host_os in
4990     aix*)
4991       # Below there is a dirty hack to force normal static linking with -ldl
4992       # The problem is because libdl dynamically linked with both libc and
4993       # libC (AIX C++ library), which obviously doesn't included in libraries
4994       # list by gcc. This cause undefined symbols with -static flags.
4995       # This hack allows C programs to be linked with "-static -ldl", but
4996       # not sure about C++ programs.
4997       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4998       ;;
4999     amigaos*)
5000       # FIXME: we need at least 68020 code to build shared libraries, but
5001       # adding the `-m68020' flag to GCC prevents building anything better,
5002       # like `-m68040'.
5003       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5004       ;;
5005     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5006       # PIC is the default for these OSes.
5007       ;;
5008     darwin* | rhapsody*)
5009       # PIC is the default on this platform
5010       # Common symbols not allowed in MH_DYLIB files
5011       lt_cv_prog_cc_pic='-fno-common'
5012       ;;
5013     cygwin* | mingw* | pw32* | os2*)
5014       # This hack is so that the source file can tell whether it is being
5015       # built for inclusion in a dll (and should export symbols for example).
5016       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5017       ;;
5018     sysv4*MP*)
5019       if test -d /usr/nec; then
5020          lt_cv_prog_cc_pic=-Kconform_pic
5021       fi
5022       ;;
5023     *)
5024       lt_cv_prog_cc_pic='-fPIC'
5025       ;;
5026     esac
5027   else
5028     # PORTME Check for PIC flags for the system compiler.
5029     case $host_os in
5030     aix3* | aix4* | aix5*)
5031       lt_cv_prog_cc_wl='-Wl,'
5032       # All AIX code is PIC.
5033       if test "$host_cpu" = ia64; then
5034         # AIX 5 now supports IA64 processor
5035         lt_cv_prog_cc_static='-Bstatic'
5036       else
5037         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5038       fi
5039       ;;
5040
5041     hpux9* | hpux10* | hpux11*)
5042       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5043       lt_cv_prog_cc_wl='-Wl,'
5044       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5045       lt_cv_prog_cc_pic='+Z'
5046       ;;
5047
5048     irix5* | irix6* | nonstopux*)
5049       lt_cv_prog_cc_wl='-Wl,'
5050       lt_cv_prog_cc_static='-non_shared'
5051       # PIC (with -KPIC) is the default.
5052       ;;
5053
5054     cygwin* | mingw* | pw32* | os2*)
5055       # This hack is so that the source file can tell whether it is being
5056       # built for inclusion in a dll (and should export symbols for example).
5057       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5058       ;;
5059
5060     newsos6)
5061       lt_cv_prog_cc_pic='-KPIC'
5062       lt_cv_prog_cc_static='-Bstatic'
5063       ;;
5064
5065     osf3* | osf4* | osf5*)
5066       # All OSF/1 code is PIC.
5067       lt_cv_prog_cc_wl='-Wl,'
5068       lt_cv_prog_cc_static='-non_shared'
5069       ;;
5070
5071     sco3.2v5*)
5072       lt_cv_prog_cc_pic='-Kpic'
5073       lt_cv_prog_cc_static='-dn'
5074       lt_cv_prog_cc_shlib='-belf'
5075       ;;
5076
5077     solaris*)
5078       lt_cv_prog_cc_pic='-KPIC'
5079       lt_cv_prog_cc_static='-Bstatic'
5080       lt_cv_prog_cc_wl='-Wl,'
5081       ;;
5082
5083     sunos4*)
5084       lt_cv_prog_cc_pic='-PIC'
5085       lt_cv_prog_cc_static='-Bstatic'
5086       lt_cv_prog_cc_wl='-Qoption ld '
5087       ;;
5088
5089     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5090       lt_cv_prog_cc_pic='-KPIC'
5091       lt_cv_prog_cc_static='-Bstatic'
5092       lt_cv_prog_cc_wl='-Wl,'
5093       ;;
5094
5095     uts4*)
5096       lt_cv_prog_cc_pic='-pic'
5097       lt_cv_prog_cc_static='-Bstatic'
5098       ;;
5099
5100     sysv4*MP*)
5101       if test -d /usr/nec ;then
5102         lt_cv_prog_cc_pic='-Kconform_pic'
5103         lt_cv_prog_cc_static='-Bstatic'
5104       fi
5105       ;;
5106
5107     *)
5108       lt_cv_prog_cc_can_build_shared=no
5109       ;;
5110     esac
5111   fi
5112
5113 fi
5114
5115 if test -z "$lt_cv_prog_cc_pic"; then
5116   echo "$ac_t""none" 1>&6
5117 else
5118   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5119
5120   # Check to make sure the pic_flag actually works.
5121   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5122 echo "configure:5123: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5123   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5124   echo $ac_n "(cached) $ac_c" 1>&6
5125 else
5126       save_CFLAGS="$CFLAGS"
5127     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5128     cat > conftest.$ac_ext <<EOF
5129 #line 5130 "configure"
5130 #include "confdefs.h"
5131
5132 int main() {
5133
5134 ; return 0; }
5135 EOF
5136 if { (eval echo configure:5137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5137   rm -rf conftest*
5138         case $host_os in
5139       hpux9* | hpux10* | hpux11*)
5140         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5141         # they create non-PIC objects.  So, if there were any warnings, we
5142         # assume that PIC is not supported.
5143         if test -s conftest.err; then
5144           lt_cv_prog_cc_pic_works=no
5145         else
5146           lt_cv_prog_cc_pic_works=yes
5147         fi
5148         ;;
5149       *)
5150         lt_cv_prog_cc_pic_works=yes
5151         ;;
5152       esac
5153     
5154 else
5155   echo "configure: failed program was:" >&5
5156   cat conftest.$ac_ext >&5
5157   rm -rf conftest*
5158         lt_cv_prog_cc_pic_works=no
5159     
5160 fi
5161 rm -f conftest*
5162     CFLAGS="$save_CFLAGS"
5163   
5164 fi
5165
5166
5167   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5168     lt_cv_prog_cc_pic=
5169     lt_cv_prog_cc_can_build_shared=no
5170   else
5171     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5172   fi
5173
5174   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5175 fi
5176 ##
5177 ## END FIXME
5178
5179 # Check for any special shared library compilation flags.
5180 if test -n "$lt_cv_prog_cc_shlib"; then
5181   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5182   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5183   else
5184    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5185     lt_cv_prog_cc_can_build_shared=no
5186   fi
5187 fi
5188
5189 ## FIXME: this should be a separate macro
5190 ##
5191 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5192 echo "configure:5193: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5193 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5194   echo $ac_n "(cached) $ac_c" 1>&6
5195 else
5196     lt_cv_prog_cc_static_works=no
5197   save_LDFLAGS="$LDFLAGS"
5198   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5199   cat > conftest.$ac_ext <<EOF
5200 #line 5201 "configure"
5201 #include "confdefs.h"
5202
5203 int main() {
5204
5205 ; return 0; }
5206 EOF
5207 if { (eval echo configure:5208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5208   rm -rf conftest*
5209   lt_cv_prog_cc_static_works=yes
5210 else
5211   echo "configure: failed program was:" >&5
5212   cat conftest.$ac_ext >&5
5213 fi
5214 rm -f conftest*
5215   LDFLAGS="$save_LDFLAGS"
5216
5217 fi
5218
5219
5220 # Belt *and* braces to stop my trousers falling down:
5221 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5222 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5223
5224 pic_flag="$lt_cv_prog_cc_pic"
5225 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5226 wl="$lt_cv_prog_cc_wl"
5227 link_static_flag="$lt_cv_prog_cc_static"
5228 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5229 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5230 ##
5231 ## END FIXME
5232
5233
5234 ## FIXME: this should be a separate macro
5235 ##
5236 # Check to see if options -o and -c are simultaneously supported by compiler
5237 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5238 echo "configure:5239: checking if $compiler supports -c -o file.$ac_objext" >&5
5239 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5240   echo $ac_n "(cached) $ac_c" 1>&6
5241 else
5242   
5243 $rm -r conftest 2>/dev/null
5244 mkdir conftest
5245 cd conftest
5246 echo "int some_variable = 0;" > conftest.$ac_ext
5247 mkdir out
5248 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5249 # that will create temporary files in the current directory regardless of
5250 # the output directory.  Thus, making CWD read-only will cause this test
5251 # to fail, enabling locking or at least warning the user not to do parallel
5252 # builds.
5253 chmod -w .
5254 save_CFLAGS="$CFLAGS"
5255 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5256 compiler_c_o=no
5257 if { (eval echo configure:5258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5258   # The compiler can only warn and ignore the option if not recognized
5259   # So say no if there are warnings
5260   if test -s out/conftest.err; then
5261     lt_cv_compiler_c_o=no
5262   else
5263     lt_cv_compiler_c_o=yes
5264   fi
5265 else
5266   # Append any errors to the config.log.
5267   cat out/conftest.err 1>&5
5268   lt_cv_compiler_c_o=no
5269 fi
5270 CFLAGS="$save_CFLAGS"
5271 chmod u+w .
5272 $rm conftest* out/*
5273 rmdir out
5274 cd ..
5275 rmdir conftest
5276 $rm -r conftest 2>/dev/null
5277
5278 fi
5279
5280 compiler_c_o=$lt_cv_compiler_c_o
5281 echo "$ac_t""$compiler_c_o" 1>&6
5282
5283 if test x"$compiler_c_o" = x"yes"; then
5284   # Check to see if we can write to a .lo
5285   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5286 echo "configure:5287: checking if $compiler supports -c -o file.lo" >&5
5287   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5288   echo $ac_n "(cached) $ac_c" 1>&6
5289 else
5290   
5291   lt_cv_compiler_o_lo=no
5292   save_CFLAGS="$CFLAGS"
5293   CFLAGS="$CFLAGS -c -o conftest.lo"
5294   save_objext="$ac_objext"
5295   ac_objext=lo
5296   cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299
5300 int main() {
5301 int some_variable = 0;
5302 ; return 0; }
5303 EOF
5304 if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5305   rm -rf conftest*
5306       # The compiler can only warn and ignore the option if not recognized
5307     # So say no if there are warnings
5308     if test -s conftest.err; then
5309       lt_cv_compiler_o_lo=no
5310     else
5311       lt_cv_compiler_o_lo=yes
5312     fi
5313   
5314 else
5315   echo "configure: failed program was:" >&5
5316   cat conftest.$ac_ext >&5
5317 fi
5318 rm -f conftest*
5319   ac_objext="$save_objext"
5320   CFLAGS="$save_CFLAGS"
5321   
5322 fi
5323
5324   compiler_o_lo=$lt_cv_compiler_o_lo
5325   echo "$ac_t""$compiler_o_lo" 1>&6
5326 else
5327   compiler_o_lo=no
5328 fi
5329 ##
5330 ## END FIXME
5331
5332 ## FIXME: this should be a separate macro
5333 ##
5334 # Check to see if we can do hard links to lock some files if needed
5335 hard_links="nottested"
5336 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5337   # do not overwrite the value of need_locks provided by the user
5338   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5339 echo "configure:5340: checking if we can lock with hard links" >&5
5340   hard_links=yes
5341   $rm conftest*
5342   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5343   touch conftest.a
5344   ln conftest.a conftest.b 2>&5 || hard_links=no
5345   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5346   echo "$ac_t""$hard_links" 1>&6
5347   if test "$hard_links" = no; then
5348     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5349     need_locks=warn
5350   fi
5351 else
5352   need_locks=no
5353 fi
5354 ##
5355 ## END FIXME
5356
5357 ## FIXME: this should be a separate macro
5358 ##
5359 if test "$GCC" = yes; then
5360   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5361   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5362 echo "configure:5363: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5363   echo "int some_variable = 0;" > conftest.$ac_ext
5364   save_CFLAGS="$CFLAGS"
5365   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5366   compiler_rtti_exceptions=no
5367   cat > conftest.$ac_ext <<EOF
5368 #line 5369 "configure"
5369 #include "confdefs.h"
5370
5371 int main() {
5372 int some_variable = 0;
5373 ; return 0; }
5374 EOF
5375 if { (eval echo configure:5376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5376   rm -rf conftest*
5377       # The compiler can only warn and ignore the option if not recognized
5378     # So say no if there are warnings
5379     if test -s conftest.err; then
5380       compiler_rtti_exceptions=no
5381     else
5382       compiler_rtti_exceptions=yes
5383     fi
5384   
5385 else
5386   echo "configure: failed program was:" >&5
5387   cat conftest.$ac_ext >&5
5388 fi
5389 rm -f conftest*
5390   CFLAGS="$save_CFLAGS"
5391   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5392
5393   if test "$compiler_rtti_exceptions" = "yes"; then
5394     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5395   else
5396     no_builtin_flag=' -fno-builtin'
5397   fi
5398 fi
5399 ##
5400 ## END FIXME
5401
5402 ## FIXME: this should be a separate macro
5403 ##
5404 # See if the linker supports building shared libraries.
5405 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5406 echo "configure:5407: checking whether the linker ($LD) supports shared libraries" >&5
5407
5408 allow_undefined_flag=
5409 no_undefined_flag=
5410 need_lib_prefix=unknown
5411 need_version=unknown
5412 # when you set need_version to no, make sure it does not cause -set_version
5413 # flags to be left without arguments
5414 archive_cmds=
5415 archive_expsym_cmds=
5416 old_archive_from_new_cmds=
5417 old_archive_from_expsyms_cmds=
5418 export_dynamic_flag_spec=
5419 whole_archive_flag_spec=
5420 thread_safe_flag_spec=
5421 hardcode_into_libs=no
5422 hardcode_libdir_flag_spec=
5423 hardcode_libdir_separator=
5424 hardcode_direct=no
5425 hardcode_minus_L=no
5426 hardcode_shlibpath_var=unsupported
5427 runpath_var=
5428 link_all_deplibs=unknown
5429 always_export_symbols=no
5430 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5431 # include_expsyms should be a list of space-separated symbols to be *always*
5432 # included in the symbol list
5433 include_expsyms=
5434 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5435 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5436 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5437 # as well as any symbol that contains `d'.
5438 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5439 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5440 # platforms (ab)use it in PIC code, but their linkers get confused if
5441 # the symbol is explicitly referenced.  Since portable code cannot
5442 # rely on this symbol name, it's probably fine to never include it in
5443 # preloaded symbol tables.
5444 extract_expsyms_cmds=
5445
5446 case $host_os in
5447 cygwin* | mingw* | pw32*)
5448   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5449   # When not using gcc, we currently assume that we are using
5450   # Microsoft Visual C++.
5451   if test "$GCC" != yes; then
5452     with_gnu_ld=no
5453   fi
5454   ;;
5455 openbsd*)
5456   with_gnu_ld=no
5457   ;;
5458 esac
5459
5460 ld_shlibs=yes
5461 if test "$with_gnu_ld" = yes; then
5462   # If archive_cmds runs LD, not CC, wlarc should be empty
5463   wlarc='${wl}'
5464
5465   # See if GNU ld supports shared libraries.
5466   case $host_os in
5467   aix3* | aix4* | aix5*)
5468     # On AIX, the GNU linker is very broken
5469     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5470     ld_shlibs=no
5471     cat <<EOF 1>&2
5472
5473 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5474 *** to be unable to reliably create shared libraries on AIX.
5475 *** Therefore, libtool is disabling shared libraries support.  If you
5476 *** really care for shared libraries, you may want to modify your PATH
5477 *** so that a non-GNU linker is found, and then restart.
5478
5479 EOF
5480     ;;
5481
5482   amigaos*)
5483     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)'
5484     hardcode_libdir_flag_spec='-L$libdir'
5485     hardcode_minus_L=yes
5486
5487     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5488     # that the semantics of dynamic libraries on AmigaOS, at least up
5489     # to version 4, is to share data among multiple programs linked
5490     # with the same dynamic library.  Since this doesn't match the
5491     # behavior of shared libraries on other platforms, we can use
5492     # them.
5493     ld_shlibs=no
5494     ;;
5495
5496   beos*)
5497     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5498       allow_undefined_flag=unsupported
5499       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5500       # support --undefined.  This deserves some investigation.  FIXME
5501       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5502     else
5503       ld_shlibs=no
5504     fi
5505     ;;
5506
5507   cygwin* | mingw* | pw32*)
5508     # hardcode_libdir_flag_spec is actually meaningless, as there is
5509     # no search path for DLLs.
5510     hardcode_libdir_flag_spec='-L$libdir'
5511     allow_undefined_flag=unsupported
5512     always_export_symbols=yes
5513
5514     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5515       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5516       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5517       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5518       else $CC -o impgen impgen.c ; fi)~
5519       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5520
5521     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5522
5523     # cygwin and mingw dlls have different entry points and sets of symbols
5524     # to exclude.
5525     # FIXME: what about values for MSVC?
5526     dll_entry=__cygwin_dll_entry@12
5527     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5528     case $host_os in
5529     mingw*)
5530       # mingw values
5531       dll_entry=_DllMainCRTStartup@12
5532       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5533       ;;
5534     esac
5535
5536     # mingw and cygwin differ, and it's simplest to just exclude the union
5537     # of the two symbol sets.
5538     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5539
5540     # recent cygwin and mingw systems supply a stub DllMain which the user
5541     # can override, but on older systems we have to supply one (in ltdll.c)
5542     if test "x$lt_cv_need_dllmain" = "xyes"; then
5543       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5544       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~
5545         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5546     else
5547       ltdll_obj=
5548       ltdll_cmds=
5549     fi
5550
5551     # Extract the symbol export list from an `--export-all' def file,
5552     # then regenerate the def file from the symbol export list, so that
5553     # the compiled dll only exports the symbol export list.
5554     # Be careful not to strip the DATA tag left be newer dlltools.
5555     export_symbols_cmds="$ltdll_cmds"'
5556       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5557       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5558
5559     # If the export-symbols file already is a .def file (1st line
5560     # is EXPORTS), use it as is.
5561     # If DATA tags from a recent dlltool are present, honour them!
5562     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5563         cp $export_symbols $output_objdir/$soname-def;
5564       else
5565         echo EXPORTS > $output_objdir/$soname-def;
5566         _lt_hint=1;
5567         cat $export_symbols | while read symbol; do
5568          set dummy \$symbol;
5569          case \$# in
5570            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5571            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5572            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5573          esac;
5574          _lt_hint=`expr 1 + \$_lt_hint`;
5575         done;
5576       fi~
5577       '"$ltdll_cmds"'
5578       $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~
5579       $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~
5580       $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~
5581       $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~
5582       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5583     ;;
5584
5585   netbsd*)
5586     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5587       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5588       wlarc=
5589     else
5590       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5591       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5592     fi
5593     ;;
5594
5595   solaris* | sysv5*)
5596     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5597       ld_shlibs=no
5598       cat <<EOF 1>&2
5599
5600 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5601 *** create shared libraries on Solaris systems.  Therefore, libtool
5602 *** is disabling shared libraries support.  We urge you to upgrade GNU
5603 *** binutils to release 2.9.1 or newer.  Another option is to modify
5604 *** your PATH or compiler configuration so that the native linker is
5605 *** used, and then restart.
5606
5607 EOF
5608     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5609       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5610       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5611     else
5612       ld_shlibs=no
5613     fi
5614     ;;
5615
5616   sunos4*)
5617     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5618     wlarc=
5619     hardcode_direct=yes
5620     hardcode_shlibpath_var=no
5621     ;;
5622
5623   *)
5624     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5625       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5626       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5627     else
5628       ld_shlibs=no
5629     fi
5630     ;;
5631   esac
5632
5633   if test "$ld_shlibs" = yes; then
5634     runpath_var=LD_RUN_PATH
5635     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5636     export_dynamic_flag_spec='${wl}--export-dynamic'
5637     case $host_os in
5638     cygwin* | mingw* | pw32*)
5639       # dlltool doesn't understand --whole-archive et. al.
5640       whole_archive_flag_spec=
5641       ;;
5642     *)
5643       # ancient GNU ld didn't support --whole-archive et. al.
5644       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5645         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5646       else
5647         whole_archive_flag_spec=
5648       fi
5649       ;;
5650     esac
5651   fi
5652 else
5653   # PORTME fill in a description of your system's linker (not GNU ld)
5654   case $host_os in
5655   aix3*)
5656     allow_undefined_flag=unsupported
5657     always_export_symbols=yes
5658     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'
5659     # Note: this linker hardcodes the directories in LIBPATH if there
5660     # are no directories specified by -L.
5661     hardcode_minus_L=yes
5662     if test "$GCC" = yes && test -z "$link_static_flag"; then
5663       # Neither direct hardcoding nor static linking is supported with a
5664       # broken collect2.
5665       hardcode_direct=unsupported
5666     fi
5667     ;;
5668
5669   aix4* | aix5*)
5670     if test "$host_cpu" = ia64; then
5671       # On IA64, the linker does run time linking by default, so we don't
5672       # have to do anything special.
5673       aix_use_runtimelinking=no
5674       exp_sym_flag='-Bexport'
5675       no_entry_flag=""
5676     else
5677       aix_use_runtimelinking=no
5678
5679       # Test if we are trying to use run time linking or normal
5680       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5681       # need to do runtime linking.
5682       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5683         for ld_flag in $LDFLAGS; do
5684           case $ld_flag in
5685           *-brtl*)
5686             aix_use_runtimelinking=yes
5687             break
5688           ;;
5689           esac
5690         done
5691       esac
5692
5693       exp_sym_flag='-bexport'
5694       no_entry_flag='-bnoentry'
5695     fi
5696
5697     # When large executables or shared objects are built, AIX ld can
5698     # have problems creating the table of contents.  If linking a library
5699     # or program results in "error TOC overflow" add -mminimal-toc to
5700     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5701     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5702
5703     hardcode_direct=yes
5704     archive_cmds=''
5705     hardcode_libdir_separator=':'
5706     if test "$GCC" = yes; then
5707       case $host_os in aix4.[012]|aix4.[012].*)
5708         collect2name=`${CC} -print-prog-name=collect2`
5709         if test -f "$collect2name" && \
5710           strings "$collect2name" | grep resolve_lib_name >/dev/null
5711         then
5712           # We have reworked collect2
5713           hardcode_direct=yes
5714         else
5715           # We have old collect2
5716           hardcode_direct=unsupported
5717           # It fails to find uninstalled libraries when the uninstalled
5718           # path is not listed in the libpath.  Setting hardcode_minus_L
5719           # to unsupported forces relinking
5720           hardcode_minus_L=yes
5721           hardcode_libdir_flag_spec='-L$libdir'
5722           hardcode_libdir_separator=
5723         fi
5724       esac
5725
5726       shared_flag='-shared'
5727     else
5728       # not using gcc
5729       if test "$host_cpu" = ia64; then
5730         shared_flag='${wl}-G'
5731       else
5732         if test "$aix_use_runtimelinking" = yes; then
5733           shared_flag='${wl}-G'
5734         else
5735           shared_flag='${wl}-bM:SRE'
5736         fi
5737       fi
5738     fi
5739
5740     # It seems that -bexpall can do strange things, so it is better to
5741     # generate a list of symbols to export.
5742     always_export_symbols=yes
5743     if test "$aix_use_runtimelinking" = yes; then
5744       # Warning - without using the other runtime loading flags (-brtl),
5745       # -berok will link without error, but may produce a broken library.
5746       allow_undefined_flag='-berok'
5747       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5748       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"
5749     else
5750       if test "$host_cpu" = ia64; then
5751         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5752         allow_undefined_flag="-z nodefs"
5753         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"
5754       else
5755         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5756         # Warning - without using the other run time loading flags,
5757         # -berok will link without error, but may produce a broken library.
5758         allow_undefined_flag='${wl}-berok'
5759         # This is a bit strange, but is similar to how AIX traditionally builds
5760         # it's shared libraries.
5761         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'
5762       fi
5763     fi
5764     ;;
5765
5766   amigaos*)
5767     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)'
5768     hardcode_libdir_flag_spec='-L$libdir'
5769     hardcode_minus_L=yes
5770     # see comment about different semantics on the GNU ld section
5771     ld_shlibs=no
5772     ;;
5773
5774   cygwin* | mingw* | pw32*)
5775     # When not using gcc, we currently assume that we are using
5776     # Microsoft Visual C++.
5777     # hardcode_libdir_flag_spec is actually meaningless, as there is
5778     # no search path for DLLs.
5779     hardcode_libdir_flag_spec=' '
5780     allow_undefined_flag=unsupported
5781     # Tell ltmain to make .lib files, not .a files.
5782     libext=lib
5783     # FIXME: Setting linknames here is a bad hack.
5784     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5785     # The linker will automatically build a .lib file if we build a DLL.
5786     old_archive_from_new_cmds='true'
5787     # FIXME: Should let the user specify the lib program.
5788     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5789     fix_srcfile_path='`cygpath -w "$srcfile"`'
5790     ;;
5791
5792   darwin* | rhapsody*)
5793     case "$host_os" in
5794     rhapsody* | darwin1.[012])
5795       allow_undefined_flag='-undefined suppress'
5796       ;;
5797     *) # Darwin 1.3 on
5798       allow_undefined_flag='-flat_namespace -undefined suppress'
5799       ;;
5800     esac
5801     # FIXME: Relying on posixy $() will cause problems for
5802     #        cross-compilation, but unfortunately the echo tests do not
5803     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5804     #        `"' quotes if we put them in here... so don't!
5805     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)'
5806     # We need to add '_' to the symbols in $export_symbols first
5807     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5808     hardcode_direct=yes
5809     hardcode_shlibpath_var=no
5810     whole_archive_flag_spec='-all_load $convenience'
5811     ;;
5812
5813   freebsd1*)
5814     ld_shlibs=no
5815     ;;
5816
5817   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5818   # support.  Future versions do this automatically, but an explicit c++rt0.o
5819   # does not break anything, and helps significantly (at the cost of a little
5820   # extra space).
5821   freebsd2.2*)
5822     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5823     hardcode_libdir_flag_spec='-R$libdir'
5824     hardcode_direct=yes
5825     hardcode_shlibpath_var=no
5826     ;;
5827
5828   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5829   freebsd2*)
5830     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5831     hardcode_direct=yes
5832     hardcode_minus_L=yes
5833     hardcode_shlibpath_var=no
5834     ;;
5835
5836   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5837   freebsd*)
5838     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5839     hardcode_libdir_flag_spec='-R$libdir'
5840     hardcode_direct=yes
5841     hardcode_shlibpath_var=no
5842     ;;
5843
5844   hpux9* | hpux10* | hpux11*)
5845     case $host_os in
5846     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' ;;
5847     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5848     esac
5849     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5850     hardcode_libdir_separator=:
5851     hardcode_direct=yes
5852     hardcode_minus_L=yes # Not in the search PATH, but as the default
5853                          # location of the library.
5854     export_dynamic_flag_spec='${wl}-E'
5855     ;;
5856
5857   irix5* | irix6* | nonstopux*)
5858     if test "$GCC" = yes; then
5859       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'
5860       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5861     else
5862       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'
5863       hardcode_libdir_flag_spec='-rpath $libdir'
5864     fi
5865     hardcode_libdir_separator=:
5866     link_all_deplibs=yes
5867     ;;
5868
5869   netbsd*)
5870     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5871       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5872     else
5873       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5874     fi
5875     hardcode_libdir_flag_spec='-R$libdir'
5876     hardcode_direct=yes
5877     hardcode_shlibpath_var=no
5878     ;;
5879
5880   newsos6)
5881     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5882     hardcode_direct=yes
5883     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5884     hardcode_libdir_separator=:
5885     hardcode_shlibpath_var=no
5886     ;;
5887
5888   openbsd*)
5889     hardcode_direct=yes
5890     hardcode_shlibpath_var=no
5891     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5892       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5893       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5894       export_dynamic_flag_spec='${wl}-E'
5895     else
5896       case "$host_os" in
5897       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5898         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5899         hardcode_libdir_flag_spec='-R$libdir'
5900         ;;
5901       *)
5902         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5903         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5904         ;;
5905       esac
5906     fi
5907     ;;
5908
5909   os2*)
5910     hardcode_libdir_flag_spec='-L$libdir'
5911     hardcode_minus_L=yes
5912     allow_undefined_flag=unsupported
5913     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'
5914     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5915     ;;
5916
5917   osf3*)
5918     if test "$GCC" = yes; then
5919       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5920       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'
5921     else
5922       allow_undefined_flag=' -expect_unresolved \*'
5923       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'
5924     fi
5925     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5926     hardcode_libdir_separator=:
5927     ;;
5928
5929   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5930     if test "$GCC" = yes; then
5931       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5932       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'
5933       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5934     else
5935       allow_undefined_flag=' -expect_unresolved \*'
5936       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'
5937       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5938       $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'
5939
5940       #Both c and cxx compiler support -rpath directly
5941       hardcode_libdir_flag_spec='-rpath $libdir'
5942     fi
5943     hardcode_libdir_separator=:
5944     ;;
5945
5946   sco3.2v5*)
5947     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5948     hardcode_shlibpath_var=no
5949     runpath_var=LD_RUN_PATH
5950     hardcode_runpath_var=yes
5951     export_dynamic_flag_spec='${wl}-Bexport'
5952     ;;
5953
5954   solaris*)
5955     # gcc --version < 3.0 without binutils cannot create self contained
5956     # shared libraries reliably, requiring libgcc.a to resolve some of
5957     # the object symbols generated in some cases.  Libraries that use
5958     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5959     # a copy of libgcc.a into every shared library to guarantee resolving
5960     # such symbols causes other problems:  According to Tim Van Holder
5961     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5962     # (to the application) exception stack for one thing.
5963     no_undefined_flag=' -z defs'
5964     if test "$GCC" = yes; then
5965       case `$CC --version 2>/dev/null` in
5966       [12].*)
5967         cat <<EOF 1>&2
5968
5969 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5970 *** create self contained shared libraries on Solaris systems, without
5971 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5972 *** -no-undefined support, which will at least allow you to build shared
5973 *** libraries.  However, you may find that when you link such libraries
5974 *** into an application without using GCC, you have to manually add
5975 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5976 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5977 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5978
5979 EOF
5980         no_undefined_flag=
5981         ;;
5982       esac
5983     fi
5984     # $CC -shared without GNU ld will not create a library from C++
5985     # object files and a static libstdc++, better avoid it by now
5986     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5987     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5988                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5989     hardcode_libdir_flag_spec='-R$libdir'
5990     hardcode_shlibpath_var=no
5991     case $host_os in
5992     solaris2.[0-5] | solaris2.[0-5].*) ;;
5993     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5994       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5995     esac
5996     link_all_deplibs=yes
5997     ;;
5998
5999   sunos4*)
6000     if test "x$host_vendor" = xsequent; then
6001       # Use $CC to link under sequent, because it throws in some extra .o
6002       # files that make .init and .fini sections work.
6003       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6004     else
6005       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6006     fi
6007     hardcode_libdir_flag_spec='-L$libdir'
6008     hardcode_direct=yes
6009     hardcode_minus_L=yes
6010     hardcode_shlibpath_var=no
6011     ;;
6012
6013   sysv4)
6014     case $host_vendor in
6015       sni)
6016         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6017         hardcode_direct=yes # is this really true???
6018         ;;
6019       siemens)
6020         ## LD is ld it makes a PLAMLIB
6021         ## CC just makes a GrossModule.
6022         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6023         reload_cmds='$CC -r -o $output$reload_objs'
6024         hardcode_direct=no
6025         ;;
6026       motorola)
6027         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6028         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6029         ;;
6030     esac
6031     runpath_var='LD_RUN_PATH'
6032     hardcode_shlibpath_var=no
6033     ;;
6034
6035   sysv4.3*)
6036     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6037     hardcode_shlibpath_var=no
6038     export_dynamic_flag_spec='-Bexport'
6039     ;;
6040
6041   sysv5*)
6042     no_undefined_flag=' -z text'
6043     # $CC -shared without GNU ld will not create a library from C++
6044     # object files and a static libstdc++, better avoid it by now
6045     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6046     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6047                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6048     hardcode_libdir_flag_spec=
6049     hardcode_shlibpath_var=no
6050     runpath_var='LD_RUN_PATH'
6051     ;;
6052
6053   uts4*)
6054     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6055     hardcode_libdir_flag_spec='-L$libdir'
6056     hardcode_shlibpath_var=no
6057     ;;
6058
6059   dgux*)
6060     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6061     hardcode_libdir_flag_spec='-L$libdir'
6062     hardcode_shlibpath_var=no
6063     ;;
6064
6065   sysv4*MP*)
6066     if test -d /usr/nec; then
6067       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6068       hardcode_shlibpath_var=no
6069       runpath_var=LD_RUN_PATH
6070       hardcode_runpath_var=yes
6071       ld_shlibs=yes
6072     fi
6073     ;;
6074
6075   sysv4.2uw2*)
6076     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6077     hardcode_direct=yes
6078     hardcode_minus_L=no
6079     hardcode_shlibpath_var=no
6080     hardcode_runpath_var=yes
6081     runpath_var=LD_RUN_PATH
6082     ;;
6083
6084   sysv5uw7* | unixware7*)
6085     no_undefined_flag='${wl}-z ${wl}text'
6086     if test "$GCC" = yes; then
6087       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6088     else
6089       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6090     fi
6091     runpath_var='LD_RUN_PATH'
6092     hardcode_shlibpath_var=no
6093     ;;
6094
6095   *)
6096     ld_shlibs=no
6097     ;;
6098   esac
6099 fi
6100 echo "$ac_t""$ld_shlibs" 1>&6
6101 test "$ld_shlibs" = no && can_build_shared=no
6102 ##
6103 ## END FIXME
6104
6105 ## FIXME: this should be a separate macro
6106 ##
6107 # Check hardcoding attributes.
6108 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6109 echo "configure:6110: checking how to hardcode library paths into programs" >&5
6110 hardcode_action=
6111 if test -n "$hardcode_libdir_flag_spec" || \
6112    test -n "$runpath_var"; then
6113
6114   # We can hardcode non-existant directories.
6115   if test "$hardcode_direct" != no &&
6116      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6117      # have to relink, otherwise we might link with an installed library
6118      # when we should be linking with a yet-to-be-installed one
6119      ## test "$hardcode_shlibpath_var" != no &&
6120      test "$hardcode_minus_L" != no; then
6121     # Linking always hardcodes the temporary library directory.
6122     hardcode_action=relink
6123   else
6124     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6125     hardcode_action=immediate
6126   fi
6127 else
6128   # We cannot hardcode anything, or else we can only hardcode existing
6129   # directories.
6130   hardcode_action=unsupported
6131 fi
6132 echo "$ac_t""$hardcode_action" 1>&6
6133 ##
6134 ## END FIXME
6135
6136 ## FIXME: this should be a separate macro
6137 ##
6138 striplib=
6139 old_striplib=
6140 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6141 echo "configure:6142: checking whether stripping libraries is possible" >&5
6142 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6143   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6144   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6145   echo "$ac_t""yes" 1>&6
6146 else
6147   echo "$ac_t""no" 1>&6
6148 fi
6149 ##
6150 ## END FIXME
6151
6152 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6153 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6154
6155 ## FIXME: this should be a separate macro
6156 ##
6157 # PORTME Fill in your ld.so characteristics
6158 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6159 echo "configure:6160: checking dynamic linker characteristics" >&5
6160 library_names_spec=
6161 libname_spec='lib$name'
6162 soname_spec=
6163 postinstall_cmds=
6164 postuninstall_cmds=
6165 finish_cmds=
6166 finish_eval=
6167 shlibpath_var=
6168 shlibpath_overrides_runpath=unknown
6169 version_type=none
6170 dynamic_linker="$host_os ld.so"
6171 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6172 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6173
6174 case $host_os in
6175 aix3*)
6176   version_type=linux
6177   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6178   shlibpath_var=LIBPATH
6179
6180   # AIX has no versioning support, so we append a major version to the name.
6181   soname_spec='${libname}${release}.so$major'
6182   ;;
6183
6184 aix4* | aix5*)
6185   version_type=linux
6186   need_lib_prefix=no
6187   need_version=no
6188   hardcode_into_libs=yes
6189   if test "$host_cpu" = ia64; then
6190     # AIX 5 supports IA64
6191     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6192     shlibpath_var=LD_LIBRARY_PATH
6193   else
6194     # With GCC up to 2.95.x, collect2 would create an import file
6195     # for dependence libraries.  The import file would start with
6196     # the line `#! .'.  This would cause the generated library to
6197     # depend on `.', always an invalid library.  This was fixed in
6198     # development snapshots of GCC prior to 3.0.
6199     case $host_os in
6200       aix4 | aix4.[01] | aix4.[01].*)
6201         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6202              echo ' yes '
6203              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6204           :
6205         else
6206           can_build_shared=no
6207         fi
6208         ;;
6209     esac
6210     # AIX (on Power*) has no versioning support, so currently we can
6211     # not hardcode correct soname into executable. Probably we can
6212     # add versioning support to collect2, so additional links can
6213     # be useful in future.
6214     if test "$aix_use_runtimelinking" = yes; then
6215       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6216       # instead of lib<name>.a to let people know that these are not
6217       # typical AIX shared libraries.
6218       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6219     else
6220       # We preserve .a as extension for shared libraries through AIX4.2
6221       # and later when we are not doing run time linking.
6222       library_names_spec='${libname}${release}.a $libname.a'
6223       soname_spec='${libname}${release}.so$major'
6224     fi
6225     shlibpath_var=LIBPATH
6226   fi
6227   hardcode_into_libs=yes
6228   ;;
6229
6230 amigaos*)
6231   library_names_spec='$libname.ixlibrary $libname.a'
6232   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6233   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'
6234   ;;
6235
6236 beos*)
6237   library_names_spec='${libname}.so'
6238   dynamic_linker="$host_os ld.so"
6239   shlibpath_var=LIBRARY_PATH
6240   ;;
6241
6242 bsdi4*)
6243   version_type=linux
6244   need_version=no
6245   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6246   soname_spec='${libname}${release}.so$major'
6247   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6248   shlibpath_var=LD_LIBRARY_PATH
6249   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6250   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6251   export_dynamic_flag_spec=-rdynamic
6252   # the default ld.so.conf also contains /usr/contrib/lib and
6253   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6254   # libtool to hard-code these into programs
6255   ;;
6256
6257 cygwin* | mingw* | pw32*)
6258   version_type=windows
6259   need_version=no
6260   need_lib_prefix=no
6261   case $GCC,$host_os in
6262   yes,cygwin*)
6263     library_names_spec='$libname.dll.a'
6264     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6265     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6266       dldir=$destdir/`dirname \$dlpath`~
6267       test -d \$dldir || mkdir -p \$dldir~
6268       $install_prog .libs/$dlname \$dldir/$dlname'
6269     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6270       dlpath=$dir/\$dldll~
6271        $rm \$dlpath'
6272     ;;
6273   yes,mingw*)
6274     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6275     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6276     ;;
6277   yes,pw32*)
6278     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6279     ;;
6280   *)
6281     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6282     ;;
6283   esac
6284   dynamic_linker='Win32 ld.exe'
6285   # FIXME: first we should search . and the directory the executable is in
6286   shlibpath_var=PATH
6287   ;;
6288
6289 darwin* | rhapsody*)
6290   dynamic_linker="$host_os dyld"
6291   version_type=darwin
6292   need_lib_prefix=no
6293   need_version=no
6294   # FIXME: Relying on posixy $() will cause problems for
6295   #        cross-compilation, but unfortunately the echo tests do not
6296   #        yet detect zsh echo's removal of \ escapes.
6297   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)'
6298   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6299   shlibpath_overrides_runpath=yes
6300   shlibpath_var=DYLD_LIBRARY_PATH
6301   ;;
6302
6303 freebsd1*)
6304   dynamic_linker=no
6305   ;;
6306
6307 freebsd*)
6308   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6309   version_type=freebsd-$objformat
6310   case $version_type in
6311     freebsd-elf*)
6312       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6313       need_version=no
6314       need_lib_prefix=no
6315       ;;
6316     freebsd-*)
6317       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6318       need_version=yes
6319       ;;
6320   esac
6321   shlibpath_var=LD_LIBRARY_PATH
6322   case $host_os in
6323   freebsd2*)
6324     shlibpath_overrides_runpath=yes
6325     ;;
6326   *)
6327     shlibpath_overrides_runpath=no
6328     hardcode_into_libs=yes
6329     ;;
6330   esac
6331   ;;
6332
6333 gnu*)
6334   version_type=linux
6335   need_lib_prefix=no
6336   need_version=no
6337   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6338   soname_spec='${libname}${release}.so$major'
6339   shlibpath_var=LD_LIBRARY_PATH
6340   hardcode_into_libs=yes
6341   ;;
6342
6343 hpux9* | hpux10* | hpux11*)
6344   # Give a soname corresponding to the major version so that dld.sl refuses to
6345   # link against other versions.
6346   dynamic_linker="$host_os dld.sl"
6347   version_type=sunos
6348   need_lib_prefix=no
6349   need_version=no
6350   shlibpath_var=SHLIB_PATH
6351   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6352   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6353   soname_spec='${libname}${release}.sl$major'
6354   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6355   postinstall_cmds='chmod 555 $lib'
6356   ;;
6357
6358 irix5* | irix6* | nonstopux*)
6359   case $host_os in
6360     nonstopux*) version_type=nonstopux ;;
6361     *)          version_type=irix ;;
6362   esac
6363   need_lib_prefix=no
6364   need_version=no
6365   soname_spec='${libname}${release}.so$major'
6366   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6367   case $host_os in
6368   irix5* | nonstopux*)
6369     libsuff= shlibsuff=
6370     ;;
6371   *)
6372     case $LD in # libtool.m4 will add one of these switches to LD
6373     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6374     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6375     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6376     *) libsuff= shlibsuff= libmagic=never-match;;
6377     esac
6378     ;;
6379   esac
6380   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6381   shlibpath_overrides_runpath=no
6382   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6383   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6384   ;;
6385
6386 # No shared lib support for Linux oldld, aout, or coff.
6387 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6388   dynamic_linker=no
6389   ;;
6390
6391 # This must be Linux ELF.
6392 linux-gnu*)
6393   version_type=linux
6394   need_lib_prefix=no
6395   need_version=no
6396   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6397   soname_spec='${libname}${release}.so$major'
6398   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6399   shlibpath_var=LD_LIBRARY_PATH
6400   shlibpath_overrides_runpath=no
6401   # This implies no fast_install, which is unacceptable.
6402   # Some rework will be needed to allow for fast_install
6403   # before this can be enabled.
6404   hardcode_into_libs=yes
6405
6406   # We used to test for /lib/ld.so.1 and disable shared libraries on
6407   # powerpc, because MkLinux only supported shared libraries with the
6408   # GNU dynamic linker.  Since this was broken with cross compilers,
6409   # most powerpc-linux boxes support dynamic linking these days and
6410   # people can always --disable-shared, the test was removed, and we
6411   # assume the GNU/Linux dynamic linker is in use.
6412   dynamic_linker='GNU/Linux ld.so'
6413   ;;
6414
6415 netbsd*)
6416   version_type=sunos
6417   need_lib_prefix=no
6418   need_version=no
6419   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6420     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6421     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6422     dynamic_linker='NetBSD (a.out) ld.so'
6423   else
6424     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6425     soname_spec='${libname}${release}.so$major'
6426     dynamic_linker='NetBSD ld.elf_so'
6427   fi
6428   shlibpath_var=LD_LIBRARY_PATH
6429   shlibpath_overrides_runpath=yes
6430   hardcode_into_libs=yes
6431   ;;
6432
6433 newsos6)
6434   version_type=linux
6435   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6436   shlibpath_var=LD_LIBRARY_PATH
6437   shlibpath_overrides_runpath=yes
6438   ;;
6439
6440 openbsd*)
6441   version_type=sunos
6442   need_lib_prefix=no
6443   need_version=no
6444   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6445     case "$host_os" in
6446     openbsd2.[89] | openbsd2.[89].*)
6447       shlibpath_overrides_runpath=no
6448       ;;
6449     *)
6450       shlibpath_overrides_runpath=yes
6451       ;;
6452     esac
6453   else
6454     shlibpath_overrides_runpath=yes
6455   fi
6456   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6457   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6458   shlibpath_var=LD_LIBRARY_PATH
6459   ;;
6460
6461 os2*)
6462   libname_spec='$name'
6463   need_lib_prefix=no
6464   library_names_spec='$libname.dll $libname.a'
6465   dynamic_linker='OS/2 ld.exe'
6466   shlibpath_var=LIBPATH
6467   ;;
6468
6469 osf3* | osf4* | osf5*)
6470   version_type=osf
6471   need_version=no
6472   soname_spec='${libname}${release}.so$major'
6473   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6474   shlibpath_var=LD_LIBRARY_PATH
6475   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6476   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6477   hardcode_into_libs=yes
6478   ;;
6479
6480 sco3.2v5*)
6481   version_type=osf
6482   soname_spec='${libname}${release}.so$major'
6483   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6484   shlibpath_var=LD_LIBRARY_PATH
6485   ;;
6486
6487 solaris*)
6488   version_type=linux
6489   need_lib_prefix=no
6490   need_version=no
6491   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6492   soname_spec='${libname}${release}.so$major'
6493   shlibpath_var=LD_LIBRARY_PATH
6494   shlibpath_overrides_runpath=yes
6495   hardcode_into_libs=yes
6496   # ldd complains unless libraries are executable
6497   postinstall_cmds='chmod +x $lib'
6498   ;;
6499
6500 sunos4*)
6501   version_type=sunos
6502   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6503   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6504   shlibpath_var=LD_LIBRARY_PATH
6505   shlibpath_overrides_runpath=yes
6506   if test "$with_gnu_ld" = yes; then
6507     need_lib_prefix=no
6508   fi
6509   need_version=yes
6510   ;;
6511
6512 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6513   version_type=linux
6514   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6515   soname_spec='${libname}${release}.so$major'
6516   shlibpath_var=LD_LIBRARY_PATH
6517   case $host_vendor in
6518     sni)
6519       shlibpath_overrides_runpath=no
6520       need_lib_prefix=no
6521       export_dynamic_flag_spec='${wl}-Blargedynsym'
6522       runpath_var=LD_RUN_PATH
6523       ;;
6524     siemens)
6525       need_lib_prefix=no
6526       ;;
6527     motorola)
6528       need_lib_prefix=no
6529       need_version=no
6530       shlibpath_overrides_runpath=no
6531       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6532       ;;
6533   esac
6534   ;;
6535
6536 uts4*)
6537   version_type=linux
6538   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6539   soname_spec='${libname}${release}.so$major'
6540   shlibpath_var=LD_LIBRARY_PATH
6541   ;;
6542
6543 dgux*)
6544   version_type=linux
6545   need_lib_prefix=no
6546   need_version=no
6547   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6548   soname_spec='${libname}${release}.so$major'
6549   shlibpath_var=LD_LIBRARY_PATH
6550   ;;
6551
6552 sysv4*MP*)
6553   if test -d /usr/nec ;then
6554     version_type=linux
6555     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6556     soname_spec='$libname.so.$major'
6557     shlibpath_var=LD_LIBRARY_PATH
6558   fi
6559   ;;
6560
6561 *)
6562   dynamic_linker=no
6563   ;;
6564 esac
6565 echo "$ac_t""$dynamic_linker" 1>&6
6566 test "$dynamic_linker" = no && can_build_shared=no
6567 ##
6568 ## END FIXME
6569
6570 ## FIXME: this should be a separate macro
6571 ##
6572 # Report the final consequences.
6573 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6574 echo "configure:6575: checking if libtool supports shared libraries" >&5
6575 echo "$ac_t""$can_build_shared" 1>&6
6576 ##
6577 ## END FIXME
6578
6579 ## FIXME: this should be a separate macro
6580 ##
6581 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6582 echo "configure:6583: checking whether to build shared libraries" >&5
6583 test "$can_build_shared" = "no" && enable_shared=no
6584
6585 # On AIX, shared libraries and static libraries use the same namespace, and
6586 # are all built from PIC.
6587 case "$host_os" in
6588 aix3*)
6589   test "$enable_shared" = yes && enable_static=no
6590   if test -n "$RANLIB"; then
6591     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6592     postinstall_cmds='$RANLIB $lib'
6593   fi
6594   ;;
6595
6596 aix4*)
6597   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6598     test "$enable_shared" = yes && enable_static=no
6599   fi
6600   ;;
6601 esac
6602 echo "$ac_t""$enable_shared" 1>&6
6603 ##
6604 ## END FIXME
6605
6606 ## FIXME: this should be a separate macro
6607 ##
6608 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6609 echo "configure:6610: checking whether to build static libraries" >&5
6610 # Make sure either enable_shared or enable_static is yes.
6611 test "$enable_shared" = yes || enable_static=yes
6612 echo "$ac_t""$enable_static" 1>&6
6613 ##
6614 ## END FIXME
6615
6616 if test "$hardcode_action" = relink; then
6617   # Fast installation is not supported
6618   enable_fast_install=no
6619 elif test "$shlibpath_overrides_runpath" = yes ||
6620      test "$enable_shared" = no; then
6621   # Fast installation is not necessary
6622   enable_fast_install=needless
6623 fi
6624
6625 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6626 if test "$GCC" = yes; then
6627   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6628 fi
6629
6630 if test "x$enable_dlopen" != xyes; then
6631   enable_dlopen=unknown
6632   enable_dlopen_self=unknown
6633   enable_dlopen_self_static=unknown
6634 else
6635   lt_cv_dlopen=no
6636   lt_cv_dlopen_libs=
6637
6638   case $host_os in
6639   beos*)
6640     lt_cv_dlopen="load_add_on"
6641     lt_cv_dlopen_libs=
6642     lt_cv_dlopen_self=yes
6643     ;;
6644
6645   cygwin* | mingw* | pw32*)
6646     lt_cv_dlopen="LoadLibrary"
6647     lt_cv_dlopen_libs=
6648    ;;
6649
6650   *)
6651     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6652 echo "configure:6653: checking for shl_load" >&5
6653 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6654   echo $ac_n "(cached) $ac_c" 1>&6
6655 else
6656   cat > conftest.$ac_ext <<EOF
6657 #line 6658 "configure"
6658 #include "confdefs.h"
6659 /* System header to define __stub macros and hopefully few prototypes,
6660     which can conflict with char shl_load(); below.  */
6661 #include <assert.h>
6662 /* Override any gcc2 internal prototype to avoid an error.  */
6663 /* We use char because int might match the return type of a gcc2
6664     builtin and then its argument prototype would still apply.  */
6665 char shl_load();
6666 char (*f)();
6667
6668 int main() {
6669
6670 /* The GNU C library defines this for functions which it implements
6671     to always fail with ENOSYS.  Some functions are actually named
6672     something starting with __ and the normal name is an alias.  */
6673 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6674 choke me
6675 #else
6676 f = shl_load;
6677 #endif
6678
6679 ; return 0; }
6680 EOF
6681 if { (eval echo configure:6682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6682   rm -rf conftest*
6683   eval "ac_cv_func_shl_load=yes"
6684 else
6685   echo "configure: failed program was:" >&5
6686   cat conftest.$ac_ext >&5
6687   rm -rf conftest*
6688   eval "ac_cv_func_shl_load=no"
6689 fi
6690 rm -f conftest*
6691 fi
6692
6693 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6694   echo "$ac_t""yes" 1>&6
6695   lt_cv_dlopen="shl_load"
6696 else
6697   echo "$ac_t""no" 1>&6
6698 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6699 echo "configure:6700: checking for shl_load in -ldld" >&5
6700 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6701 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   ac_save_LIBS="$LIBS"
6705 LIBS="-ldld  $LIBS"
6706 cat > conftest.$ac_ext <<EOF
6707 #line 6708 "configure"
6708 #include "confdefs.h"
6709 /* Override any gcc2 internal prototype to avoid an error.  */
6710 /* We use char because int might match the return type of a gcc2
6711     builtin and then its argument prototype would still apply.  */
6712 char shl_load();
6713
6714 int main() {
6715 shl_load()
6716 ; return 0; }
6717 EOF
6718 if { (eval echo configure:6719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6719   rm -rf conftest*
6720   eval "ac_cv_lib_$ac_lib_var=yes"
6721 else
6722   echo "configure: failed program was:" >&5
6723   cat conftest.$ac_ext >&5
6724   rm -rf conftest*
6725   eval "ac_cv_lib_$ac_lib_var=no"
6726 fi
6727 rm -f conftest*
6728 LIBS="$ac_save_LIBS"
6729
6730 fi
6731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6732   echo "$ac_t""yes" 1>&6
6733   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6734 else
6735   echo "$ac_t""no" 1>&6
6736 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6737 echo "configure:6738: checking for dlopen" >&5
6738 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6739   echo $ac_n "(cached) $ac_c" 1>&6
6740 else
6741   cat > conftest.$ac_ext <<EOF
6742 #line 6743 "configure"
6743 #include "confdefs.h"
6744 /* System header to define __stub macros and hopefully few prototypes,
6745     which can conflict with char dlopen(); below.  */
6746 #include <assert.h>
6747 /* Override any gcc2 internal prototype to avoid an error.  */
6748 /* We use char because int might match the return type of a gcc2
6749     builtin and then its argument prototype would still apply.  */
6750 char dlopen();
6751 char (*f)();
6752
6753 int main() {
6754
6755 /* The GNU C library defines this for functions which it implements
6756     to always fail with ENOSYS.  Some functions are actually named
6757     something starting with __ and the normal name is an alias.  */
6758 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6759 choke me
6760 #else
6761 f = dlopen;
6762 #endif
6763
6764 ; return 0; }
6765 EOF
6766 if { (eval echo configure:6767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6767   rm -rf conftest*
6768   eval "ac_cv_func_dlopen=yes"
6769 else
6770   echo "configure: failed program was:" >&5
6771   cat conftest.$ac_ext >&5
6772   rm -rf conftest*
6773   eval "ac_cv_func_dlopen=no"
6774 fi
6775 rm -f conftest*
6776 fi
6777
6778 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6779   echo "$ac_t""yes" 1>&6
6780   lt_cv_dlopen="dlopen"
6781 else
6782   echo "$ac_t""no" 1>&6
6783 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6784 echo "configure:6785: checking for dlopen in -ldl" >&5
6785 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6786 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6787   echo $ac_n "(cached) $ac_c" 1>&6
6788 else
6789   ac_save_LIBS="$LIBS"
6790 LIBS="-ldl  $LIBS"
6791 cat > conftest.$ac_ext <<EOF
6792 #line 6793 "configure"
6793 #include "confdefs.h"
6794 /* Override any gcc2 internal prototype to avoid an error.  */
6795 /* We use char because int might match the return type of a gcc2
6796     builtin and then its argument prototype would still apply.  */
6797 char dlopen();
6798
6799 int main() {
6800 dlopen()
6801 ; return 0; }
6802 EOF
6803 if { (eval echo configure:6804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6804   rm -rf conftest*
6805   eval "ac_cv_lib_$ac_lib_var=yes"
6806 else
6807   echo "configure: failed program was:" >&5
6808   cat conftest.$ac_ext >&5
6809   rm -rf conftest*
6810   eval "ac_cv_lib_$ac_lib_var=no"
6811 fi
6812 rm -f conftest*
6813 LIBS="$ac_save_LIBS"
6814
6815 fi
6816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6817   echo "$ac_t""yes" 1>&6
6818   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6819 else
6820   echo "$ac_t""no" 1>&6
6821 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6822 echo "configure:6823: checking for dlopen in -lsvld" >&5
6823 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6824 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6825   echo $ac_n "(cached) $ac_c" 1>&6
6826 else
6827   ac_save_LIBS="$LIBS"
6828 LIBS="-lsvld  $LIBS"
6829 cat > conftest.$ac_ext <<EOF
6830 #line 6831 "configure"
6831 #include "confdefs.h"
6832 /* Override any gcc2 internal prototype to avoid an error.  */
6833 /* We use char because int might match the return type of a gcc2
6834     builtin and then its argument prototype would still apply.  */
6835 char dlopen();
6836
6837 int main() {
6838 dlopen()
6839 ; return 0; }
6840 EOF
6841 if { (eval echo configure:6842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6842   rm -rf conftest*
6843   eval "ac_cv_lib_$ac_lib_var=yes"
6844 else
6845   echo "configure: failed program was:" >&5
6846   cat conftest.$ac_ext >&5
6847   rm -rf conftest*
6848   eval "ac_cv_lib_$ac_lib_var=no"
6849 fi
6850 rm -f conftest*
6851 LIBS="$ac_save_LIBS"
6852
6853 fi
6854 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6855   echo "$ac_t""yes" 1>&6
6856   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6857 else
6858   echo "$ac_t""no" 1>&6
6859 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6860 echo "configure:6861: checking for dld_link in -ldld" >&5
6861 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6862 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6863   echo $ac_n "(cached) $ac_c" 1>&6
6864 else
6865   ac_save_LIBS="$LIBS"
6866 LIBS="-ldld  $LIBS"
6867 cat > conftest.$ac_ext <<EOF
6868 #line 6869 "configure"
6869 #include "confdefs.h"
6870 /* Override any gcc2 internal prototype to avoid an error.  */
6871 /* We use char because int might match the return type of a gcc2
6872     builtin and then its argument prototype would still apply.  */
6873 char dld_link();
6874
6875 int main() {
6876 dld_link()
6877 ; return 0; }
6878 EOF
6879 if { (eval echo configure:6880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6880   rm -rf conftest*
6881   eval "ac_cv_lib_$ac_lib_var=yes"
6882 else
6883   echo "configure: failed program was:" >&5
6884   cat conftest.$ac_ext >&5
6885   rm -rf conftest*
6886   eval "ac_cv_lib_$ac_lib_var=no"
6887 fi
6888 rm -f conftest*
6889 LIBS="$ac_save_LIBS"
6890
6891 fi
6892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6893   echo "$ac_t""yes" 1>&6
6894   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6895 else
6896   echo "$ac_t""no" 1>&6
6897 fi
6898
6899               
6900 fi
6901
6902             
6903 fi
6904
6905           
6906 fi
6907
6908         
6909 fi
6910
6911       
6912 fi
6913
6914     ;;
6915   esac
6916
6917   if test "x$lt_cv_dlopen" != xno; then
6918     enable_dlopen=yes
6919   else
6920     enable_dlopen=no
6921   fi
6922
6923   case $lt_cv_dlopen in
6924   dlopen)
6925     save_CPPFLAGS="$CPPFLAGS"
6926         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6927
6928     save_LDFLAGS="$LDFLAGS"
6929     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6930
6931     save_LIBS="$LIBS"
6932     LIBS="$lt_cv_dlopen_libs $LIBS"
6933
6934     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6935 echo "configure:6936: checking whether a program can dlopen itself" >&5
6936 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6937   echo $ac_n "(cached) $ac_c" 1>&6
6938 else
6939           if test "$cross_compiling" = yes; then :
6940   lt_cv_dlopen_self=cross
6941 else
6942     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6943   lt_status=$lt_dlunknown
6944   cat > conftest.$ac_ext <<EOF
6945 #line 6946 "configure"
6946 #include "confdefs.h"
6947
6948 #if HAVE_DLFCN_H
6949 #include <dlfcn.h>
6950 #endif
6951
6952 #include <stdio.h>
6953
6954 #ifdef RTLD_GLOBAL
6955 #  define LT_DLGLOBAL           RTLD_GLOBAL
6956 #else
6957 #  ifdef DL_GLOBAL
6958 #    define LT_DLGLOBAL         DL_GLOBAL
6959 #  else
6960 #    define LT_DLGLOBAL         0
6961 #  endif
6962 #endif
6963
6964 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6965    find out it does not work in some platform. */
6966 #ifndef LT_DLLAZY_OR_NOW
6967 #  ifdef RTLD_LAZY
6968 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6969 #  else
6970 #    ifdef DL_LAZY
6971 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6972 #    else
6973 #      ifdef RTLD_NOW
6974 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6975 #      else
6976 #        ifdef DL_NOW
6977 #          define LT_DLLAZY_OR_NOW      DL_NOW
6978 #        else
6979 #          define LT_DLLAZY_OR_NOW      0
6980 #        endif
6981 #      endif
6982 #    endif
6983 #  endif
6984 #endif
6985
6986 #ifdef __cplusplus
6987 extern "C" void exit (int);
6988 #endif
6989
6990 void fnord() { int i=42;}
6991 int main ()
6992 {
6993   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6994   int status = $lt_dlunknown;
6995
6996   if (self)
6997     {
6998       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6999       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7000       /* dlclose (self); */
7001     }
7002
7003     exit (status);
7004 }
7005 EOF
7006   if { (eval echo configure:7007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7007     (./conftest; exit; ) 2>/dev/null
7008     lt_status=$?
7009     case x$lt_status in
7010       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7011       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7012       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7013     esac
7014   else :
7015     # compilation failed
7016     lt_cv_dlopen_self=no
7017   fi
7018 fi
7019 rm -fr conftest*
7020
7021     
7022 fi
7023
7024 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7025
7026     if test "x$lt_cv_dlopen_self" = xyes; then
7027       LDFLAGS="$LDFLAGS $link_static_flag"
7028       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7029 echo "configure:7030: checking whether a statically linked program can dlopen itself" >&5
7030 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7031   echo $ac_n "(cached) $ac_c" 1>&6
7032 else
7033           if test "$cross_compiling" = yes; then :
7034   lt_cv_dlopen_self_static=cross
7035 else
7036     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7037   lt_status=$lt_dlunknown
7038   cat > conftest.$ac_ext <<EOF
7039 #line 7040 "configure"
7040 #include "confdefs.h"
7041
7042 #if HAVE_DLFCN_H
7043 #include <dlfcn.h>
7044 #endif
7045
7046 #include <stdio.h>
7047
7048 #ifdef RTLD_GLOBAL
7049 #  define LT_DLGLOBAL           RTLD_GLOBAL
7050 #else
7051 #  ifdef DL_GLOBAL
7052 #    define LT_DLGLOBAL         DL_GLOBAL
7053 #  else
7054 #    define LT_DLGLOBAL         0
7055 #  endif
7056 #endif
7057
7058 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7059    find out it does not work in some platform. */
7060 #ifndef LT_DLLAZY_OR_NOW
7061 #  ifdef RTLD_LAZY
7062 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7063 #  else
7064 #    ifdef DL_LAZY
7065 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7066 #    else
7067 #      ifdef RTLD_NOW
7068 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7069 #      else
7070 #        ifdef DL_NOW
7071 #          define LT_DLLAZY_OR_NOW      DL_NOW
7072 #        else
7073 #          define LT_DLLAZY_OR_NOW      0
7074 #        endif
7075 #      endif
7076 #    endif
7077 #  endif
7078 #endif
7079
7080 #ifdef __cplusplus
7081 extern "C" void exit (int);
7082 #endif
7083
7084 void fnord() { int i=42;}
7085 int main ()
7086 {
7087   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7088   int status = $lt_dlunknown;
7089
7090   if (self)
7091     {
7092       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7093       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7094       /* dlclose (self); */
7095     }
7096
7097     exit (status);
7098 }
7099 EOF
7100   if { (eval echo configure:7101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7101     (./conftest; exit; ) 2>/dev/null
7102     lt_status=$?
7103     case x$lt_status in
7104       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7105       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7106       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7107     esac
7108   else :
7109     # compilation failed
7110     lt_cv_dlopen_self_static=no
7111   fi
7112 fi
7113 rm -fr conftest*
7114
7115       
7116 fi
7117
7118 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7119     fi
7120
7121     CPPFLAGS="$save_CPPFLAGS"
7122     LDFLAGS="$save_LDFLAGS"
7123     LIBS="$save_LIBS"
7124     ;;
7125   esac
7126
7127   case $lt_cv_dlopen_self in
7128   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7129   *) enable_dlopen_self=unknown ;;
7130   esac
7131
7132   case $lt_cv_dlopen_self_static in
7133   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7134   *) enable_dlopen_self_static=unknown ;;
7135   esac
7136 fi
7137
7138
7139 ## FIXME: this should be a separate macro
7140 ##
7141 if test "$enable_shared" = yes && test "$GCC" = yes; then
7142   case $archive_cmds in
7143   *'~'*)
7144     # FIXME: we may have to deal with multi-command sequences.
7145     ;;
7146   '$CC '*)
7147     # Test whether the compiler implicitly links with -lc since on some
7148     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7149     # to ld, don't add -lc before -lgcc.
7150     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7151 echo "configure:7152: checking whether -lc should be explicitly linked in" >&5
7152     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7153   echo $ac_n "(cached) $ac_c" 1>&6
7154 else
7155   $rm conftest*
7156     echo 'static int dummy;' > conftest.$ac_ext
7157
7158     if { (eval echo configure:7159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7159       soname=conftest
7160       lib=conftest
7161       libobjs=conftest.$ac_objext
7162       deplibs=
7163       wl=$lt_cv_prog_cc_wl
7164       compiler_flags=-v
7165       linker_flags=-v
7166       verstring=
7167       output_objdir=.
7168       libname=conftest
7169       save_allow_undefined_flag=$allow_undefined_flag
7170       allow_undefined_flag=
7171       if { (eval echo configure:7172: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
7172       then
7173         lt_cv_archive_cmds_need_lc=no
7174       else
7175         lt_cv_archive_cmds_need_lc=yes
7176       fi
7177       allow_undefined_flag=$save_allow_undefined_flag
7178     else
7179       cat conftest.err 1>&5
7180     fi
7181 fi
7182
7183     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7184     ;;
7185   esac
7186 fi
7187 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7188 ##
7189 ## END FIXME
7190
7191 ## FIXME: this should be a separate macro
7192 ##
7193 # The second clause should only fire when bootstrapping the
7194 # libtool distribution, otherwise you forgot to ship ltmain.sh
7195 # with your package, and you will get complaints that there are
7196 # no rules to generate ltmain.sh.
7197 if test -f "$ltmain"; then
7198   :
7199 else
7200   # If there is no Makefile yet, we rely on a make rule to execute
7201   # `config.status --recheck' to rerun these tests and create the
7202   # libtool script then.
7203   test -f Makefile && make "$ltmain"
7204 fi
7205
7206 if test -f "$ltmain"; then
7207   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7208   $rm -f "${ofile}T"
7209
7210   echo creating $ofile
7211
7212   # Now quote all the things that may contain metacharacters while being
7213   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7214   # variables and quote the copies for generation of the libtool script.
7215   for var in echo old_CC old_CFLAGS SED \
7216     AR AR_FLAGS CC LD LN_S NM SHELL \
7217     reload_flag reload_cmds wl \
7218     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7219     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7220     library_names_spec soname_spec \
7221     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7222     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7223     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7224     old_striplib striplib file_magic_cmd export_symbols_cmds \
7225     deplibs_check_method allow_undefined_flag no_undefined_flag \
7226     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7227     global_symbol_to_c_name_address \
7228     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7229     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7230     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7231
7232     case $var in
7233     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7234     old_postinstall_cmds | old_postuninstall_cmds | \
7235     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7236     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7237     postinstall_cmds | postuninstall_cmds | \
7238     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7239       # Double-quote double-evaled strings.
7240       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7241       ;;
7242     *)
7243       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7244       ;;
7245     esac
7246   done
7247
7248   cat <<__EOF__ > "${ofile}T"
7249 #! $SHELL
7250
7251 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7252 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7253 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7254 #
7255 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7256 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7257 #
7258 # This program is free software; you can redistribute it and/or modify
7259 # it under the terms of the GNU General Public License as published by
7260 # the Free Software Foundation; either version 2 of the License, or
7261 # (at your option) any later version.
7262 #
7263 # This program is distributed in the hope that it will be useful, but
7264 # WITHOUT ANY WARRANTY; without even the implied warranty of
7265 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7266 # General Public License for more details.
7267 #
7268 # You should have received a copy of the GNU General Public License
7269 # along with this program; if not, write to the Free Software
7270 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7271 #
7272 # As a special exception to the GNU General Public License, if you
7273 # distribute this file as part of a program that contains a
7274 # configuration script generated by Autoconf, you may include it under
7275 # the same distribution terms that you use for the rest of that program.
7276
7277 # A sed that does not truncate output.
7278 SED=$lt_SED
7279
7280 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7281 Xsed="${SED} -e s/^X//"
7282
7283 # The HP-UX ksh and POSIX shell print the target directory to stdout
7284 # if CDPATH is set.
7285 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7286
7287 # ### BEGIN LIBTOOL CONFIG
7288
7289 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7290
7291 # Shell to use when invoking shell scripts.
7292 SHELL=$lt_SHELL
7293
7294 # Whether or not to build shared libraries.
7295 build_libtool_libs=$enable_shared
7296
7297 # Whether or not to build static libraries.
7298 build_old_libs=$enable_static
7299
7300 # Whether or not to add -lc for building shared libraries.
7301 build_libtool_need_lc=$need_lc
7302
7303 # Whether or not to optimize for fast installation.
7304 fast_install=$enable_fast_install
7305
7306 # The host system.
7307 host_alias=$host_alias
7308 host=$host
7309
7310 # An echo program that does not interpret backslashes.
7311 echo=$lt_echo
7312
7313 # The archiver.
7314 AR=$lt_AR
7315 AR_FLAGS=$lt_AR_FLAGS
7316
7317 # The default C compiler.
7318 CC=$lt_CC
7319
7320 # Is the compiler the GNU C compiler?
7321 with_gcc=$GCC
7322
7323 # The linker used to build libraries.
7324 LD=$lt_LD
7325
7326 # Whether we need hard or soft links.
7327 LN_S=$lt_LN_S
7328
7329 # A BSD-compatible nm program.
7330 NM=$lt_NM
7331
7332 # A symbol stripping program
7333 STRIP=$STRIP
7334
7335 # Used to examine libraries when file_magic_cmd begins "file"
7336 MAGIC_CMD=$MAGIC_CMD
7337
7338 # Used on cygwin: DLL creation program.
7339 DLLTOOL="$DLLTOOL"
7340
7341 # Used on cygwin: object dumper.
7342 OBJDUMP="$OBJDUMP"
7343
7344 # Used on cygwin: assembler.
7345 AS="$AS"
7346
7347 # The name of the directory that contains temporary libtool files.
7348 objdir=$objdir
7349
7350 # How to create reloadable object files.
7351 reload_flag=$lt_reload_flag
7352 reload_cmds=$lt_reload_cmds
7353
7354 # How to pass a linker flag through the compiler.
7355 wl=$lt_wl
7356
7357 # Object file suffix (normally "o").
7358 objext="$ac_objext"
7359
7360 # Old archive suffix (normally "a").
7361 libext="$libext"
7362
7363 # Executable file suffix (normally "").
7364 exeext="$exeext"
7365
7366 # Additional compiler flags for building library objects.
7367 pic_flag=$lt_pic_flag
7368 pic_mode=$pic_mode
7369
7370 # Does compiler simultaneously support -c and -o options?
7371 compiler_c_o=$lt_compiler_c_o
7372
7373 # Can we write directly to a .lo ?
7374 compiler_o_lo=$lt_compiler_o_lo
7375
7376 # Must we lock files when doing compilation ?
7377 need_locks=$lt_need_locks
7378
7379 # Do we need the lib prefix for modules?
7380 need_lib_prefix=$need_lib_prefix
7381
7382 # Do we need a version for libraries?
7383 need_version=$need_version
7384
7385 # Whether dlopen is supported.
7386 dlopen_support=$enable_dlopen
7387
7388 # Whether dlopen of programs is supported.
7389 dlopen_self=$enable_dlopen_self
7390
7391 # Whether dlopen of statically linked programs is supported.
7392 dlopen_self_static=$enable_dlopen_self_static
7393
7394 # Compiler flag to prevent dynamic linking.
7395 link_static_flag=$lt_link_static_flag
7396
7397 # Compiler flag to turn off builtin functions.
7398 no_builtin_flag=$lt_no_builtin_flag
7399
7400 # Compiler flag to allow reflexive dlopens.
7401 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7402
7403 # Compiler flag to generate shared objects directly from archives.
7404 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7405
7406 # Compiler flag to generate thread-safe objects.
7407 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7408
7409 # Library versioning type.
7410 version_type=$version_type
7411
7412 # Format of library name prefix.
7413 libname_spec=$lt_libname_spec
7414
7415 # List of archive names.  First name is the real one, the rest are links.
7416 # The last name is the one that the linker finds with -lNAME.
7417 library_names_spec=$lt_library_names_spec
7418
7419 # The coded name of the library, if different from the real name.
7420 soname_spec=$lt_soname_spec
7421
7422 # Commands used to build and install an old-style archive.
7423 RANLIB=$lt_RANLIB
7424 old_archive_cmds=$lt_old_archive_cmds
7425 old_postinstall_cmds=$lt_old_postinstall_cmds
7426 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7427
7428 # Create an old-style archive from a shared archive.
7429 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7430
7431 # Create a temporary old-style archive to link instead of a shared archive.
7432 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7433
7434 # Commands used to build and install a shared archive.
7435 archive_cmds=$lt_archive_cmds
7436 archive_expsym_cmds=$lt_archive_expsym_cmds
7437 postinstall_cmds=$lt_postinstall_cmds
7438 postuninstall_cmds=$lt_postuninstall_cmds
7439
7440 # Commands to strip libraries.
7441 old_striplib=$lt_old_striplib
7442 striplib=$lt_striplib
7443
7444 # Method to check whether dependent libraries are shared objects.
7445 deplibs_check_method=$lt_deplibs_check_method
7446
7447 # Command to use when deplibs_check_method == file_magic.
7448 file_magic_cmd=$lt_file_magic_cmd
7449
7450 # Flag that allows shared libraries with undefined symbols to be built.
7451 allow_undefined_flag=$lt_allow_undefined_flag
7452
7453 # Flag that forces no undefined symbols.
7454 no_undefined_flag=$lt_no_undefined_flag
7455
7456 # Commands used to finish a libtool library installation in a directory.
7457 finish_cmds=$lt_finish_cmds
7458
7459 # Same as above, but a single script fragment to be evaled but not shown.
7460 finish_eval=$lt_finish_eval
7461
7462 # Take the output of nm and produce a listing of raw symbols and C names.
7463 global_symbol_pipe=$lt_global_symbol_pipe
7464
7465 # Transform the output of nm in a proper C declaration
7466 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7467
7468 # Transform the output of nm in a C name address pair
7469 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7470
7471 # This is the shared library runtime path variable.
7472 runpath_var=$runpath_var
7473
7474 # This is the shared library path variable.
7475 shlibpath_var=$shlibpath_var
7476
7477 # Is shlibpath searched before the hard-coded library search path?
7478 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7479
7480 # How to hardcode a shared library path into an executable.
7481 hardcode_action=$hardcode_action
7482
7483 # Whether we should hardcode library paths into libraries.
7484 hardcode_into_libs=$hardcode_into_libs
7485
7486 # Flag to hardcode \$libdir into a binary during linking.
7487 # This must work even if \$libdir does not exist.
7488 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7489
7490 # Whether we need a single -rpath flag with a separated argument.
7491 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7492
7493 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7494 # resulting binary.
7495 hardcode_direct=$hardcode_direct
7496
7497 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7498 # resulting binary.
7499 hardcode_minus_L=$hardcode_minus_L
7500
7501 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7502 # the resulting binary.
7503 hardcode_shlibpath_var=$hardcode_shlibpath_var
7504
7505 # Variables whose values should be saved in libtool wrapper scripts and
7506 # restored at relink time.
7507 variables_saved_for_relink="$variables_saved_for_relink"
7508
7509 # Whether libtool must link a program against all its dependency libraries.
7510 link_all_deplibs=$link_all_deplibs
7511
7512 # Compile-time system search path for libraries
7513 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7514
7515 # Run-time system search path for libraries
7516 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7517
7518 # Fix the shell variable \$srcfile for the compiler.
7519 fix_srcfile_path="$fix_srcfile_path"
7520
7521 # Set to yes if exported symbols are required.
7522 always_export_symbols=$always_export_symbols
7523
7524 # The commands to list exported symbols.
7525 export_symbols_cmds=$lt_export_symbols_cmds
7526
7527 # The commands to extract the exported symbol list from a shared archive.
7528 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7529
7530 # Symbols that should not be listed in the preloaded symbols.
7531 exclude_expsyms=$lt_exclude_expsyms
7532
7533 # Symbols that must always be exported.
7534 include_expsyms=$lt_include_expsyms
7535
7536 # ### END LIBTOOL CONFIG
7537
7538 __EOF__
7539
7540   case $host_os in
7541   aix3*)
7542     cat <<\EOF >> "${ofile}T"
7543
7544 # AIX sometimes has problems with the GCC collect2 program.  For some
7545 # reason, if we set the COLLECT_NAMES environment variable, the problems
7546 # vanish in a puff of smoke.
7547 if test "X${COLLECT_NAMES+set}" != Xset; then
7548   COLLECT_NAMES=
7549   export COLLECT_NAMES
7550 fi
7551 EOF
7552     ;;
7553   esac
7554
7555   case $host_os in
7556   cygwin* | mingw* | pw32* | os2*)
7557     cat <<'EOF' >> "${ofile}T"
7558       # This is a source program that is used to create dlls on Windows
7559       # Don't remove nor modify the starting and closing comments
7560 # /* ltdll.c starts here */
7561 # #define WIN32_LEAN_AND_MEAN
7562 # #include <windows.h>
7563 # #undef WIN32_LEAN_AND_MEAN
7564 # #include <stdio.h>
7565 #
7566 # #ifndef __CYGWIN__
7567 # #  ifdef __CYGWIN32__
7568 # #    define __CYGWIN__ __CYGWIN32__
7569 # #  endif
7570 # #endif
7571 #
7572 # #ifdef __cplusplus
7573 # extern "C" {
7574 # #endif
7575 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7576 # #ifdef __cplusplus
7577 # }
7578 # #endif
7579 #
7580 # #ifdef __CYGWIN__
7581 # #include <cygwin/cygwin_dll.h>
7582 # DECLARE_CYGWIN_DLL( DllMain );
7583 # #endif
7584 # HINSTANCE __hDllInstance_base;
7585 #
7586 # BOOL APIENTRY
7587 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7588 # {
7589 #   __hDllInstance_base = hInst;
7590 #   return TRUE;
7591 # }
7592 # /* ltdll.c ends here */
7593         # This is a source program that is used to create import libraries
7594         # on Windows for dlls which lack them. Don't remove nor modify the
7595         # starting and closing comments
7596 # /* impgen.c starts here */
7597 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7598 #
7599 #  This file is part of GNU libtool.
7600 #
7601 #  This program is free software; you can redistribute it and/or modify
7602 #  it under the terms of the GNU General Public License as published by
7603 #  the Free Software Foundation; either version 2 of the License, or
7604 #  (at your option) any later version.
7605 #
7606 #  This program is distributed in the hope that it will be useful,
7607 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7608 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7609 #  GNU General Public License for more details.
7610 #
7611 #  You should have received a copy of the GNU General Public License
7612 #  along with this program; if not, write to the Free Software
7613 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7614 #  */
7615 #
7616 # #include <stdio.h>            /* for printf() */
7617 # #include <unistd.h>           /* for open(), lseek(), read() */
7618 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7619 # #include <string.h>           /* for strdup() */
7620 #
7621 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7622 # #ifndef O_BINARY
7623 # #define O_BINARY 0
7624 # #endif
7625 #
7626 # static unsigned int
7627 # pe_get16 (fd, offset)
7628 #      int fd;
7629 #      int offset;
7630 # {
7631 #   unsigned char b[2];
7632 #   lseek (fd, offset, SEEK_SET);
7633 #   read (fd, b, 2);
7634 #   return b[0] + (b[1]<<8);
7635 # }
7636 #
7637 # static unsigned int
7638 # pe_get32 (fd, offset)
7639 #     int fd;
7640 #     int offset;
7641 # {
7642 #   unsigned char b[4];
7643 #   lseek (fd, offset, SEEK_SET);
7644 #   read (fd, b, 4);
7645 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7646 # }
7647 #
7648 # static unsigned int
7649 # pe_as32 (ptr)
7650 #      void *ptr;
7651 # {
7652 #   unsigned char *b = ptr;
7653 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7654 # }
7655 #
7656 # int
7657 # main (argc, argv)
7658 #     int argc;
7659 #     char *argv[];
7660 # {
7661 #     int dll;
7662 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7663 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7664 #     unsigned long name_rvas, nexp;
7665 #     unsigned char *expdata, *erva;
7666 #     char *filename, *dll_name;
7667 #
7668 #     filename = argv[1];
7669 #
7670 #     dll = open(filename, O_RDONLY|O_BINARY);
7671 #     if (dll < 1)
7672 #       return 1;
7673 #
7674 #     dll_name = filename;
7675 #
7676 #     for (i=0; filename[i]; i++)
7677 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7678 #           dll_name = filename + i +1;
7679 #
7680 #     pe_header_offset = pe_get32 (dll, 0x3c);
7681 #     opthdr_ofs = pe_header_offset + 4 + 20;
7682 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7683 #
7684 #     if (num_entries < 1) /* no exports */
7685 #       return 1;
7686 #
7687 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7688 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7689 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7690 #     secptr = (pe_header_offset + 4 + 20 +
7691 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7692 #
7693 #     expptr = 0;
7694 #     for (i = 0; i < nsections; i++)
7695 #     {
7696 #       char sname[8];
7697 #       unsigned long secptr1 = secptr + 40 * i;
7698 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7699 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7700 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7701 #       lseek(dll, secptr1, SEEK_SET);
7702 #       read(dll, sname, 8);
7703 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7704 #       {
7705 #           expptr = fptr + (export_rva - vaddr);
7706 #           if (export_rva + export_size > vaddr + vsize)
7707 #               export_size = vsize - (export_rva - vaddr);
7708 #           break;
7709 #       }
7710 #     }
7711 #
7712 #     expdata = (unsigned char*)malloc(export_size);
7713 #     lseek (dll, expptr, SEEK_SET);
7714 #     read (dll, expdata, export_size);
7715 #     erva = expdata - export_rva;
7716 #
7717 #     nexp = pe_as32 (expdata+24);
7718 #     name_rvas = pe_as32 (expdata+32);
7719 #
7720 #     printf ("EXPORTS\n");
7721 #     for (i = 0; i<nexp; i++)
7722 #     {
7723 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7724 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7725 #     }
7726 #
7727 #     return 0;
7728 # }
7729 # /* impgen.c ends here */
7730
7731 EOF
7732     ;;
7733   esac
7734
7735   # We use sed instead of cat because bash on DJGPP gets confused if
7736   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7737   # text mode, it properly converts lines to CR/LF.  This bash problem
7738   # is reportedly fixed, but why not run on old versions too?
7739   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7740
7741   mv -f "${ofile}T" "$ofile" || \
7742     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7743   chmod +x "$ofile"
7744 fi
7745 ##
7746 ## END FIXME
7747
7748
7749
7750
7751
7752 # This can be used to rebuild libtool when needed
7753 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7754
7755 # Always use our own libtool.
7756 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7757
7758 # Prevent multiple expansion
7759
7760
7761
7762 # test for ln hardlink support
7763 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7764 echo "configure:7765: checking whether ln works" >&5
7765 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7766   echo $ac_n "(cached) $ac_c" 1>&6
7767 else
7768   rm -f conftest.src conftest.dst
7769 echo "conftest" > conftest.src
7770 if ln conftest.src conftest.dst 2>/dev/null
7771 then
7772   ol_cv_prog_LN_H="ln"
7773 else
7774   ol_cv_prog_LN_H="cp"
7775 fi
7776 rm -f conftest.src conftest.dst
7777
7778 fi
7779 LN_H="$ol_cv_prog_LN_H"
7780 if test "$ol_cv_prog_LN_H" = "ln"; then
7781         echo "$ac_t""yes" 1>&6
7782 else
7783         echo "$ac_t""no" 1>&6
7784 fi
7785
7786 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7787 echo "configure:7788: checking whether ln -s works" >&5
7788 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7789   echo $ac_n "(cached) $ac_c" 1>&6
7790 else
7791   rm -f conftestdata
7792 if ln -s X conftestdata 2>/dev/null
7793 then
7794   rm -f conftestdata
7795   ac_cv_prog_LN_S="ln -s"
7796 else
7797   ac_cv_prog_LN_S=ln
7798 fi
7799 fi
7800 LN_S="$ac_cv_prog_LN_S"
7801 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7802   echo "$ac_t""yes" 1>&6
7803 else
7804   echo "$ac_t""no" 1>&6
7805 fi
7806
7807
7808 ol_link_perl=no
7809 if test $ol_enable_perl != no ; then
7810         # Extract the first word of "perl", so it can be a program name with args.
7811 set dummy perl; ac_word=$2
7812 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7813 echo "configure:7814: checking for $ac_word" >&5
7814 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7815   echo $ac_n "(cached) $ac_c" 1>&6
7816 else
7817   case "$PERLBIN" in
7818   /*)
7819   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7820   ;;
7821   ?:/*)
7822   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7823   ;;
7824   *)
7825   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7826   ac_dummy="$PATH"
7827   for ac_dir in $ac_dummy; do 
7828     test -z "$ac_dir" && ac_dir=.
7829     if test -f $ac_dir/$ac_word; then
7830       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7831       break
7832     fi
7833   done
7834   IFS="$ac_save_ifs"
7835   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7836   ;;
7837 esac
7838 fi
7839 PERLBIN="$ac_cv_path_PERLBIN"
7840 if test -n "$PERLBIN"; then
7841   echo "$ac_t""$PERLBIN" 1>&6
7842 else
7843   echo "$ac_t""no" 1>&6
7844 fi
7845
7846
7847         if test "no$PERLBIN" = "no" ; then
7848                 if test $ol_enable_perl = yes ; then
7849                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7850                 fi
7851
7852         else
7853                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7854                 if test x"$ol_with_perl_module" = "xstatic" ; then
7855                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7856                 else
7857                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7858                 fi
7859                                 ol_link_perl=yes
7860         fi
7861 fi
7862
7863 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7864 echo "configure:7865: checking how to run the C preprocessor" >&5
7865 # On Suns, sometimes $CPP names a directory.
7866 if test -n "$CPP" && test -d "$CPP"; then
7867   CPP=
7868 fi
7869 if test -z "$CPP"; then
7870 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7871   echo $ac_n "(cached) $ac_c" 1>&6
7872 else
7873     # This must be in double quotes, not single quotes, because CPP may get
7874   # substituted into the Makefile and "${CC-cc}" will confuse make.
7875   CPP="${CC-cc} -E"
7876   # On the NeXT, cc -E runs the code through the compiler's parser,
7877   # not just through cpp.
7878   cat > conftest.$ac_ext <<EOF
7879 #line 7880 "configure"
7880 #include "confdefs.h"
7881 #include <assert.h>
7882 Syntax Error
7883 EOF
7884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7885 { (eval echo configure:7886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7887 if test -z "$ac_err"; then
7888   :
7889 else
7890   echo "$ac_err" >&5
7891   echo "configure: failed program was:" >&5
7892   cat conftest.$ac_ext >&5
7893   rm -rf conftest*
7894   CPP="${CC-cc} -E -traditional-cpp"
7895   cat > conftest.$ac_ext <<EOF
7896 #line 7897 "configure"
7897 #include "confdefs.h"
7898 #include <assert.h>
7899 Syntax Error
7900 EOF
7901 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7902 { (eval echo configure:7903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7903 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7904 if test -z "$ac_err"; then
7905   :
7906 else
7907   echo "$ac_err" >&5
7908   echo "configure: failed program was:" >&5
7909   cat conftest.$ac_ext >&5
7910   rm -rf conftest*
7911   CPP="${CC-cc} -nologo -E"
7912   cat > conftest.$ac_ext <<EOF
7913 #line 7914 "configure"
7914 #include "confdefs.h"
7915 #include <assert.h>
7916 Syntax Error
7917 EOF
7918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7919 { (eval echo configure:7920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7921 if test -z "$ac_err"; then
7922   :
7923 else
7924   echo "$ac_err" >&5
7925   echo "configure: failed program was:" >&5
7926   cat conftest.$ac_ext >&5
7927   rm -rf conftest*
7928   CPP=/lib/cpp
7929 fi
7930 rm -f conftest*
7931 fi
7932 rm -f conftest*
7933 fi
7934 rm -f conftest*
7935   ac_cv_prog_CPP="$CPP"
7936 fi
7937   CPP="$ac_cv_prog_CPP"
7938 else
7939   ac_cv_prog_CPP="$CPP"
7940 fi
7941 echo "$ac_t""$CPP" 1>&6
7942
7943
7944 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7945         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7946
7947 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7948         echo "configure: warning: programs compiled here do run here..." 1>&2
7949         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7950
7951 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7952         echo "configure: warning: programs compiled here do not run here..." 1>&2
7953         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7954 fi
7955
7956
7957 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7958 echo "configure:7959: checking for Cygwin environment" >&5
7959 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7960   echo $ac_n "(cached) $ac_c" 1>&6
7961 else
7962   cat > conftest.$ac_ext <<EOF
7963 #line 7964 "configure"
7964 #include "confdefs.h"
7965
7966 int main() {
7967
7968 #ifndef __CYGWIN__
7969 #define __CYGWIN__ __CYGWIN32__
7970 #endif
7971 return __CYGWIN__;
7972 ; return 0; }
7973 EOF
7974 if { (eval echo configure:7975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7975   rm -rf conftest*
7976   ac_cv_cygwin=yes
7977 else
7978   echo "configure: failed program was:" >&5
7979   cat conftest.$ac_ext >&5
7980   rm -rf conftest*
7981   ac_cv_cygwin=no
7982 fi
7983 rm -f conftest*
7984 fi
7985
7986 echo "$ac_t""$ac_cv_cygwin" 1>&6
7987 CYGWIN=
7988 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7989 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7990 echo "configure:7991: checking for mingw32 environment" >&5
7991 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7992   echo $ac_n "(cached) $ac_c" 1>&6
7993 else
7994   cat > conftest.$ac_ext <<EOF
7995 #line 7996 "configure"
7996 #include "confdefs.h"
7997
7998 int main() {
7999 return __MINGW32__;
8000 ; return 0; }
8001 EOF
8002 if { (eval echo configure:8003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8003   rm -rf conftest*
8004   ac_cv_mingw32=yes
8005 else
8006   echo "configure: failed program was:" >&5
8007   cat conftest.$ac_ext >&5
8008   rm -rf conftest*
8009   ac_cv_mingw32=no
8010 fi
8011 rm -f conftest*
8012 fi
8013
8014 echo "$ac_t""$ac_cv_mingw32" 1>&6
8015 MINGW32=
8016 test "$ac_cv_mingw32" = yes && MINGW32=yes
8017
8018
8019
8020 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8021 echo "configure:8022: checking for executable suffix" >&5
8022 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8023   echo $ac_n "(cached) $ac_c" 1>&6
8024 else
8025   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8026   ac_cv_exeext=.exe
8027 else
8028   rm -f conftest*
8029   echo 'int main () { return 0; }' > conftest.$ac_ext
8030   ac_cv_exeext=
8031   if { (eval echo configure:8032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8032     for file in conftest.*; do
8033       case $file in
8034       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8035       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8036       esac
8037     done
8038   else
8039     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8040   fi
8041   rm -f conftest*
8042   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8043 fi
8044 fi
8045
8046 EXEEXT=""
8047 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8048 echo "$ac_t""${ac_cv_exeext}" 1>&6
8049 ac_exeext=$EXEEXT
8050
8051 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8052 echo "configure:8053: checking for object suffix" >&5
8053 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8054   echo $ac_n "(cached) $ac_c" 1>&6
8055 else
8056   rm -f conftest*
8057 echo 'int i = 1;' > conftest.$ac_ext
8058 if { (eval echo configure:8059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8059   for ac_file in conftest.*; do
8060     case $ac_file in
8061     *.c) ;;
8062     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8063     esac
8064   done
8065 else
8066   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8067 fi
8068 rm -f conftest*
8069 fi
8070
8071 echo "$ac_t""$ac_cv_objext" 1>&6
8072 OBJEXT=$ac_cv_objext
8073 ac_objext=$ac_cv_objext
8074
8075
8076 cat >> confdefs.h <<EOF
8077 #define EXEEXT "${EXEEXT}"
8078 EOF
8079
8080
8081 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8082 echo "configure:8083: checking for be_app in -lbe" >&5
8083 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8084 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8085   echo $ac_n "(cached) $ac_c" 1>&6
8086 else
8087   ac_save_LIBS="$LIBS"
8088 LIBS="-lbe -lroot -lnet $LIBS"
8089 cat > conftest.$ac_ext <<EOF
8090 #line 8091 "configure"
8091 #include "confdefs.h"
8092 /* Override any gcc2 internal prototype to avoid an error.  */
8093 /* We use char because int might match the return type of a gcc2
8094     builtin and then its argument prototype would still apply.  */
8095 char be_app();
8096
8097 int main() {
8098 be_app()
8099 ; return 0; }
8100 EOF
8101 if { (eval echo configure:8102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8102   rm -rf conftest*
8103   eval "ac_cv_lib_$ac_lib_var=yes"
8104 else
8105   echo "configure: failed program was:" >&5
8106   cat conftest.$ac_ext >&5
8107   rm -rf conftest*
8108   eval "ac_cv_lib_$ac_lib_var=no"
8109 fi
8110 rm -f conftest*
8111 LIBS="$ac_save_LIBS"
8112
8113 fi
8114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8115   echo "$ac_t""yes" 1>&6
8116   LIBS="$LIBS -lbe -lroot -lnet"
8117 else
8118   echo "$ac_t""no" 1>&6
8119 :
8120 fi
8121
8122
8123
8124
8125
8126 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8127 echo "configure:8128: checking for ${CC-cc} option to accept ANSI C" >&5
8128 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8129   echo $ac_n "(cached) $ac_c" 1>&6
8130 else
8131   am_cv_prog_cc_stdc=no
8132 ac_save_CC="$CC"
8133 # Don't try gcc -ansi; that turns off useful extensions and
8134 # breaks some systems' header files.
8135 # AIX                   -qlanglvl=ansi
8136 # Ultrix and OSF/1      -std1
8137 # HP-UX 10.20 and later -Ae
8138 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8139 # SVR4                  -Xc -D__EXTENSIONS__
8140 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8141 do
8142   CC="$ac_save_CC $ac_arg"
8143   cat > conftest.$ac_ext <<EOF
8144 #line 8145 "configure"
8145 #include "confdefs.h"
8146 #include <stdarg.h>
8147 #include <stdio.h>
8148 #include <sys/types.h>
8149 #include <sys/stat.h>
8150 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8151 struct buf { int x; };
8152 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8153 static char *e (p, i)
8154      char **p;
8155      int i;
8156 {
8157   return p[i];
8158 }
8159 static char *f (char * (*g) (char **, int), char **p, ...)
8160 {
8161   char *s;
8162   va_list v;
8163   va_start (v,p);
8164   s = g (p, va_arg (v,int));
8165   va_end (v);
8166   return s;
8167 }
8168 int test (int i, double x);
8169 struct s1 {int (*f) (int a);};
8170 struct s2 {int (*f) (double a);};
8171 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8172 int argc;
8173 char **argv;
8174
8175 int main() {
8176
8177 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8178
8179 ; return 0; }
8180 EOF
8181 if { (eval echo configure:8182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8182   rm -rf conftest*
8183   am_cv_prog_cc_stdc="$ac_arg"; break
8184 else
8185   echo "configure: failed program was:" >&5
8186   cat conftest.$ac_ext >&5
8187 fi
8188 rm -f conftest*
8189 done
8190 CC="$ac_save_CC"
8191
8192 fi
8193
8194 if test -z "$am_cv_prog_cc_stdc"; then
8195   echo "$ac_t""none needed" 1>&6
8196 else
8197   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8198 fi
8199 case "x$am_cv_prog_cc_stdc" in
8200   x|xno) ;;
8201   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8202 esac
8203
8204 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8205         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8206 fi
8207
8208 # test for make depend flag
8209 OL_MKDEP=
8210 OL_MKDEP_FLAGS=
8211 if test -z "${MKDEP}"; then
8212         OL_MKDEP="${CC-cc}"
8213         if test -z "${MKDEP_FLAGS}"; then
8214                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8215 echo "configure:8216: checking for ${OL_MKDEP} depend flag" >&5
8216 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8217   echo $ac_n "(cached) $ac_c" 1>&6
8218 else
8219   
8220                         ol_cv_mkdep=no
8221                         for flag in "-M" "-xM"; do
8222                                 cat > conftest.c <<EOF
8223  noCode;
8224 EOF
8225                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8226                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8227                                 then
8228                                         if test ! -f conftest."${ac_object}" ; then
8229                                                 ol_cv_mkdep=$flag
8230                                                 OL_MKDEP_FLAGS="$flag"
8231                                                 break
8232                                         fi
8233                                 fi
8234                         done
8235                         rm -f conftest*
8236                 
8237 fi
8238
8239 echo "$ac_t""$ol_cv_mkdep" 1>&6
8240         else
8241                 cc_cv_mkdep=yes
8242                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8243         fi
8244 else
8245         cc_cv_mkdep=yes
8246         OL_MKDEP="${MKDEP}"
8247         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8248 fi
8249
8250
8251
8252 if test "${ol_cv_mkdep}" = no ; then
8253         # this will soon become an error
8254         echo "configure: warning: do not know how to generate dependencies" 1>&2
8255 fi
8256
8257 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8258 echo "configure:8259: checking for afopen in -ls" >&5
8259 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8260 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8261   echo $ac_n "(cached) $ac_c" 1>&6
8262 else
8263   ac_save_LIBS="$LIBS"
8264 LIBS="-ls  $LIBS"
8265 cat > conftest.$ac_ext <<EOF
8266 #line 8267 "configure"
8267 #include "confdefs.h"
8268 /* Override any gcc2 internal prototype to avoid an error.  */
8269 /* We use char because int might match the return type of a gcc2
8270     builtin and then its argument prototype would still apply.  */
8271 char afopen();
8272
8273 int main() {
8274 afopen()
8275 ; return 0; }
8276 EOF
8277 if { (eval echo configure:8278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8278   rm -rf conftest*
8279   eval "ac_cv_lib_$ac_lib_var=yes"
8280 else
8281   echo "configure: failed program was:" >&5
8282   cat conftest.$ac_ext >&5
8283   rm -rf conftest*
8284   eval "ac_cv_lib_$ac_lib_var=no"
8285 fi
8286 rm -f conftest*
8287 LIBS="$ac_save_LIBS"
8288
8289 fi
8290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8291   echo "$ac_t""yes" 1>&6
8292   
8293         AUTH_LIBS=-ls
8294         cat >> confdefs.h <<\EOF
8295 #define HAVE_AIX_SECURITY 1
8296 EOF
8297
8298
8299 else
8300   echo "$ac_t""no" 1>&6
8301 fi
8302
8303
8304 case "$target" in
8305 *-ibm-openedition)
8306         ac_cv_func_getopt=no
8307         cat >> confdefs.h <<\EOF
8308 #define BOTH_STRINGS_H 1
8309 EOF
8310
8311         ;;
8312 esac
8313
8314 ol_link_modules=no
8315 if test $ol_enable_modules != no ; then
8316         for ac_hdr in ltdl.h
8317 do
8318 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8319 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8320 echo "configure:8321: checking for $ac_hdr" >&5
8321 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8322   echo $ac_n "(cached) $ac_c" 1>&6
8323 else
8324   cat > conftest.$ac_ext <<EOF
8325 #line 8326 "configure"
8326 #include "confdefs.h"
8327 #include <$ac_hdr>
8328 EOF
8329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8330 { (eval echo configure:8331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8332 if test -z "$ac_err"; then
8333   rm -rf conftest*
8334   eval "ac_cv_header_$ac_safe=yes"
8335 else
8336   echo "$ac_err" >&5
8337   echo "configure: failed program was:" >&5
8338   cat conftest.$ac_ext >&5
8339   rm -rf conftest*
8340   eval "ac_cv_header_$ac_safe=no"
8341 fi
8342 rm -f conftest*
8343 fi
8344 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8345   echo "$ac_t""yes" 1>&6
8346     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8347   cat >> confdefs.h <<EOF
8348 #define $ac_tr_hdr 1
8349 EOF
8350  
8351 else
8352   echo "$ac_t""no" 1>&6
8353 fi
8354 done
8355
8356
8357         if test $ac_cv_header_ltdl_h = no ; then
8358                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8359         fi
8360
8361         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8362 echo "configure:8363: checking for lt_dlinit in -lltdl" >&5
8363 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8364 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8365   echo $ac_n "(cached) $ac_c" 1>&6
8366 else
8367   ac_save_LIBS="$LIBS"
8368 LIBS="-lltdl  $LIBS"
8369 cat > conftest.$ac_ext <<EOF
8370 #line 8371 "configure"
8371 #include "confdefs.h"
8372 /* Override any gcc2 internal prototype to avoid an error.  */
8373 /* We use char because int might match the return type of a gcc2
8374     builtin and then its argument prototype would still apply.  */
8375 char lt_dlinit();
8376
8377 int main() {
8378 lt_dlinit()
8379 ; return 0; }
8380 EOF
8381 if { (eval echo configure:8382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8382   rm -rf conftest*
8383   eval "ac_cv_lib_$ac_lib_var=yes"
8384 else
8385   echo "configure: failed program was:" >&5
8386   cat conftest.$ac_ext >&5
8387   rm -rf conftest*
8388   eval "ac_cv_lib_$ac_lib_var=no"
8389 fi
8390 rm -f conftest*
8391 LIBS="$ac_save_LIBS"
8392
8393 fi
8394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8395   echo "$ac_t""yes" 1>&6
8396   
8397                 MODULES_LIBS=-lltdl
8398                 cat >> confdefs.h <<\EOF
8399 #define HAVE_LIBLTDL 1
8400 EOF
8401
8402         
8403 else
8404   echo "$ac_t""no" 1>&6
8405 fi
8406
8407
8408         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8409                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8410         fi
8411         ol_link_modules=yes
8412 else
8413         ol_with_bdb_module=static
8414         ol_with_dnssrv_module=static
8415         ol_with_ldap_module=static
8416         ol_with_ldbm_module=static
8417         ol_with_meta_module=static
8418         ol_with_monitor_module=static
8419         ol_with_null_module=static
8420         ol_with_passwd_module=static
8421         ol_with_perl_module=static
8422         ol_with_shell_module=static
8423         ol_with_sql_module=static
8424 fi
8425
8426 # test for EBCDIC
8427 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8428 echo "configure:8429: checking for EBCDIC" >&5
8429 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8430   echo $ac_n "(cached) $ac_c" 1>&6
8431 else
8432   
8433         cat > conftest.$ac_ext <<EOF
8434 #line 8435 "configure"
8435 #include "confdefs.h"
8436
8437 #if !('M' == 0xd4)
8438 #include <__ASCII__/generate_error.h>
8439 #endif
8440
8441 EOF
8442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8443 { (eval echo configure:8444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8445 if test -z "$ac_err"; then
8446   rm -rf conftest*
8447   ol_cv_cpp_ebcdic=yes
8448 else
8449   echo "$ac_err" >&5
8450   echo "configure: failed program was:" >&5
8451   cat conftest.$ac_ext >&5
8452   rm -rf conftest*
8453   ol_cv_cpp_ebcdic=no
8454 fi
8455 rm -f conftest*
8456 fi
8457
8458 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8459 if test $ol_cv_cpp_ebcdic = yes ; then
8460         cat >> confdefs.h <<\EOF
8461 #define HAVE_EBCDIC 1
8462 EOF
8463
8464 fi
8465
8466 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8467 echo "configure:8468: checking for ANSI C header files" >&5
8468 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8469   echo $ac_n "(cached) $ac_c" 1>&6
8470 else
8471   cat > conftest.$ac_ext <<EOF
8472 #line 8473 "configure"
8473 #include "confdefs.h"
8474 #include <stdlib.h>
8475 #include <stdarg.h>
8476 #include <string.h>
8477 #include <float.h>
8478 EOF
8479 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8480 { (eval echo configure:8481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8481 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8482 if test -z "$ac_err"; then
8483   rm -rf conftest*
8484   ol_cv_header_stdc=yes
8485 else
8486   echo "$ac_err" >&5
8487   echo "configure: failed program was:" >&5
8488   cat conftest.$ac_ext >&5
8489   rm -rf conftest*
8490   ol_cv_header_stdc=no
8491 fi
8492 rm -f conftest*
8493
8494 if test $ol_cv_header_stdc = yes; then
8495   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8496 cat > conftest.$ac_ext <<EOF
8497 #line 8498 "configure"
8498 #include "confdefs.h"
8499 #include <string.h>
8500 EOF
8501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8502   egrep "memchr" >/dev/null 2>&1; then
8503   :
8504 else
8505   rm -rf conftest*
8506   ol_cv_header_stdc=no
8507 fi
8508 rm -f conftest*
8509
8510 fi
8511
8512 if test $ol_cv_header_stdc = yes; then
8513   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8514 cat > conftest.$ac_ext <<EOF
8515 #line 8516 "configure"
8516 #include "confdefs.h"
8517 #include <stdlib.h>
8518 EOF
8519 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8520   egrep "free" >/dev/null 2>&1; then
8521   :
8522 else
8523   rm -rf conftest*
8524   ol_cv_header_stdc=no
8525 fi
8526 rm -f conftest*
8527
8528 fi
8529
8530 if test $ol_cv_header_stdc = yes; then
8531   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8532 if test "$cross_compiling" = yes; then
8533   :
8534 else
8535   cat > conftest.$ac_ext <<EOF
8536 #line 8537 "configure"
8537 #include "confdefs.h"
8538 #include <ctype.h>
8539 #ifndef HAVE_EBCDIC
8540 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8541 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8542 #else
8543 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8544                 || ('j' <= (c) && (c) <= 'r') \
8545                 || ('s' <= (c) && (c) <= 'z'))
8546 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8547 #endif
8548 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8549 int main () { int i; for (i = 0; i < 256; i++)
8550 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8551 exit (0); }
8552
8553 EOF
8554 if { (eval echo configure:8555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8555 then
8556   :
8557 else
8558   echo "configure: failed program was:" >&5
8559   cat conftest.$ac_ext >&5
8560   rm -fr conftest*
8561   ol_cv_header_stdc=no
8562 fi
8563 rm -fr conftest*
8564 fi
8565
8566 fi
8567 fi
8568
8569 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8570 if test $ol_cv_header_stdc = yes; then
8571   cat >> confdefs.h <<\EOF
8572 #define STDC_HEADERS 1
8573 EOF
8574
8575 fi
8576 ac_cv_header_stdc=disable
8577
8578
8579 if test $ol_cv_header_stdc != yes; then
8580         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8581 fi
8582
8583 ac_header_dirent=no
8584 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8585 do
8586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8587 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8588 echo "configure:8589: checking for $ac_hdr that defines DIR" >&5
8589 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8590   echo $ac_n "(cached) $ac_c" 1>&6
8591 else
8592   cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8595 #include <sys/types.h>
8596 #include <$ac_hdr>
8597 int main() {
8598 DIR *dirp = 0;
8599 ; return 0; }
8600 EOF
8601 if { (eval echo configure:8602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8602   rm -rf conftest*
8603   eval "ac_cv_header_dirent_$ac_safe=yes"
8604 else
8605   echo "configure: failed program was:" >&5
8606   cat conftest.$ac_ext >&5
8607   rm -rf conftest*
8608   eval "ac_cv_header_dirent_$ac_safe=no"
8609 fi
8610 rm -f conftest*
8611 fi
8612 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8613   echo "$ac_t""yes" 1>&6
8614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8615   cat >> confdefs.h <<EOF
8616 #define $ac_tr_hdr 1
8617 EOF
8618  ac_header_dirent=$ac_hdr; break
8619 else
8620   echo "$ac_t""no" 1>&6
8621 fi
8622 done
8623 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8624 if test $ac_header_dirent = dirent.h; then
8625 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8626 echo "configure:8627: checking for opendir in -ldir" >&5
8627 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8629   echo $ac_n "(cached) $ac_c" 1>&6
8630 else
8631   ac_save_LIBS="$LIBS"
8632 LIBS="-ldir  $LIBS"
8633 cat > conftest.$ac_ext <<EOF
8634 #line 8635 "configure"
8635 #include "confdefs.h"
8636 /* Override any gcc2 internal prototype to avoid an error.  */
8637 /* We use char because int might match the return type of a gcc2
8638     builtin and then its argument prototype would still apply.  */
8639 char opendir();
8640
8641 int main() {
8642 opendir()
8643 ; return 0; }
8644 EOF
8645 if { (eval echo configure:8646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8646   rm -rf conftest*
8647   eval "ac_cv_lib_$ac_lib_var=yes"
8648 else
8649   echo "configure: failed program was:" >&5
8650   cat conftest.$ac_ext >&5
8651   rm -rf conftest*
8652   eval "ac_cv_lib_$ac_lib_var=no"
8653 fi
8654 rm -f conftest*
8655 LIBS="$ac_save_LIBS"
8656
8657 fi
8658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8659   echo "$ac_t""yes" 1>&6
8660   LIBS="$LIBS -ldir"
8661 else
8662   echo "$ac_t""no" 1>&6
8663 fi
8664
8665 else
8666 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8667 echo "configure:8668: checking for opendir in -lx" >&5
8668 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8669 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8670   echo $ac_n "(cached) $ac_c" 1>&6
8671 else
8672   ac_save_LIBS="$LIBS"
8673 LIBS="-lx  $LIBS"
8674 cat > conftest.$ac_ext <<EOF
8675 #line 8676 "configure"
8676 #include "confdefs.h"
8677 /* Override any gcc2 internal prototype to avoid an error.  */
8678 /* We use char because int might match the return type of a gcc2
8679     builtin and then its argument prototype would still apply.  */
8680 char opendir();
8681
8682 int main() {
8683 opendir()
8684 ; return 0; }
8685 EOF
8686 if { (eval echo configure:8687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8687   rm -rf conftest*
8688   eval "ac_cv_lib_$ac_lib_var=yes"
8689 else
8690   echo "configure: failed program was:" >&5
8691   cat conftest.$ac_ext >&5
8692   rm -rf conftest*
8693   eval "ac_cv_lib_$ac_lib_var=no"
8694 fi
8695 rm -f conftest*
8696 LIBS="$ac_save_LIBS"
8697
8698 fi
8699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8700   echo "$ac_t""yes" 1>&6
8701   LIBS="$LIBS -lx"
8702 else
8703   echo "$ac_t""no" 1>&6
8704 fi
8705
8706 fi
8707
8708 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8709 echo "configure:8710: checking for sys/wait.h that is POSIX.1 compatible" >&5
8710 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8711   echo $ac_n "(cached) $ac_c" 1>&6
8712 else
8713   cat > conftest.$ac_ext <<EOF
8714 #line 8715 "configure"
8715 #include "confdefs.h"
8716 #include <sys/types.h>
8717 #include <sys/wait.h>
8718 #ifndef WEXITSTATUS
8719 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8720 #endif
8721 #ifndef WIFEXITED
8722 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8723 #endif
8724 int main() {
8725 int s;
8726 wait (&s);
8727 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8728 ; return 0; }
8729 EOF
8730 if { (eval echo configure:8731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8731   rm -rf conftest*
8732   ac_cv_header_sys_wait_h=yes
8733 else
8734   echo "configure: failed program was:" >&5
8735   cat conftest.$ac_ext >&5
8736   rm -rf conftest*
8737   ac_cv_header_sys_wait_h=no
8738 fi
8739 rm -f conftest*
8740 fi
8741
8742 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8743 if test $ac_cv_header_sys_wait_h = yes; then
8744   cat >> confdefs.h <<\EOF
8745 #define HAVE_SYS_WAIT_H 1
8746 EOF
8747
8748 fi
8749
8750 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8751 echo "configure:8752: checking POSIX termios" >&5
8752 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8753   echo $ac_n "(cached) $ac_c" 1>&6
8754 else
8755   cat > conftest.$ac_ext <<EOF
8756 #line 8757 "configure"
8757 #include "confdefs.h"
8758 #include <sys/types.h>
8759 #include <unistd.h>
8760 #include <termios.h>
8761 int main() {
8762 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8763    tcgetattr(0, 0);
8764 ; return 0; }
8765 EOF
8766 if { (eval echo configure:8767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8767   rm -rf conftest*
8768   am_cv_sys_posix_termios=yes
8769 else
8770   echo "configure: failed program was:" >&5
8771   cat conftest.$ac_ext >&5
8772   rm -rf conftest*
8773   am_cv_sys_posix_termios=no
8774 fi
8775 rm -f conftest*
8776 fi
8777
8778 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8779
8780
8781  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8782 echo "configure:8783: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8783 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8784   echo $ac_n "(cached) $ac_c" 1>&6
8785 else
8786   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8787
8788   gwinsz_in_termios_h=no
8789   if test $am_cv_sys_posix_termios = yes; then
8790     cat > conftest.$ac_ext <<EOF
8791 #line 8792 "configure"
8792 #include "confdefs.h"
8793 #include <sys/types.h>
8794 #     include <termios.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   gwinsz_in_termios_h=yes
8804 fi
8805 rm -f conftest*
8806
8807   fi
8808
8809   if test $gwinsz_in_termios_h = no; then
8810     cat > conftest.$ac_ext <<EOF
8811 #line 8812 "configure"
8812 #include "confdefs.h"
8813 #include <sys/types.h>
8814 #     include <sys/ioctl.h>
8815 #     ifdef TIOCGWINSZ
8816         yes
8817 #     endif
8818     
8819 EOF
8820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8821   egrep "yes" >/dev/null 2>&1; then
8822   rm -rf conftest*
8823   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8824 fi
8825 rm -f conftest*
8826
8827   fi
8828   
8829 fi
8830
8831 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8832   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8833     cat >> confdefs.h <<\EOF
8834 #define GWINSZ_IN_SYS_IOCTL 1
8835 EOF
8836
8837   fi
8838
8839 if test $am_cv_sys_posix_termios = yes ; then
8840         cat >> confdefs.h <<\EOF
8841 #define HAVE_POSIX_TERMIOS 1
8842 EOF
8843
8844 fi
8845
8846 for ac_hdr in \
8847         arpa/inet.h             \
8848         arpa/nameser.h  \
8849         assert.h                \
8850         conio.h                 \
8851         crypt.h                 \
8852         direct.h                \
8853         errno.h                 \
8854         fcntl.h                 \
8855         filio.h                 \
8856         getopt.h                \
8857         grp.h                   \
8858         io.h                    \
8859         libutil.h               \
8860         limits.h                \
8861         locale.h                \
8862         netinet/tcp.h   \
8863         malloc.h                \
8864         memory.h                \
8865         psap.h                  \
8866         pwd.h                   \
8867         process.h               \
8868         resolv.h                \
8869         sgtty.h                 \
8870         shadow.h                \
8871         stddef.h                \
8872         string.h                \
8873         strings.h               \
8874         sysexits.h              \
8875         sys/file.h              \
8876         sys/filio.h             \
8877         sys/errno.h             \
8878         sys/ioctl.h             \
8879         sys/param.h             \
8880         sys/resource.h  \
8881         sys/select.h    \
8882         sys/socket.h    \
8883         sys/stat.h              \
8884         sys/syslog.h    \
8885         sys/time.h              \
8886         sys/types.h             \
8887         sys/ucred.h             \
8888         sys/uio.h               \
8889         syslog.h                \
8890         termios.h               \
8891         unistd.h                \
8892         winsock.h               \
8893         winsock2.h              \
8894
8895 do
8896 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8897 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8898 echo "configure:8899: checking for $ac_hdr" >&5
8899 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8900   echo $ac_n "(cached) $ac_c" 1>&6
8901 else
8902   cat > conftest.$ac_ext <<EOF
8903 #line 8904 "configure"
8904 #include "confdefs.h"
8905 #include <$ac_hdr>
8906 EOF
8907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8908 { (eval echo configure:8909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8910 if test -z "$ac_err"; then
8911   rm -rf conftest*
8912   eval "ac_cv_header_$ac_safe=yes"
8913 else
8914   echo "$ac_err" >&5
8915   echo "configure: failed program was:" >&5
8916   cat conftest.$ac_ext >&5
8917   rm -rf conftest*
8918   eval "ac_cv_header_$ac_safe=no"
8919 fi
8920 rm -f conftest*
8921 fi
8922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8923   echo "$ac_t""yes" 1>&6
8924     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8925   cat >> confdefs.h <<EOF
8926 #define $ac_tr_hdr 1
8927 EOF
8928  
8929 else
8930   echo "$ac_t""no" 1>&6
8931 fi
8932 done
8933
8934
8935
8936
8937 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8938 echo "configure:8939: checking for dlopen" >&5
8939 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8940   echo $ac_n "(cached) $ac_c" 1>&6
8941 else
8942   cat > conftest.$ac_ext <<EOF
8943 #line 8944 "configure"
8944 #include "confdefs.h"
8945 /* System header to define __stub macros and hopefully few prototypes,
8946     which can conflict with char dlopen(); below.  */
8947 #include <assert.h>
8948 /* Override any gcc2 internal prototype to avoid an error.  */
8949 /* We use char because int might match the return type of a gcc2
8950     builtin and then its argument prototype would still apply.  */
8951 char dlopen();
8952 char (*f)();
8953
8954 int main() {
8955
8956 /* The GNU C library defines this for functions which it implements
8957     to always fail with ENOSYS.  Some functions are actually named
8958     something starting with __ and the normal name is an alias.  */
8959 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8960 choke me
8961 #else
8962 f = dlopen;
8963 #endif
8964
8965 ; return 0; }
8966 EOF
8967 if { (eval echo configure:8968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8968   rm -rf conftest*
8969   eval "ac_cv_func_dlopen=yes"
8970 else
8971   echo "configure: failed program was:" >&5
8972   cat conftest.$ac_ext >&5
8973   rm -rf conftest*
8974   eval "ac_cv_func_dlopen=no"
8975 fi
8976 rm -f conftest*
8977 fi
8978
8979 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8980   echo "$ac_t""yes" 1>&6
8981   :
8982 else
8983   echo "$ac_t""no" 1>&6
8984 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8985 echo "configure:8986: checking for dlopen in -ldl" >&5
8986 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8987 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8988   echo $ac_n "(cached) $ac_c" 1>&6
8989 else
8990   ac_save_LIBS="$LIBS"
8991 LIBS="-ldl  $LIBS"
8992 cat > conftest.$ac_ext <<EOF
8993 #line 8994 "configure"
8994 #include "confdefs.h"
8995 /* Override any gcc2 internal prototype to avoid an error.  */
8996 /* We use char because int might match the return type of a gcc2
8997     builtin and then its argument prototype would still apply.  */
8998 char dlopen();
8999
9000 int main() {
9001 dlopen()
9002 ; return 0; }
9003 EOF
9004 if { (eval echo configure:9005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9005   rm -rf conftest*
9006   eval "ac_cv_lib_$ac_lib_var=yes"
9007 else
9008   echo "configure: failed program was:" >&5
9009   cat conftest.$ac_ext >&5
9010   rm -rf conftest*
9011   eval "ac_cv_lib_$ac_lib_var=no"
9012 fi
9013 rm -f conftest*
9014 LIBS="$ac_save_LIBS"
9015
9016 fi
9017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9018   echo "$ac_t""yes" 1>&6
9019     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9020     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9021   cat >> confdefs.h <<EOF
9022 #define $ac_tr_lib 1
9023 EOF
9024
9025   LIBS="-ldl $LIBS"
9026
9027 else
9028   echo "$ac_t""no" 1>&6
9029 fi
9030
9031 fi
9032
9033
9034 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9035 echo "configure:9036: checking for sigset in -lV3" >&5
9036 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9037 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9038   echo $ac_n "(cached) $ac_c" 1>&6
9039 else
9040   ac_save_LIBS="$LIBS"
9041 LIBS="-lV3  $LIBS"
9042 cat > conftest.$ac_ext <<EOF
9043 #line 9044 "configure"
9044 #include "confdefs.h"
9045 /* Override any gcc2 internal prototype to avoid an error.  */
9046 /* We use char because int might match the return type of a gcc2
9047     builtin and then its argument prototype would still apply.  */
9048 char sigset();
9049
9050 int main() {
9051 sigset()
9052 ; return 0; }
9053 EOF
9054 if { (eval echo configure:9055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9055   rm -rf conftest*
9056   eval "ac_cv_lib_$ac_lib_var=yes"
9057 else
9058   echo "configure: failed program was:" >&5
9059   cat conftest.$ac_ext >&5
9060   rm -rf conftest*
9061   eval "ac_cv_lib_$ac_lib_var=no"
9062 fi
9063 rm -f conftest*
9064 LIBS="$ac_save_LIBS"
9065
9066 fi
9067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9068   echo "$ac_t""yes" 1>&6
9069     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9070     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9071   cat >> confdefs.h <<EOF
9072 #define $ac_tr_lib 1
9073 EOF
9074
9075   LIBS="-lV3 $LIBS"
9076
9077 else
9078   echo "$ac_t""no" 1>&6
9079 fi
9080
9081
9082 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9083 echo "configure:9084: checking for winsock" >&5
9084 save_LIBS="$LIBS"
9085 for curlib in ws2_32 wsock32; do
9086         LIBS="$LIBS -l$curlib"
9087         cat > conftest.$ac_ext <<EOF
9088 #line 9089 "configure"
9089 #include "confdefs.h"
9090
9091                         char socket@12();
9092                         char select@20();
9093                         char closesocket@4();
9094                         char gethostname@8();
9095                         
9096 int main() {
9097
9098                         socket@12();
9099                         select@20();
9100                         closesocket@4();
9101                         gethostname@8();
9102                         
9103 ; return 0; }
9104 EOF
9105 if { (eval echo configure:9106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9106   rm -rf conftest*
9107   have_winsock=yes
9108 else
9109   echo "configure: failed program was:" >&5
9110   cat conftest.$ac_ext >&5
9111   rm -rf conftest*
9112   have_winsock=no
9113 fi
9114 rm -f conftest*
9115
9116         if test $have_winsock = yes; then
9117                 cat >> confdefs.h <<\EOF
9118 #define HAVE_WINSOCK 1
9119 EOF
9120
9121                 ac_cv_func_socket=yes
9122                 ac_cv_func_select=yes
9123                 ac_cv_func_closesocket=yes
9124                 ac_cv_func_gethostname=yes
9125                 if test $curlib = ws2_32; then
9126                         have_winsock=winsock2
9127                         cat >> confdefs.h <<\EOF
9128 #define HAVE_WINSOCK2 1
9129 EOF
9130
9131                 fi
9132                 break
9133         fi
9134         LIBS="$save_LIBS"
9135 done
9136 echo "$ac_t""$have_winsock" 1>&6
9137
9138
9139 echo $ac_n "checking for socket""... $ac_c" 1>&6
9140 echo "configure:9141: checking for socket" >&5
9141 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9142   echo $ac_n "(cached) $ac_c" 1>&6
9143 else
9144   cat > conftest.$ac_ext <<EOF
9145 #line 9146 "configure"
9146 #include "confdefs.h"
9147 /* System header to define __stub macros and hopefully few prototypes,
9148     which can conflict with char socket(); below.  */
9149 #include <assert.h>
9150 /* Override any gcc2 internal prototype to avoid an error.  */
9151 /* We use char because int might match the return type of a gcc2
9152     builtin and then its argument prototype would still apply.  */
9153 char socket();
9154 char (*f)();
9155
9156 int main() {
9157
9158 /* The GNU C library defines this for functions which it implements
9159     to always fail with ENOSYS.  Some functions are actually named
9160     something starting with __ and the normal name is an alias.  */
9161 #if defined (__stub_socket) || defined (__stub___socket)
9162 choke me
9163 #else
9164 f = socket;
9165 #endif
9166
9167 ; return 0; }
9168 EOF
9169 if { (eval echo configure:9170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9170   rm -rf conftest*
9171   eval "ac_cv_func_socket=yes"
9172 else
9173   echo "configure: failed program was:" >&5
9174   cat conftest.$ac_ext >&5
9175   rm -rf conftest*
9176   eval "ac_cv_func_socket=no"
9177 fi
9178 rm -f conftest*
9179 fi
9180
9181 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9182   echo "$ac_t""yes" 1>&6
9183   :
9184 else
9185   echo "$ac_t""no" 1>&6
9186         
9187         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9188 echo "configure:9189: checking for main in -lsocket" >&5
9189 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9190 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9191   echo $ac_n "(cached) $ac_c" 1>&6
9192 else
9193   ac_save_LIBS="$LIBS"
9194 LIBS="-lsocket  $LIBS"
9195 cat > conftest.$ac_ext <<EOF
9196 #line 9197 "configure"
9197 #include "confdefs.h"
9198
9199 int main() {
9200 main()
9201 ; return 0; }
9202 EOF
9203 if { (eval echo configure:9204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9204   rm -rf conftest*
9205   eval "ac_cv_lib_$ac_lib_var=yes"
9206 else
9207   echo "configure: failed program was:" >&5
9208   cat conftest.$ac_ext >&5
9209   rm -rf conftest*
9210   eval "ac_cv_lib_$ac_lib_var=no"
9211 fi
9212 rm -f conftest*
9213 LIBS="$ac_save_LIBS"
9214
9215 fi
9216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9217   echo "$ac_t""yes" 1>&6
9218     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9219     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9220   cat >> confdefs.h <<EOF
9221 #define $ac_tr_lib 1
9222 EOF
9223
9224   LIBS="-lsocket $LIBS"
9225
9226 else
9227   echo "$ac_t""no" 1>&6
9228 fi
9229
9230         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9231 echo "configure:9232: checking for main in -lnet" >&5
9232 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9233 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9234   echo $ac_n "(cached) $ac_c" 1>&6
9235 else
9236   ac_save_LIBS="$LIBS"
9237 LIBS="-lnet  $LIBS"
9238 cat > conftest.$ac_ext <<EOF
9239 #line 9240 "configure"
9240 #include "confdefs.h"
9241
9242 int main() {
9243 main()
9244 ; return 0; }
9245 EOF
9246 if { (eval echo configure:9247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9247   rm -rf conftest*
9248   eval "ac_cv_lib_$ac_lib_var=yes"
9249 else
9250   echo "configure: failed program was:" >&5
9251   cat conftest.$ac_ext >&5
9252   rm -rf conftest*
9253   eval "ac_cv_lib_$ac_lib_var=no"
9254 fi
9255 rm -f conftest*
9256 LIBS="$ac_save_LIBS"
9257
9258 fi
9259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9260   echo "$ac_t""yes" 1>&6
9261     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9262     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9263   cat >> confdefs.h <<EOF
9264 #define $ac_tr_lib 1
9265 EOF
9266
9267   LIBS="-lnet $LIBS"
9268
9269 else
9270   echo "$ac_t""no" 1>&6
9271 fi
9272
9273         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9274 echo "configure:9275: checking for main in -lnsl_s" >&5
9275 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9276 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9277   echo $ac_n "(cached) $ac_c" 1>&6
9278 else
9279   ac_save_LIBS="$LIBS"
9280 LIBS="-lnsl_s  $LIBS"
9281 cat > conftest.$ac_ext <<EOF
9282 #line 9283 "configure"
9283 #include "confdefs.h"
9284
9285 int main() {
9286 main()
9287 ; return 0; }
9288 EOF
9289 if { (eval echo configure:9290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9290   rm -rf conftest*
9291   eval "ac_cv_lib_$ac_lib_var=yes"
9292 else
9293   echo "configure: failed program was:" >&5
9294   cat conftest.$ac_ext >&5
9295   rm -rf conftest*
9296   eval "ac_cv_lib_$ac_lib_var=no"
9297 fi
9298 rm -f conftest*
9299 LIBS="$ac_save_LIBS"
9300
9301 fi
9302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9303   echo "$ac_t""yes" 1>&6
9304     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9305     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9306   cat >> confdefs.h <<EOF
9307 #define $ac_tr_lib 1
9308 EOF
9309
9310   LIBS="-lnsl_s $LIBS"
9311
9312 else
9313   echo "$ac_t""no" 1>&6
9314 fi
9315
9316         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9317 echo "configure:9318: checking for main in -lnsl" >&5
9318 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9319 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9320   echo $ac_n "(cached) $ac_c" 1>&6
9321 else
9322   ac_save_LIBS="$LIBS"
9323 LIBS="-lnsl  $LIBS"
9324 cat > conftest.$ac_ext <<EOF
9325 #line 9326 "configure"
9326 #include "confdefs.h"
9327
9328 int main() {
9329 main()
9330 ; return 0; }
9331 EOF
9332 if { (eval echo configure:9333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9333   rm -rf conftest*
9334   eval "ac_cv_lib_$ac_lib_var=yes"
9335 else
9336   echo "configure: failed program was:" >&5
9337   cat conftest.$ac_ext >&5
9338   rm -rf conftest*
9339   eval "ac_cv_lib_$ac_lib_var=no"
9340 fi
9341 rm -f conftest*
9342 LIBS="$ac_save_LIBS"
9343
9344 fi
9345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9346   echo "$ac_t""yes" 1>&6
9347     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9348     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9349   cat >> confdefs.h <<EOF
9350 #define $ac_tr_lib 1
9351 EOF
9352
9353   LIBS="-lnsl $LIBS"
9354
9355 else
9356   echo "$ac_t""no" 1>&6
9357 fi
9358
9359         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9360 echo "configure:9361: checking for socket in -linet" >&5
9361 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9362 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9363   echo $ac_n "(cached) $ac_c" 1>&6
9364 else
9365   ac_save_LIBS="$LIBS"
9366 LIBS="-linet  $LIBS"
9367 cat > conftest.$ac_ext <<EOF
9368 #line 9369 "configure"
9369 #include "confdefs.h"
9370 /* Override any gcc2 internal prototype to avoid an error.  */
9371 /* We use char because int might match the return type of a gcc2
9372     builtin and then its argument prototype would still apply.  */
9373 char socket();
9374
9375 int main() {
9376 socket()
9377 ; return 0; }
9378 EOF
9379 if { (eval echo configure:9380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9380   rm -rf conftest*
9381   eval "ac_cv_lib_$ac_lib_var=yes"
9382 else
9383   echo "configure: failed program was:" >&5
9384   cat conftest.$ac_ext >&5
9385   rm -rf conftest*
9386   eval "ac_cv_lib_$ac_lib_var=no"
9387 fi
9388 rm -f conftest*
9389 LIBS="$ac_save_LIBS"
9390
9391 fi
9392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9393   echo "$ac_t""yes" 1>&6
9394     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9395     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9396   cat >> confdefs.h <<EOF
9397 #define $ac_tr_lib 1
9398 EOF
9399
9400   LIBS="-linet $LIBS"
9401
9402 else
9403   echo "$ac_t""no" 1>&6
9404 fi
9405
9406         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9407 echo "configure:9408: checking for main in -lgen" >&5
9408 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9409 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9410   echo $ac_n "(cached) $ac_c" 1>&6
9411 else
9412   ac_save_LIBS="$LIBS"
9413 LIBS="-lgen  $LIBS"
9414 cat > conftest.$ac_ext <<EOF
9415 #line 9416 "configure"
9416 #include "confdefs.h"
9417
9418 int main() {
9419 main()
9420 ; return 0; }
9421 EOF
9422 if { (eval echo configure:9423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9423   rm -rf conftest*
9424   eval "ac_cv_lib_$ac_lib_var=yes"
9425 else
9426   echo "configure: failed program was:" >&5
9427   cat conftest.$ac_ext >&5
9428   rm -rf conftest*
9429   eval "ac_cv_lib_$ac_lib_var=no"
9430 fi
9431 rm -f conftest*
9432 LIBS="$ac_save_LIBS"
9433
9434 fi
9435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9436   echo "$ac_t""yes" 1>&6
9437     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9438     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9439   cat >> confdefs.h <<EOF
9440 #define $ac_tr_lib 1
9441 EOF
9442
9443   LIBS="-lgen $LIBS"
9444
9445 else
9446   echo "$ac_t""no" 1>&6
9447 fi
9448
9449
9450 fi
9451
9452
9453 echo $ac_n "checking for select""... $ac_c" 1>&6
9454 echo "configure:9455: checking for select" >&5
9455 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9456   echo $ac_n "(cached) $ac_c" 1>&6
9457 else
9458   cat > conftest.$ac_ext <<EOF
9459 #line 9460 "configure"
9460 #include "confdefs.h"
9461 /* System header to define __stub macros and hopefully few prototypes,
9462     which can conflict with char select(); below.  */
9463 #include <assert.h>
9464 /* Override any gcc2 internal prototype to avoid an error.  */
9465 /* We use char because int might match the return type of a gcc2
9466     builtin and then its argument prototype would still apply.  */
9467 char select();
9468 char (*f)();
9469
9470 int main() {
9471
9472 /* The GNU C library defines this for functions which it implements
9473     to always fail with ENOSYS.  Some functions are actually named
9474     something starting with __ and the normal name is an alias.  */
9475 #if defined (__stub_select) || defined (__stub___select)
9476 choke me
9477 #else
9478 f = select;
9479 #endif
9480
9481 ; return 0; }
9482 EOF
9483 if { (eval echo configure:9484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9484   rm -rf conftest*
9485   eval "ac_cv_func_select=yes"
9486 else
9487   echo "configure: failed program was:" >&5
9488   cat conftest.$ac_ext >&5
9489   rm -rf conftest*
9490   eval "ac_cv_func_select=no"
9491 fi
9492 rm -f conftest*
9493 fi
9494
9495 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9496   echo "$ac_t""yes" 1>&6
9497   :
9498 else
9499   echo "$ac_t""no" 1>&6
9500 { echo "configure: error: select() required." 1>&2; exit 1; }
9501 fi
9502
9503
9504 if test "${ac_cv_header_winsock_h}" != yes; then
9505                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9506 echo "configure:9507: checking types of arguments for select()" >&5
9507  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9508   echo $ac_n "(cached) $ac_c" 1>&6
9509 else
9510    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9511   echo $ac_n "(cached) $ac_c" 1>&6
9512 else
9513     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9514   echo $ac_n "(cached) $ac_c" 1>&6
9515 else
9516      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9517      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9518       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9519        cat > conftest.$ac_ext <<EOF
9520 #line 9521 "configure"
9521 #include "confdefs.h"
9522 #ifdef HAVE_SYS_TYPES_H
9523 #include <sys/types.h>
9524 #endif
9525 #ifdef HAVE_SYS_TIME_H
9526 #include <sys/time.h>
9527 #endif
9528 #ifdef HAVE_SYS_SELECT_H
9529 #include <sys/select.h>
9530 #endif
9531 #ifdef HAVE_SYS_SOCKET_H
9532 #include <sys/socket.h>
9533 #endif
9534 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);
9535 int main() {
9536
9537 ; return 0; }
9538 EOF
9539 if { (eval echo configure:9540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9540   rm -rf conftest*
9541           ac_not_found=no ; break 3
9542 else
9543   echo "configure: failed program was:" >&5
9544   cat conftest.$ac_ext >&5
9545   rm -rf conftest*
9546   ac_not_found=yes
9547 fi
9548 rm -f conftest*
9549       done
9550      done
9551     done
9552    
9553 fi
9554   
9555 fi
9556  
9557 fi
9558  if test "$ac_not_found" = yes; then
9559   ac_cv_func_select_arg1=int 
9560   ac_cv_func_select_arg234='int *' 
9561   ac_cv_func_select_arg5='struct timeval *'
9562  fi
9563  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9564  cat >> confdefs.h <<EOF
9565 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9566 EOF
9567
9568  cat >> confdefs.h <<EOF
9569 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9570 EOF
9571
9572  cat >> confdefs.h <<EOF
9573 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9574 EOF
9575
9576
9577 fi
9578
9579
9580 for ac_hdr in regex.h 
9581 do
9582 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9583 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9584 echo "configure:9585: checking for $ac_hdr" >&5
9585 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9586   echo $ac_n "(cached) $ac_c" 1>&6
9587 else
9588   cat > conftest.$ac_ext <<EOF
9589 #line 9590 "configure"
9590 #include "confdefs.h"
9591 #include <$ac_hdr>
9592 EOF
9593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9594 { (eval echo configure:9595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9596 if test -z "$ac_err"; then
9597   rm -rf conftest*
9598   eval "ac_cv_header_$ac_safe=yes"
9599 else
9600   echo "$ac_err" >&5
9601   echo "configure: failed program was:" >&5
9602   cat conftest.$ac_ext >&5
9603   rm -rf conftest*
9604   eval "ac_cv_header_$ac_safe=no"
9605 fi
9606 rm -f conftest*
9607 fi
9608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9609   echo "$ac_t""yes" 1>&6
9610     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9611   cat >> confdefs.h <<EOF
9612 #define $ac_tr_hdr 1
9613 EOF
9614  
9615 else
9616   echo "$ac_t""no" 1>&6
9617 fi
9618 done
9619
9620 if test "$ac_cv_header_regex_h" != yes ; then
9621         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9622 fi
9623
9624 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9625 echo "configure:9626: checking for library containing regfree" >&5
9626 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9627   echo $ac_n "(cached) $ac_c" 1>&6
9628 else
9629   ac_func_search_save_LIBS="$LIBS"
9630 ac_cv_search_regfree="no"
9631 cat > conftest.$ac_ext <<EOF
9632 #line 9633 "configure"
9633 #include "confdefs.h"
9634 /* Override any gcc2 internal prototype to avoid an error.  */
9635 /* We use char because int might match the return type of a gcc2
9636     builtin and then its argument prototype would still apply.  */
9637 char regfree();
9638
9639 int main() {
9640 regfree()
9641 ; return 0; }
9642 EOF
9643 if { (eval echo configure:9644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9644   rm -rf conftest*
9645   ac_cv_search_regfree="none required"
9646 else
9647   echo "configure: failed program was:" >&5
9648   cat conftest.$ac_ext >&5
9649 fi
9650 rm -f conftest*
9651 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9652 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9653 cat > conftest.$ac_ext <<EOF
9654 #line 9655 "configure"
9655 #include "confdefs.h"
9656 /* Override any gcc2 internal prototype to avoid an error.  */
9657 /* We use char because int might match the return type of a gcc2
9658     builtin and then its argument prototype would still apply.  */
9659 char regfree();
9660
9661 int main() {
9662 regfree()
9663 ; return 0; }
9664 EOF
9665 if { (eval echo configure:9666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9666   rm -rf conftest*
9667   ac_cv_search_regfree="-l$ac_lib"
9668 break
9669 else
9670   echo "configure: failed program was:" >&5
9671   cat conftest.$ac_ext >&5
9672 fi
9673 rm -f conftest*
9674 done
9675 LIBS="$ac_func_search_save_LIBS"
9676 fi
9677
9678 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9679 if test "$ac_cv_search_regfree" != "no"; then
9680   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9681   :
9682 else :
9683   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9684 fi
9685
9686
9687 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9688 echo "configure:9689: checking for compatible POSIX regex" >&5
9689 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9690   echo $ac_n "(cached) $ac_c" 1>&6
9691 else
9692   
9693         if test "$cross_compiling" = yes; then
9694   ol_cv_c_posix_regex=cross
9695 else
9696   cat > conftest.$ac_ext <<EOF
9697 #line 9698 "configure"
9698 #include "confdefs.h"
9699
9700 #include <sys/types.h>
9701 #include <regex.h>
9702 static char *pattern, *string;
9703 main()
9704 {
9705         int rc;
9706         regex_t re;
9707
9708         pattern = "^A";
9709
9710         if(regcomp(&re, pattern, 0)) {
9711                 return -1;
9712         }
9713         
9714         string = "ALL MATCH";
9715         
9716         rc = regexec(&re, string, 0, (void*)0, 0);
9717
9718         regfree(&re);
9719
9720         return rc;
9721 }
9722 EOF
9723 if { (eval echo configure:9724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9724 then
9725   ol_cv_c_posix_regex=yes
9726 else
9727   echo "configure: failed program was:" >&5
9728   cat conftest.$ac_ext >&5
9729   rm -fr conftest*
9730   ol_cv_c_posix_regex=no
9731 fi
9732 rm -fr conftest*
9733 fi
9734
9735 fi
9736
9737 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9738
9739 if test "$ol_cv_c_posix_regex" = no ; then
9740         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9741 fi
9742
9743
9744 have_uuid=no
9745 for ac_hdr in sys/uuid.h
9746 do
9747 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9748 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9749 echo "configure:9750: checking for $ac_hdr" >&5
9750 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9751   echo $ac_n "(cached) $ac_c" 1>&6
9752 else
9753   cat > conftest.$ac_ext <<EOF
9754 #line 9755 "configure"
9755 #include "confdefs.h"
9756 #include <$ac_hdr>
9757 EOF
9758 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9759 { (eval echo configure:9760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9760 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9761 if test -z "$ac_err"; then
9762   rm -rf conftest*
9763   eval "ac_cv_header_$ac_safe=yes"
9764 else
9765   echo "$ac_err" >&5
9766   echo "configure: failed program was:" >&5
9767   cat conftest.$ac_ext >&5
9768   rm -rf conftest*
9769   eval "ac_cv_header_$ac_safe=no"
9770 fi
9771 rm -f conftest*
9772 fi
9773 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9774   echo "$ac_t""yes" 1>&6
9775     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9776   cat >> confdefs.h <<EOF
9777 #define $ac_tr_hdr 1
9778 EOF
9779  
9780 else
9781   echo "$ac_t""no" 1>&6
9782 fi
9783 done
9784
9785 if test $ac_cv_header_sys_uuid_h = yes ; then
9786         save_LIBS="$LIBS"
9787         
9788 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9789 echo "configure:9790: checking for library containing uuid_to_str" >&5
9790 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9791   echo $ac_n "(cached) $ac_c" 1>&6
9792 else
9793   ac_func_search_save_LIBS="$LIBS"
9794 ac_cv_search_uuid_to_str="no"
9795 cat > conftest.$ac_ext <<EOF
9796 #line 9797 "configure"
9797 #include "confdefs.h"
9798 /* Override any gcc2 internal prototype to avoid an error.  */
9799 /* We use char because int might match the return type of a gcc2
9800     builtin and then its argument prototype would still apply.  */
9801 char uuid_to_str();
9802
9803 int main() {
9804 uuid_to_str()
9805 ; return 0; }
9806 EOF
9807 if { (eval echo configure:9808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9808   rm -rf conftest*
9809   ac_cv_search_uuid_to_str="none required"
9810 else
9811   echo "configure: failed program was:" >&5
9812   cat conftest.$ac_ext >&5
9813 fi
9814 rm -f conftest*
9815 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9816 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9817 cat > conftest.$ac_ext <<EOF
9818 #line 9819 "configure"
9819 #include "confdefs.h"
9820 /* Override any gcc2 internal prototype to avoid an error.  */
9821 /* We use char because int might match the return type of a gcc2
9822     builtin and then its argument prototype would still apply.  */
9823 char uuid_to_str();
9824
9825 int main() {
9826 uuid_to_str()
9827 ; return 0; }
9828 EOF
9829 if { (eval echo configure:9830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9830   rm -rf conftest*
9831   ac_cv_search_uuid_to_str="-l$ac_lib"
9832 break
9833 else
9834   echo "configure: failed program was:" >&5
9835   cat conftest.$ac_ext >&5
9836 fi
9837 rm -f conftest*
9838 done
9839 LIBS="$ac_func_search_save_LIBS"
9840 fi
9841
9842 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9843 if test "$ac_cv_search_uuid_to_str" != "no"; then
9844   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9845   have_uuid=yes
9846 else :
9847   :
9848 fi
9849         LIBS="$save_LIBS"
9850
9851         if test have_uuid = yes ; then
9852                 cat >> confdefs.h <<\EOF
9853 #define HAVE_UUID_TO_STR 1
9854 EOF
9855
9856
9857                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9858                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9859         fi
9860 fi
9861
9862 if test $have_uuid = no ; then
9863         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9864 echo "configure:9865: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9865         save_LIBS="$LIBS"
9866         LIBS="$LIBS -lrpcrt4"
9867         cat > conftest.$ac_ext <<EOF
9868 #line 9869 "configure"
9869 #include "confdefs.h"
9870
9871                 char UuidCreate@4();
9872                 char UuidToStringA@8();
9873                 
9874 int main() {
9875
9876                 UuidCreate@4();
9877                 UuidToStringA@8();
9878                 
9879 ; return 0; }
9880 EOF
9881 if { (eval echo configure:9882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9882   rm -rf conftest*
9883   need_rpcrt=yes
9884 else
9885   echo "configure: failed program was:" >&5
9886   cat conftest.$ac_ext >&5
9887   rm -rf conftest*
9888   need_rpcrt=no
9889 fi
9890 rm -f conftest*
9891         if test $need_rpcrt = yes; then
9892                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9893         fi
9894         LIBS="$save_LIBS"
9895         echo "$ac_t""$need_rpcrt" 1>&6
9896 fi
9897
9898 ol_link_dnssrv=no
9899 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9900 echo "configure:9901: checking for res_query" >&5
9901 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9902   echo $ac_n "(cached) $ac_c" 1>&6
9903 else
9904   cat > conftest.$ac_ext <<EOF
9905 #line 9906 "configure"
9906 #include "confdefs.h"
9907 /* System header to define __stub macros and hopefully few prototypes,
9908     which can conflict with char res_query(); below.  */
9909 #include <assert.h>
9910 /* Override any gcc2 internal prototype to avoid an error.  */
9911 /* We use char because int might match the return type of a gcc2
9912     builtin and then its argument prototype would still apply.  */
9913 char res_query();
9914 char (*f)();
9915
9916 int main() {
9917
9918 /* The GNU C library defines this for functions which it implements
9919     to always fail with ENOSYS.  Some functions are actually named
9920     something starting with __ and the normal name is an alias.  */
9921 #if defined (__stub_res_query) || defined (__stub___res_query)
9922 choke me
9923 #else
9924 f = res_query;
9925 #endif
9926
9927 ; return 0; }
9928 EOF
9929 if { (eval echo configure:9930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9930   rm -rf conftest*
9931   eval "ac_cv_func_res_query=yes"
9932 else
9933   echo "configure: failed program was:" >&5
9934   cat conftest.$ac_ext >&5
9935   rm -rf conftest*
9936   eval "ac_cv_func_res_query=no"
9937 fi
9938 rm -f conftest*
9939 fi
9940
9941 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9942   echo "$ac_t""yes" 1>&6
9943   :
9944 else
9945   echo "$ac_t""no" 1>&6
9946 fi
9947
9948 if test $ac_cv_func_res_query = no ; then 
9949         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9950 echo "configure:9951: checking for __res_query" >&5
9951 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9952   echo $ac_n "(cached) $ac_c" 1>&6
9953 else
9954   cat > conftest.$ac_ext <<EOF
9955 #line 9956 "configure"
9956 #include "confdefs.h"
9957 /* System header to define __stub macros and hopefully few prototypes,
9958     which can conflict with char __res_query(); below.  */
9959 #include <assert.h>
9960 /* Override any gcc2 internal prototype to avoid an error.  */
9961 /* We use char because int might match the return type of a gcc2
9962     builtin and then its argument prototype would still apply.  */
9963 char __res_query();
9964 char (*f)();
9965
9966 int main() {
9967
9968 /* The GNU C library defines this for functions which it implements
9969     to always fail with ENOSYS.  Some functions are actually named
9970     something starting with __ and the normal name is an alias.  */
9971 #if defined (__stub___res_query) || defined (__stub_____res_query)
9972 choke me
9973 #else
9974 f = __res_query;
9975 #endif
9976
9977 ; return 0; }
9978 EOF
9979 if { (eval echo configure:9980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9980   rm -rf conftest*
9981   eval "ac_cv_func___res_query=yes"
9982 else
9983   echo "configure: failed program was:" >&5
9984   cat conftest.$ac_ext >&5
9985   rm -rf conftest*
9986   eval "ac_cv_func___res_query=no"
9987 fi
9988 rm -f conftest*
9989 fi
9990
9991 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9992   echo "$ac_t""yes" 1>&6
9993   :
9994 else
9995   echo "$ac_t""no" 1>&6
9996 fi
9997
9998         ac_cv_func_res_query=$ac_cv_func___res_query
9999 fi
10000
10001 if test $ac_cv_func_res_query = no ; then 
10002         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10003 echo "configure:10004: checking for res_query in -lbind" >&5
10004 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10005 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10006   echo $ac_n "(cached) $ac_c" 1>&6
10007 else
10008   ac_save_LIBS="$LIBS"
10009 LIBS="-lbind  $LIBS"
10010 cat > conftest.$ac_ext <<EOF
10011 #line 10012 "configure"
10012 #include "confdefs.h"
10013 /* Override any gcc2 internal prototype to avoid an error.  */
10014 /* We use char because int might match the return type of a gcc2
10015     builtin and then its argument prototype would still apply.  */
10016 char res_query();
10017
10018 int main() {
10019 res_query()
10020 ; return 0; }
10021 EOF
10022 if { (eval echo configure:10023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10023   rm -rf conftest*
10024   eval "ac_cv_lib_$ac_lib_var=yes"
10025 else
10026   echo "configure: failed program was:" >&5
10027   cat conftest.$ac_ext >&5
10028   rm -rf conftest*
10029   eval "ac_cv_lib_$ac_lib_var=no"
10030 fi
10031 rm -f conftest*
10032 LIBS="$ac_save_LIBS"
10033
10034 fi
10035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10036   echo "$ac_t""yes" 1>&6
10037     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10038     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10039   cat >> confdefs.h <<EOF
10040 #define $ac_tr_lib 1
10041 EOF
10042
10043   LIBS="-lbind $LIBS"
10044
10045 else
10046   echo "$ac_t""no" 1>&6
10047 fi
10048
10049         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10050 fi
10051
10052 if test $ac_cv_func_res_query = no ; then 
10053         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10054 echo "configure:10055: checking for __res_query in -lbind" >&5
10055 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10056 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10057   echo $ac_n "(cached) $ac_c" 1>&6
10058 else
10059   ac_save_LIBS="$LIBS"
10060 LIBS="-lbind  $LIBS"
10061 cat > conftest.$ac_ext <<EOF
10062 #line 10063 "configure"
10063 #include "confdefs.h"
10064 /* Override any gcc2 internal prototype to avoid an error.  */
10065 /* We use char because int might match the return type of a gcc2
10066     builtin and then its argument prototype would still apply.  */
10067 char __res_query();
10068
10069 int main() {
10070 __res_query()
10071 ; return 0; }
10072 EOF
10073 if { (eval echo configure:10074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10074   rm -rf conftest*
10075   eval "ac_cv_lib_$ac_lib_var=yes"
10076 else
10077   echo "configure: failed program was:" >&5
10078   cat conftest.$ac_ext >&5
10079   rm -rf conftest*
10080   eval "ac_cv_lib_$ac_lib_var=no"
10081 fi
10082 rm -f conftest*
10083 LIBS="$ac_save_LIBS"
10084
10085 fi
10086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10087   echo "$ac_t""yes" 1>&6
10088     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10089     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10090   cat >> confdefs.h <<EOF
10091 #define $ac_tr_lib 1
10092 EOF
10093
10094   LIBS="-lbind $LIBS"
10095
10096 else
10097   echo "$ac_t""no" 1>&6
10098 fi
10099
10100         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10101 fi
10102
10103 if test $ac_cv_func_res_query = no ; then 
10104         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10105 echo "configure:10106: checking for res_query in -lresolv" >&5
10106 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10107 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10108   echo $ac_n "(cached) $ac_c" 1>&6
10109 else
10110   ac_save_LIBS="$LIBS"
10111 LIBS="-lresolv  $LIBS"
10112 cat > conftest.$ac_ext <<EOF
10113 #line 10114 "configure"
10114 #include "confdefs.h"
10115 /* Override any gcc2 internal prototype to avoid an error.  */
10116 /* We use char because int might match the return type of a gcc2
10117     builtin and then its argument prototype would still apply.  */
10118 char res_query();
10119
10120 int main() {
10121 res_query()
10122 ; return 0; }
10123 EOF
10124 if { (eval echo configure:10125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10125   rm -rf conftest*
10126   eval "ac_cv_lib_$ac_lib_var=yes"
10127 else
10128   echo "configure: failed program was:" >&5
10129   cat conftest.$ac_ext >&5
10130   rm -rf conftest*
10131   eval "ac_cv_lib_$ac_lib_var=no"
10132 fi
10133 rm -f conftest*
10134 LIBS="$ac_save_LIBS"
10135
10136 fi
10137 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10138   echo "$ac_t""yes" 1>&6
10139     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10140     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10141   cat >> confdefs.h <<EOF
10142 #define $ac_tr_lib 1
10143 EOF
10144
10145   LIBS="-lresolv $LIBS"
10146
10147 else
10148   echo "$ac_t""no" 1>&6
10149 fi
10150
10151         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10152 fi
10153
10154 if test $ac_cv_func_res_query = no ; then 
10155         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10156 echo "configure:10157: checking for __res_query in -lresolv" >&5
10157 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10158 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10159   echo $ac_n "(cached) $ac_c" 1>&6
10160 else
10161   ac_save_LIBS="$LIBS"
10162 LIBS="-lresolv  $LIBS"
10163 cat > conftest.$ac_ext <<EOF
10164 #line 10165 "configure"
10165 #include "confdefs.h"
10166 /* Override any gcc2 internal prototype to avoid an error.  */
10167 /* We use char because int might match the return type of a gcc2
10168     builtin and then its argument prototype would still apply.  */
10169 char __res_query();
10170
10171 int main() {
10172 __res_query()
10173 ; return 0; }
10174 EOF
10175 if { (eval echo configure:10176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10176   rm -rf conftest*
10177   eval "ac_cv_lib_$ac_lib_var=yes"
10178 else
10179   echo "configure: failed program was:" >&5
10180   cat conftest.$ac_ext >&5
10181   rm -rf conftest*
10182   eval "ac_cv_lib_$ac_lib_var=no"
10183 fi
10184 rm -f conftest*
10185 LIBS="$ac_save_LIBS"
10186
10187 fi
10188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10189   echo "$ac_t""yes" 1>&6
10190     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10191     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10192   cat >> confdefs.h <<EOF
10193 #define $ac_tr_lib 1
10194 EOF
10195
10196   LIBS="-lresolv $LIBS"
10197
10198 else
10199   echo "$ac_t""no" 1>&6
10200 fi
10201
10202         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10203 fi
10204
10205 if test "$ac_cv_func_res_query" = yes ; then
10206         cat >> confdefs.h <<\EOF
10207 #define HAVE_RES_QUERY 1
10208 EOF
10209
10210
10211         if test $ol_enable_dnssrv != no ; then
10212                 ol_link_dnssrv=yes
10213         fi
10214 fi
10215
10216 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10217         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10218 fi
10219
10220 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10221 do
10222 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10223 echo "configure:10224: checking for $ac_func" >&5
10224 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10225   echo $ac_n "(cached) $ac_c" 1>&6
10226 else
10227   cat > conftest.$ac_ext <<EOF
10228 #line 10229 "configure"
10229 #include "confdefs.h"
10230 /* System header to define __stub macros and hopefully few prototypes,
10231     which can conflict with char $ac_func(); below.  */
10232 #include <assert.h>
10233 /* Override any gcc2 internal prototype to avoid an error.  */
10234 /* We use char because int might match the return type of a gcc2
10235     builtin and then its argument prototype would still apply.  */
10236 char $ac_func();
10237 char (*f)();
10238
10239 int main() {
10240
10241 /* The GNU C library defines this for functions which it implements
10242     to always fail with ENOSYS.  Some functions are actually named
10243     something starting with __ and the normal name is an alias.  */
10244 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10245 choke me
10246 #else
10247 f = $ac_func;
10248 #endif
10249
10250 ; return 0; }
10251 EOF
10252 if { (eval echo configure:10253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10253   rm -rf conftest*
10254   eval "ac_cv_func_$ac_func=yes"
10255 else
10256   echo "configure: failed program was:" >&5
10257   cat conftest.$ac_ext >&5
10258   rm -rf conftest*
10259   eval "ac_cv_func_$ac_func=no"
10260 fi
10261 rm -f conftest*
10262 fi
10263
10264 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10265   echo "$ac_t""yes" 1>&6
10266     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10267   cat >> confdefs.h <<EOF
10268 #define $ac_tr_func 1
10269 EOF
10270  
10271 else
10272   echo "$ac_t""no" 1>&6
10273 fi
10274 done
10275
10276
10277 ol_link_ipv6=no
10278 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10279         if test $ol_enable_ipv6 = yes ; then
10280                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10281         fi
10282 elif test $ol_enable_ipv6 != no ; then
10283         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10284 echo "configure:10285: checking INET6_ADDRSTRLEN" >&5
10285 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10286   echo $ac_n "(cached) $ac_c" 1>&6
10287 else
10288   
10289                 cat > conftest.$ac_ext <<EOF
10290 #line 10291 "configure"
10291 #include "confdefs.h"
10292
10293 #                       include <netinet/in.h>
10294 #                       ifdef INET6_ADDRSTRLEN
10295                                 __has_inet6_addrstrlen__;
10296 #                       endif
10297                 
10298 EOF
10299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10300   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10301   rm -rf conftest*
10302   ol_cv_inet6_addrstrlen=yes
10303 else
10304   rm -rf conftest*
10305   ol_cv_inet6_addrstrlen=no
10306 fi
10307 rm -f conftest*
10308
10309 fi
10310
10311 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10312
10313
10314         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10315 echo "configure:10316: checking struct sockaddr_storage" >&5
10316 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10317   echo $ac_n "(cached) $ac_c" 1>&6
10318 else
10319   
10320                 cat > conftest.$ac_ext <<EOF
10321 #line 10322 "configure"
10322 #include "confdefs.h"
10323
10324 #include <sys/types.h>
10325 #include <sys/socket.h>
10326
10327 int main() {
10328
10329                         struct sockaddr_storage ss;
10330
10331 ; return 0; }
10332 EOF
10333 if { (eval echo configure:10334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10334   rm -rf conftest*
10335   ol_cv_struct_sockaddr_storage=yes
10336 else
10337   echo "configure: failed program was:" >&5
10338   cat conftest.$ac_ext >&5
10339   rm -rf conftest*
10340   ol_cv_struct_sockaddr_storage=no
10341 fi
10342 rm -f conftest*
10343 fi
10344
10345 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10346
10347         if test $ol_cv_inet6_addrstrlen = yes \
10348                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10349                 ol_link_ipv6=yes
10350         elif test $ol_enable_ipv6 = yes \
10351                         -a $ol_cv_inet6_addrstrlen = no ; then
10352                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10353         elif test $ol_enable_ipv6 = yes \
10354                         -a $ol_cv_struct_sockaddr_storage = no ; then
10355                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10356         fi
10357 fi
10358
10359 if test $ol_enable_local != no ; then
10360         for ac_hdr in sys/un.h 
10361 do
10362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10364 echo "configure:10365: checking for $ac_hdr" >&5
10365 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10366   echo $ac_n "(cached) $ac_c" 1>&6
10367 else
10368   cat > conftest.$ac_ext <<EOF
10369 #line 10370 "configure"
10370 #include "confdefs.h"
10371 #include <$ac_hdr>
10372 EOF
10373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10374 { (eval echo configure:10375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10376 if test -z "$ac_err"; then
10377   rm -rf conftest*
10378   eval "ac_cv_header_$ac_safe=yes"
10379 else
10380   echo "$ac_err" >&5
10381   echo "configure: failed program was:" >&5
10382   cat conftest.$ac_ext >&5
10383   rm -rf conftest*
10384   eval "ac_cv_header_$ac_safe=no"
10385 fi
10386 rm -f conftest*
10387 fi
10388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10389   echo "$ac_t""yes" 1>&6
10390     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10391   cat >> confdefs.h <<EOF
10392 #define $ac_tr_hdr 1
10393 EOF
10394  
10395 else
10396   echo "$ac_t""no" 1>&6
10397 fi
10398 done
10399
10400
10401         if test $ol_enable_local = auto ; then
10402                 ol_enable_local=$ac_cv_header_sys_un_h
10403         elif test $ac_cv_header_sys_un_h = no ; then
10404                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10405         fi
10406 fi
10407
10408 ol_link_kbind=no
10409 ol_link_kpasswd=no
10410 ol_link_krb5=no
10411 ol_link_krb4=no
10412
10413 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10414         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10415         -o $ol_with_kerberos = k425 ; then
10416
10417         for ac_hdr in krb5.h
10418 do
10419 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10420 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10421 echo "configure:10422: checking for $ac_hdr" >&5
10422 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10423   echo $ac_n "(cached) $ac_c" 1>&6
10424 else
10425   cat > conftest.$ac_ext <<EOF
10426 #line 10427 "configure"
10427 #include "confdefs.h"
10428 #include <$ac_hdr>
10429 EOF
10430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10431 { (eval echo configure:10432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10433 if test -z "$ac_err"; then
10434   rm -rf conftest*
10435   eval "ac_cv_header_$ac_safe=yes"
10436 else
10437   echo "$ac_err" >&5
10438   echo "configure: failed program was:" >&5
10439   cat conftest.$ac_ext >&5
10440   rm -rf conftest*
10441   eval "ac_cv_header_$ac_safe=no"
10442 fi
10443 rm -f conftest*
10444 fi
10445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10446   echo "$ac_t""yes" 1>&6
10447     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10448   cat >> confdefs.h <<EOF
10449 #define $ac_tr_hdr 1
10450 EOF
10451  
10452 else
10453   echo "$ac_t""no" 1>&6
10454 fi
10455 done
10456
10457
10458         if test $ac_cv_header_krb5_h = yes ; then
10459                                 for ac_hdr in heim_err.h
10460 do
10461 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10462 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10463 echo "configure:10464: checking for $ac_hdr" >&5
10464 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10465   echo $ac_n "(cached) $ac_c" 1>&6
10466 else
10467   cat > conftest.$ac_ext <<EOF
10468 #line 10469 "configure"
10469 #include "confdefs.h"
10470 #include <$ac_hdr>
10471 EOF
10472 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10473 { (eval echo configure:10474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10474 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10475 if test -z "$ac_err"; then
10476   rm -rf conftest*
10477   eval "ac_cv_header_$ac_safe=yes"
10478 else
10479   echo "$ac_err" >&5
10480   echo "configure: failed program was:" >&5
10481   cat conftest.$ac_ext >&5
10482   rm -rf conftest*
10483   eval "ac_cv_header_$ac_safe=no"
10484 fi
10485 rm -f conftest*
10486 fi
10487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10488   echo "$ac_t""yes" 1>&6
10489     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10490   cat >> confdefs.h <<EOF
10491 #define $ac_tr_hdr 1
10492 EOF
10493  
10494 else
10495   echo "$ac_t""no" 1>&6
10496 fi
10497 done
10498
10499                 if test $ac_cv_header_heim_err_h = yes ; then
10500                         krb5_impl=heimdal
10501                 else
10502                         krb5_impl=mit
10503                 fi
10504
10505                 if test $krb5_impl = mit; then
10506                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10507 echo "configure:10508: checking for main in -lk5crypto" >&5
10508 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10509 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10510   echo $ac_n "(cached) $ac_c" 1>&6
10511 else
10512   ac_save_LIBS="$LIBS"
10513 LIBS="-lk5crypto  $LIBS"
10514 cat > conftest.$ac_ext <<EOF
10515 #line 10516 "configure"
10516 #include "confdefs.h"
10517
10518 int main() {
10519 main()
10520 ; return 0; }
10521 EOF
10522 if { (eval echo configure:10523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10523   rm -rf conftest*
10524   eval "ac_cv_lib_$ac_lib_var=yes"
10525 else
10526   echo "configure: failed program was:" >&5
10527   cat conftest.$ac_ext >&5
10528   rm -rf conftest*
10529   eval "ac_cv_lib_$ac_lib_var=no"
10530 fi
10531 rm -f conftest*
10532 LIBS="$ac_save_LIBS"
10533
10534 fi
10535 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10536   echo "$ac_t""yes" 1>&6
10537   krb5crypto=k5crypto
10538 else
10539   echo "$ac_t""no" 1>&6
10540 krb5crypto=crypto
10541 fi
10542
10543
10544                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10545 echo "configure:10546: checking for main in -lkrb5" >&5
10546 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10547 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10548   echo $ac_n "(cached) $ac_c" 1>&6
10549 else
10550   ac_save_LIBS="$LIBS"
10551 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10552 cat > conftest.$ac_ext <<EOF
10553 #line 10554 "configure"
10554 #include "confdefs.h"
10555
10556 int main() {
10557 main()
10558 ; return 0; }
10559 EOF
10560 if { (eval echo configure:10561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10561   rm -rf conftest*
10562   eval "ac_cv_lib_$ac_lib_var=yes"
10563 else
10564   echo "configure: failed program was:" >&5
10565   cat conftest.$ac_ext >&5
10566   rm -rf conftest*
10567   eval "ac_cv_lib_$ac_lib_var=no"
10568 fi
10569 rm -f conftest*
10570 LIBS="$ac_save_LIBS"
10571
10572 fi
10573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10574   echo "$ac_t""yes" 1>&6
10575   have_krb5=yes
10576                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10577 else
10578   echo "$ac_t""no" 1>&6
10579 have_krb5=no
10580 fi
10581
10582
10583                 elif test $krb5_impl = heimdal; then
10584                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10585 echo "configure:10586: checking for main in -ldes" >&5
10586 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10587 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10588   echo $ac_n "(cached) $ac_c" 1>&6
10589 else
10590   ac_save_LIBS="$LIBS"
10591 LIBS="-ldes  $LIBS"
10592 cat > conftest.$ac_ext <<EOF
10593 #line 10594 "configure"
10594 #include "confdefs.h"
10595
10596 int main() {
10597 main()
10598 ; return 0; }
10599 EOF
10600 if { (eval echo configure:10601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10601   rm -rf conftest*
10602   eval "ac_cv_lib_$ac_lib_var=yes"
10603 else
10604   echo "configure: failed program was:" >&5
10605   cat conftest.$ac_ext >&5
10606   rm -rf conftest*
10607   eval "ac_cv_lib_$ac_lib_var=no"
10608 fi
10609 rm -f conftest*
10610 LIBS="$ac_save_LIBS"
10611
10612 fi
10613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10614   echo "$ac_t""yes" 1>&6
10615   krb5crypto=des
10616 else
10617   echo "$ac_t""no" 1>&6
10618 krb5crypto=crypto
10619 fi
10620
10621
10622                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10623 echo "configure:10624: checking for main in -lkrb5" >&5
10624 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10625 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10626   echo $ac_n "(cached) $ac_c" 1>&6
10627 else
10628   ac_save_LIBS="$LIBS"
10629 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10630 cat > conftest.$ac_ext <<EOF
10631 #line 10632 "configure"
10632 #include "confdefs.h"
10633
10634 int main() {
10635 main()
10636 ; return 0; }
10637 EOF
10638 if { (eval echo configure:10639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10639   rm -rf conftest*
10640   eval "ac_cv_lib_$ac_lib_var=yes"
10641 else
10642   echo "configure: failed program was:" >&5
10643   cat conftest.$ac_ext >&5
10644   rm -rf conftest*
10645   eval "ac_cv_lib_$ac_lib_var=no"
10646 fi
10647 rm -f conftest*
10648 LIBS="$ac_save_LIBS"
10649
10650 fi
10651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10652   echo "$ac_t""yes" 1>&6
10653   have_krb5=yes
10654                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10655 else
10656   echo "$ac_t""no" 1>&6
10657 have_krb5=no
10658 fi
10659
10660
10661                         cat >> confdefs.h <<\EOF
10662 #define HAVE_HEIMDAL_KERBEROS 1
10663 EOF
10664
10665
10666                 else
10667                         have_krb5=no
10668                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10669                 fi
10670
10671                 if test $have_krb5 = yes ; then
10672                         ol_link_krb5=yes
10673
10674                         cat >> confdefs.h <<\EOF
10675 #define HAVE_KRB5 1
10676 EOF
10677
10678
10679                         if test $ol_enable_kpasswd != no ; then
10680                                 ol_link_kpasswd=yes;
10681                         fi
10682
10683                         if test $ol_with_kerberos = k5only ; then
10684                                 ol_with_kerberos=found
10685                         fi
10686
10687                 elif test $ol_with_kerberos != auto ; then
10688                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10689                 fi
10690
10691         fi
10692 fi
10693
10694 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10695         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10696
10697         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10698 do
10699 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10700 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10701 echo "configure:10702: checking for $ac_hdr" >&5
10702 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10703   echo $ac_n "(cached) $ac_c" 1>&6
10704 else
10705   cat > conftest.$ac_ext <<EOF
10706 #line 10707 "configure"
10707 #include "confdefs.h"
10708 #include <$ac_hdr>
10709 EOF
10710 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10711 { (eval echo configure:10712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10712 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10713 if test -z "$ac_err"; then
10714   rm -rf conftest*
10715   eval "ac_cv_header_$ac_safe=yes"
10716 else
10717   echo "$ac_err" >&5
10718   echo "configure: failed program was:" >&5
10719   cat conftest.$ac_ext >&5
10720   rm -rf conftest*
10721   eval "ac_cv_header_$ac_safe=no"
10722 fi
10723 rm -f conftest*
10724 fi
10725 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10726   echo "$ac_t""yes" 1>&6
10727     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10728   cat >> confdefs.h <<EOF
10729 #define $ac_tr_hdr 1
10730 EOF
10731  
10732 else
10733   echo "$ac_t""no" 1>&6
10734 fi
10735 done
10736
10737
10738         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10739                 if test $krb5_impl = mit; then
10740                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10741 echo "configure:10742: checking for main in -lkrb4" >&5
10742 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10743 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10744   echo $ac_n "(cached) $ac_c" 1>&6
10745 else
10746   ac_save_LIBS="$LIBS"
10747 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10748 cat > conftest.$ac_ext <<EOF
10749 #line 10750 "configure"
10750 #include "confdefs.h"
10751
10752 int main() {
10753 main()
10754 ; return 0; }
10755 EOF
10756 if { (eval echo configure:10757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10757   rm -rf conftest*
10758   eval "ac_cv_lib_$ac_lib_var=yes"
10759 else
10760   echo "configure: failed program was:" >&5
10761   cat conftest.$ac_ext >&5
10762   rm -rf conftest*
10763   eval "ac_cv_lib_$ac_lib_var=no"
10764 fi
10765 rm -f conftest*
10766 LIBS="$ac_save_LIBS"
10767
10768 fi
10769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10770   echo "$ac_t""yes" 1>&6
10771   have_k425=yes
10772                                 KRB4_LIBS="-lkrb4 -ldes425"
10773 else
10774   echo "$ac_t""no" 1>&6
10775 have_k425=no
10776 fi
10777
10778
10779                 elif test $krb5_impl = heimdal; then
10780                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10781 echo "configure:10782: checking for main in -lkrb4" >&5
10782 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10783 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10784   echo $ac_n "(cached) $ac_c" 1>&6
10785 else
10786   ac_save_LIBS="$LIBS"
10787 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10788 cat > conftest.$ac_ext <<EOF
10789 #line 10790 "configure"
10790 #include "confdefs.h"
10791
10792 int main() {
10793 main()
10794 ; return 0; }
10795 EOF
10796 if { (eval echo configure:10797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10797   rm -rf conftest*
10798   eval "ac_cv_lib_$ac_lib_var=yes"
10799 else
10800   echo "configure: failed program was:" >&5
10801   cat conftest.$ac_ext >&5
10802   rm -rf conftest*
10803   eval "ac_cv_lib_$ac_lib_var=no"
10804 fi
10805 rm -f conftest*
10806 LIBS="$ac_save_LIBS"
10807
10808 fi
10809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10810   echo "$ac_t""yes" 1>&6
10811   have_k425=yes
10812                                 KRB4_LIBS="-lkrb4"
10813 else
10814   echo "$ac_t""no" 1>&6
10815 have_k425=no
10816 fi
10817
10818
10819                 else
10820                         have_425=no
10821                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10822                 fi
10823
10824                 if test $have_k425 = yes ; then
10825                         ol_with_kerberos=found
10826                         ol_link_krb4=yes
10827
10828                         cat >> confdefs.h <<\EOF
10829 #define HAVE_KRB425 1
10830 EOF
10831
10832                         cat >> confdefs.h <<\EOF
10833 #define HAVE_KRB4 1
10834 EOF
10835
10836
10837                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10838 echo "configure:10839: checking for des_debug in Kerberos libraries" >&5
10839 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10840   echo $ac_n "(cached) $ac_c" 1>&6
10841 else
10842   
10843                                                                 save_LIBS="$LIBS"
10844                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10845                                 cat > conftest.$ac_ext <<EOF
10846 #line 10847 "configure"
10847 #include "confdefs.h"
10848
10849 #include <kerberosIV/krb.h>
10850 #include <kerberosIV/des.h>
10851 extern int des_debug;
10852
10853 int main() {
10854
10855 des_debug = 1;
10856
10857 ; return 0; }
10858 EOF
10859 if { (eval echo configure:10860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10860   rm -rf conftest*
10861   ol_cv_var_des_debug=yes
10862 else
10863   echo "configure: failed program was:" >&5
10864   cat conftest.$ac_ext >&5
10865   rm -rf conftest*
10866   ol_cv_var_des_debug=no
10867 fi
10868 rm -f conftest*
10869                                                                 LIBS="$save_LIBS"
10870                         
10871 fi
10872
10873 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10874
10875                         if test $ol_cv_var_des_debug = yes ; then
10876                                 cat >> confdefs.h <<\EOF
10877 #define HAVE_DES_DEBUG 1
10878 EOF
10879
10880                         fi
10881
10882                         LIBS="$save_LIBS"
10883                 fi
10884         fi
10885 fi
10886
10887 if test $ol_link_krb5 = yes ; then
10888         ol_with_kerberos=found
10889 fi
10890
10891 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10892         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10893
10894         for ac_hdr in krb.h des.h krb-archaeology.h 
10895 do
10896 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10897 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10898 echo "configure:10899: checking for $ac_hdr" >&5
10899 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10900   echo $ac_n "(cached) $ac_c" 1>&6
10901 else
10902   cat > conftest.$ac_ext <<EOF
10903 #line 10904 "configure"
10904 #include "confdefs.h"
10905 #include <$ac_hdr>
10906 EOF
10907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10908 { (eval echo configure:10909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10910 if test -z "$ac_err"; then
10911   rm -rf conftest*
10912   eval "ac_cv_header_$ac_safe=yes"
10913 else
10914   echo "$ac_err" >&5
10915   echo "configure: failed program was:" >&5
10916   cat conftest.$ac_ext >&5
10917   rm -rf conftest*
10918   eval "ac_cv_header_$ac_safe=no"
10919 fi
10920 rm -f conftest*
10921 fi
10922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10923   echo "$ac_t""yes" 1>&6
10924     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10925   cat >> confdefs.h <<EOF
10926 #define $ac_tr_hdr 1
10927 EOF
10928  
10929 else
10930   echo "$ac_t""no" 1>&6
10931 fi
10932 done
10933
10934
10935         if test $ac_cv_header_krb_h = yes ; then
10936                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10937 echo "configure:10938: checking for main in -lkrb" >&5
10938 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10939 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10940   echo $ac_n "(cached) $ac_c" 1>&6
10941 else
10942   ac_save_LIBS="$LIBS"
10943 LIBS="-lkrb -ldes $LIBS"
10944 cat > conftest.$ac_ext <<EOF
10945 #line 10946 "configure"
10946 #include "confdefs.h"
10947
10948 int main() {
10949 main()
10950 ; return 0; }
10951 EOF
10952 if { (eval echo configure:10953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10953   rm -rf conftest*
10954   eval "ac_cv_lib_$ac_lib_var=yes"
10955 else
10956   echo "configure: failed program was:" >&5
10957   cat conftest.$ac_ext >&5
10958   rm -rf conftest*
10959   eval "ac_cv_lib_$ac_lib_var=no"
10960 fi
10961 rm -f conftest*
10962 LIBS="$ac_save_LIBS"
10963
10964 fi
10965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10966   echo "$ac_t""yes" 1>&6
10967   have_k4=yes
10968 else
10969   echo "$ac_t""no" 1>&6
10970 have_k4=no
10971 fi
10972
10973
10974                 if test $have_k4 = yes ; then
10975                         ol_with_kerberos=found
10976                         ol_link_krb4=yes
10977
10978                         cat >> confdefs.h <<\EOF
10979 #define HAVE_KRB4 1
10980 EOF
10981
10982
10983                         KRB4_LIBS="-lkrb -ldes"
10984
10985                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10986                                 cat >> confdefs.h <<\EOF
10987 #define HAVE_KTH_KERBEROS 1
10988 EOF
10989
10990                         fi
10991                 fi
10992         fi
10993 fi
10994
10995 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10996         ol_link_kpasswd=yes
10997 fi
10998
10999 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11000         ol_link_kbind=yes
11001
11002 elif test $ol_enable_kbind = yes ; then
11003         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11004 fi
11005
11006 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11007         cat >> confdefs.h <<\EOF
11008 #define HAVE_KERBEROS 1
11009 EOF
11010
11011
11012 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11013         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11014 fi
11015
11016 ol_link_tls=no
11017 if test $ol_with_tls != no ; then
11018         for ac_hdr in openssl/ssl.h ssl.h
11019 do
11020 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11021 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11022 echo "configure:11023: checking for $ac_hdr" >&5
11023 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11024   echo $ac_n "(cached) $ac_c" 1>&6
11025 else
11026   cat > conftest.$ac_ext <<EOF
11027 #line 11028 "configure"
11028 #include "confdefs.h"
11029 #include <$ac_hdr>
11030 EOF
11031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11032 { (eval echo configure:11033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11034 if test -z "$ac_err"; then
11035   rm -rf conftest*
11036   eval "ac_cv_header_$ac_safe=yes"
11037 else
11038   echo "$ac_err" >&5
11039   echo "configure: failed program was:" >&5
11040   cat conftest.$ac_ext >&5
11041   rm -rf conftest*
11042   eval "ac_cv_header_$ac_safe=no"
11043 fi
11044 rm -f conftest*
11045 fi
11046 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11047   echo "$ac_t""yes" 1>&6
11048     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11049   cat >> confdefs.h <<EOF
11050 #define $ac_tr_hdr 1
11051 EOF
11052  
11053 else
11054   echo "$ac_t""no" 1>&6
11055 fi
11056 done
11057
11058         
11059         if test $ac_cv_header_openssl_ssl_h = yes \
11060                 -o $ac_cv_header_ssl_h = yes ; then
11061                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11062 echo "configure:11063: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11063 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11065   echo $ac_n "(cached) $ac_c" 1>&6
11066 else
11067   ac_save_LIBS="$LIBS"
11068 LIBS="-lssl -lcrypto $LIBS"
11069 cat > conftest.$ac_ext <<EOF
11070 #line 11071 "configure"
11071 #include "confdefs.h"
11072 /* Override any gcc2 internal prototype to avoid an error.  */
11073 /* We use char because int might match the return type of a gcc2
11074     builtin and then its argument prototype would still apply.  */
11075 char SSLeay_add_ssl_algorithms();
11076
11077 int main() {
11078 SSLeay_add_ssl_algorithms()
11079 ; return 0; }
11080 EOF
11081 if { (eval echo configure:11082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11082   rm -rf conftest*
11083   eval "ac_cv_lib_$ac_lib_var=yes"
11084 else
11085   echo "configure: failed program was:" >&5
11086   cat conftest.$ac_ext >&5
11087   rm -rf conftest*
11088   eval "ac_cv_lib_$ac_lib_var=no"
11089 fi
11090 rm -f conftest*
11091 LIBS="$ac_save_LIBS"
11092
11093 fi
11094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11095   echo "$ac_t""yes" 1>&6
11096   have_ssleay=yes
11097                         need_rsaref=no
11098 else
11099   echo "$ac_t""no" 1>&6
11100 have_ssleay=no
11101 fi
11102
11103                         
11104                 if test $have_ssleay = no ; then
11105                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11106 echo "configure:11107: checking for SSL_library_init in -lssl" >&5
11107 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11108 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11109   echo $ac_n "(cached) $ac_c" 1>&6
11110 else
11111   ac_save_LIBS="$LIBS"
11112 LIBS="-lssl -lcrypto $LIBS"
11113 cat > conftest.$ac_ext <<EOF
11114 #line 11115 "configure"
11115 #include "confdefs.h"
11116 /* Override any gcc2 internal prototype to avoid an error.  */
11117 /* We use char because int might match the return type of a gcc2
11118     builtin and then its argument prototype would still apply.  */
11119 char SSL_library_init();
11120
11121 int main() {
11122 SSL_library_init()
11123 ; return 0; }
11124 EOF
11125 if { (eval echo configure:11126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11126   rm -rf conftest*
11127   eval "ac_cv_lib_$ac_lib_var=yes"
11128 else
11129   echo "configure: failed program was:" >&5
11130   cat conftest.$ac_ext >&5
11131   rm -rf conftest*
11132   eval "ac_cv_lib_$ac_lib_var=no"
11133 fi
11134 rm -f conftest*
11135 LIBS="$ac_save_LIBS"
11136
11137 fi
11138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11139   echo "$ac_t""yes" 1>&6
11140   have_ssleay=yes
11141                                 need_rsaref=no
11142 else
11143   echo "$ac_t""no" 1>&6
11144 have_ssleay=no
11145 fi
11146
11147                 fi
11148
11149                 if test $have_ssleay = no ; then
11150                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11151 echo "configure:11152: checking for ssl3_accept in -lssl" >&5
11152 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11153 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11154   echo $ac_n "(cached) $ac_c" 1>&6
11155 else
11156   ac_save_LIBS="$LIBS"
11157 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11158 cat > conftest.$ac_ext <<EOF
11159 #line 11160 "configure"
11160 #include "confdefs.h"
11161 /* Override any gcc2 internal prototype to avoid an error.  */
11162 /* We use char because int might match the return type of a gcc2
11163     builtin and then its argument prototype would still apply.  */
11164 char ssl3_accept();
11165
11166 int main() {
11167 ssl3_accept()
11168 ; return 0; }
11169 EOF
11170 if { (eval echo configure:11171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11171   rm -rf conftest*
11172   eval "ac_cv_lib_$ac_lib_var=yes"
11173 else
11174   echo "configure: failed program was:" >&5
11175   cat conftest.$ac_ext >&5
11176   rm -rf conftest*
11177   eval "ac_cv_lib_$ac_lib_var=no"
11178 fi
11179 rm -f conftest*
11180 LIBS="$ac_save_LIBS"
11181
11182 fi
11183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11184   echo "$ac_t""yes" 1>&6
11185   have_ssleay=yes
11186                                 need_rsaref=yes
11187 else
11188   echo "$ac_t""no" 1>&6
11189 have_ssleay=no
11190 fi
11191
11192                 fi
11193
11194                 if test $have_ssleay = yes ; then
11195                         ol_with_tls=found
11196                         ol_link_tls=yes
11197
11198                         cat >> confdefs.h <<\EOF
11199 #define HAVE_SSLEAY 1
11200 EOF
11201
11202
11203                         if test $need_rsaref = yes; then
11204                                 cat >> confdefs.h <<\EOF
11205 #define HAVE_RSAREF 1
11206 EOF
11207
11208
11209                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11210                         else
11211                                 TLS_LIBS="-lssl -lcrypto"
11212                         fi
11213                 fi
11214         fi
11215
11216 else
11217         echo "configure: warning: TLS data protection not supported!" 1>&2
11218 fi
11219
11220 if test $ol_link_tls = yes ; then
11221         cat >> confdefs.h <<\EOF
11222 #define HAVE_TLS 1
11223 EOF
11224
11225
11226 elif test $ol_with_tls = auto ; then
11227         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11228         echo "configure: warning: TLS data protection not supported!" 1>&2
11229
11230 elif test $ol_with_tls != no ; then
11231         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11232 fi
11233
11234 if test $ol_enable_lmpasswd != no; then
11235         if test $ol_link_tls != yes ; then
11236                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11237         fi
11238
11239         cat >> confdefs.h <<\EOF
11240 #define SLAPD_LMHASH 1
11241 EOF
11242
11243 fi
11244
11245 ol_link_threads=no
11246
11247 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11248         -o $ol_with_threads = nt ; then
11249
11250         
11251         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11252 echo "configure:11253: checking for _beginthread" >&5
11253 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11254   echo $ac_n "(cached) $ac_c" 1>&6
11255 else
11256   cat > conftest.$ac_ext <<EOF
11257 #line 11258 "configure"
11258 #include "confdefs.h"
11259 /* System header to define __stub macros and hopefully few prototypes,
11260     which can conflict with char _beginthread(); below.  */
11261 #include <assert.h>
11262 /* Override any gcc2 internal prototype to avoid an error.  */
11263 /* We use char because int might match the return type of a gcc2
11264     builtin and then its argument prototype would still apply.  */
11265 char _beginthread();
11266 char (*f)();
11267
11268 int main() {
11269
11270 /* The GNU C library defines this for functions which it implements
11271     to always fail with ENOSYS.  Some functions are actually named
11272     something starting with __ and the normal name is an alias.  */
11273 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11274 choke me
11275 #else
11276 f = _beginthread;
11277 #endif
11278
11279 ; return 0; }
11280 EOF
11281 if { (eval echo configure:11282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11282   rm -rf conftest*
11283   eval "ac_cv_func__beginthread=yes"
11284 else
11285   echo "configure: failed program was:" >&5
11286   cat conftest.$ac_ext >&5
11287   rm -rf conftest*
11288   eval "ac_cv_func__beginthread=no"
11289 fi
11290 rm -f conftest*
11291 fi
11292
11293 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11294   echo "$ac_t""yes" 1>&6
11295   :
11296 else
11297   echo "$ac_t""no" 1>&6
11298 fi
11299
11300
11301         if test $ac_cv_func__beginthread = yes ; then
11302                 cat >> confdefs.h <<\EOF
11303 #define HAVE_NT_THREADS 1
11304 EOF
11305
11306                 ol_cv_nt_threads=yes
11307         fi
11308
11309
11310         if test "$ol_cv_nt_threads" = yes ; then
11311                 ol_link_threads=nt
11312                 ol_with_threads=found
11313                 ol_with_yielding_select=yes
11314
11315                 cat >> confdefs.h <<\EOF
11316 #define HAVE_NT_SERVICE_MANAGER 1
11317 EOF
11318
11319                 cat >> confdefs.h <<\EOF
11320 #define HAVE_NT_EVENT_LOG 1
11321 EOF
11322
11323         fi
11324
11325         if test $ol_with_threads = nt ; then
11326                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11327         fi
11328 fi
11329
11330 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11331         -o $ol_with_threads = posix ; then
11332
11333         for ac_hdr in pthread.h
11334 do
11335 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11336 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11337 echo "configure:11338: checking for $ac_hdr" >&5
11338 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11339   echo $ac_n "(cached) $ac_c" 1>&6
11340 else
11341   cat > conftest.$ac_ext <<EOF
11342 #line 11343 "configure"
11343 #include "confdefs.h"
11344 #include <$ac_hdr>
11345 EOF
11346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11347 { (eval echo configure:11348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11349 if test -z "$ac_err"; then
11350   rm -rf conftest*
11351   eval "ac_cv_header_$ac_safe=yes"
11352 else
11353   echo "$ac_err" >&5
11354   echo "configure: failed program was:" >&5
11355   cat conftest.$ac_ext >&5
11356   rm -rf conftest*
11357   eval "ac_cv_header_$ac_safe=no"
11358 fi
11359 rm -f conftest*
11360 fi
11361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11362   echo "$ac_t""yes" 1>&6
11363     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11364   cat >> confdefs.h <<EOF
11365 #define $ac_tr_hdr 1
11366 EOF
11367  
11368 else
11369   echo "$ac_t""no" 1>&6
11370 fi
11371 done
11372
11373
11374         if test $ac_cv_header_pthread_h = yes ; then
11375                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11376 echo "configure:11377: checking POSIX thread version" >&5
11377 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11378   echo $ac_n "(cached) $ac_c" 1>&6
11379 else
11380   
11381         cat > conftest.$ac_ext <<EOF
11382 #line 11383 "configure"
11383 #include "confdefs.h"
11384
11385 #               include <pthread.h>
11386         
11387 int main() {
11388
11389                 int i = PTHREAD_CREATE_JOINABLE;
11390         
11391 ; return 0; }
11392 EOF
11393 if { (eval echo configure:11394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11394   rm -rf conftest*
11395   
11396         cat > conftest.$ac_ext <<EOF
11397 #line 11398 "configure"
11398 #include "confdefs.h"
11399 #include <pthread.h>
11400 EOF
11401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11402   egrep "pthread_detach" >/dev/null 2>&1; then
11403   rm -rf conftest*
11404   ol_cv_pthread_version=10
11405 else
11406   rm -rf conftest*
11407   ol_cv_pthread_version=8
11408 fi
11409 rm -f conftest*
11410
11411 else
11412   echo "configure: failed program was:" >&5
11413   cat conftest.$ac_ext >&5
11414   rm -rf conftest*
11415   
11416         cat > conftest.$ac_ext <<EOF
11417 #line 11418 "configure"
11418 #include "confdefs.h"
11419
11420 #               include <pthread.h>
11421 #               ifdef PTHREAD_CREATE_UNDETACHED
11422                 draft7
11423 #               endif
11424         
11425 EOF
11426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11427   egrep "draft7" >/dev/null 2>&1; then
11428   rm -rf conftest*
11429   ol_cv_pthread_version=7
11430 else
11431   rm -rf conftest*
11432   
11433         cat > conftest.$ac_ext <<EOF
11434 #line 11435 "configure"
11435 #include "confdefs.h"
11436 #include <pthread.h>
11437 EOF
11438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11439   egrep "pthread_attr_init" >/dev/null 2>&1; then
11440   rm -rf conftest*
11441   ol_cv_pthread_version=6
11442 else
11443   rm -rf conftest*
11444   
11445         cat > conftest.$ac_ext <<EOF
11446 #line 11447 "configure"
11447 #include "confdefs.h"
11448
11449 #               include <pthread.h>
11450 #ifdef          PTHREAD_MUTEX_INITIALIZER
11451                 draft5
11452 #endif
11453         
11454 EOF
11455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11456   egrep "draft5" >/dev/null 2>&1; then
11457   rm -rf conftest*
11458   ol_cv_pthread_version=5
11459 else
11460   rm -rf conftest*
11461   ol_cv_pthread_version=4
11462 fi
11463 rm -f conftest*
11464  
11465 fi
11466 rm -f conftest*
11467  
11468 fi
11469 rm -f conftest*
11470  
11471 fi
11472 rm -f conftest*
11473
11474 fi
11475
11476 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11477
11478
11479                 if test $ol_cv_pthread_version != 0 ; then
11480                         cat >> confdefs.h <<EOF
11481 #define HAVE_PTHREADS $ol_cv_pthread_version
11482 EOF
11483
11484                 else
11485                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11486                 fi
11487
11488                 # consider threads found
11489                 ol_with_threads=found
11490
11491                 
11492         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11493 echo "configure:11494: checking for LinuxThreads pthread.h" >&5
11494 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11495   echo $ac_n "(cached) $ac_c" 1>&6
11496 else
11497   cat > conftest.$ac_ext <<EOF
11498 #line 11499 "configure"
11499 #include "confdefs.h"
11500 #include <pthread.h>
11501 EOF
11502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11503   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11504   rm -rf conftest*
11505   ol_cv_header_linux_threads=yes
11506 else
11507   rm -rf conftest*
11508   ol_cv_header_linux_threads=no
11509 fi
11510 rm -f conftest*
11511
11512                 
11513 fi
11514
11515 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11516         if test $ol_cv_header_linux_threads = yes; then
11517                 cat >> confdefs.h <<\EOF
11518 #define HAVE_LINUX_THREADS 1
11519 EOF
11520
11521         fi
11522
11523                 
11524         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11525 echo "configure:11526: checking for GNU Pth pthread.h" >&5
11526 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11527   echo $ac_n "(cached) $ac_c" 1>&6
11528 else
11529   cat > conftest.$ac_ext <<EOF
11530 #line 11531 "configure"
11531 #include "confdefs.h"
11532 #include <pthread.h>
11533 #ifdef _POSIX_THREAD_IS_GNU_PTH
11534         __gnu_pth__;
11535 #endif
11536
11537 EOF
11538 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11539   egrep "__gnu_pth__" >/dev/null 2>&1; then
11540   rm -rf conftest*
11541   ol_cv_header_gnu_pth_pthread_h=yes
11542 else
11543   rm -rf conftest*
11544   ol_cv_header_gnu_pth_pthread_h=no
11545 fi
11546 rm -f conftest*
11547
11548                 
11549 fi
11550
11551 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11552
11553
11554                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11555                         for ac_hdr in sched.h
11556 do
11557 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11558 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11559 echo "configure:11560: checking for $ac_hdr" >&5
11560 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11561   echo $ac_n "(cached) $ac_c" 1>&6
11562 else
11563   cat > conftest.$ac_ext <<EOF
11564 #line 11565 "configure"
11565 #include "confdefs.h"
11566 #include <$ac_hdr>
11567 EOF
11568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11569 { (eval echo configure:11570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11571 if test -z "$ac_err"; then
11572   rm -rf conftest*
11573   eval "ac_cv_header_$ac_safe=yes"
11574 else
11575   echo "$ac_err" >&5
11576   echo "configure: failed program was:" >&5
11577   cat conftest.$ac_ext >&5
11578   rm -rf conftest*
11579   eval "ac_cv_header_$ac_safe=no"
11580 fi
11581 rm -f conftest*
11582 fi
11583 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11584   echo "$ac_t""yes" 1>&6
11585     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11586   cat >> confdefs.h <<EOF
11587 #define $ac_tr_hdr 1
11588 EOF
11589  
11590 else
11591   echo "$ac_t""no" 1>&6
11592 fi
11593 done
11594
11595                 fi
11596
11597                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11598                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11599 echo "configure:11600: checking for pthread_create in default libraries" >&5
11600 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11601   echo $ac_n "(cached) $ac_c" 1>&6
11602 else
11603   
11604                 if test "$cross_compiling" = yes; then
11605   cat > conftest.$ac_ext <<EOF
11606 #line 11607 "configure"
11607 #include "confdefs.h"
11608 /* pthread test headers */
11609 #include <pthread.h>
11610 #if HAVE_PTHREADS < 7
11611 #include <errno.h>
11612 #endif
11613 #ifndef NULL
11614 #define NULL (void*)0
11615 #endif
11616
11617 static void *task(p)
11618         void *p;
11619 {
11620         return (void *) (p == NULL);
11621 }
11622
11623 int main() {
11624
11625         /* pthread test function */
11626 #ifndef PTHREAD_CREATE_DETACHED
11627 #define PTHREAD_CREATE_DETACHED 1
11628 #endif
11629         pthread_t t;
11630         int status;
11631         int detach = PTHREAD_CREATE_DETACHED;
11632
11633 #if HAVE_PTHREADS > 4
11634         /* Final pthreads */
11635         pthread_attr_t attr;
11636
11637         status = pthread_attr_init(&attr);
11638         if( status ) return status;
11639
11640 #if HAVE_PTHREADS < 7
11641         status = pthread_attr_setdetachstate(&attr, &detach);
11642         if( status < 0 ) status = errno;
11643 #else
11644         status = pthread_attr_setdetachstate(&attr, detach);
11645 #endif
11646         if( status ) return status;
11647         status = pthread_create( &t, &attr, task, NULL );
11648 #if HAVE_PTHREADS < 7
11649         if( status < 0 ) status = errno;
11650 #endif
11651         if( status ) return status;
11652 #else
11653         /* Draft 4 pthreads */
11654         status = pthread_create( &t, pthread_attr_default, task, NULL );
11655         if( status ) return errno;
11656
11657         /* give thread a chance to complete */
11658         /* it should remain joinable and hence detachable */
11659         sleep( 1 );
11660
11661         status = pthread_detach( &t );
11662         if( status ) return errno;
11663 #endif
11664
11665 #ifdef HAVE_LINUX_THREADS
11666         pthread_kill_other_threads_np();
11667 #endif
11668
11669         return 0;
11670
11671 ; return 0; }
11672 EOF
11673 if { (eval echo configure:11674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11674   rm -rf conftest*
11675   ol_cv_pthread_create=yes
11676 else
11677   echo "configure: failed program was:" >&5
11678   cat conftest.$ac_ext >&5
11679   rm -rf conftest*
11680   ol_cv_pthread_create=no
11681 fi
11682 rm -f conftest*
11683 else
11684   cat > conftest.$ac_ext <<EOF
11685 #line 11686 "configure"
11686 #include "confdefs.h"
11687 /* pthread test headers */
11688 #include <pthread.h>
11689 #if HAVE_PTHREADS < 7
11690 #include <errno.h>
11691 #endif
11692 #ifndef NULL
11693 #define NULL (void*)0
11694 #endif
11695
11696 static void *task(p)
11697         void *p;
11698 {
11699         return (void *) (p == NULL);
11700 }
11701
11702
11703 int main(argc, argv)
11704         int argc;
11705         char **argv;
11706 {
11707
11708         /* pthread test function */
11709 #ifndef PTHREAD_CREATE_DETACHED
11710 #define PTHREAD_CREATE_DETACHED 1
11711 #endif
11712         pthread_t t;
11713         int status;
11714         int detach = PTHREAD_CREATE_DETACHED;
11715
11716 #if HAVE_PTHREADS > 4
11717         /* Final pthreads */
11718         pthread_attr_t attr;
11719
11720         status = pthread_attr_init(&attr);
11721         if( status ) return status;
11722
11723 #if HAVE_PTHREADS < 7
11724         status = pthread_attr_setdetachstate(&attr, &detach);
11725         if( status < 0 ) status = errno;
11726 #else
11727         status = pthread_attr_setdetachstate(&attr, detach);
11728 #endif
11729         if( status ) return status;
11730         status = pthread_create( &t, &attr, task, NULL );
11731 #if HAVE_PTHREADS < 7
11732         if( status < 0 ) status = errno;
11733 #endif
11734         if( status ) return status;
11735 #else
11736         /* Draft 4 pthreads */
11737         status = pthread_create( &t, pthread_attr_default, task, NULL );
11738         if( status ) return errno;
11739
11740         /* give thread a chance to complete */
11741         /* it should remain joinable and hence detachable */
11742         sleep( 1 );
11743
11744         status = pthread_detach( &t );
11745         if( status ) return errno;
11746 #endif
11747
11748 #ifdef HAVE_LINUX_THREADS
11749         pthread_kill_other_threads_np();
11750 #endif
11751
11752         return 0;
11753
11754 }
11755
11756 EOF
11757 if { (eval echo configure:11758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11758 then
11759   ol_cv_pthread_create=yes
11760 else
11761   echo "configure: failed program was:" >&5
11762   cat conftest.$ac_ext >&5
11763   rm -fr conftest*
11764   ol_cv_pthread_create=no
11765 fi
11766 rm -fr conftest*
11767 fi
11768
11769 fi
11770
11771 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11772
11773                 if test $ol_cv_pthread_create != no ; then
11774                         ol_link_threads=posix
11775                         ol_link_pthreads=""
11776                 fi
11777                 
11778                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11779 if test "$ol_link_threads" = no ; then
11780         # try -kthread
11781         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11782 echo "configure:11783: checking for pthread link with -kthread" >&5
11783 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11784   echo $ac_n "(cached) $ac_c" 1>&6
11785 else
11786   
11787                 # save the flags
11788                 ol_LIBS="$LIBS"
11789                 LIBS="-kthread $LIBS"
11790
11791                 if test "$cross_compiling" = yes; then
11792   cat > conftest.$ac_ext <<EOF
11793 #line 11794 "configure"
11794 #include "confdefs.h"
11795 /* pthread test headers */
11796 #include <pthread.h>
11797 #if HAVE_PTHREADS < 7
11798 #include <errno.h>
11799 #endif
11800 #ifndef NULL
11801 #define NULL (void*)0
11802 #endif
11803
11804 static void *task(p)
11805         void *p;
11806 {
11807         return (void *) (p == NULL);
11808 }
11809
11810 int main() {
11811
11812         /* pthread test function */
11813 #ifndef PTHREAD_CREATE_DETACHED
11814 #define PTHREAD_CREATE_DETACHED 1
11815 #endif
11816         pthread_t t;
11817         int status;
11818         int detach = PTHREAD_CREATE_DETACHED;
11819
11820 #if HAVE_PTHREADS > 4
11821         /* Final pthreads */
11822         pthread_attr_t attr;
11823
11824         status = pthread_attr_init(&attr);
11825         if( status ) return status;
11826
11827 #if HAVE_PTHREADS < 7
11828         status = pthread_attr_setdetachstate(&attr, &detach);
11829         if( status < 0 ) status = errno;
11830 #else
11831         status = pthread_attr_setdetachstate(&attr, detach);
11832 #endif
11833         if( status ) return status;
11834         status = pthread_create( &t, &attr, task, NULL );
11835 #if HAVE_PTHREADS < 7
11836         if( status < 0 ) status = errno;
11837 #endif
11838         if( status ) return status;
11839 #else
11840         /* Draft 4 pthreads */
11841         status = pthread_create( &t, pthread_attr_default, task, NULL );
11842         if( status ) return errno;
11843
11844         /* give thread a chance to complete */
11845         /* it should remain joinable and hence detachable */
11846         sleep( 1 );
11847
11848         status = pthread_detach( &t );
11849         if( status ) return errno;
11850 #endif
11851
11852 #ifdef HAVE_LINUX_THREADS
11853         pthread_kill_other_threads_np();
11854 #endif
11855
11856         return 0;
11857
11858 ; return 0; }
11859 EOF
11860 if { (eval echo configure:11861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11861   rm -rf conftest*
11862   ol_cv_pthread_kthread=yes
11863 else
11864   echo "configure: failed program was:" >&5
11865   cat conftest.$ac_ext >&5
11866   rm -rf conftest*
11867   ol_cv_pthread_kthread=no
11868 fi
11869 rm -f conftest*
11870 else
11871   cat > conftest.$ac_ext <<EOF
11872 #line 11873 "configure"
11873 #include "confdefs.h"
11874 /* pthread test headers */
11875 #include <pthread.h>
11876 #if HAVE_PTHREADS < 7
11877 #include <errno.h>
11878 #endif
11879 #ifndef NULL
11880 #define NULL (void*)0
11881 #endif
11882
11883 static void *task(p)
11884         void *p;
11885 {
11886         return (void *) (p == NULL);
11887 }
11888
11889
11890 int main(argc, argv)
11891         int argc;
11892         char **argv;
11893 {
11894
11895         /* pthread test function */
11896 #ifndef PTHREAD_CREATE_DETACHED
11897 #define PTHREAD_CREATE_DETACHED 1
11898 #endif
11899         pthread_t t;
11900         int status;
11901         int detach = PTHREAD_CREATE_DETACHED;
11902
11903 #if HAVE_PTHREADS > 4
11904         /* Final pthreads */
11905         pthread_attr_t attr;
11906
11907         status = pthread_attr_init(&attr);
11908         if( status ) return status;
11909
11910 #if HAVE_PTHREADS < 7
11911         status = pthread_attr_setdetachstate(&attr, &detach);
11912         if( status < 0 ) status = errno;
11913 #else
11914         status = pthread_attr_setdetachstate(&attr, detach);
11915 #endif
11916         if( status ) return status;
11917         status = pthread_create( &t, &attr, task, NULL );
11918 #if HAVE_PTHREADS < 7
11919         if( status < 0 ) status = errno;
11920 #endif
11921         if( status ) return status;
11922 #else
11923         /* Draft 4 pthreads */
11924         status = pthread_create( &t, pthread_attr_default, task, NULL );
11925         if( status ) return errno;
11926
11927         /* give thread a chance to complete */
11928         /* it should remain joinable and hence detachable */
11929         sleep( 1 );
11930
11931         status = pthread_detach( &t );
11932         if( status ) return errno;
11933 #endif
11934
11935 #ifdef HAVE_LINUX_THREADS
11936         pthread_kill_other_threads_np();
11937 #endif
11938
11939         return 0;
11940
11941 }
11942
11943 EOF
11944 if { (eval echo configure:11945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11945 then
11946   ol_cv_pthread_kthread=yes
11947 else
11948   echo "configure: failed program was:" >&5
11949   cat conftest.$ac_ext >&5
11950   rm -fr conftest*
11951   ol_cv_pthread_kthread=no
11952 fi
11953 rm -fr conftest*
11954 fi
11955
11956
11957                 # restore the LIBS
11958                 LIBS="$ol_LIBS"
11959         
11960 fi
11961
11962 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11963
11964         if test $ol_cv_pthread_kthread = yes ; then
11965                 ol_link_pthreads="-kthread"
11966                 ol_link_threads=posix
11967         fi
11968 fi
11969
11970                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11971 if test "$ol_link_threads" = no ; then
11972         # try -pthread
11973         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11974 echo "configure:11975: checking for pthread link with -pthread" >&5
11975 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11976   echo $ac_n "(cached) $ac_c" 1>&6
11977 else
11978   
11979                 # save the flags
11980                 ol_LIBS="$LIBS"
11981                 LIBS="-pthread $LIBS"
11982
11983                 if test "$cross_compiling" = yes; then
11984   cat > conftest.$ac_ext <<EOF
11985 #line 11986 "configure"
11986 #include "confdefs.h"
11987 /* pthread test headers */
11988 #include <pthread.h>
11989 #if HAVE_PTHREADS < 7
11990 #include <errno.h>
11991 #endif
11992 #ifndef NULL
11993 #define NULL (void*)0
11994 #endif
11995
11996 static void *task(p)
11997         void *p;
11998 {
11999         return (void *) (p == NULL);
12000 }
12001
12002 int main() {
12003
12004         /* pthread test function */
12005 #ifndef PTHREAD_CREATE_DETACHED
12006 #define PTHREAD_CREATE_DETACHED 1
12007 #endif
12008         pthread_t t;
12009         int status;
12010         int detach = PTHREAD_CREATE_DETACHED;
12011
12012 #if HAVE_PTHREADS > 4
12013         /* Final pthreads */
12014         pthread_attr_t attr;
12015
12016         status = pthread_attr_init(&attr);
12017         if( status ) return status;
12018
12019 #if HAVE_PTHREADS < 7
12020         status = pthread_attr_setdetachstate(&attr, &detach);
12021         if( status < 0 ) status = errno;
12022 #else
12023         status = pthread_attr_setdetachstate(&attr, detach);
12024 #endif
12025         if( status ) return status;
12026         status = pthread_create( &t, &attr, task, NULL );
12027 #if HAVE_PTHREADS < 7
12028         if( status < 0 ) status = errno;
12029 #endif
12030         if( status ) return status;
12031 #else
12032         /* Draft 4 pthreads */
12033         status = pthread_create( &t, pthread_attr_default, task, NULL );
12034         if( status ) return errno;
12035
12036         /* give thread a chance to complete */
12037         /* it should remain joinable and hence detachable */
12038         sleep( 1 );
12039
12040         status = pthread_detach( &t );
12041         if( status ) return errno;
12042 #endif
12043
12044 #ifdef HAVE_LINUX_THREADS
12045         pthread_kill_other_threads_np();
12046 #endif
12047
12048         return 0;
12049
12050 ; return 0; }
12051 EOF
12052 if { (eval echo configure:12053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12053   rm -rf conftest*
12054   ol_cv_pthread_pthread=yes
12055 else
12056   echo "configure: failed program was:" >&5
12057   cat conftest.$ac_ext >&5
12058   rm -rf conftest*
12059   ol_cv_pthread_pthread=no
12060 fi
12061 rm -f conftest*
12062 else
12063   cat > conftest.$ac_ext <<EOF
12064 #line 12065 "configure"
12065 #include "confdefs.h"
12066 /* pthread test headers */
12067 #include <pthread.h>
12068 #if HAVE_PTHREADS < 7
12069 #include <errno.h>
12070 #endif
12071 #ifndef NULL
12072 #define NULL (void*)0
12073 #endif
12074
12075 static void *task(p)
12076         void *p;
12077 {
12078         return (void *) (p == NULL);
12079 }
12080
12081
12082 int main(argc, argv)
12083         int argc;
12084         char **argv;
12085 {
12086
12087         /* pthread test function */
12088 #ifndef PTHREAD_CREATE_DETACHED
12089 #define PTHREAD_CREATE_DETACHED 1
12090 #endif
12091         pthread_t t;
12092         int status;
12093         int detach = PTHREAD_CREATE_DETACHED;
12094
12095 #if HAVE_PTHREADS > 4
12096         /* Final pthreads */
12097         pthread_attr_t attr;
12098
12099         status = pthread_attr_init(&attr);
12100         if( status ) return status;
12101
12102 #if HAVE_PTHREADS < 7
12103         status = pthread_attr_setdetachstate(&attr, &detach);
12104         if( status < 0 ) status = errno;
12105 #else
12106         status = pthread_attr_setdetachstate(&attr, detach);
12107 #endif
12108         if( status ) return status;
12109         status = pthread_create( &t, &attr, task, NULL );
12110 #if HAVE_PTHREADS < 7
12111         if( status < 0 ) status = errno;
12112 #endif
12113         if( status ) return status;
12114 #else
12115         /* Draft 4 pthreads */
12116         status = pthread_create( &t, pthread_attr_default, task, NULL );
12117         if( status ) return errno;
12118
12119         /* give thread a chance to complete */
12120         /* it should remain joinable and hence detachable */
12121         sleep( 1 );
12122
12123         status = pthread_detach( &t );
12124         if( status ) return errno;
12125 #endif
12126
12127 #ifdef HAVE_LINUX_THREADS
12128         pthread_kill_other_threads_np();
12129 #endif
12130
12131         return 0;
12132
12133 }
12134
12135 EOF
12136 if { (eval echo configure:12137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12137 then
12138   ol_cv_pthread_pthread=yes
12139 else
12140   echo "configure: failed program was:" >&5
12141   cat conftest.$ac_ext >&5
12142   rm -fr conftest*
12143   ol_cv_pthread_pthread=no
12144 fi
12145 rm -fr conftest*
12146 fi
12147
12148
12149                 # restore the LIBS
12150                 LIBS="$ol_LIBS"
12151         
12152 fi
12153
12154 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12155
12156         if test $ol_cv_pthread_pthread = yes ; then
12157                 ol_link_pthreads="-pthread"
12158                 ol_link_threads=posix
12159         fi
12160 fi
12161
12162                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12163 if test "$ol_link_threads" = no ; then
12164         # try -pthreads
12165         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12166 echo "configure:12167: checking for pthread link with -pthreads" >&5
12167 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12168   echo $ac_n "(cached) $ac_c" 1>&6
12169 else
12170   
12171                 # save the flags
12172                 ol_LIBS="$LIBS"
12173                 LIBS="-pthreads $LIBS"
12174
12175                 if test "$cross_compiling" = yes; then
12176   cat > conftest.$ac_ext <<EOF
12177 #line 12178 "configure"
12178 #include "confdefs.h"
12179 /* pthread test headers */
12180 #include <pthread.h>
12181 #if HAVE_PTHREADS < 7
12182 #include <errno.h>
12183 #endif
12184 #ifndef NULL
12185 #define NULL (void*)0
12186 #endif
12187
12188 static void *task(p)
12189         void *p;
12190 {
12191         return (void *) (p == NULL);
12192 }
12193
12194 int main() {
12195
12196         /* pthread test function */
12197 #ifndef PTHREAD_CREATE_DETACHED
12198 #define PTHREAD_CREATE_DETACHED 1
12199 #endif
12200         pthread_t t;
12201         int status;
12202         int detach = PTHREAD_CREATE_DETACHED;
12203
12204 #if HAVE_PTHREADS > 4
12205         /* Final pthreads */
12206         pthread_attr_t attr;
12207
12208         status = pthread_attr_init(&attr);
12209         if( status ) return status;
12210
12211 #if HAVE_PTHREADS < 7
12212         status = pthread_attr_setdetachstate(&attr, &detach);
12213         if( status < 0 ) status = errno;
12214 #else
12215         status = pthread_attr_setdetachstate(&attr, detach);
12216 #endif
12217         if( status ) return status;
12218         status = pthread_create( &t, &attr, task, NULL );
12219 #if HAVE_PTHREADS < 7
12220         if( status < 0 ) status = errno;
12221 #endif
12222         if( status ) return status;
12223 #else
12224         /* Draft 4 pthreads */
12225         status = pthread_create( &t, pthread_attr_default, task, NULL );
12226         if( status ) return errno;
12227
12228         /* give thread a chance to complete */
12229         /* it should remain joinable and hence detachable */
12230         sleep( 1 );
12231
12232         status = pthread_detach( &t );
12233         if( status ) return errno;
12234 #endif
12235
12236 #ifdef HAVE_LINUX_THREADS
12237         pthread_kill_other_threads_np();
12238 #endif
12239
12240         return 0;
12241
12242 ; return 0; }
12243 EOF
12244 if { (eval echo configure:12245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12245   rm -rf conftest*
12246   ol_cv_pthread_pthreads=yes
12247 else
12248   echo "configure: failed program was:" >&5
12249   cat conftest.$ac_ext >&5
12250   rm -rf conftest*
12251   ol_cv_pthread_pthreads=no
12252 fi
12253 rm -f conftest*
12254 else
12255   cat > conftest.$ac_ext <<EOF
12256 #line 12257 "configure"
12257 #include "confdefs.h"
12258 /* pthread test headers */
12259 #include <pthread.h>
12260 #if HAVE_PTHREADS < 7
12261 #include <errno.h>
12262 #endif
12263 #ifndef NULL
12264 #define NULL (void*)0
12265 #endif
12266
12267 static void *task(p)
12268         void *p;
12269 {
12270         return (void *) (p == NULL);
12271 }
12272
12273
12274 int main(argc, argv)
12275         int argc;
12276         char **argv;
12277 {
12278
12279         /* pthread test function */
12280 #ifndef PTHREAD_CREATE_DETACHED
12281 #define PTHREAD_CREATE_DETACHED 1
12282 #endif
12283         pthread_t t;
12284         int status;
12285         int detach = PTHREAD_CREATE_DETACHED;
12286
12287 #if HAVE_PTHREADS > 4
12288         /* Final pthreads */
12289         pthread_attr_t attr;
12290
12291         status = pthread_attr_init(&attr);
12292         if( status ) return status;
12293
12294 #if HAVE_PTHREADS < 7
12295         status = pthread_attr_setdetachstate(&attr, &detach);
12296         if( status < 0 ) status = errno;
12297 #else
12298         status = pthread_attr_setdetachstate(&attr, detach);
12299 #endif
12300         if( status ) return status;
12301         status = pthread_create( &t, &attr, task, NULL );
12302 #if HAVE_PTHREADS < 7
12303         if( status < 0 ) status = errno;
12304 #endif
12305         if( status ) return status;
12306 #else
12307         /* Draft 4 pthreads */
12308         status = pthread_create( &t, pthread_attr_default, task, NULL );
12309         if( status ) return errno;
12310
12311         /* give thread a chance to complete */
12312         /* it should remain joinable and hence detachable */
12313         sleep( 1 );
12314
12315         status = pthread_detach( &t );
12316         if( status ) return errno;
12317 #endif
12318
12319 #ifdef HAVE_LINUX_THREADS
12320         pthread_kill_other_threads_np();
12321 #endif
12322
12323         return 0;
12324
12325 }
12326
12327 EOF
12328 if { (eval echo configure:12329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12329 then
12330   ol_cv_pthread_pthreads=yes
12331 else
12332   echo "configure: failed program was:" >&5
12333   cat conftest.$ac_ext >&5
12334   rm -fr conftest*
12335   ol_cv_pthread_pthreads=no
12336 fi
12337 rm -fr conftest*
12338 fi
12339
12340
12341                 # restore the LIBS
12342                 LIBS="$ol_LIBS"
12343         
12344 fi
12345
12346 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12347
12348         if test $ol_cv_pthread_pthreads = yes ; then
12349                 ol_link_pthreads="-pthreads"
12350                 ol_link_threads=posix
12351         fi
12352 fi
12353
12354                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12355 if test "$ol_link_threads" = no ; then
12356         # try -mthreads
12357         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12358 echo "configure:12359: checking for pthread link with -mthreads" >&5
12359 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12360   echo $ac_n "(cached) $ac_c" 1>&6
12361 else
12362   
12363                 # save the flags
12364                 ol_LIBS="$LIBS"
12365                 LIBS="-mthreads $LIBS"
12366
12367                 if test "$cross_compiling" = yes; then
12368   cat > conftest.$ac_ext <<EOF
12369 #line 12370 "configure"
12370 #include "confdefs.h"
12371 /* pthread test headers */
12372 #include <pthread.h>
12373 #if HAVE_PTHREADS < 7
12374 #include <errno.h>
12375 #endif
12376 #ifndef NULL
12377 #define NULL (void*)0
12378 #endif
12379
12380 static void *task(p)
12381         void *p;
12382 {
12383         return (void *) (p == NULL);
12384 }
12385
12386 int main() {
12387
12388         /* pthread test function */
12389 #ifndef PTHREAD_CREATE_DETACHED
12390 #define PTHREAD_CREATE_DETACHED 1
12391 #endif
12392         pthread_t t;
12393         int status;
12394         int detach = PTHREAD_CREATE_DETACHED;
12395
12396 #if HAVE_PTHREADS > 4
12397         /* Final pthreads */
12398         pthread_attr_t attr;
12399
12400         status = pthread_attr_init(&attr);
12401         if( status ) return status;
12402
12403 #if HAVE_PTHREADS < 7
12404         status = pthread_attr_setdetachstate(&attr, &detach);
12405         if( status < 0 ) status = errno;
12406 #else
12407         status = pthread_attr_setdetachstate(&attr, detach);
12408 #endif
12409         if( status ) return status;
12410         status = pthread_create( &t, &attr, task, NULL );
12411 #if HAVE_PTHREADS < 7
12412         if( status < 0 ) status = errno;
12413 #endif
12414         if( status ) return status;
12415 #else
12416         /* Draft 4 pthreads */
12417         status = pthread_create( &t, pthread_attr_default, task, NULL );
12418         if( status ) return errno;
12419
12420         /* give thread a chance to complete */
12421         /* it should remain joinable and hence detachable */
12422         sleep( 1 );
12423
12424         status = pthread_detach( &t );
12425         if( status ) return errno;
12426 #endif
12427
12428 #ifdef HAVE_LINUX_THREADS
12429         pthread_kill_other_threads_np();
12430 #endif
12431
12432         return 0;
12433
12434 ; return 0; }
12435 EOF
12436 if { (eval echo configure:12437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12437   rm -rf conftest*
12438   ol_cv_pthread_mthreads=yes
12439 else
12440   echo "configure: failed program was:" >&5
12441   cat conftest.$ac_ext >&5
12442   rm -rf conftest*
12443   ol_cv_pthread_mthreads=no
12444 fi
12445 rm -f conftest*
12446 else
12447   cat > conftest.$ac_ext <<EOF
12448 #line 12449 "configure"
12449 #include "confdefs.h"
12450 /* pthread test headers */
12451 #include <pthread.h>
12452 #if HAVE_PTHREADS < 7
12453 #include <errno.h>
12454 #endif
12455 #ifndef NULL
12456 #define NULL (void*)0
12457 #endif
12458
12459 static void *task(p)
12460         void *p;
12461 {
12462         return (void *) (p == NULL);
12463 }
12464
12465
12466 int main(argc, argv)
12467         int argc;
12468         char **argv;
12469 {
12470
12471         /* pthread test function */
12472 #ifndef PTHREAD_CREATE_DETACHED
12473 #define PTHREAD_CREATE_DETACHED 1
12474 #endif
12475         pthread_t t;
12476         int status;
12477         int detach = PTHREAD_CREATE_DETACHED;
12478
12479 #if HAVE_PTHREADS > 4
12480         /* Final pthreads */
12481         pthread_attr_t attr;
12482
12483         status = pthread_attr_init(&attr);
12484         if( status ) return status;
12485
12486 #if HAVE_PTHREADS < 7
12487         status = pthread_attr_setdetachstate(&attr, &detach);
12488         if( status < 0 ) status = errno;
12489 #else
12490         status = pthread_attr_setdetachstate(&attr, detach);
12491 #endif
12492         if( status ) return status;
12493         status = pthread_create( &t, &attr, task, NULL );
12494 #if HAVE_PTHREADS < 7
12495         if( status < 0 ) status = errno;
12496 #endif
12497         if( status ) return status;
12498 #else
12499         /* Draft 4 pthreads */
12500         status = pthread_create( &t, pthread_attr_default, task, NULL );
12501         if( status ) return errno;
12502
12503         /* give thread a chance to complete */
12504         /* it should remain joinable and hence detachable */
12505         sleep( 1 );
12506
12507         status = pthread_detach( &t );
12508         if( status ) return errno;
12509 #endif
12510
12511 #ifdef HAVE_LINUX_THREADS
12512         pthread_kill_other_threads_np();
12513 #endif
12514
12515         return 0;
12516
12517 }
12518
12519 EOF
12520 if { (eval echo configure:12521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12521 then
12522   ol_cv_pthread_mthreads=yes
12523 else
12524   echo "configure: failed program was:" >&5
12525   cat conftest.$ac_ext >&5
12526   rm -fr conftest*
12527   ol_cv_pthread_mthreads=no
12528 fi
12529 rm -fr conftest*
12530 fi
12531
12532
12533                 # restore the LIBS
12534                 LIBS="$ol_LIBS"
12535         
12536 fi
12537
12538 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12539
12540         if test $ol_cv_pthread_mthreads = yes ; then
12541                 ol_link_pthreads="-mthreads"
12542                 ol_link_threads=posix
12543         fi
12544 fi
12545
12546                 # Pthread try link: -thread (ol_cv_pthread_thread)
12547 if test "$ol_link_threads" = no ; then
12548         # try -thread
12549         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12550 echo "configure:12551: checking for pthread link with -thread" >&5
12551 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12552   echo $ac_n "(cached) $ac_c" 1>&6
12553 else
12554   
12555                 # save the flags
12556                 ol_LIBS="$LIBS"
12557                 LIBS="-thread $LIBS"
12558
12559                 if test "$cross_compiling" = yes; then
12560   cat > conftest.$ac_ext <<EOF
12561 #line 12562 "configure"
12562 #include "confdefs.h"
12563 /* pthread test headers */
12564 #include <pthread.h>
12565 #if HAVE_PTHREADS < 7
12566 #include <errno.h>
12567 #endif
12568 #ifndef NULL
12569 #define NULL (void*)0
12570 #endif
12571
12572 static void *task(p)
12573         void *p;
12574 {
12575         return (void *) (p == NULL);
12576 }
12577
12578 int main() {
12579
12580         /* pthread test function */
12581 #ifndef PTHREAD_CREATE_DETACHED
12582 #define PTHREAD_CREATE_DETACHED 1
12583 #endif
12584         pthread_t t;
12585         int status;
12586         int detach = PTHREAD_CREATE_DETACHED;
12587
12588 #if HAVE_PTHREADS > 4
12589         /* Final pthreads */
12590         pthread_attr_t attr;
12591
12592         status = pthread_attr_init(&attr);
12593         if( status ) return status;
12594
12595 #if HAVE_PTHREADS < 7
12596         status = pthread_attr_setdetachstate(&attr, &detach);
12597         if( status < 0 ) status = errno;
12598 #else
12599         status = pthread_attr_setdetachstate(&attr, detach);
12600 #endif
12601         if( status ) return status;
12602         status = pthread_create( &t, &attr, task, NULL );
12603 #if HAVE_PTHREADS < 7
12604         if( status < 0 ) status = errno;
12605 #endif
12606         if( status ) return status;
12607 #else
12608         /* Draft 4 pthreads */
12609         status = pthread_create( &t, pthread_attr_default, task, NULL );
12610         if( status ) return errno;
12611
12612         /* give thread a chance to complete */
12613         /* it should remain joinable and hence detachable */
12614         sleep( 1 );
12615
12616         status = pthread_detach( &t );
12617         if( status ) return errno;
12618 #endif
12619
12620 #ifdef HAVE_LINUX_THREADS
12621         pthread_kill_other_threads_np();
12622 #endif
12623
12624         return 0;
12625
12626 ; return 0; }
12627 EOF
12628 if { (eval echo configure:12629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12629   rm -rf conftest*
12630   ol_cv_pthread_thread=yes
12631 else
12632   echo "configure: failed program was:" >&5
12633   cat conftest.$ac_ext >&5
12634   rm -rf conftest*
12635   ol_cv_pthread_thread=no
12636 fi
12637 rm -f conftest*
12638 else
12639   cat > conftest.$ac_ext <<EOF
12640 #line 12641 "configure"
12641 #include "confdefs.h"
12642 /* pthread test headers */
12643 #include <pthread.h>
12644 #if HAVE_PTHREADS < 7
12645 #include <errno.h>
12646 #endif
12647 #ifndef NULL
12648 #define NULL (void*)0
12649 #endif
12650
12651 static void *task(p)
12652         void *p;
12653 {
12654         return (void *) (p == NULL);
12655 }
12656
12657
12658 int main(argc, argv)
12659         int argc;
12660         char **argv;
12661 {
12662
12663         /* pthread test function */
12664 #ifndef PTHREAD_CREATE_DETACHED
12665 #define PTHREAD_CREATE_DETACHED 1
12666 #endif
12667         pthread_t t;
12668         int status;
12669         int detach = PTHREAD_CREATE_DETACHED;
12670
12671 #if HAVE_PTHREADS > 4
12672         /* Final pthreads */
12673         pthread_attr_t attr;
12674
12675         status = pthread_attr_init(&attr);
12676         if( status ) return status;
12677
12678 #if HAVE_PTHREADS < 7
12679         status = pthread_attr_setdetachstate(&attr, &detach);
12680         if( status < 0 ) status = errno;
12681 #else
12682         status = pthread_attr_setdetachstate(&attr, detach);
12683 #endif
12684         if( status ) return status;
12685         status = pthread_create( &t, &attr, task, NULL );
12686 #if HAVE_PTHREADS < 7
12687         if( status < 0 ) status = errno;
12688 #endif
12689         if( status ) return status;
12690 #else
12691         /* Draft 4 pthreads */
12692         status = pthread_create( &t, pthread_attr_default, task, NULL );
12693         if( status ) return errno;
12694
12695         /* give thread a chance to complete */
12696         /* it should remain joinable and hence detachable */
12697         sleep( 1 );
12698
12699         status = pthread_detach( &t );
12700         if( status ) return errno;
12701 #endif
12702
12703 #ifdef HAVE_LINUX_THREADS
12704         pthread_kill_other_threads_np();
12705 #endif
12706
12707         return 0;
12708
12709 }
12710
12711 EOF
12712 if { (eval echo configure:12713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12713 then
12714   ol_cv_pthread_thread=yes
12715 else
12716   echo "configure: failed program was:" >&5
12717   cat conftest.$ac_ext >&5
12718   rm -fr conftest*
12719   ol_cv_pthread_thread=no
12720 fi
12721 rm -fr conftest*
12722 fi
12723
12724
12725                 # restore the LIBS
12726                 LIBS="$ol_LIBS"
12727         
12728 fi
12729
12730 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12731
12732         if test $ol_cv_pthread_thread = yes ; then
12733                 ol_link_pthreads="-thread"
12734                 ol_link_threads=posix
12735         fi
12736 fi
12737
12738
12739                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12740 if test "$ol_link_threads" = no ; then
12741         # try -lpthread -lmach -lexc -lc_r
12742         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12743 echo "configure:12744: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12744 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12745   echo $ac_n "(cached) $ac_c" 1>&6
12746 else
12747   
12748                 # save the flags
12749                 ol_LIBS="$LIBS"
12750                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12751
12752                 if test "$cross_compiling" = yes; then
12753   cat > conftest.$ac_ext <<EOF
12754 #line 12755 "configure"
12755 #include "confdefs.h"
12756 /* pthread test headers */
12757 #include <pthread.h>
12758 #if HAVE_PTHREADS < 7
12759 #include <errno.h>
12760 #endif
12761 #ifndef NULL
12762 #define NULL (void*)0
12763 #endif
12764
12765 static void *task(p)
12766         void *p;
12767 {
12768         return (void *) (p == NULL);
12769 }
12770
12771 int main() {
12772
12773         /* pthread test function */
12774 #ifndef PTHREAD_CREATE_DETACHED
12775 #define PTHREAD_CREATE_DETACHED 1
12776 #endif
12777         pthread_t t;
12778         int status;
12779         int detach = PTHREAD_CREATE_DETACHED;
12780
12781 #if HAVE_PTHREADS > 4
12782         /* Final pthreads */
12783         pthread_attr_t attr;
12784
12785         status = pthread_attr_init(&attr);
12786         if( status ) return status;
12787
12788 #if HAVE_PTHREADS < 7
12789         status = pthread_attr_setdetachstate(&attr, &detach);
12790         if( status < 0 ) status = errno;
12791 #else
12792         status = pthread_attr_setdetachstate(&attr, detach);
12793 #endif
12794         if( status ) return status;
12795         status = pthread_create( &t, &attr, task, NULL );
12796 #if HAVE_PTHREADS < 7
12797         if( status < 0 ) status = errno;
12798 #endif
12799         if( status ) return status;
12800 #else
12801         /* Draft 4 pthreads */
12802         status = pthread_create( &t, pthread_attr_default, task, NULL );
12803         if( status ) return errno;
12804
12805         /* give thread a chance to complete */
12806         /* it should remain joinable and hence detachable */
12807         sleep( 1 );
12808
12809         status = pthread_detach( &t );
12810         if( status ) return errno;
12811 #endif
12812
12813 #ifdef HAVE_LINUX_THREADS
12814         pthread_kill_other_threads_np();
12815 #endif
12816
12817         return 0;
12818
12819 ; return 0; }
12820 EOF
12821 if { (eval echo configure:12822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12822   rm -rf conftest*
12823   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12824 else
12825   echo "configure: failed program was:" >&5
12826   cat conftest.$ac_ext >&5
12827   rm -rf conftest*
12828   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12829 fi
12830 rm -f conftest*
12831 else
12832   cat > conftest.$ac_ext <<EOF
12833 #line 12834 "configure"
12834 #include "confdefs.h"
12835 /* pthread test headers */
12836 #include <pthread.h>
12837 #if HAVE_PTHREADS < 7
12838 #include <errno.h>
12839 #endif
12840 #ifndef NULL
12841 #define NULL (void*)0
12842 #endif
12843
12844 static void *task(p)
12845         void *p;
12846 {
12847         return (void *) (p == NULL);
12848 }
12849
12850
12851 int main(argc, argv)
12852         int argc;
12853         char **argv;
12854 {
12855
12856         /* pthread test function */
12857 #ifndef PTHREAD_CREATE_DETACHED
12858 #define PTHREAD_CREATE_DETACHED 1
12859 #endif
12860         pthread_t t;
12861         int status;
12862         int detach = PTHREAD_CREATE_DETACHED;
12863
12864 #if HAVE_PTHREADS > 4
12865         /* Final pthreads */
12866         pthread_attr_t attr;
12867
12868         status = pthread_attr_init(&attr);
12869         if( status ) return status;
12870
12871 #if HAVE_PTHREADS < 7
12872         status = pthread_attr_setdetachstate(&attr, &detach);
12873         if( status < 0 ) status = errno;
12874 #else
12875         status = pthread_attr_setdetachstate(&attr, detach);
12876 #endif
12877         if( status ) return status;
12878         status = pthread_create( &t, &attr, task, NULL );
12879 #if HAVE_PTHREADS < 7
12880         if( status < 0 ) status = errno;
12881 #endif
12882         if( status ) return status;
12883 #else
12884         /* Draft 4 pthreads */
12885         status = pthread_create( &t, pthread_attr_default, task, NULL );
12886         if( status ) return errno;
12887
12888         /* give thread a chance to complete */
12889         /* it should remain joinable and hence detachable */
12890         sleep( 1 );
12891
12892         status = pthread_detach( &t );
12893         if( status ) return errno;
12894 #endif
12895
12896 #ifdef HAVE_LINUX_THREADS
12897         pthread_kill_other_threads_np();
12898 #endif
12899
12900         return 0;
12901
12902 }
12903
12904 EOF
12905 if { (eval echo configure:12906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12906 then
12907   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12908 else
12909   echo "configure: failed program was:" >&5
12910   cat conftest.$ac_ext >&5
12911   rm -fr conftest*
12912   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12913 fi
12914 rm -fr conftest*
12915 fi
12916
12917
12918                 # restore the LIBS
12919                 LIBS="$ol_LIBS"
12920         
12921 fi
12922
12923 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12924
12925         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12926                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12927                 ol_link_threads=posix
12928         fi
12929 fi
12930
12931                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12932 if test "$ol_link_threads" = no ; then
12933         # try -lpthread -lmach -lexc
12934         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12935 echo "configure:12936: checking for pthread link with -lpthread -lmach -lexc" >&5
12936 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12937   echo $ac_n "(cached) $ac_c" 1>&6
12938 else
12939   
12940                 # save the flags
12941                 ol_LIBS="$LIBS"
12942                 LIBS="-lpthread -lmach -lexc $LIBS"
12943
12944                 if test "$cross_compiling" = yes; then
12945   cat > conftest.$ac_ext <<EOF
12946 #line 12947 "configure"
12947 #include "confdefs.h"
12948 /* pthread test headers */
12949 #include <pthread.h>
12950 #if HAVE_PTHREADS < 7
12951 #include <errno.h>
12952 #endif
12953 #ifndef NULL
12954 #define NULL (void*)0
12955 #endif
12956
12957 static void *task(p)
12958         void *p;
12959 {
12960         return (void *) (p == NULL);
12961 }
12962
12963 int main() {
12964
12965         /* pthread test function */
12966 #ifndef PTHREAD_CREATE_DETACHED
12967 #define PTHREAD_CREATE_DETACHED 1
12968 #endif
12969         pthread_t t;
12970         int status;
12971         int detach = PTHREAD_CREATE_DETACHED;
12972
12973 #if HAVE_PTHREADS > 4
12974         /* Final pthreads */
12975         pthread_attr_t attr;
12976
12977         status = pthread_attr_init(&attr);
12978         if( status ) return status;
12979
12980 #if HAVE_PTHREADS < 7
12981         status = pthread_attr_setdetachstate(&attr, &detach);
12982         if( status < 0 ) status = errno;
12983 #else
12984         status = pthread_attr_setdetachstate(&attr, detach);
12985 #endif
12986         if( status ) return status;
12987         status = pthread_create( &t, &attr, task, NULL );
12988 #if HAVE_PTHREADS < 7
12989         if( status < 0 ) status = errno;
12990 #endif
12991         if( status ) return status;
12992 #else
12993         /* Draft 4 pthreads */
12994         status = pthread_create( &t, pthread_attr_default, task, NULL );
12995         if( status ) return errno;
12996
12997         /* give thread a chance to complete */
12998         /* it should remain joinable and hence detachable */
12999         sleep( 1 );
13000
13001         status = pthread_detach( &t );
13002         if( status ) return errno;
13003 #endif
13004
13005 #ifdef HAVE_LINUX_THREADS
13006         pthread_kill_other_threads_np();
13007 #endif
13008
13009         return 0;
13010
13011 ; return 0; }
13012 EOF
13013 if { (eval echo configure:13014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13014   rm -rf conftest*
13015   ol_cv_pthread_lpthread_lmach_lexc=yes
13016 else
13017   echo "configure: failed program was:" >&5
13018   cat conftest.$ac_ext >&5
13019   rm -rf conftest*
13020   ol_cv_pthread_lpthread_lmach_lexc=no
13021 fi
13022 rm -f conftest*
13023 else
13024   cat > conftest.$ac_ext <<EOF
13025 #line 13026 "configure"
13026 #include "confdefs.h"
13027 /* pthread test headers */
13028 #include <pthread.h>
13029 #if HAVE_PTHREADS < 7
13030 #include <errno.h>
13031 #endif
13032 #ifndef NULL
13033 #define NULL (void*)0
13034 #endif
13035
13036 static void *task(p)
13037         void *p;
13038 {
13039         return (void *) (p == NULL);
13040 }
13041
13042
13043 int main(argc, argv)
13044         int argc;
13045         char **argv;
13046 {
13047
13048         /* pthread test function */
13049 #ifndef PTHREAD_CREATE_DETACHED
13050 #define PTHREAD_CREATE_DETACHED 1
13051 #endif
13052         pthread_t t;
13053         int status;
13054         int detach = PTHREAD_CREATE_DETACHED;
13055
13056 #if HAVE_PTHREADS > 4
13057         /* Final pthreads */
13058         pthread_attr_t attr;
13059
13060         status = pthread_attr_init(&attr);
13061         if( status ) return status;
13062
13063 #if HAVE_PTHREADS < 7
13064         status = pthread_attr_setdetachstate(&attr, &detach);
13065         if( status < 0 ) status = errno;
13066 #else
13067         status = pthread_attr_setdetachstate(&attr, detach);
13068 #endif
13069         if( status ) return status;
13070         status = pthread_create( &t, &attr, task, NULL );
13071 #if HAVE_PTHREADS < 7
13072         if( status < 0 ) status = errno;
13073 #endif
13074         if( status ) return status;
13075 #else
13076         /* Draft 4 pthreads */
13077         status = pthread_create( &t, pthread_attr_default, task, NULL );
13078         if( status ) return errno;
13079
13080         /* give thread a chance to complete */
13081         /* it should remain joinable and hence detachable */
13082         sleep( 1 );
13083
13084         status = pthread_detach( &t );
13085         if( status ) return errno;
13086 #endif
13087
13088 #ifdef HAVE_LINUX_THREADS
13089         pthread_kill_other_threads_np();
13090 #endif
13091
13092         return 0;
13093
13094 }
13095
13096 EOF
13097 if { (eval echo configure:13098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13098 then
13099   ol_cv_pthread_lpthread_lmach_lexc=yes
13100 else
13101   echo "configure: failed program was:" >&5
13102   cat conftest.$ac_ext >&5
13103   rm -fr conftest*
13104   ol_cv_pthread_lpthread_lmach_lexc=no
13105 fi
13106 rm -fr conftest*
13107 fi
13108
13109
13110                 # restore the LIBS
13111                 LIBS="$ol_LIBS"
13112         
13113 fi
13114
13115 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13116
13117         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13118                 ol_link_pthreads="-lpthread -lmach -lexc"
13119                 ol_link_threads=posix
13120         fi
13121 fi
13122
13123
13124                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13125 if test "$ol_link_threads" = no ; then
13126         # try -lpthread -Wl,-woff,85
13127         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13128 echo "configure:13129: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13129 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13130   echo $ac_n "(cached) $ac_c" 1>&6
13131 else
13132   
13133                 # save the flags
13134                 ol_LIBS="$LIBS"
13135                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13136
13137                 if test "$cross_compiling" = yes; then
13138   cat > conftest.$ac_ext <<EOF
13139 #line 13140 "configure"
13140 #include "confdefs.h"
13141 /* pthread test headers */
13142 #include <pthread.h>
13143 #if HAVE_PTHREADS < 7
13144 #include <errno.h>
13145 #endif
13146 #ifndef NULL
13147 #define NULL (void*)0
13148 #endif
13149
13150 static void *task(p)
13151         void *p;
13152 {
13153         return (void *) (p == NULL);
13154 }
13155
13156 int main() {
13157
13158         /* pthread test function */
13159 #ifndef PTHREAD_CREATE_DETACHED
13160 #define PTHREAD_CREATE_DETACHED 1
13161 #endif
13162         pthread_t t;
13163         int status;
13164         int detach = PTHREAD_CREATE_DETACHED;
13165
13166 #if HAVE_PTHREADS > 4
13167         /* Final pthreads */
13168         pthread_attr_t attr;
13169
13170         status = pthread_attr_init(&attr);
13171         if( status ) return status;
13172
13173 #if HAVE_PTHREADS < 7
13174         status = pthread_attr_setdetachstate(&attr, &detach);
13175         if( status < 0 ) status = errno;
13176 #else
13177         status = pthread_attr_setdetachstate(&attr, detach);
13178 #endif
13179         if( status ) return status;
13180         status = pthread_create( &t, &attr, task, NULL );
13181 #if HAVE_PTHREADS < 7
13182         if( status < 0 ) status = errno;
13183 #endif
13184         if( status ) return status;
13185 #else
13186         /* Draft 4 pthreads */
13187         status = pthread_create( &t, pthread_attr_default, task, NULL );
13188         if( status ) return errno;
13189
13190         /* give thread a chance to complete */
13191         /* it should remain joinable and hence detachable */
13192         sleep( 1 );
13193
13194         status = pthread_detach( &t );
13195         if( status ) return errno;
13196 #endif
13197
13198 #ifdef HAVE_LINUX_THREADS
13199         pthread_kill_other_threads_np();
13200 #endif
13201
13202         return 0;
13203
13204 ; return 0; }
13205 EOF
13206 if { (eval echo configure:13207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13207   rm -rf conftest*
13208   ol_cv_pthread_lib_lpthread_woff=yes
13209 else
13210   echo "configure: failed program was:" >&5
13211   cat conftest.$ac_ext >&5
13212   rm -rf conftest*
13213   ol_cv_pthread_lib_lpthread_woff=no
13214 fi
13215 rm -f conftest*
13216 else
13217   cat > conftest.$ac_ext <<EOF
13218 #line 13219 "configure"
13219 #include "confdefs.h"
13220 /* pthread test headers */
13221 #include <pthread.h>
13222 #if HAVE_PTHREADS < 7
13223 #include <errno.h>
13224 #endif
13225 #ifndef NULL
13226 #define NULL (void*)0
13227 #endif
13228
13229 static void *task(p)
13230         void *p;
13231 {
13232         return (void *) (p == NULL);
13233 }
13234
13235
13236 int main(argc, argv)
13237         int argc;
13238         char **argv;
13239 {
13240
13241         /* pthread test function */
13242 #ifndef PTHREAD_CREATE_DETACHED
13243 #define PTHREAD_CREATE_DETACHED 1
13244 #endif
13245         pthread_t t;
13246         int status;
13247         int detach = PTHREAD_CREATE_DETACHED;
13248
13249 #if HAVE_PTHREADS > 4
13250         /* Final pthreads */
13251         pthread_attr_t attr;
13252
13253         status = pthread_attr_init(&attr);
13254         if( status ) return status;
13255
13256 #if HAVE_PTHREADS < 7
13257         status = pthread_attr_setdetachstate(&attr, &detach);
13258         if( status < 0 ) status = errno;
13259 #else
13260         status = pthread_attr_setdetachstate(&attr, detach);
13261 #endif
13262         if( status ) return status;
13263         status = pthread_create( &t, &attr, task, NULL );
13264 #if HAVE_PTHREADS < 7
13265         if( status < 0 ) status = errno;
13266 #endif
13267         if( status ) return status;
13268 #else
13269         /* Draft 4 pthreads */
13270         status = pthread_create( &t, pthread_attr_default, task, NULL );
13271         if( status ) return errno;
13272
13273         /* give thread a chance to complete */
13274         /* it should remain joinable and hence detachable */
13275         sleep( 1 );
13276
13277         status = pthread_detach( &t );
13278         if( status ) return errno;
13279 #endif
13280
13281 #ifdef HAVE_LINUX_THREADS
13282         pthread_kill_other_threads_np();
13283 #endif
13284
13285         return 0;
13286
13287 }
13288
13289 EOF
13290 if { (eval echo configure:13291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13291 then
13292   ol_cv_pthread_lib_lpthread_woff=yes
13293 else
13294   echo "configure: failed program was:" >&5
13295   cat conftest.$ac_ext >&5
13296   rm -fr conftest*
13297   ol_cv_pthread_lib_lpthread_woff=no
13298 fi
13299 rm -fr conftest*
13300 fi
13301
13302
13303                 # restore the LIBS
13304                 LIBS="$ol_LIBS"
13305         
13306 fi
13307
13308 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13309
13310         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13311                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13312                 ol_link_threads=posix
13313         fi
13314 fi
13315
13316
13317                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13318 if test "$ol_link_threads" = no ; then
13319         # try -lpthread
13320         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13321 echo "configure:13322: checking for pthread link with -lpthread" >&5
13322 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13323   echo $ac_n "(cached) $ac_c" 1>&6
13324 else
13325   
13326                 # save the flags
13327                 ol_LIBS="$LIBS"
13328                 LIBS="-lpthread $LIBS"
13329
13330                 if test "$cross_compiling" = yes; then
13331   cat > conftest.$ac_ext <<EOF
13332 #line 13333 "configure"
13333 #include "confdefs.h"
13334 /* pthread test headers */
13335 #include <pthread.h>
13336 #if HAVE_PTHREADS < 7
13337 #include <errno.h>
13338 #endif
13339 #ifndef NULL
13340 #define NULL (void*)0
13341 #endif
13342
13343 static void *task(p)
13344         void *p;
13345 {
13346         return (void *) (p == NULL);
13347 }
13348
13349 int main() {
13350
13351         /* pthread test function */
13352 #ifndef PTHREAD_CREATE_DETACHED
13353 #define PTHREAD_CREATE_DETACHED 1
13354 #endif
13355         pthread_t t;
13356         int status;
13357         int detach = PTHREAD_CREATE_DETACHED;
13358
13359 #if HAVE_PTHREADS > 4
13360         /* Final pthreads */
13361         pthread_attr_t attr;
13362
13363         status = pthread_attr_init(&attr);
13364         if( status ) return status;
13365
13366 #if HAVE_PTHREADS < 7
13367         status = pthread_attr_setdetachstate(&attr, &detach);
13368         if( status < 0 ) status = errno;
13369 #else
13370         status = pthread_attr_setdetachstate(&attr, detach);
13371 #endif
13372         if( status ) return status;
13373         status = pthread_create( &t, &attr, task, NULL );
13374 #if HAVE_PTHREADS < 7
13375         if( status < 0 ) status = errno;
13376 #endif
13377         if( status ) return status;
13378 #else
13379         /* Draft 4 pthreads */
13380         status = pthread_create( &t, pthread_attr_default, task, NULL );
13381         if( status ) return errno;
13382
13383         /* give thread a chance to complete */
13384         /* it should remain joinable and hence detachable */
13385         sleep( 1 );
13386
13387         status = pthread_detach( &t );
13388         if( status ) return errno;
13389 #endif
13390
13391 #ifdef HAVE_LINUX_THREADS
13392         pthread_kill_other_threads_np();
13393 #endif
13394
13395         return 0;
13396
13397 ; return 0; }
13398 EOF
13399 if { (eval echo configure:13400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13400   rm -rf conftest*
13401   ol_cv_pthread_lpthread=yes
13402 else
13403   echo "configure: failed program was:" >&5
13404   cat conftest.$ac_ext >&5
13405   rm -rf conftest*
13406   ol_cv_pthread_lpthread=no
13407 fi
13408 rm -f conftest*
13409 else
13410   cat > conftest.$ac_ext <<EOF
13411 #line 13412 "configure"
13412 #include "confdefs.h"
13413 /* pthread test headers */
13414 #include <pthread.h>
13415 #if HAVE_PTHREADS < 7
13416 #include <errno.h>
13417 #endif
13418 #ifndef NULL
13419 #define NULL (void*)0
13420 #endif
13421
13422 static void *task(p)
13423         void *p;
13424 {
13425         return (void *) (p == NULL);
13426 }
13427
13428
13429 int main(argc, argv)
13430         int argc;
13431         char **argv;
13432 {
13433
13434         /* pthread test function */
13435 #ifndef PTHREAD_CREATE_DETACHED
13436 #define PTHREAD_CREATE_DETACHED 1
13437 #endif
13438         pthread_t t;
13439         int status;
13440         int detach = PTHREAD_CREATE_DETACHED;
13441
13442 #if HAVE_PTHREADS > 4
13443         /* Final pthreads */
13444         pthread_attr_t attr;
13445
13446         status = pthread_attr_init(&attr);
13447         if( status ) return status;
13448
13449 #if HAVE_PTHREADS < 7
13450         status = pthread_attr_setdetachstate(&attr, &detach);
13451         if( status < 0 ) status = errno;
13452 #else
13453         status = pthread_attr_setdetachstate(&attr, detach);
13454 #endif
13455         if( status ) return status;
13456         status = pthread_create( &t, &attr, task, NULL );
13457 #if HAVE_PTHREADS < 7
13458         if( status < 0 ) status = errno;
13459 #endif
13460         if( status ) return status;
13461 #else
13462         /* Draft 4 pthreads */
13463         status = pthread_create( &t, pthread_attr_default, task, NULL );
13464         if( status ) return errno;
13465
13466         /* give thread a chance to complete */
13467         /* it should remain joinable and hence detachable */
13468         sleep( 1 );
13469
13470         status = pthread_detach( &t );
13471         if( status ) return errno;
13472 #endif
13473
13474 #ifdef HAVE_LINUX_THREADS
13475         pthread_kill_other_threads_np();
13476 #endif
13477
13478         return 0;
13479
13480 }
13481
13482 EOF
13483 if { (eval echo configure:13484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13484 then
13485   ol_cv_pthread_lpthread=yes
13486 else
13487   echo "configure: failed program was:" >&5
13488   cat conftest.$ac_ext >&5
13489   rm -fr conftest*
13490   ol_cv_pthread_lpthread=no
13491 fi
13492 rm -fr conftest*
13493 fi
13494
13495
13496                 # restore the LIBS
13497                 LIBS="$ol_LIBS"
13498         
13499 fi
13500
13501 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13502
13503         if test $ol_cv_pthread_lpthread = yes ; then
13504                 ol_link_pthreads="-lpthread"
13505                 ol_link_threads=posix
13506         fi
13507 fi
13508
13509                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13510 if test "$ol_link_threads" = no ; then
13511         # try -lc_r
13512         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13513 echo "configure:13514: checking for pthread link with -lc_r" >&5
13514 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13515   echo $ac_n "(cached) $ac_c" 1>&6
13516 else
13517   
13518                 # save the flags
13519                 ol_LIBS="$LIBS"
13520                 LIBS="-lc_r $LIBS"
13521
13522                 if test "$cross_compiling" = yes; then
13523   cat > conftest.$ac_ext <<EOF
13524 #line 13525 "configure"
13525 #include "confdefs.h"
13526 /* pthread test headers */
13527 #include <pthread.h>
13528 #if HAVE_PTHREADS < 7
13529 #include <errno.h>
13530 #endif
13531 #ifndef NULL
13532 #define NULL (void*)0
13533 #endif
13534
13535 static void *task(p)
13536         void *p;
13537 {
13538         return (void *) (p == NULL);
13539 }
13540
13541 int main() {
13542
13543         /* pthread test function */
13544 #ifndef PTHREAD_CREATE_DETACHED
13545 #define PTHREAD_CREATE_DETACHED 1
13546 #endif
13547         pthread_t t;
13548         int status;
13549         int detach = PTHREAD_CREATE_DETACHED;
13550
13551 #if HAVE_PTHREADS > 4
13552         /* Final pthreads */
13553         pthread_attr_t attr;
13554
13555         status = pthread_attr_init(&attr);
13556         if( status ) return status;
13557
13558 #if HAVE_PTHREADS < 7
13559         status = pthread_attr_setdetachstate(&attr, &detach);
13560         if( status < 0 ) status = errno;
13561 #else
13562         status = pthread_attr_setdetachstate(&attr, detach);
13563 #endif
13564         if( status ) return status;
13565         status = pthread_create( &t, &attr, task, NULL );
13566 #if HAVE_PTHREADS < 7
13567         if( status < 0 ) status = errno;
13568 #endif
13569         if( status ) return status;
13570 #else
13571         /* Draft 4 pthreads */
13572         status = pthread_create( &t, pthread_attr_default, task, NULL );
13573         if( status ) return errno;
13574
13575         /* give thread a chance to complete */
13576         /* it should remain joinable and hence detachable */
13577         sleep( 1 );
13578
13579         status = pthread_detach( &t );
13580         if( status ) return errno;
13581 #endif
13582
13583 #ifdef HAVE_LINUX_THREADS
13584         pthread_kill_other_threads_np();
13585 #endif
13586
13587         return 0;
13588
13589 ; return 0; }
13590 EOF
13591 if { (eval echo configure:13592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13592   rm -rf conftest*
13593   ol_cv_pthread_lc_r=yes
13594 else
13595   echo "configure: failed program was:" >&5
13596   cat conftest.$ac_ext >&5
13597   rm -rf conftest*
13598   ol_cv_pthread_lc_r=no
13599 fi
13600 rm -f conftest*
13601 else
13602   cat > conftest.$ac_ext <<EOF
13603 #line 13604 "configure"
13604 #include "confdefs.h"
13605 /* pthread test headers */
13606 #include <pthread.h>
13607 #if HAVE_PTHREADS < 7
13608 #include <errno.h>
13609 #endif
13610 #ifndef NULL
13611 #define NULL (void*)0
13612 #endif
13613
13614 static void *task(p)
13615         void *p;
13616 {
13617         return (void *) (p == NULL);
13618 }
13619
13620
13621 int main(argc, argv)
13622         int argc;
13623         char **argv;
13624 {
13625
13626         /* pthread test function */
13627 #ifndef PTHREAD_CREATE_DETACHED
13628 #define PTHREAD_CREATE_DETACHED 1
13629 #endif
13630         pthread_t t;
13631         int status;
13632         int detach = PTHREAD_CREATE_DETACHED;
13633
13634 #if HAVE_PTHREADS > 4
13635         /* Final pthreads */
13636         pthread_attr_t attr;
13637
13638         status = pthread_attr_init(&attr);
13639         if( status ) return status;
13640
13641 #if HAVE_PTHREADS < 7
13642         status = pthread_attr_setdetachstate(&attr, &detach);
13643         if( status < 0 ) status = errno;
13644 #else
13645         status = pthread_attr_setdetachstate(&attr, detach);
13646 #endif
13647         if( status ) return status;
13648         status = pthread_create( &t, &attr, task, NULL );
13649 #if HAVE_PTHREADS < 7
13650         if( status < 0 ) status = errno;
13651 #endif
13652         if( status ) return status;
13653 #else
13654         /* Draft 4 pthreads */
13655         status = pthread_create( &t, pthread_attr_default, task, NULL );
13656         if( status ) return errno;
13657
13658         /* give thread a chance to complete */
13659         /* it should remain joinable and hence detachable */
13660         sleep( 1 );
13661
13662         status = pthread_detach( &t );
13663         if( status ) return errno;
13664 #endif
13665
13666 #ifdef HAVE_LINUX_THREADS
13667         pthread_kill_other_threads_np();
13668 #endif
13669
13670         return 0;
13671
13672 }
13673
13674 EOF
13675 if { (eval echo configure:13676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13676 then
13677   ol_cv_pthread_lc_r=yes
13678 else
13679   echo "configure: failed program was:" >&5
13680   cat conftest.$ac_ext >&5
13681   rm -fr conftest*
13682   ol_cv_pthread_lc_r=no
13683 fi
13684 rm -fr conftest*
13685 fi
13686
13687
13688                 # restore the LIBS
13689                 LIBS="$ol_LIBS"
13690         
13691 fi
13692
13693 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13694
13695         if test $ol_cv_pthread_lc_r = yes ; then
13696                 ol_link_pthreads="-lc_r"
13697                 ol_link_threads=posix
13698         fi
13699 fi
13700
13701
13702                 # Pthread try link: -threads (ol_cv_pthread_threads)
13703 if test "$ol_link_threads" = no ; then
13704         # try -threads
13705         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13706 echo "configure:13707: checking for pthread link with -threads" >&5
13707 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13708   echo $ac_n "(cached) $ac_c" 1>&6
13709 else
13710   
13711                 # save the flags
13712                 ol_LIBS="$LIBS"
13713                 LIBS="-threads $LIBS"
13714
13715                 if test "$cross_compiling" = yes; then
13716   cat > conftest.$ac_ext <<EOF
13717 #line 13718 "configure"
13718 #include "confdefs.h"
13719 /* pthread test headers */
13720 #include <pthread.h>
13721 #if HAVE_PTHREADS < 7
13722 #include <errno.h>
13723 #endif
13724 #ifndef NULL
13725 #define NULL (void*)0
13726 #endif
13727
13728 static void *task(p)
13729         void *p;
13730 {
13731         return (void *) (p == NULL);
13732 }
13733
13734 int main() {
13735
13736         /* pthread test function */
13737 #ifndef PTHREAD_CREATE_DETACHED
13738 #define PTHREAD_CREATE_DETACHED 1
13739 #endif
13740         pthread_t t;
13741         int status;
13742         int detach = PTHREAD_CREATE_DETACHED;
13743
13744 #if HAVE_PTHREADS > 4
13745         /* Final pthreads */
13746         pthread_attr_t attr;
13747
13748         status = pthread_attr_init(&attr);
13749         if( status ) return status;
13750
13751 #if HAVE_PTHREADS < 7
13752         status = pthread_attr_setdetachstate(&attr, &detach);
13753         if( status < 0 ) status = errno;
13754 #else
13755         status = pthread_attr_setdetachstate(&attr, detach);
13756 #endif
13757         if( status ) return status;
13758         status = pthread_create( &t, &attr, task, NULL );
13759 #if HAVE_PTHREADS < 7
13760         if( status < 0 ) status = errno;
13761 #endif
13762         if( status ) return status;
13763 #else
13764         /* Draft 4 pthreads */
13765         status = pthread_create( &t, pthread_attr_default, task, NULL );
13766         if( status ) return errno;
13767
13768         /* give thread a chance to complete */
13769         /* it should remain joinable and hence detachable */
13770         sleep( 1 );
13771
13772         status = pthread_detach( &t );
13773         if( status ) return errno;
13774 #endif
13775
13776 #ifdef HAVE_LINUX_THREADS
13777         pthread_kill_other_threads_np();
13778 #endif
13779
13780         return 0;
13781
13782 ; return 0; }
13783 EOF
13784 if { (eval echo configure:13785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13785   rm -rf conftest*
13786   ol_cv_pthread_threads=yes
13787 else
13788   echo "configure: failed program was:" >&5
13789   cat conftest.$ac_ext >&5
13790   rm -rf conftest*
13791   ol_cv_pthread_threads=no
13792 fi
13793 rm -f conftest*
13794 else
13795   cat > conftest.$ac_ext <<EOF
13796 #line 13797 "configure"
13797 #include "confdefs.h"
13798 /* pthread test headers */
13799 #include <pthread.h>
13800 #if HAVE_PTHREADS < 7
13801 #include <errno.h>
13802 #endif
13803 #ifndef NULL
13804 #define NULL (void*)0
13805 #endif
13806
13807 static void *task(p)
13808         void *p;
13809 {
13810         return (void *) (p == NULL);
13811 }
13812
13813
13814 int main(argc, argv)
13815         int argc;
13816         char **argv;
13817 {
13818
13819         /* pthread test function */
13820 #ifndef PTHREAD_CREATE_DETACHED
13821 #define PTHREAD_CREATE_DETACHED 1
13822 #endif
13823         pthread_t t;
13824         int status;
13825         int detach = PTHREAD_CREATE_DETACHED;
13826
13827 #if HAVE_PTHREADS > 4
13828         /* Final pthreads */
13829         pthread_attr_t attr;
13830
13831         status = pthread_attr_init(&attr);
13832         if( status ) return status;
13833
13834 #if HAVE_PTHREADS < 7
13835         status = pthread_attr_setdetachstate(&attr, &detach);
13836         if( status < 0 ) status = errno;
13837 #else
13838         status = pthread_attr_setdetachstate(&attr, detach);
13839 #endif
13840         if( status ) return status;
13841         status = pthread_create( &t, &attr, task, NULL );
13842 #if HAVE_PTHREADS < 7
13843         if( status < 0 ) status = errno;
13844 #endif
13845         if( status ) return status;
13846 #else
13847         /* Draft 4 pthreads */
13848         status = pthread_create( &t, pthread_attr_default, task, NULL );
13849         if( status ) return errno;
13850
13851         /* give thread a chance to complete */
13852         /* it should remain joinable and hence detachable */
13853         sleep( 1 );
13854
13855         status = pthread_detach( &t );
13856         if( status ) return errno;
13857 #endif
13858
13859 #ifdef HAVE_LINUX_THREADS
13860         pthread_kill_other_threads_np();
13861 #endif
13862
13863         return 0;
13864
13865 }
13866
13867 EOF
13868 if { (eval echo configure:13869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13869 then
13870   ol_cv_pthread_threads=yes
13871 else
13872   echo "configure: failed program was:" >&5
13873   cat conftest.$ac_ext >&5
13874   rm -fr conftest*
13875   ol_cv_pthread_threads=no
13876 fi
13877 rm -fr conftest*
13878 fi
13879
13880
13881                 # restore the LIBS
13882                 LIBS="$ol_LIBS"
13883         
13884 fi
13885
13886 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13887
13888         if test $ol_cv_pthread_threads = yes ; then
13889                 ol_link_pthreads="-threads"
13890                 ol_link_threads=posix
13891         fi
13892 fi
13893
13894
13895                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13896 if test "$ol_link_threads" = no ; then
13897         # try -lpthreads -lmach -lexc -lc_r
13898         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13899 echo "configure:13900: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13900 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13901   echo $ac_n "(cached) $ac_c" 1>&6
13902 else
13903   
13904                 # save the flags
13905                 ol_LIBS="$LIBS"
13906                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13907
13908                 if test "$cross_compiling" = yes; then
13909   cat > conftest.$ac_ext <<EOF
13910 #line 13911 "configure"
13911 #include "confdefs.h"
13912 /* pthread test headers */
13913 #include <pthread.h>
13914 #if HAVE_PTHREADS < 7
13915 #include <errno.h>
13916 #endif
13917 #ifndef NULL
13918 #define NULL (void*)0
13919 #endif
13920
13921 static void *task(p)
13922         void *p;
13923 {
13924         return (void *) (p == NULL);
13925 }
13926
13927 int main() {
13928
13929         /* pthread test function */
13930 #ifndef PTHREAD_CREATE_DETACHED
13931 #define PTHREAD_CREATE_DETACHED 1
13932 #endif
13933         pthread_t t;
13934         int status;
13935         int detach = PTHREAD_CREATE_DETACHED;
13936
13937 #if HAVE_PTHREADS > 4
13938         /* Final pthreads */
13939         pthread_attr_t attr;
13940
13941         status = pthread_attr_init(&attr);
13942         if( status ) return status;
13943
13944 #if HAVE_PTHREADS < 7
13945         status = pthread_attr_setdetachstate(&attr, &detach);
13946         if( status < 0 ) status = errno;
13947 #else
13948         status = pthread_attr_setdetachstate(&attr, detach);
13949 #endif
13950         if( status ) return status;
13951         status = pthread_create( &t, &attr, task, NULL );
13952 #if HAVE_PTHREADS < 7
13953         if( status < 0 ) status = errno;
13954 #endif
13955         if( status ) return status;
13956 #else
13957         /* Draft 4 pthreads */
13958         status = pthread_create( &t, pthread_attr_default, task, NULL );
13959         if( status ) return errno;
13960
13961         /* give thread a chance to complete */
13962         /* it should remain joinable and hence detachable */
13963         sleep( 1 );
13964
13965         status = pthread_detach( &t );
13966         if( status ) return errno;
13967 #endif
13968
13969 #ifdef HAVE_LINUX_THREADS
13970         pthread_kill_other_threads_np();
13971 #endif
13972
13973         return 0;
13974
13975 ; return 0; }
13976 EOF
13977 if { (eval echo configure:13978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13978   rm -rf conftest*
13979   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13980 else
13981   echo "configure: failed program was:" >&5
13982   cat conftest.$ac_ext >&5
13983   rm -rf conftest*
13984   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13985 fi
13986 rm -f conftest*
13987 else
13988   cat > conftest.$ac_ext <<EOF
13989 #line 13990 "configure"
13990 #include "confdefs.h"
13991 /* pthread test headers */
13992 #include <pthread.h>
13993 #if HAVE_PTHREADS < 7
13994 #include <errno.h>
13995 #endif
13996 #ifndef NULL
13997 #define NULL (void*)0
13998 #endif
13999
14000 static void *task(p)
14001         void *p;
14002 {
14003         return (void *) (p == NULL);
14004 }
14005
14006
14007 int main(argc, argv)
14008         int argc;
14009         char **argv;
14010 {
14011
14012         /* pthread test function */
14013 #ifndef PTHREAD_CREATE_DETACHED
14014 #define PTHREAD_CREATE_DETACHED 1
14015 #endif
14016         pthread_t t;
14017         int status;
14018         int detach = PTHREAD_CREATE_DETACHED;
14019
14020 #if HAVE_PTHREADS > 4
14021         /* Final pthreads */
14022         pthread_attr_t attr;
14023
14024         status = pthread_attr_init(&attr);
14025         if( status ) return status;
14026
14027 #if HAVE_PTHREADS < 7
14028         status = pthread_attr_setdetachstate(&attr, &detach);
14029         if( status < 0 ) status = errno;
14030 #else
14031         status = pthread_attr_setdetachstate(&attr, detach);
14032 #endif
14033         if( status ) return status;
14034         status = pthread_create( &t, &attr, task, NULL );
14035 #if HAVE_PTHREADS < 7
14036         if( status < 0 ) status = errno;
14037 #endif
14038         if( status ) return status;
14039 #else
14040         /* Draft 4 pthreads */
14041         status = pthread_create( &t, pthread_attr_default, task, NULL );
14042         if( status ) return errno;
14043
14044         /* give thread a chance to complete */
14045         /* it should remain joinable and hence detachable */
14046         sleep( 1 );
14047
14048         status = pthread_detach( &t );
14049         if( status ) return errno;
14050 #endif
14051
14052 #ifdef HAVE_LINUX_THREADS
14053         pthread_kill_other_threads_np();
14054 #endif
14055
14056         return 0;
14057
14058 }
14059
14060 EOF
14061 if { (eval echo configure:14062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14062 then
14063   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14064 else
14065   echo "configure: failed program was:" >&5
14066   cat conftest.$ac_ext >&5
14067   rm -fr conftest*
14068   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14069 fi
14070 rm -fr conftest*
14071 fi
14072
14073
14074                 # restore the LIBS
14075                 LIBS="$ol_LIBS"
14076         
14077 fi
14078
14079 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14080
14081         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14082                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14083                 ol_link_threads=posix
14084         fi
14085 fi
14086
14087                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14088 if test "$ol_link_threads" = no ; then
14089         # try -lpthreads -lmach -lexc
14090         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14091 echo "configure:14092: checking for pthread link with -lpthreads -lmach -lexc" >&5
14092 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14093   echo $ac_n "(cached) $ac_c" 1>&6
14094 else
14095   
14096                 # save the flags
14097                 ol_LIBS="$LIBS"
14098                 LIBS="-lpthreads -lmach -lexc $LIBS"
14099
14100                 if test "$cross_compiling" = yes; then
14101   cat > conftest.$ac_ext <<EOF
14102 #line 14103 "configure"
14103 #include "confdefs.h"
14104 /* pthread test headers */
14105 #include <pthread.h>
14106 #if HAVE_PTHREADS < 7
14107 #include <errno.h>
14108 #endif
14109 #ifndef NULL
14110 #define NULL (void*)0
14111 #endif
14112
14113 static void *task(p)
14114         void *p;
14115 {
14116         return (void *) (p == NULL);
14117 }
14118
14119 int main() {
14120
14121         /* pthread test function */
14122 #ifndef PTHREAD_CREATE_DETACHED
14123 #define PTHREAD_CREATE_DETACHED 1
14124 #endif
14125         pthread_t t;
14126         int status;
14127         int detach = PTHREAD_CREATE_DETACHED;
14128
14129 #if HAVE_PTHREADS > 4
14130         /* Final pthreads */
14131         pthread_attr_t attr;
14132
14133         status = pthread_attr_init(&attr);
14134         if( status ) return status;
14135
14136 #if HAVE_PTHREADS < 7
14137         status = pthread_attr_setdetachstate(&attr, &detach);
14138         if( status < 0 ) status = errno;
14139 #else
14140         status = pthread_attr_setdetachstate(&attr, detach);
14141 #endif
14142         if( status ) return status;
14143         status = pthread_create( &t, &attr, task, NULL );
14144 #if HAVE_PTHREADS < 7
14145         if( status < 0 ) status = errno;
14146 #endif
14147         if( status ) return status;
14148 #else
14149         /* Draft 4 pthreads */
14150         status = pthread_create( &t, pthread_attr_default, task, NULL );
14151         if( status ) return errno;
14152
14153         /* give thread a chance to complete */
14154         /* it should remain joinable and hence detachable */
14155         sleep( 1 );
14156
14157         status = pthread_detach( &t );
14158         if( status ) return errno;
14159 #endif
14160
14161 #ifdef HAVE_LINUX_THREADS
14162         pthread_kill_other_threads_np();
14163 #endif
14164
14165         return 0;
14166
14167 ; return 0; }
14168 EOF
14169 if { (eval echo configure:14170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14170   rm -rf conftest*
14171   ol_cv_pthread_lpthreads_lmach_lexc=yes
14172 else
14173   echo "configure: failed program was:" >&5
14174   cat conftest.$ac_ext >&5
14175   rm -rf conftest*
14176   ol_cv_pthread_lpthreads_lmach_lexc=no
14177 fi
14178 rm -f conftest*
14179 else
14180   cat > conftest.$ac_ext <<EOF
14181 #line 14182 "configure"
14182 #include "confdefs.h"
14183 /* pthread test headers */
14184 #include <pthread.h>
14185 #if HAVE_PTHREADS < 7
14186 #include <errno.h>
14187 #endif
14188 #ifndef NULL
14189 #define NULL (void*)0
14190 #endif
14191
14192 static void *task(p)
14193         void *p;
14194 {
14195         return (void *) (p == NULL);
14196 }
14197
14198
14199 int main(argc, argv)
14200         int argc;
14201         char **argv;
14202 {
14203
14204         /* pthread test function */
14205 #ifndef PTHREAD_CREATE_DETACHED
14206 #define PTHREAD_CREATE_DETACHED 1
14207 #endif
14208         pthread_t t;
14209         int status;
14210         int detach = PTHREAD_CREATE_DETACHED;
14211
14212 #if HAVE_PTHREADS > 4
14213         /* Final pthreads */
14214         pthread_attr_t attr;
14215
14216         status = pthread_attr_init(&attr);
14217         if( status ) return status;
14218
14219 #if HAVE_PTHREADS < 7
14220         status = pthread_attr_setdetachstate(&attr, &detach);
14221         if( status < 0 ) status = errno;
14222 #else
14223         status = pthread_attr_setdetachstate(&attr, detach);
14224 #endif
14225         if( status ) return status;
14226         status = pthread_create( &t, &attr, task, NULL );
14227 #if HAVE_PTHREADS < 7
14228         if( status < 0 ) status = errno;
14229 #endif
14230         if( status ) return status;
14231 #else
14232         /* Draft 4 pthreads */
14233         status = pthread_create( &t, pthread_attr_default, task, NULL );
14234         if( status ) return errno;
14235
14236         /* give thread a chance to complete */
14237         /* it should remain joinable and hence detachable */
14238         sleep( 1 );
14239
14240         status = pthread_detach( &t );
14241         if( status ) return errno;
14242 #endif
14243
14244 #ifdef HAVE_LINUX_THREADS
14245         pthread_kill_other_threads_np();
14246 #endif
14247
14248         return 0;
14249
14250 }
14251
14252 EOF
14253 if { (eval echo configure:14254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14254 then
14255   ol_cv_pthread_lpthreads_lmach_lexc=yes
14256 else
14257   echo "configure: failed program was:" >&5
14258   cat conftest.$ac_ext >&5
14259   rm -fr conftest*
14260   ol_cv_pthread_lpthreads_lmach_lexc=no
14261 fi
14262 rm -fr conftest*
14263 fi
14264
14265
14266                 # restore the LIBS
14267                 LIBS="$ol_LIBS"
14268         
14269 fi
14270
14271 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14272
14273         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14274                 ol_link_pthreads="-lpthreads -lmach -lexc"
14275                 ol_link_threads=posix
14276         fi
14277 fi
14278
14279                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14280 if test "$ol_link_threads" = no ; then
14281         # try -lpthreads -lexc
14282         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14283 echo "configure:14284: checking for pthread link with -lpthreads -lexc" >&5
14284 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14285   echo $ac_n "(cached) $ac_c" 1>&6
14286 else
14287   
14288                 # save the flags
14289                 ol_LIBS="$LIBS"
14290                 LIBS="-lpthreads -lexc $LIBS"
14291
14292                 if test "$cross_compiling" = yes; then
14293   cat > conftest.$ac_ext <<EOF
14294 #line 14295 "configure"
14295 #include "confdefs.h"
14296 /* pthread test headers */
14297 #include <pthread.h>
14298 #if HAVE_PTHREADS < 7
14299 #include <errno.h>
14300 #endif
14301 #ifndef NULL
14302 #define NULL (void*)0
14303 #endif
14304
14305 static void *task(p)
14306         void *p;
14307 {
14308         return (void *) (p == NULL);
14309 }
14310
14311 int main() {
14312
14313         /* pthread test function */
14314 #ifndef PTHREAD_CREATE_DETACHED
14315 #define PTHREAD_CREATE_DETACHED 1
14316 #endif
14317         pthread_t t;
14318         int status;
14319         int detach = PTHREAD_CREATE_DETACHED;
14320
14321 #if HAVE_PTHREADS > 4
14322         /* Final pthreads */
14323         pthread_attr_t attr;
14324
14325         status = pthread_attr_init(&attr);
14326         if( status ) return status;
14327
14328 #if HAVE_PTHREADS < 7
14329         status = pthread_attr_setdetachstate(&attr, &detach);
14330         if( status < 0 ) status = errno;
14331 #else
14332         status = pthread_attr_setdetachstate(&attr, detach);
14333 #endif
14334         if( status ) return status;
14335         status = pthread_create( &t, &attr, task, NULL );
14336 #if HAVE_PTHREADS < 7
14337         if( status < 0 ) status = errno;
14338 #endif
14339         if( status ) return status;
14340 #else
14341         /* Draft 4 pthreads */
14342         status = pthread_create( &t, pthread_attr_default, task, NULL );
14343         if( status ) return errno;
14344
14345         /* give thread a chance to complete */
14346         /* it should remain joinable and hence detachable */
14347         sleep( 1 );
14348
14349         status = pthread_detach( &t );
14350         if( status ) return errno;
14351 #endif
14352
14353 #ifdef HAVE_LINUX_THREADS
14354         pthread_kill_other_threads_np();
14355 #endif
14356
14357         return 0;
14358
14359 ; return 0; }
14360 EOF
14361 if { (eval echo configure:14362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14362   rm -rf conftest*
14363   ol_cv_pthread_lpthreads_lexc=yes
14364 else
14365   echo "configure: failed program was:" >&5
14366   cat conftest.$ac_ext >&5
14367   rm -rf conftest*
14368   ol_cv_pthread_lpthreads_lexc=no
14369 fi
14370 rm -f conftest*
14371 else
14372   cat > conftest.$ac_ext <<EOF
14373 #line 14374 "configure"
14374 #include "confdefs.h"
14375 /* pthread test headers */
14376 #include <pthread.h>
14377 #if HAVE_PTHREADS < 7
14378 #include <errno.h>
14379 #endif
14380 #ifndef NULL
14381 #define NULL (void*)0
14382 #endif
14383
14384 static void *task(p)
14385         void *p;
14386 {
14387         return (void *) (p == NULL);
14388 }
14389
14390
14391 int main(argc, argv)
14392         int argc;
14393         char **argv;
14394 {
14395
14396         /* pthread test function */
14397 #ifndef PTHREAD_CREATE_DETACHED
14398 #define PTHREAD_CREATE_DETACHED 1
14399 #endif
14400         pthread_t t;
14401         int status;
14402         int detach = PTHREAD_CREATE_DETACHED;
14403
14404 #if HAVE_PTHREADS > 4
14405         /* Final pthreads */
14406         pthread_attr_t attr;
14407
14408         status = pthread_attr_init(&attr);
14409         if( status ) return status;
14410
14411 #if HAVE_PTHREADS < 7
14412         status = pthread_attr_setdetachstate(&attr, &detach);
14413         if( status < 0 ) status = errno;
14414 #else
14415         status = pthread_attr_setdetachstate(&attr, detach);
14416 #endif
14417         if( status ) return status;
14418         status = pthread_create( &t, &attr, task, NULL );
14419 #if HAVE_PTHREADS < 7
14420         if( status < 0 ) status = errno;
14421 #endif
14422         if( status ) return status;
14423 #else
14424         /* Draft 4 pthreads */
14425         status = pthread_create( &t, pthread_attr_default, task, NULL );
14426         if( status ) return errno;
14427
14428         /* give thread a chance to complete */
14429         /* it should remain joinable and hence detachable */
14430         sleep( 1 );
14431
14432         status = pthread_detach( &t );
14433         if( status ) return errno;
14434 #endif
14435
14436 #ifdef HAVE_LINUX_THREADS
14437         pthread_kill_other_threads_np();
14438 #endif
14439
14440         return 0;
14441
14442 }
14443
14444 EOF
14445 if { (eval echo configure:14446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14446 then
14447   ol_cv_pthread_lpthreads_lexc=yes
14448 else
14449   echo "configure: failed program was:" >&5
14450   cat conftest.$ac_ext >&5
14451   rm -fr conftest*
14452   ol_cv_pthread_lpthreads_lexc=no
14453 fi
14454 rm -fr conftest*
14455 fi
14456
14457
14458                 # restore the LIBS
14459                 LIBS="$ol_LIBS"
14460         
14461 fi
14462
14463 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14464
14465         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14466                 ol_link_pthreads="-lpthreads -lexc"
14467                 ol_link_threads=posix
14468         fi
14469 fi
14470
14471
14472                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14473 if test "$ol_link_threads" = no ; then
14474         # try -lpthreads
14475         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14476 echo "configure:14477: checking for pthread link with -lpthreads" >&5
14477 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14478   echo $ac_n "(cached) $ac_c" 1>&6
14479 else
14480   
14481                 # save the flags
14482                 ol_LIBS="$LIBS"
14483                 LIBS="-lpthreads $LIBS"
14484
14485                 if test "$cross_compiling" = yes; then
14486   cat > conftest.$ac_ext <<EOF
14487 #line 14488 "configure"
14488 #include "confdefs.h"
14489 /* pthread test headers */
14490 #include <pthread.h>
14491 #if HAVE_PTHREADS < 7
14492 #include <errno.h>
14493 #endif
14494 #ifndef NULL
14495 #define NULL (void*)0
14496 #endif
14497
14498 static void *task(p)
14499         void *p;
14500 {
14501         return (void *) (p == NULL);
14502 }
14503
14504 int main() {
14505
14506         /* pthread test function */
14507 #ifndef PTHREAD_CREATE_DETACHED
14508 #define PTHREAD_CREATE_DETACHED 1
14509 #endif
14510         pthread_t t;
14511         int status;
14512         int detach = PTHREAD_CREATE_DETACHED;
14513
14514 #if HAVE_PTHREADS > 4
14515         /* Final pthreads */
14516         pthread_attr_t attr;
14517
14518         status = pthread_attr_init(&attr);
14519         if( status ) return status;
14520
14521 #if HAVE_PTHREADS < 7
14522         status = pthread_attr_setdetachstate(&attr, &detach);
14523         if( status < 0 ) status = errno;
14524 #else
14525         status = pthread_attr_setdetachstate(&attr, detach);
14526 #endif
14527         if( status ) return status;
14528         status = pthread_create( &t, &attr, task, NULL );
14529 #if HAVE_PTHREADS < 7
14530         if( status < 0 ) status = errno;
14531 #endif
14532         if( status ) return status;
14533 #else
14534         /* Draft 4 pthreads */
14535         status = pthread_create( &t, pthread_attr_default, task, NULL );
14536         if( status ) return errno;
14537
14538         /* give thread a chance to complete */
14539         /* it should remain joinable and hence detachable */
14540         sleep( 1 );
14541
14542         status = pthread_detach( &t );
14543         if( status ) return errno;
14544 #endif
14545
14546 #ifdef HAVE_LINUX_THREADS
14547         pthread_kill_other_threads_np();
14548 #endif
14549
14550         return 0;
14551
14552 ; return 0; }
14553 EOF
14554 if { (eval echo configure:14555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14555   rm -rf conftest*
14556   ol_cv_pthread_lib_lpthreads=yes
14557 else
14558   echo "configure: failed program was:" >&5
14559   cat conftest.$ac_ext >&5
14560   rm -rf conftest*
14561   ol_cv_pthread_lib_lpthreads=no
14562 fi
14563 rm -f conftest*
14564 else
14565   cat > conftest.$ac_ext <<EOF
14566 #line 14567 "configure"
14567 #include "confdefs.h"
14568 /* pthread test headers */
14569 #include <pthread.h>
14570 #if HAVE_PTHREADS < 7
14571 #include <errno.h>
14572 #endif
14573 #ifndef NULL
14574 #define NULL (void*)0
14575 #endif
14576
14577 static void *task(p)
14578         void *p;
14579 {
14580         return (void *) (p == NULL);
14581 }
14582
14583
14584 int main(argc, argv)
14585         int argc;
14586         char **argv;
14587 {
14588
14589         /* pthread test function */
14590 #ifndef PTHREAD_CREATE_DETACHED
14591 #define PTHREAD_CREATE_DETACHED 1
14592 #endif
14593         pthread_t t;
14594         int status;
14595         int detach = PTHREAD_CREATE_DETACHED;
14596
14597 #if HAVE_PTHREADS > 4
14598         /* Final pthreads */
14599         pthread_attr_t attr;
14600
14601         status = pthread_attr_init(&attr);
14602         if( status ) return status;
14603
14604 #if HAVE_PTHREADS < 7
14605         status = pthread_attr_setdetachstate(&attr, &detach);
14606         if( status < 0 ) status = errno;
14607 #else
14608         status = pthread_attr_setdetachstate(&attr, detach);
14609 #endif
14610         if( status ) return status;
14611         status = pthread_create( &t, &attr, task, NULL );
14612 #if HAVE_PTHREADS < 7
14613         if( status < 0 ) status = errno;
14614 #endif
14615         if( status ) return status;
14616 #else
14617         /* Draft 4 pthreads */
14618         status = pthread_create( &t, pthread_attr_default, task, NULL );
14619         if( status ) return errno;
14620
14621         /* give thread a chance to complete */
14622         /* it should remain joinable and hence detachable */
14623         sleep( 1 );
14624
14625         status = pthread_detach( &t );
14626         if( status ) return errno;
14627 #endif
14628
14629 #ifdef HAVE_LINUX_THREADS
14630         pthread_kill_other_threads_np();
14631 #endif
14632
14633         return 0;
14634
14635 }
14636
14637 EOF
14638 if { (eval echo configure:14639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14639 then
14640   ol_cv_pthread_lib_lpthreads=yes
14641 else
14642   echo "configure: failed program was:" >&5
14643   cat conftest.$ac_ext >&5
14644   rm -fr conftest*
14645   ol_cv_pthread_lib_lpthreads=no
14646 fi
14647 rm -fr conftest*
14648 fi
14649
14650
14651                 # restore the LIBS
14652                 LIBS="$ol_LIBS"
14653         
14654 fi
14655
14656 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14657
14658         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14659                 ol_link_pthreads="-lpthreads"
14660                 ol_link_threads=posix
14661         fi
14662 fi
14663
14664
14665                 if test $ol_link_threads != no ; then
14666                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14667
14668                                                 save_CPPFLAGS="$CPPFLAGS"
14669                         save_LIBS="$LIBS"
14670                         LIBS="$LTHREAD_LIBS $LIBS"
14671
14672                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14673 do
14674 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14675 echo "configure:14676: checking for $ac_func" >&5
14676 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14677   echo $ac_n "(cached) $ac_c" 1>&6
14678 else
14679   cat > conftest.$ac_ext <<EOF
14680 #line 14681 "configure"
14681 #include "confdefs.h"
14682 /* System header to define __stub macros and hopefully few prototypes,
14683     which can conflict with char $ac_func(); below.  */
14684 #include <assert.h>
14685 /* Override any gcc2 internal prototype to avoid an error.  */
14686 /* We use char because int might match the return type of a gcc2
14687     builtin and then its argument prototype would still apply.  */
14688 char $ac_func();
14689 char (*f)();
14690
14691 int main() {
14692
14693 /* The GNU C library defines this for functions which it implements
14694     to always fail with ENOSYS.  Some functions are actually named
14695     something starting with __ and the normal name is an alias.  */
14696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14697 choke me
14698 #else
14699 f = $ac_func;
14700 #endif
14701
14702 ; return 0; }
14703 EOF
14704 if { (eval echo configure:14705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14705   rm -rf conftest*
14706   eval "ac_cv_func_$ac_func=yes"
14707 else
14708   echo "configure: failed program was:" >&5
14709   cat conftest.$ac_ext >&5
14710   rm -rf conftest*
14711   eval "ac_cv_func_$ac_func=no"
14712 fi
14713 rm -f conftest*
14714 fi
14715
14716 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14717   echo "$ac_t""yes" 1>&6
14718     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14719   cat >> confdefs.h <<EOF
14720 #define $ac_tr_func 1
14721 EOF
14722  
14723 else
14724   echo "$ac_t""no" 1>&6
14725 fi
14726 done
14727
14728
14729                         if test $ac_cv_func_sched_yield = no -a \
14730                                 $ac_cv_func_pthread_yield = no -a \
14731                                 $ac_cv_func_thr_yield = no ; then
14732                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14733 echo "configure:14734: checking for sched_yield in -lrt" >&5
14734 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14735 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14736   echo $ac_n "(cached) $ac_c" 1>&6
14737 else
14738   ac_save_LIBS="$LIBS"
14739 LIBS="-lrt  $LIBS"
14740 cat > conftest.$ac_ext <<EOF
14741 #line 14742 "configure"
14742 #include "confdefs.h"
14743 /* Override any gcc2 internal prototype to avoid an error.  */
14744 /* We use char because int might match the return type of a gcc2
14745     builtin and then its argument prototype would still apply.  */
14746 char sched_yield();
14747
14748 int main() {
14749 sched_yield()
14750 ; return 0; }
14751 EOF
14752 if { (eval echo configure:14753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14753   rm -rf conftest*
14754   eval "ac_cv_lib_$ac_lib_var=yes"
14755 else
14756   echo "configure: failed program was:" >&5
14757   cat conftest.$ac_ext >&5
14758   rm -rf conftest*
14759   eval "ac_cv_lib_$ac_lib_var=no"
14760 fi
14761 rm -f conftest*
14762 LIBS="$ac_save_LIBS"
14763
14764 fi
14765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14766   echo "$ac_t""yes" 1>&6
14767   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14768                                         cat >> confdefs.h <<\EOF
14769 #define HAVE_SCHED_YIELD 1
14770 EOF
14771
14772                                         ac_cv_func_sched_yield=yes
14773 else
14774   echo "$ac_t""no" 1>&6
14775 ac_cv_func_sched_yield=no
14776 fi
14777
14778                         fi
14779                         if test $ac_cv_func_sched_yield = no -a \
14780                                 $ac_cv_func_pthread_yield = no -a \
14781                                 "$ac_cv_func_thr_yield" = no ; then
14782                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14783                         fi
14784
14785                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14786 do
14787 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14788 echo "configure:14789: checking for $ac_func" >&5
14789 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14790   echo $ac_n "(cached) $ac_c" 1>&6
14791 else
14792   cat > conftest.$ac_ext <<EOF
14793 #line 14794 "configure"
14794 #include "confdefs.h"
14795 /* System header to define __stub macros and hopefully few prototypes,
14796     which can conflict with char $ac_func(); below.  */
14797 #include <assert.h>
14798 /* Override any gcc2 internal prototype to avoid an error.  */
14799 /* We use char because int might match the return type of a gcc2
14800     builtin and then its argument prototype would still apply.  */
14801 char $ac_func();
14802 char (*f)();
14803
14804 int main() {
14805
14806 /* The GNU C library defines this for functions which it implements
14807     to always fail with ENOSYS.  Some functions are actually named
14808     something starting with __ and the normal name is an alias.  */
14809 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14810 choke me
14811 #else
14812 f = $ac_func;
14813 #endif
14814
14815 ; return 0; }
14816 EOF
14817 if { (eval echo configure:14818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14818   rm -rf conftest*
14819   eval "ac_cv_func_$ac_func=yes"
14820 else
14821   echo "configure: failed program was:" >&5
14822   cat conftest.$ac_ext >&5
14823   rm -rf conftest*
14824   eval "ac_cv_func_$ac_func=no"
14825 fi
14826 rm -f conftest*
14827 fi
14828
14829 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14830   echo "$ac_t""yes" 1>&6
14831     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14832   cat >> confdefs.h <<EOF
14833 #define $ac_tr_func 1
14834 EOF
14835  
14836 else
14837   echo "$ac_t""no" 1>&6
14838 fi
14839 done
14840
14841
14842                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14843 echo "configure:14844: checking for pthread_detach with <pthread.h>" >&5
14844 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14845   echo $ac_n "(cached) $ac_c" 1>&6
14846 else
14847   
14848                                                                 cat > conftest.$ac_ext <<EOF
14849 #line 14850 "configure"
14850 #include "confdefs.h"
14851
14852 #include <pthread.h>
14853 #ifndef NULL
14854 #define NULL (void*)0
14855 #endif
14856
14857 int main() {
14858 pthread_detach(NULL);
14859 ; return 0; }
14860 EOF
14861 if { (eval echo configure:14862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14862   rm -rf conftest*
14863   ol_cv_func_pthread_detach=yes
14864 else
14865   echo "configure: failed program was:" >&5
14866   cat conftest.$ac_ext >&5
14867   rm -rf conftest*
14868   ol_cv_func_pthread_detach=no
14869 fi
14870 rm -f conftest*
14871                         
14872 fi
14873
14874 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14875
14876                         if test $ol_cv_func_pthread_detach = no ; then
14877                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14878                         fi
14879
14880                         cat >> confdefs.h <<\EOF
14881 #define HAVE_PTHREAD_DETACH 1
14882 EOF
14883
14884
14885                                                 for ac_func in \
14886                                 pthread_setconcurrency \
14887                                 pthread_getconcurrency \
14888                                 thr_setconcurrency \
14889                                 thr_getconcurrency \
14890                         
14891 do
14892 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14893 echo "configure:14894: checking for $ac_func" >&5
14894 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14895   echo $ac_n "(cached) $ac_c" 1>&6
14896 else
14897   cat > conftest.$ac_ext <<EOF
14898 #line 14899 "configure"
14899 #include "confdefs.h"
14900 /* System header to define __stub macros and hopefully few prototypes,
14901     which can conflict with char $ac_func(); below.  */
14902 #include <assert.h>
14903 /* Override any gcc2 internal prototype to avoid an error.  */
14904 /* We use char because int might match the return type of a gcc2
14905     builtin and then its argument prototype would still apply.  */
14906 char $ac_func();
14907 char (*f)();
14908
14909 int main() {
14910
14911 /* The GNU C library defines this for functions which it implements
14912     to always fail with ENOSYS.  Some functions are actually named
14913     something starting with __ and the normal name is an alias.  */
14914 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14915 choke me
14916 #else
14917 f = $ac_func;
14918 #endif
14919
14920 ; return 0; }
14921 EOF
14922 if { (eval echo configure:14923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14923   rm -rf conftest*
14924   eval "ac_cv_func_$ac_func=yes"
14925 else
14926   echo "configure: failed program was:" >&5
14927   cat conftest.$ac_ext >&5
14928   rm -rf conftest*
14929   eval "ac_cv_func_$ac_func=no"
14930 fi
14931 rm -f conftest*
14932 fi
14933
14934 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14935   echo "$ac_t""yes" 1>&6
14936     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14937   cat >> confdefs.h <<EOF
14938 #define $ac_tr_func 1
14939 EOF
14940  
14941 else
14942   echo "$ac_t""no" 1>&6
14943 fi
14944 done
14945
14946
14947                         
14948         for ac_func in pthread_kill_other_threads_np
14949 do
14950 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14951 echo "configure:14952: checking for $ac_func" >&5
14952 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14953   echo $ac_n "(cached) $ac_c" 1>&6
14954 else
14955   cat > conftest.$ac_ext <<EOF
14956 #line 14957 "configure"
14957 #include "confdefs.h"
14958 /* System header to define __stub macros and hopefully few prototypes,
14959     which can conflict with char $ac_func(); below.  */
14960 #include <assert.h>
14961 /* Override any gcc2 internal prototype to avoid an error.  */
14962 /* We use char because int might match the return type of a gcc2
14963     builtin and then its argument prototype would still apply.  */
14964 char $ac_func();
14965 char (*f)();
14966
14967 int main() {
14968
14969 /* The GNU C library defines this for functions which it implements
14970     to always fail with ENOSYS.  Some functions are actually named
14971     something starting with __ and the normal name is an alias.  */
14972 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14973 choke me
14974 #else
14975 f = $ac_func;
14976 #endif
14977
14978 ; return 0; }
14979 EOF
14980 if { (eval echo configure:14981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14981   rm -rf conftest*
14982   eval "ac_cv_func_$ac_func=yes"
14983 else
14984   echo "configure: failed program was:" >&5
14985   cat conftest.$ac_ext >&5
14986   rm -rf conftest*
14987   eval "ac_cv_func_$ac_func=no"
14988 fi
14989 rm -f conftest*
14990 fi
14991
14992 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14993   echo "$ac_t""yes" 1>&6
14994     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14995   cat >> confdefs.h <<EOF
14996 #define $ac_tr_func 1
14997 EOF
14998  
14999 else
15000   echo "$ac_t""no" 1>&6
15001 fi
15002 done
15003
15004         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15005 echo "configure:15006: checking for LinuxThreads implementation" >&5
15006 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15007   echo $ac_n "(cached) $ac_c" 1>&6
15008 else
15009   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15010 fi
15011
15012 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15013
15014                         
15015         
15016         
15017         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15018 echo "configure:15019: checking for LinuxThreads consistency" >&5
15019 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15020   echo $ac_n "(cached) $ac_c" 1>&6
15021 else
15022   
15023                 if test $ol_cv_header_linux_threads = yes -a \
15024                         $ol_cv_sys_linux_threads = yes; then
15025                         ol_cv_linux_threads=yes
15026                 elif test $ol_cv_header_linux_threads = no -a \
15027                         $ol_cv_sys_linux_threads = no; then
15028                         ol_cv_linux_threads=no
15029                 else
15030                         ol_cv_linux_threads=error
15031                 fi
15032         
15033 fi
15034
15035 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15036
15037
15038                         if test $ol_cv_linux_threads = error; then
15039                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15040                         fi
15041
15042                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15043 echo "configure:15044: checking if pthread_create() works" >&5
15044 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15045   echo $ac_n "(cached) $ac_c" 1>&6
15046 else
15047   
15048                         if test "$cross_compiling" = yes; then
15049                                 ol_cv_pthread_create_works=yes
15050 else
15051   cat > conftest.$ac_ext <<EOF
15052 #line 15053 "configure"
15053 #include "confdefs.h"
15054 /* pthread test headers */
15055 #include <pthread.h>
15056 #if HAVE_PTHREADS < 7
15057 #include <errno.h>
15058 #endif
15059 #ifndef NULL
15060 #define NULL (void*)0
15061 #endif
15062
15063 static void *task(p)
15064         void *p;
15065 {
15066         return (void *) (p == NULL);
15067 }
15068
15069
15070 int main(argc, argv)
15071         int argc;
15072         char **argv;
15073 {
15074
15075         /* pthread test function */
15076 #ifndef PTHREAD_CREATE_DETACHED
15077 #define PTHREAD_CREATE_DETACHED 1
15078 #endif
15079         pthread_t t;
15080         int status;
15081         int detach = PTHREAD_CREATE_DETACHED;
15082
15083 #if HAVE_PTHREADS > 4
15084         /* Final pthreads */
15085         pthread_attr_t attr;
15086
15087         status = pthread_attr_init(&attr);
15088         if( status ) return status;
15089
15090 #if HAVE_PTHREADS < 7
15091         status = pthread_attr_setdetachstate(&attr, &detach);
15092         if( status < 0 ) status = errno;
15093 #else
15094         status = pthread_attr_setdetachstate(&attr, detach);
15095 #endif
15096         if( status ) return status;
15097         status = pthread_create( &t, &attr, task, NULL );
15098 #if HAVE_PTHREADS < 7
15099         if( status < 0 ) status = errno;
15100 #endif
15101         if( status ) return status;
15102 #else
15103         /* Draft 4 pthreads */
15104         status = pthread_create( &t, pthread_attr_default, task, NULL );
15105         if( status ) return errno;
15106
15107         /* give thread a chance to complete */
15108         /* it should remain joinable and hence detachable */
15109         sleep( 1 );
15110
15111         status = pthread_detach( &t );
15112         if( status ) return errno;
15113 #endif
15114
15115 #ifdef HAVE_LINUX_THREADS
15116         pthread_kill_other_threads_np();
15117 #endif
15118
15119         return 0;
15120
15121 }
15122
15123 EOF
15124 if { (eval echo configure:15125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15125 then
15126   ol_cv_pthread_create_works=yes
15127 else
15128   echo "configure: failed program was:" >&5
15129   cat conftest.$ac_ext >&5
15130   rm -fr conftest*
15131   ol_cv_pthread_create_works=no
15132 fi
15133 rm -fr conftest*
15134 fi
15135
15136 fi
15137
15138 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15139
15140                         if test $ol_cv_pthread_create_works = no ; then
15141                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15142                         fi
15143
15144                                                 if test $ol_with_yielding_select = auto ; then
15145                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15146 echo "configure:15147: checking if select yields when using pthreads" >&5
15147 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15148   echo $ac_n "(cached) $ac_c" 1>&6
15149 else
15150   
15151                                 if test "$cross_compiling" = yes; then
15152   ol_cv_pthread_select_yields=cross
15153 else
15154   cat > conftest.$ac_ext <<EOF
15155 #line 15156 "configure"
15156 #include "confdefs.h"
15157
15158 #include <sys/types.h>
15159 #include <sys/time.h>
15160 #include <unistd.h>
15161 #include <pthread.h>
15162 #ifndef NULL
15163 #define NULL (void*) 0
15164 #endif
15165
15166 static int fildes[2];
15167
15168 static void *task(p)
15169         void *p;
15170 {
15171         int i;
15172         struct timeval tv;
15173
15174         fd_set rfds;
15175
15176         tv.tv_sec=10;
15177         tv.tv_usec=0;
15178
15179         FD_ZERO(&rfds);
15180         FD_SET(fildes[0], &rfds);
15181
15182         /* we're not interested in any fds */
15183         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15184
15185         if(i < 0) {
15186                 perror("select");
15187                 exit(10);
15188         }
15189
15190         exit(0); /* if we exit here, the select blocked the whole process */
15191 }
15192
15193 int main(argc, argv)
15194         int argc;
15195         char **argv;
15196 {
15197         pthread_t t;
15198
15199         /* create a pipe to select */
15200         if(pipe(&fildes[0])) {
15201                 perror("select");
15202                 exit(1);
15203         }
15204
15205 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15206         (void) pthread_setconcurrency(2);
15207 #else
15208 #ifdef HAVE_THR_SETCONCURRENCY
15209         /* Set Solaris LWP concurrency to 2 */
15210         thr_setconcurrency(2);
15211 #endif
15212 #endif
15213
15214 #if HAVE_PTHREADS < 6
15215         pthread_create(&t, pthread_attr_default, task, NULL);
15216 #else
15217         pthread_create(&t, NULL, task, NULL);
15218 #endif
15219
15220         /* make sure task runs first */
15221 #if HAVE_THR_YIELD
15222         thr_yield();
15223 #elif defined( HAVE_SCHED_YIELD )
15224         sched_yield();
15225 #elif defined( HAVE_PTHREAD_YIELD )
15226         pthread_yield();
15227 #endif
15228
15229         exit(2);
15230 }
15231 EOF
15232 if { (eval echo configure:15233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15233 then
15234   ol_cv_pthread_select_yields=no
15235 else
15236   echo "configure: failed program was:" >&5
15237   cat conftest.$ac_ext >&5
15238   rm -fr conftest*
15239   ol_cv_pthread_select_yields=yes
15240 fi
15241 rm -fr conftest*
15242 fi
15243
15244 fi
15245
15246 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15247
15248                                 if test $ol_cv_pthread_select_yields = cross ; then
15249                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15250                                 fi
15251
15252                                 if test $ol_cv_pthread_select_yields = yes ; then
15253                                         ol_with_yielding_select=yes
15254                                 fi
15255                         fi
15256
15257                                                 CPPFLAGS="$save_CPPFLAGS"
15258                         LIBS="$save_LIBS"
15259                 else
15260                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15261                 fi
15262         fi
15263
15264         if test $ol_with_threads = posix ; then
15265                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15266         fi
15267 fi
15268
15269 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15270         -o $ol_with_threads = mach ; then
15271
15272                 for ac_hdr in mach/cthreads.h cthreads.h
15273 do
15274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15276 echo "configure:15277: checking for $ac_hdr" >&5
15277 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15278   echo $ac_n "(cached) $ac_c" 1>&6
15279 else
15280   cat > conftest.$ac_ext <<EOF
15281 #line 15282 "configure"
15282 #include "confdefs.h"
15283 #include <$ac_hdr>
15284 EOF
15285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15286 { (eval echo configure:15287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15288 if test -z "$ac_err"; then
15289   rm -rf conftest*
15290   eval "ac_cv_header_$ac_safe=yes"
15291 else
15292   echo "$ac_err" >&5
15293   echo "configure: failed program was:" >&5
15294   cat conftest.$ac_ext >&5
15295   rm -rf conftest*
15296   eval "ac_cv_header_$ac_safe=no"
15297 fi
15298 rm -f conftest*
15299 fi
15300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15301   echo "$ac_t""yes" 1>&6
15302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15303   cat >> confdefs.h <<EOF
15304 #define $ac_tr_hdr 1
15305 EOF
15306  
15307 else
15308   echo "$ac_t""no" 1>&6
15309 fi
15310 done
15311
15312         if test $ac_cv_header_mach_cthreads_h = yes ; then
15313                 ol_with_threads=found
15314
15315                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15316 echo "configure:15317: checking for cthread_fork" >&5
15317 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15318   echo $ac_n "(cached) $ac_c" 1>&6
15319 else
15320   cat > conftest.$ac_ext <<EOF
15321 #line 15322 "configure"
15322 #include "confdefs.h"
15323 /* System header to define __stub macros and hopefully few prototypes,
15324     which can conflict with char cthread_fork(); below.  */
15325 #include <assert.h>
15326 /* Override any gcc2 internal prototype to avoid an error.  */
15327 /* We use char because int might match the return type of a gcc2
15328     builtin and then its argument prototype would still apply.  */
15329 char cthread_fork();
15330 char (*f)();
15331
15332 int main() {
15333
15334 /* The GNU C library defines this for functions which it implements
15335     to always fail with ENOSYS.  Some functions are actually named
15336     something starting with __ and the normal name is an alias.  */
15337 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15338 choke me
15339 #else
15340 f = cthread_fork;
15341 #endif
15342
15343 ; return 0; }
15344 EOF
15345 if { (eval echo configure:15346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15346   rm -rf conftest*
15347   eval "ac_cv_func_cthread_fork=yes"
15348 else
15349   echo "configure: failed program was:" >&5
15350   cat conftest.$ac_ext >&5
15351   rm -rf conftest*
15352   eval "ac_cv_func_cthread_fork=no"
15353 fi
15354 rm -f conftest*
15355 fi
15356
15357 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15358   echo "$ac_t""yes" 1>&6
15359   ol_link_threads=yes
15360 else
15361   echo "$ac_t""no" 1>&6
15362 fi
15363
15364
15365                 if test $ol_link_threads = no ; then
15366                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15367 echo "configure:15368: checking for cthread_fork with -all_load" >&5
15368 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15369   echo $ac_n "(cached) $ac_c" 1>&6
15370 else
15371   
15372                                                                 save_LIBS="$LIBS"
15373                                 LIBS="-all_load $LIBS"
15374                                 cat > conftest.$ac_ext <<EOF
15375 #line 15376 "configure"
15376 #include "confdefs.h"
15377 #include <mach/cthreads.h>
15378 int main() {
15379
15380                                         cthread_fork((void *)0, (void *)0);
15381                                         
15382 ; return 0; }
15383 EOF
15384 if { (eval echo configure:15385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15385   rm -rf conftest*
15386   ol_cv_cthread_all_load=yes
15387 else
15388   echo "configure: failed program was:" >&5
15389   cat conftest.$ac_ext >&5
15390   rm -rf conftest*
15391   ol_cv_cthread_all_load=no
15392 fi
15393 rm -f conftest*
15394                                                                 LIBS="$save_LIBS"
15395                         
15396 fi
15397
15398 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15399
15400                         if test $ol_cv_cthread_all_load = yes ; then
15401                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15402                                 ol_link_threads=mach
15403                                 ol_with_threads=found
15404                         fi
15405                 fi
15406
15407         elif test $ac_cv_header_cthreads_h = yes ; then
15408                                 
15409                 ol_with_threads=found
15410  
15411                                 save_LIBS="$LIBS"
15412                 LIBS="$LIBS -lthreads"
15413                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15414 echo "configure:15415: checking for cthread_fork" >&5
15415 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15416   echo $ac_n "(cached) $ac_c" 1>&6
15417 else
15418   cat > conftest.$ac_ext <<EOF
15419 #line 15420 "configure"
15420 #include "confdefs.h"
15421 /* System header to define __stub macros and hopefully few prototypes,
15422     which can conflict with char cthread_fork(); below.  */
15423 #include <assert.h>
15424 /* Override any gcc2 internal prototype to avoid an error.  */
15425 /* We use char because int might match the return type of a gcc2
15426     builtin and then its argument prototype would still apply.  */
15427 char cthread_fork();
15428 char (*f)();
15429
15430 int main() {
15431
15432 /* The GNU C library defines this for functions which it implements
15433     to always fail with ENOSYS.  Some functions are actually named
15434     something starting with __ and the normal name is an alias.  */
15435 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15436 choke me
15437 #else
15438 f = cthread_fork;
15439 #endif
15440
15441 ; return 0; }
15442 EOF
15443 if { (eval echo configure:15444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15444   rm -rf conftest*
15445   eval "ac_cv_func_cthread_fork=yes"
15446 else
15447   echo "configure: failed program was:" >&5
15448   cat conftest.$ac_ext >&5
15449   rm -rf conftest*
15450   eval "ac_cv_func_cthread_fork=no"
15451 fi
15452 rm -f conftest*
15453 fi
15454
15455 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15456   echo "$ac_t""yes" 1>&6
15457   ol_link_threads=yes
15458 else
15459   echo "$ac_t""no" 1>&6
15460 fi
15461
15462                 LIBS="$save_LIBS"
15463
15464                 if test $ol_link_threads = yes ; then
15465                         LTHREAD_LIBS="-lthreads"
15466                         ol_link_threads=mach
15467                         ol_with_threads=found
15468                 else
15469                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15470                 fi
15471
15472         elif test $ol_with_threads = mach ; then
15473                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15474         fi
15475
15476         if test $ol_link_threads = mach ; then
15477                 cat >> confdefs.h <<\EOF
15478 #define HAVE_MACH_CTHREADS 1
15479 EOF
15480
15481         elif test $ol_with_threads = found ; then
15482                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15483         fi
15484 fi
15485
15486 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15487         -o $ol_with_threads = pth ; then
15488
15489         for ac_hdr in pth.h
15490 do
15491 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15492 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15493 echo "configure:15494: checking for $ac_hdr" >&5
15494 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15495   echo $ac_n "(cached) $ac_c" 1>&6
15496 else
15497   cat > conftest.$ac_ext <<EOF
15498 #line 15499 "configure"
15499 #include "confdefs.h"
15500 #include <$ac_hdr>
15501 EOF
15502 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15503 { (eval echo configure:15504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15504 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15505 if test -z "$ac_err"; then
15506   rm -rf conftest*
15507   eval "ac_cv_header_$ac_safe=yes"
15508 else
15509   echo "$ac_err" >&5
15510   echo "configure: failed program was:" >&5
15511   cat conftest.$ac_ext >&5
15512   rm -rf conftest*
15513   eval "ac_cv_header_$ac_safe=no"
15514 fi
15515 rm -f conftest*
15516 fi
15517 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15518   echo "$ac_t""yes" 1>&6
15519     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15520   cat >> confdefs.h <<EOF
15521 #define $ac_tr_hdr 1
15522 EOF
15523  
15524 else
15525   echo "$ac_t""no" 1>&6
15526 fi
15527 done
15528
15529
15530         if test $ac_cv_header_pth_h = yes ; then
15531                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15532 echo "configure:15533: checking for pth_version in -lpth" >&5
15533 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15534 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15535   echo $ac_n "(cached) $ac_c" 1>&6
15536 else
15537   ac_save_LIBS="$LIBS"
15538 LIBS="-lpth  $LIBS"
15539 cat > conftest.$ac_ext <<EOF
15540 #line 15541 "configure"
15541 #include "confdefs.h"
15542 /* Override any gcc2 internal prototype to avoid an error.  */
15543 /* We use char because int might match the return type of a gcc2
15544     builtin and then its argument prototype would still apply.  */
15545 char pth_version();
15546
15547 int main() {
15548 pth_version()
15549 ; return 0; }
15550 EOF
15551 if { (eval echo configure:15552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15552   rm -rf conftest*
15553   eval "ac_cv_lib_$ac_lib_var=yes"
15554 else
15555   echo "configure: failed program was:" >&5
15556   cat conftest.$ac_ext >&5
15557   rm -rf conftest*
15558   eval "ac_cv_lib_$ac_lib_var=no"
15559 fi
15560 rm -f conftest*
15561 LIBS="$ac_save_LIBS"
15562
15563 fi
15564 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15565   echo "$ac_t""yes" 1>&6
15566   have_pth=yes
15567 else
15568   echo "$ac_t""no" 1>&6
15569 have_pth=no
15570 fi
15571
15572
15573                 if test $have_pth = yes ; then
15574                         cat >> confdefs.h <<\EOF
15575 #define HAVE_GNU_PTH 1
15576 EOF
15577
15578                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15579                         ol_link_threads=pth
15580                         ol_with_threads=found
15581
15582                         if test $ol_with_yielding_select = auto ; then
15583                                 ol_with_yielding_select=yes
15584                         fi
15585                 fi
15586         fi
15587 fi
15588
15589 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15590         -o $ol_with_threads = lwp ; then
15591
15592                 for ac_hdr in thread.h synch.h
15593 do
15594 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15595 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15596 echo "configure:15597: checking for $ac_hdr" >&5
15597 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15598   echo $ac_n "(cached) $ac_c" 1>&6
15599 else
15600   cat > conftest.$ac_ext <<EOF
15601 #line 15602 "configure"
15602 #include "confdefs.h"
15603 #include <$ac_hdr>
15604 EOF
15605 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15606 { (eval echo configure:15607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15607 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15608 if test -z "$ac_err"; then
15609   rm -rf conftest*
15610   eval "ac_cv_header_$ac_safe=yes"
15611 else
15612   echo "$ac_err" >&5
15613   echo "configure: failed program was:" >&5
15614   cat conftest.$ac_ext >&5
15615   rm -rf conftest*
15616   eval "ac_cv_header_$ac_safe=no"
15617 fi
15618 rm -f conftest*
15619 fi
15620 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15621   echo "$ac_t""yes" 1>&6
15622     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15623   cat >> confdefs.h <<EOF
15624 #define $ac_tr_hdr 1
15625 EOF
15626  
15627 else
15628   echo "$ac_t""no" 1>&6
15629 fi
15630 done
15631
15632         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15633                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15634 echo "configure:15635: checking for thr_create in -lthread" >&5
15635 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15636 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15637   echo $ac_n "(cached) $ac_c" 1>&6
15638 else
15639   ac_save_LIBS="$LIBS"
15640 LIBS="-lthread  $LIBS"
15641 cat > conftest.$ac_ext <<EOF
15642 #line 15643 "configure"
15643 #include "confdefs.h"
15644 /* Override any gcc2 internal prototype to avoid an error.  */
15645 /* We use char because int might match the return type of a gcc2
15646     builtin and then its argument prototype would still apply.  */
15647 char thr_create();
15648
15649 int main() {
15650 thr_create()
15651 ; return 0; }
15652 EOF
15653 if { (eval echo configure:15654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15654   rm -rf conftest*
15655   eval "ac_cv_lib_$ac_lib_var=yes"
15656 else
15657   echo "configure: failed program was:" >&5
15658   cat conftest.$ac_ext >&5
15659   rm -rf conftest*
15660   eval "ac_cv_lib_$ac_lib_var=no"
15661 fi
15662 rm -f conftest*
15663 LIBS="$ac_save_LIBS"
15664
15665 fi
15666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15667   echo "$ac_t""yes" 1>&6
15668   have_thr=yes
15669 else
15670   echo "$ac_t""no" 1>&6
15671 have_thr=no
15672 fi
15673
15674
15675                 if test $have_thr = yes ; then
15676                         cat >> confdefs.h <<\EOF
15677 #define HAVE_THR 1
15678 EOF
15679
15680                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15681                         ol_link_threads=thr
15682
15683                         if test $ol_with_yielding_select = auto ; then
15684                                 ol_with_yielding_select=yes
15685                         fi
15686
15687                                                 for ac_func in \
15688                                 thr_setconcurrency \
15689                                 thr_getconcurrency \
15690                         
15691 do
15692 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15693 echo "configure:15694: checking for $ac_func" >&5
15694 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15695   echo $ac_n "(cached) $ac_c" 1>&6
15696 else
15697   cat > conftest.$ac_ext <<EOF
15698 #line 15699 "configure"
15699 #include "confdefs.h"
15700 /* System header to define __stub macros and hopefully few prototypes,
15701     which can conflict with char $ac_func(); below.  */
15702 #include <assert.h>
15703 /* Override any gcc2 internal prototype to avoid an error.  */
15704 /* We use char because int might match the return type of a gcc2
15705     builtin and then its argument prototype would still apply.  */
15706 char $ac_func();
15707 char (*f)();
15708
15709 int main() {
15710
15711 /* The GNU C library defines this for functions which it implements
15712     to always fail with ENOSYS.  Some functions are actually named
15713     something starting with __ and the normal name is an alias.  */
15714 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15715 choke me
15716 #else
15717 f = $ac_func;
15718 #endif
15719
15720 ; return 0; }
15721 EOF
15722 if { (eval echo configure:15723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15723   rm -rf conftest*
15724   eval "ac_cv_func_$ac_func=yes"
15725 else
15726   echo "configure: failed program was:" >&5
15727   cat conftest.$ac_ext >&5
15728   rm -rf conftest*
15729   eval "ac_cv_func_$ac_func=no"
15730 fi
15731 rm -f conftest*
15732 fi
15733
15734 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15735   echo "$ac_t""yes" 1>&6
15736     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15737   cat >> confdefs.h <<EOF
15738 #define $ac_tr_func 1
15739 EOF
15740  
15741 else
15742   echo "$ac_t""no" 1>&6
15743 fi
15744 done
15745
15746                 fi
15747         fi
15748
15749                 for ac_hdr in lwp/lwp.h
15750 do
15751 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15752 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15753 echo "configure:15754: checking for $ac_hdr" >&5
15754 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15755   echo $ac_n "(cached) $ac_c" 1>&6
15756 else
15757   cat > conftest.$ac_ext <<EOF
15758 #line 15759 "configure"
15759 #include "confdefs.h"
15760 #include <$ac_hdr>
15761 EOF
15762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15763 { (eval echo configure:15764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15765 if test -z "$ac_err"; then
15766   rm -rf conftest*
15767   eval "ac_cv_header_$ac_safe=yes"
15768 else
15769   echo "$ac_err" >&5
15770   echo "configure: failed program was:" >&5
15771   cat conftest.$ac_ext >&5
15772   rm -rf conftest*
15773   eval "ac_cv_header_$ac_safe=no"
15774 fi
15775 rm -f conftest*
15776 fi
15777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15778   echo "$ac_t""yes" 1>&6
15779     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15780   cat >> confdefs.h <<EOF
15781 #define $ac_tr_hdr 1
15782 EOF
15783  
15784 else
15785   echo "$ac_t""no" 1>&6
15786 fi
15787 done
15788
15789         if test $ac_cv_header_lwp_lwp_h = yes ; then
15790                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15791 echo "configure:15792: checking for lwp_create in -llwp" >&5
15792 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15793 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15794   echo $ac_n "(cached) $ac_c" 1>&6
15795 else
15796   ac_save_LIBS="$LIBS"
15797 LIBS="-llwp  $LIBS"
15798 cat > conftest.$ac_ext <<EOF
15799 #line 15800 "configure"
15800 #include "confdefs.h"
15801 /* Override any gcc2 internal prototype to avoid an error.  */
15802 /* We use char because int might match the return type of a gcc2
15803     builtin and then its argument prototype would still apply.  */
15804 char lwp_create();
15805
15806 int main() {
15807 lwp_create()
15808 ; return 0; }
15809 EOF
15810 if { (eval echo configure:15811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15811   rm -rf conftest*
15812   eval "ac_cv_lib_$ac_lib_var=yes"
15813 else
15814   echo "configure: failed program was:" >&5
15815   cat conftest.$ac_ext >&5
15816   rm -rf conftest*
15817   eval "ac_cv_lib_$ac_lib_var=no"
15818 fi
15819 rm -f conftest*
15820 LIBS="$ac_save_LIBS"
15821
15822 fi
15823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15824   echo "$ac_t""yes" 1>&6
15825   have_lwp=yes
15826 else
15827   echo "$ac_t""no" 1>&6
15828 have_lwp=no
15829 fi
15830
15831
15832                 if test $have_lwp = yes ; then
15833                         cat >> confdefs.h <<\EOF
15834 #define HAVE_LWP 1
15835 EOF
15836
15837                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15838                         ol_link_threads=lwp
15839
15840                         if test $ol_with_yielding_select = auto ; then
15841                                 ol_with_yielding_select=no
15842                         fi
15843                 fi
15844         fi
15845 fi
15846
15847 if test $ol_with_yielding_select = yes ; then
15848         cat >> confdefs.h <<\EOF
15849 #define HAVE_YIELDING_SELECT 1
15850 EOF
15851
15852 fi
15853
15854 if test $ol_with_threads = manual ; then
15855                 ol_link_threads=yes
15856
15857         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15858
15859         for ac_hdr in pthread.h sched.h
15860 do
15861 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15862 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15863 echo "configure:15864: checking for $ac_hdr" >&5
15864 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15865   echo $ac_n "(cached) $ac_c" 1>&6
15866 else
15867   cat > conftest.$ac_ext <<EOF
15868 #line 15869 "configure"
15869 #include "confdefs.h"
15870 #include <$ac_hdr>
15871 EOF
15872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15873 { (eval echo configure:15874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15875 if test -z "$ac_err"; then
15876   rm -rf conftest*
15877   eval "ac_cv_header_$ac_safe=yes"
15878 else
15879   echo "$ac_err" >&5
15880   echo "configure: failed program was:" >&5
15881   cat conftest.$ac_ext >&5
15882   rm -rf conftest*
15883   eval "ac_cv_header_$ac_safe=no"
15884 fi
15885 rm -f conftest*
15886 fi
15887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15888   echo "$ac_t""yes" 1>&6
15889     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15890   cat >> confdefs.h <<EOF
15891 #define $ac_tr_hdr 1
15892 EOF
15893  
15894 else
15895   echo "$ac_t""no" 1>&6
15896 fi
15897 done
15898
15899         for ac_func in sched_yield pthread_yield
15900 do
15901 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15902 echo "configure:15903: checking for $ac_func" >&5
15903 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15904   echo $ac_n "(cached) $ac_c" 1>&6
15905 else
15906   cat > conftest.$ac_ext <<EOF
15907 #line 15908 "configure"
15908 #include "confdefs.h"
15909 /* System header to define __stub macros and hopefully few prototypes,
15910     which can conflict with char $ac_func(); below.  */
15911 #include <assert.h>
15912 /* Override any gcc2 internal prototype to avoid an error.  */
15913 /* We use char because int might match the return type of a gcc2
15914     builtin and then its argument prototype would still apply.  */
15915 char $ac_func();
15916 char (*f)();
15917
15918 int main() {
15919
15920 /* The GNU C library defines this for functions which it implements
15921     to always fail with ENOSYS.  Some functions are actually named
15922     something starting with __ and the normal name is an alias.  */
15923 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15924 choke me
15925 #else
15926 f = $ac_func;
15927 #endif
15928
15929 ; return 0; }
15930 EOF
15931 if { (eval echo configure:15932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15932   rm -rf conftest*
15933   eval "ac_cv_func_$ac_func=yes"
15934 else
15935   echo "configure: failed program was:" >&5
15936   cat conftest.$ac_ext >&5
15937   rm -rf conftest*
15938   eval "ac_cv_func_$ac_func=no"
15939 fi
15940 rm -f conftest*
15941 fi
15942
15943 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15944   echo "$ac_t""yes" 1>&6
15945     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15946   cat >> confdefs.h <<EOF
15947 #define $ac_tr_func 1
15948 EOF
15949  
15950 else
15951   echo "$ac_t""no" 1>&6
15952 fi
15953 done
15954
15955         
15956         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15957 echo "configure:15958: checking for LinuxThreads pthread.h" >&5
15958 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15959   echo $ac_n "(cached) $ac_c" 1>&6
15960 else
15961   cat > conftest.$ac_ext <<EOF
15962 #line 15963 "configure"
15963 #include "confdefs.h"
15964 #include <pthread.h>
15965 EOF
15966 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15967   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15968   rm -rf conftest*
15969   ol_cv_header_linux_threads=yes
15970 else
15971   rm -rf conftest*
15972   ol_cv_header_linux_threads=no
15973 fi
15974 rm -f conftest*
15975
15976                 
15977 fi
15978
15979 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15980         if test $ol_cv_header_linux_threads = yes; then
15981                 cat >> confdefs.h <<\EOF
15982 #define HAVE_LINUX_THREADS 1
15983 EOF
15984
15985         fi
15986
15987
15988         for ac_hdr in mach/cthreads.h
15989 do
15990 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15991 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15992 echo "configure:15993: checking for $ac_hdr" >&5
15993 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15994   echo $ac_n "(cached) $ac_c" 1>&6
15995 else
15996   cat > conftest.$ac_ext <<EOF
15997 #line 15998 "configure"
15998 #include "confdefs.h"
15999 #include <$ac_hdr>
16000 EOF
16001 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16002 { (eval echo configure:16003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16003 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16004 if test -z "$ac_err"; then
16005   rm -rf conftest*
16006   eval "ac_cv_header_$ac_safe=yes"
16007 else
16008   echo "$ac_err" >&5
16009   echo "configure: failed program was:" >&5
16010   cat conftest.$ac_ext >&5
16011   rm -rf conftest*
16012   eval "ac_cv_header_$ac_safe=no"
16013 fi
16014 rm -f conftest*
16015 fi
16016 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16017   echo "$ac_t""yes" 1>&6
16018     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16019   cat >> confdefs.h <<EOF
16020 #define $ac_tr_hdr 1
16021 EOF
16022  
16023 else
16024   echo "$ac_t""no" 1>&6
16025 fi
16026 done
16027
16028         for ac_hdr in lwp/lwp.h
16029 do
16030 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16031 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16032 echo "configure:16033: checking for $ac_hdr" >&5
16033 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16034   echo $ac_n "(cached) $ac_c" 1>&6
16035 else
16036   cat > conftest.$ac_ext <<EOF
16037 #line 16038 "configure"
16038 #include "confdefs.h"
16039 #include <$ac_hdr>
16040 EOF
16041 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16042 { (eval echo configure:16043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16043 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16044 if test -z "$ac_err"; then
16045   rm -rf conftest*
16046   eval "ac_cv_header_$ac_safe=yes"
16047 else
16048   echo "$ac_err" >&5
16049   echo "configure: failed program was:" >&5
16050   cat conftest.$ac_ext >&5
16051   rm -rf conftest*
16052   eval "ac_cv_header_$ac_safe=no"
16053 fi
16054 rm -f conftest*
16055 fi
16056 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16057   echo "$ac_t""yes" 1>&6
16058     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16059   cat >> confdefs.h <<EOF
16060 #define $ac_tr_hdr 1
16061 EOF
16062  
16063 else
16064   echo "$ac_t""no" 1>&6
16065 fi
16066 done
16067
16068         for ac_hdr in thread.h synch.h
16069 do
16070 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16071 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16072 echo "configure:16073: checking for $ac_hdr" >&5
16073 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16074   echo $ac_n "(cached) $ac_c" 1>&6
16075 else
16076   cat > conftest.$ac_ext <<EOF
16077 #line 16078 "configure"
16078 #include "confdefs.h"
16079 #include <$ac_hdr>
16080 EOF
16081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16082 { (eval echo configure:16083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16084 if test -z "$ac_err"; then
16085   rm -rf conftest*
16086   eval "ac_cv_header_$ac_safe=yes"
16087 else
16088   echo "$ac_err" >&5
16089   echo "configure: failed program was:" >&5
16090   cat conftest.$ac_ext >&5
16091   rm -rf conftest*
16092   eval "ac_cv_header_$ac_safe=no"
16093 fi
16094 rm -f conftest*
16095 fi
16096 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16097   echo "$ac_t""yes" 1>&6
16098     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16099   cat >> confdefs.h <<EOF
16100 #define $ac_tr_hdr 1
16101 EOF
16102  
16103 else
16104   echo "$ac_t""no" 1>&6
16105 fi
16106 done
16107
16108 fi
16109
16110 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16111                         cat >> confdefs.h <<\EOF
16112 #define REENTRANT 1
16113 EOF
16114
16115         cat >> confdefs.h <<\EOF
16116 #define _REENTRANT 1
16117 EOF
16118
16119         cat >> confdefs.h <<\EOF
16120 #define THREAD_SAFE 1
16121 EOF
16122
16123         cat >> confdefs.h <<\EOF
16124 #define _THREAD_SAFE 1
16125 EOF
16126
16127         cat >> confdefs.h <<\EOF
16128 #define THREADSAFE 1
16129 EOF
16130
16131         cat >> confdefs.h <<\EOF
16132 #define _THREADSAFE 1
16133 EOF
16134
16135         cat >> confdefs.h <<\EOF
16136 #define _SGI_MP_SOURCE 1
16137 EOF
16138
16139
16140                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16141 echo "configure:16142: checking for thread specific errno" >&5
16142 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16143   echo $ac_n "(cached) $ac_c" 1>&6
16144 else
16145   
16146                 cat > conftest.$ac_ext <<EOF
16147 #line 16148 "configure"
16148 #include "confdefs.h"
16149 #include <errno.h>
16150 int main() {
16151 errno = 0;
16152 ; return 0; }
16153 EOF
16154 if { (eval echo configure:16155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16155   rm -rf conftest*
16156   ol_cv_errno_thread_specific=yes
16157 else
16158   echo "configure: failed program was:" >&5
16159   cat conftest.$ac_ext >&5
16160   rm -rf conftest*
16161   ol_cv_errno_thread_specific=no
16162 fi
16163 rm -f conftest*
16164         
16165 fi
16166
16167 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16168
16169                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16170 echo "configure:16171: checking for thread specific h_errno" >&5
16171 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16172   echo $ac_n "(cached) $ac_c" 1>&6
16173 else
16174   
16175                 cat > conftest.$ac_ext <<EOF
16176 #line 16177 "configure"
16177 #include "confdefs.h"
16178 #include <netdb.h>
16179 int main() {
16180 h_errno = 0;
16181 ; return 0; }
16182 EOF
16183 if { (eval echo configure:16184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16184   rm -rf conftest*
16185   ol_cv_h_errno_thread_specific=yes
16186 else
16187   echo "configure: failed program was:" >&5
16188   cat conftest.$ac_ext >&5
16189   rm -rf conftest*
16190   ol_cv_h_errno_thread_specific=no
16191 fi
16192 rm -f conftest*
16193         
16194 fi
16195
16196 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16197
16198         if test $ol_cv_errno_thread_specific != yes \
16199                 -o $ol_cv_h_errno_thread_specific != yes ; then
16200                 LIBS="$LTHREAD_LIBS $LIBS"
16201                 LTHREAD_LIBS=""
16202         fi
16203
16204 fi  
16205
16206 if test $ol_link_threads = no ; then
16207         if test $ol_with_threads = yes ; then
16208                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16209         fi
16210
16211         if test $ol_with_threads = auto ; then
16212                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16213                 ol_with_threads=no
16214         fi
16215
16216         cat >> confdefs.h <<\EOF
16217 #define NO_THREADS 1
16218 EOF
16219
16220         LTHREAD_LIBS=""
16221 fi
16222
16223 if test $ol_link_threads != no ; then
16224         cat >> confdefs.h <<\EOF
16225 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16226 EOF
16227
16228 fi
16229
16230 for ac_func in \
16231         ctime_r                 \
16232         gethostbyname_r gethostbyaddr_r \
16233
16234 do
16235 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16236 echo "configure:16237: checking for $ac_func" >&5
16237 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16238   echo $ac_n "(cached) $ac_c" 1>&6
16239 else
16240   cat > conftest.$ac_ext <<EOF
16241 #line 16242 "configure"
16242 #include "confdefs.h"
16243 /* System header to define __stub macros and hopefully few prototypes,
16244     which can conflict with char $ac_func(); below.  */
16245 #include <assert.h>
16246 /* Override any gcc2 internal prototype to avoid an error.  */
16247 /* We use char because int might match the return type of a gcc2
16248     builtin and then its argument prototype would still apply.  */
16249 char $ac_func();
16250 char (*f)();
16251
16252 int main() {
16253
16254 /* The GNU C library defines this for functions which it implements
16255     to always fail with ENOSYS.  Some functions are actually named
16256     something starting with __ and the normal name is an alias.  */
16257 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16258 choke me
16259 #else
16260 f = $ac_func;
16261 #endif
16262
16263 ; return 0; }
16264 EOF
16265 if { (eval echo configure:16266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16266   rm -rf conftest*
16267   eval "ac_cv_func_$ac_func=yes"
16268 else
16269   echo "configure: failed program was:" >&5
16270   cat conftest.$ac_ext >&5
16271   rm -rf conftest*
16272   eval "ac_cv_func_$ac_func=no"
16273 fi
16274 rm -f conftest*
16275 fi
16276
16277 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16278   echo "$ac_t""yes" 1>&6
16279     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16280   cat >> confdefs.h <<EOF
16281 #define $ac_tr_func 1
16282 EOF
16283  
16284 else
16285   echo "$ac_t""no" 1>&6
16286 fi
16287 done
16288
16289
16290 if test "$ac_cv_func_ctime_r" = no ; then
16291         ol_cv_func_ctime_r_nargs=0
16292 else
16293         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16294 echo "configure:16295: checking number of arguments of ctime_r" >&5
16295 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16296   echo $ac_n "(cached) $ac_c" 1>&6
16297 else
16298   cat > conftest.$ac_ext <<EOF
16299 #line 16300 "configure"
16300 #include "confdefs.h"
16301 #include <time.h>
16302 int main() {
16303 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16304 ; return 0; }
16305 EOF
16306 if { (eval echo configure:16307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16307   rm -rf conftest*
16308   ol_cv_func_ctime_r_nargs3=yes
16309 else
16310   echo "configure: failed program was:" >&5
16311   cat conftest.$ac_ext >&5
16312   rm -rf conftest*
16313   ol_cv_func_ctime_r_nargs3=no
16314 fi
16315 rm -f conftest*
16316
16317         cat > conftest.$ac_ext <<EOF
16318 #line 16319 "configure"
16319 #include "confdefs.h"
16320 #include <time.h>
16321 int main() {
16322 time_t ti; char *buffer; ctime_r(&ti,buffer);
16323 ; return 0; }
16324 EOF
16325 if { (eval echo configure:16326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16326   rm -rf conftest*
16327   ol_cv_func_ctime_r_nargs2=yes
16328 else
16329   echo "configure: failed program was:" >&5
16330   cat conftest.$ac_ext >&5
16331   rm -rf conftest*
16332   ol_cv_func_ctime_r_nargs2=no
16333 fi
16334 rm -f conftest*
16335
16336         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16337                 $ol_cv_func_ctime_r_nargs2 = no ; then
16338
16339                 ol_cv_func_ctime_r_nargs=3
16340
16341         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16342                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16343
16344                 ol_cv_func_ctime_r_nargs=2
16345
16346         else
16347                 ol_cv_func_ctime_r_nargs=0
16348         fi
16349   
16350 fi
16351
16352 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16353
16354   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16355         cat >> confdefs.h <<EOF
16356 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16357 EOF
16358
16359   fi
16360
16361 fi
16362
16363 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16364         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16365 echo "configure:16366: checking number of arguments of gethostbyname_r" >&5
16366 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16367   echo $ac_n "(cached) $ac_c" 1>&6
16368 else
16369   cat > conftest.$ac_ext <<EOF
16370 #line 16371 "configure"
16371 #include "confdefs.h"
16372 #include <sys/types.h>
16373 #include <sys/socket.h>
16374 #include <netinet/in.h>
16375 #include <netdb.h>
16376 #define BUFSIZE (sizeof(struct hostent)+10)
16377 int main() {
16378 struct hostent hent; char buffer[BUFSIZE];
16379                 int bufsize=BUFSIZE;int h_errno;
16380                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16381                         buffer, bufsize, &h_errno);
16382 ; return 0; }
16383 EOF
16384 if { (eval echo configure:16385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16385   rm -rf conftest*
16386   ol_cv_func_gethostbyname_r_nargs5=yes
16387 else
16388   echo "configure: failed program was:" >&5
16389   cat conftest.$ac_ext >&5
16390   rm -rf conftest*
16391   ol_cv_func_gethostbyname_r_nargs5=no
16392 fi
16393 rm -f conftest*
16394
16395         cat > conftest.$ac_ext <<EOF
16396 #line 16397 "configure"
16397 #include "confdefs.h"
16398 #include <sys/types.h>
16399 #include <sys/socket.h>
16400 #include <netinet/in.h>
16401 #include <netdb.h>
16402 #define BUFSIZE (sizeof(struct hostent)+10)
16403 int main() {
16404 struct hostent hent;struct hostent *rhent;
16405                 char buffer[BUFSIZE];
16406                 int bufsize=BUFSIZE;int h_errno;
16407                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16408                         &rhent, &h_errno);
16409 ; return 0; }
16410 EOF
16411 if { (eval echo configure:16412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16412   rm -rf conftest*
16413   ol_cv_func_gethostbyname_r_nargs6=yes
16414 else
16415   echo "configure: failed program was:" >&5
16416   cat conftest.$ac_ext >&5
16417   rm -rf conftest*
16418   ol_cv_func_gethostbyname_r_nargs6=no
16419 fi
16420 rm -f conftest*
16421
16422         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16423                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16424
16425                 ol_cv_func_gethostbyname_r_nargs=5
16426
16427         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16428                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16429
16430                 ol_cv_func_gethostbyname_r_nargs=6
16431
16432         else
16433                 ol_cv_func_gethostbyname_r_nargs=0
16434         fi
16435   
16436 fi
16437
16438 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16439   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16440         cat >> confdefs.h <<EOF
16441 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16442 EOF
16443
16444   fi
16445
16446 else
16447         ol_cv_func_gethostbyname_r_nargs=0
16448 fi
16449  
16450 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16451         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16452 echo "configure:16453: checking number of arguments of gethostbyaddr_r" >&5
16453 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16454   echo $ac_n "(cached) $ac_c" 1>&6
16455 else
16456   cat > conftest.$ac_ext <<EOF
16457 #line 16458 "configure"
16458 #include "confdefs.h"
16459 #include <sys/types.h>
16460 #include <sys/socket.h>
16461 #include <netinet/in.h>
16462 #include <netdb.h>
16463 #define BUFSIZE (sizeof(struct hostent)+10)
16464 int main() {
16465 struct hostent hent; char buffer[BUFSIZE]; 
16466             struct in_addr add;
16467             size_t alen=sizeof(struct in_addr);
16468             int bufsize=BUFSIZE;int h_errno;
16469                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16470                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16471 ; return 0; }
16472 EOF
16473 if { (eval echo configure:16474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16474   rm -rf conftest*
16475   ol_cv_func_gethostbyaddr_r_nargs7=yes
16476 else
16477   echo "configure: failed program was:" >&5
16478   cat conftest.$ac_ext >&5
16479   rm -rf conftest*
16480   ol_cv_func_gethostbyaddr_r_nargs7=no
16481 fi
16482 rm -f conftest*
16483
16484         cat > conftest.$ac_ext <<EOF
16485 #line 16486 "configure"
16486 #include "confdefs.h"
16487 #include <sys/types.h>
16488 #include <sys/socket.h>
16489 #include <netinet/in.h>
16490 #include <netdb.h>
16491 #define BUFSIZE (sizeof(struct hostent)+10)
16492 int main() {
16493 struct hostent hent;
16494                 struct hostent *rhent; char buffer[BUFSIZE]; 
16495                 struct in_addr add;
16496                 size_t alen=sizeof(struct in_addr);
16497                 int bufsize=BUFSIZE;int h_errno;
16498                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16499                         alen, AF_INET, &hent, buffer, bufsize, 
16500                         &rhent, &h_errno);
16501 ; return 0; }
16502 EOF
16503 if { (eval echo configure:16504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16504   rm -rf conftest*
16505   ol_cv_func_gethostbyaddr_r_nargs8=yes
16506 else
16507   echo "configure: failed program was:" >&5
16508   cat conftest.$ac_ext >&5
16509   rm -rf conftest*
16510   ol_cv_func_gethostbyaddr_r_nargs8=no
16511 fi
16512 rm -f conftest*
16513
16514         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16515                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16516
16517                 ol_cv_func_gethostbyaddr_r_nargs=7
16518
16519         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16520                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16521
16522                 ol_cv_func_gethostbyaddr_r_nargs=8
16523
16524         else
16525                 ol_cv_func_gethostbyaddr_r_nargs=0
16526         fi
16527   
16528 fi
16529
16530 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16531   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16532     cat >> confdefs.h <<EOF
16533 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16534 EOF
16535
16536   fi
16537
16538 else
16539         ol_cv_func_gethostbyaddr_r_nargs=0
16540 fi
16541
16542 ol_link_ldbm=no 
16543
16544 if test $ol_with_ldbm_api = auto \
16545         -o $ol_with_ldbm_api = berkeley \
16546         -o $ol_with_ldbm_api = bcompat ; then
16547
16548         if test $ol_with_ldbm_api = bcompat; then \
16549                 for ac_hdr in db_185.h db.h
16550 do
16551 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16552 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16553 echo "configure:16554: checking for $ac_hdr" >&5
16554 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16555   echo $ac_n "(cached) $ac_c" 1>&6
16556 else
16557   cat > conftest.$ac_ext <<EOF
16558 #line 16559 "configure"
16559 #include "confdefs.h"
16560 #include <$ac_hdr>
16561 EOF
16562 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16563 { (eval echo configure:16564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16564 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16565 if test -z "$ac_err"; then
16566   rm -rf conftest*
16567   eval "ac_cv_header_$ac_safe=yes"
16568 else
16569   echo "$ac_err" >&5
16570   echo "configure: failed program was:" >&5
16571   cat conftest.$ac_ext >&5
16572   rm -rf conftest*
16573   eval "ac_cv_header_$ac_safe=no"
16574 fi
16575 rm -f conftest*
16576 fi
16577 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16578   echo "$ac_t""yes" 1>&6
16579     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16580   cat >> confdefs.h <<EOF
16581 #define $ac_tr_hdr 1
16582 EOF
16583  
16584 else
16585   echo "$ac_t""no" 1>&6
16586 fi
16587 done
16588
16589 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16590         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16591 echo "configure:16592: checking if Berkeley DB header compatibility" >&5
16592 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16593   echo $ac_n "(cached) $ac_c" 1>&6
16594 else
16595   
16596                 cat > conftest.$ac_ext <<EOF
16597 #line 16598 "configure"
16598 #include "confdefs.h"
16599
16600 #if HAVE_DB_185_H
16601 #       include <db_185.h>
16602 #else
16603 #       include <db.h>
16604 #endif
16605
16606  /* this check could be improved */
16607 #ifndef DB_VERSION_MAJOR
16608 #       define DB_VERSION_MAJOR 1
16609 #endif
16610
16611 #if DB_VERSION_MAJOR == 1 
16612         __db_version_1
16613 #endif
16614
16615 EOF
16616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16617   egrep "__db_version_1" >/dev/null 2>&1; then
16618   rm -rf conftest*
16619   ol_cv_header_db1=yes
16620 else
16621   rm -rf conftest*
16622   ol_cv_header_db1=no
16623 fi
16624 rm -f conftest*
16625
16626 fi
16627
16628 echo "$ac_t""$ol_cv_header_db1" 1>&6
16629
16630         if test $ol_cv_header_db1 = yes ; then
16631                 ol_cv_lib_db=no
16632 if test $ol_cv_lib_db = no ; then
16633         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16634 echo "configure:16635: checking for Berkeley DB link (default)" >&5
16635 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16636   echo $ac_n "(cached) $ac_c" 1>&6
16637 else
16638   
16639         ol_DB_LIB=
16640         ol_LIBS=$LIBS
16641         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16642
16643         cat > conftest.$ac_ext <<EOF
16644 #line 16645 "configure"
16645 #include "confdefs.h"
16646
16647 #ifdef HAVE_DB_185_H
16648 # include <db_185.h>
16649 #else
16650 # include <db.h>
16651 #endif
16652
16653 #ifndef DB_VERSION_MAJOR
16654 # define DB_VERSION_MAJOR 1
16655 #endif
16656
16657 #ifndef NULL
16658 #define NULL ((void*)0)
16659 #endif
16660
16661 int main() {
16662
16663 #if DB_VERSION_MAJOR > 1
16664         {
16665                 char *version;
16666                 int major, minor, patch;
16667
16668                 version = db_version( &major, &minor, &patch );
16669
16670                 if( major != DB_VERSION_MAJOR ||
16671                         minor < DB_VERSION_MINOR )
16672                 {
16673                         printf("Berkeley DB version mismatch\n"
16674                                 "\texpected: %s\n\tgot: %s\n",
16675                                 DB_VERSION_STRING, version);
16676                         return 1;
16677                 }
16678         }
16679 #endif
16680
16681 #if DB_VERSION_MAJOR > 2
16682         db_env_create( NULL, 0 );
16683 #elif DB_VERSION_MAJOR > 1
16684         db_appexit( NULL );
16685 #else
16686         (void) dbopen( NULL, 0, 0, 0, NULL);
16687 #endif
16688
16689 ; return 0; }
16690 EOF
16691 if { (eval echo configure:16692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16692   rm -rf conftest*
16693   ol_cv_db_none=yes
16694 else
16695   echo "configure: failed program was:" >&5
16696   cat conftest.$ac_ext >&5
16697   rm -rf conftest*
16698   ol_cv_db_none=no
16699 fi
16700 rm -f conftest*
16701
16702         LIBS="$ol_LIBS"
16703
16704 fi
16705
16706 echo "$ac_t""$ol_cv_db_none" 1>&6
16707
16708         if test $ol_cv_db_none = yes ; then
16709                 ol_cv_lib_db=yes
16710         fi
16711 fi
16712
16713 if test $ol_cv_lib_db = no ; then
16714         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16715 echo "configure:16716: checking for Berkeley DB link (-ldb41)" >&5
16716 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16717   echo $ac_n "(cached) $ac_c" 1>&6
16718 else
16719   
16720         ol_DB_LIB=-ldb41
16721         ol_LIBS=$LIBS
16722         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16723
16724         cat > conftest.$ac_ext <<EOF
16725 #line 16726 "configure"
16726 #include "confdefs.h"
16727
16728 #ifdef HAVE_DB_185_H
16729 # include <db_185.h>
16730 #else
16731 # include <db.h>
16732 #endif
16733
16734 #ifndef DB_VERSION_MAJOR
16735 # define DB_VERSION_MAJOR 1
16736 #endif
16737
16738 #ifndef NULL
16739 #define NULL ((void*)0)
16740 #endif
16741
16742 int main() {
16743
16744 #if DB_VERSION_MAJOR > 1
16745         {
16746                 char *version;
16747                 int major, minor, patch;
16748
16749                 version = db_version( &major, &minor, &patch );
16750
16751                 if( major != DB_VERSION_MAJOR ||
16752                         minor < DB_VERSION_MINOR )
16753                 {
16754                         printf("Berkeley DB version mismatch\n"
16755                                 "\texpected: %s\n\tgot: %s\n",
16756                                 DB_VERSION_STRING, version);
16757                         return 1;
16758                 }
16759         }
16760 #endif
16761
16762 #if DB_VERSION_MAJOR > 2
16763         db_env_create( NULL, 0 );
16764 #elif DB_VERSION_MAJOR > 1
16765         db_appexit( NULL );
16766 #else
16767         (void) dbopen( NULL, 0, 0, 0, NULL);
16768 #endif
16769
16770 ; return 0; }
16771 EOF
16772 if { (eval echo configure:16773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16773   rm -rf conftest*
16774   ol_cv_db_db41=yes
16775 else
16776   echo "configure: failed program was:" >&5
16777   cat conftest.$ac_ext >&5
16778   rm -rf conftest*
16779   ol_cv_db_db41=no
16780 fi
16781 rm -f conftest*
16782
16783         LIBS="$ol_LIBS"
16784
16785 fi
16786
16787 echo "$ac_t""$ol_cv_db_db41" 1>&6
16788
16789         if test $ol_cv_db_db41 = yes ; then
16790                 ol_cv_lib_db=-ldb41
16791         fi
16792 fi
16793
16794 if test $ol_cv_lib_db = no ; then
16795         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16796 echo "configure:16797: checking for Berkeley DB link (-ldb-41)" >&5
16797 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16798   echo $ac_n "(cached) $ac_c" 1>&6
16799 else
16800   
16801         ol_DB_LIB=-ldb-41
16802         ol_LIBS=$LIBS
16803         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16804
16805         cat > conftest.$ac_ext <<EOF
16806 #line 16807 "configure"
16807 #include "confdefs.h"
16808
16809 #ifdef HAVE_DB_185_H
16810 # include <db_185.h>
16811 #else
16812 # include <db.h>
16813 #endif
16814
16815 #ifndef DB_VERSION_MAJOR
16816 # define DB_VERSION_MAJOR 1
16817 #endif
16818
16819 #ifndef NULL
16820 #define NULL ((void*)0)
16821 #endif
16822
16823 int main() {
16824
16825 #if DB_VERSION_MAJOR > 1
16826         {
16827                 char *version;
16828                 int major, minor, patch;
16829
16830                 version = db_version( &major, &minor, &patch );
16831
16832                 if( major != DB_VERSION_MAJOR ||
16833                         minor < DB_VERSION_MINOR )
16834                 {
16835                         printf("Berkeley DB version mismatch\n"
16836                                 "\texpected: %s\n\tgot: %s\n",
16837                                 DB_VERSION_STRING, version);
16838                         return 1;
16839                 }
16840         }
16841 #endif
16842
16843 #if DB_VERSION_MAJOR > 2
16844         db_env_create( NULL, 0 );
16845 #elif DB_VERSION_MAJOR > 1
16846         db_appexit( NULL );
16847 #else
16848         (void) dbopen( NULL, 0, 0, 0, NULL);
16849 #endif
16850
16851 ; return 0; }
16852 EOF
16853 if { (eval echo configure:16854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16854   rm -rf conftest*
16855   ol_cv_db_db_41=yes
16856 else
16857   echo "configure: failed program was:" >&5
16858   cat conftest.$ac_ext >&5
16859   rm -rf conftest*
16860   ol_cv_db_db_41=no
16861 fi
16862 rm -f conftest*
16863
16864         LIBS="$ol_LIBS"
16865
16866 fi
16867
16868 echo "$ac_t""$ol_cv_db_db_41" 1>&6
16869
16870         if test $ol_cv_db_db_41 = yes ; then
16871                 ol_cv_lib_db=-ldb-41
16872         fi
16873 fi
16874
16875 if test $ol_cv_lib_db = no ; then
16876         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
16877 echo "configure:16878: checking for Berkeley DB link (-ldb-4.1)" >&5
16878 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
16879   echo $ac_n "(cached) $ac_c" 1>&6
16880 else
16881   
16882         ol_DB_LIB=-ldb-4.1
16883         ol_LIBS=$LIBS
16884         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16885
16886         cat > conftest.$ac_ext <<EOF
16887 #line 16888 "configure"
16888 #include "confdefs.h"
16889
16890 #ifdef HAVE_DB_185_H
16891 # include <db_185.h>
16892 #else
16893 # include <db.h>
16894 #endif
16895
16896 #ifndef DB_VERSION_MAJOR
16897 # define DB_VERSION_MAJOR 1
16898 #endif
16899
16900 #ifndef NULL
16901 #define NULL ((void*)0)
16902 #endif
16903
16904 int main() {
16905
16906 #if DB_VERSION_MAJOR > 1
16907         {
16908                 char *version;
16909                 int major, minor, patch;
16910
16911                 version = db_version( &major, &minor, &patch );
16912
16913                 if( major != DB_VERSION_MAJOR ||
16914                         minor < DB_VERSION_MINOR )
16915                 {
16916                         printf("Berkeley DB version mismatch\n"
16917                                 "\texpected: %s\n\tgot: %s\n",
16918                                 DB_VERSION_STRING, version);
16919                         return 1;
16920                 }
16921         }
16922 #endif
16923
16924 #if DB_VERSION_MAJOR > 2
16925         db_env_create( NULL, 0 );
16926 #elif DB_VERSION_MAJOR > 1
16927         db_appexit( NULL );
16928 #else
16929         (void) dbopen( NULL, 0, 0, 0, NULL);
16930 #endif
16931
16932 ; return 0; }
16933 EOF
16934 if { (eval echo configure:16935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16935   rm -rf conftest*
16936   ol_cv_db_db_4_dot_1=yes
16937 else
16938   echo "configure: failed program was:" >&5
16939   cat conftest.$ac_ext >&5
16940   rm -rf conftest*
16941   ol_cv_db_db_4_dot_1=no
16942 fi
16943 rm -f conftest*
16944
16945         LIBS="$ol_LIBS"
16946
16947 fi
16948
16949 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
16950
16951         if test $ol_cv_db_db_4_dot_1 = yes ; then
16952                 ol_cv_lib_db=-ldb-4.1
16953         fi
16954 fi
16955
16956 if test $ol_cv_lib_db = no ; then
16957         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
16958 echo "configure:16959: checking for Berkeley DB link (-ldb-4-1)" >&5
16959 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
16960   echo $ac_n "(cached) $ac_c" 1>&6
16961 else
16962   
16963         ol_DB_LIB=-ldb-4-1
16964         ol_LIBS=$LIBS
16965         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16966
16967         cat > conftest.$ac_ext <<EOF
16968 #line 16969 "configure"
16969 #include "confdefs.h"
16970
16971 #ifdef HAVE_DB_185_H
16972 # include <db_185.h>
16973 #else
16974 # include <db.h>
16975 #endif
16976
16977 #ifndef DB_VERSION_MAJOR
16978 # define DB_VERSION_MAJOR 1
16979 #endif
16980
16981 #ifndef NULL
16982 #define NULL ((void*)0)
16983 #endif
16984
16985 int main() {
16986
16987 #if DB_VERSION_MAJOR > 1
16988         {
16989                 char *version;
16990                 int major, minor, patch;
16991
16992                 version = db_version( &major, &minor, &patch );
16993
16994                 if( major != DB_VERSION_MAJOR ||
16995                         minor < DB_VERSION_MINOR )
16996                 {
16997                         printf("Berkeley DB version mismatch\n"
16998                                 "\texpected: %s\n\tgot: %s\n",
16999                                 DB_VERSION_STRING, version);
17000                         return 1;
17001                 }
17002         }
17003 #endif
17004
17005 #if DB_VERSION_MAJOR > 2
17006         db_env_create( NULL, 0 );
17007 #elif DB_VERSION_MAJOR > 1
17008         db_appexit( NULL );
17009 #else
17010         (void) dbopen( NULL, 0, 0, 0, NULL);
17011 #endif
17012
17013 ; return 0; }
17014 EOF
17015 if { (eval echo configure:17016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17016   rm -rf conftest*
17017   ol_cv_db_db_4_1=yes
17018 else
17019   echo "configure: failed program was:" >&5
17020   cat conftest.$ac_ext >&5
17021   rm -rf conftest*
17022   ol_cv_db_db_4_1=no
17023 fi
17024 rm -f conftest*
17025
17026         LIBS="$ol_LIBS"
17027
17028 fi
17029
17030 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17031
17032         if test $ol_cv_db_db_4_1 = yes ; then
17033                 ol_cv_lib_db=-ldb-4-1
17034         fi
17035 fi
17036
17037 if test $ol_cv_lib_db = no ; then
17038         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17039 echo "configure:17040: checking for Berkeley DB link (-ldb-4)" >&5
17040 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17041   echo $ac_n "(cached) $ac_c" 1>&6
17042 else
17043   
17044         ol_DB_LIB=-ldb-4
17045         ol_LIBS=$LIBS
17046         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17047
17048         cat > conftest.$ac_ext <<EOF
17049 #line 17050 "configure"
17050 #include "confdefs.h"
17051
17052 #ifdef HAVE_DB_185_H
17053 # include <db_185.h>
17054 #else
17055 # include <db.h>
17056 #endif
17057
17058 #ifndef DB_VERSION_MAJOR
17059 # define DB_VERSION_MAJOR 1
17060 #endif
17061
17062 #ifndef NULL
17063 #define NULL ((void*)0)
17064 #endif
17065
17066 int main() {
17067
17068 #if DB_VERSION_MAJOR > 1
17069         {
17070                 char *version;
17071                 int major, minor, patch;
17072
17073                 version = db_version( &major, &minor, &patch );
17074
17075                 if( major != DB_VERSION_MAJOR ||
17076                         minor < DB_VERSION_MINOR )
17077                 {
17078                         printf("Berkeley DB version mismatch\n"
17079                                 "\texpected: %s\n\tgot: %s\n",
17080                                 DB_VERSION_STRING, version);
17081                         return 1;
17082                 }
17083         }
17084 #endif
17085
17086 #if DB_VERSION_MAJOR > 2
17087         db_env_create( NULL, 0 );
17088 #elif DB_VERSION_MAJOR > 1
17089         db_appexit( NULL );
17090 #else
17091         (void) dbopen( NULL, 0, 0, 0, NULL);
17092 #endif
17093
17094 ; return 0; }
17095 EOF
17096 if { (eval echo configure:17097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17097   rm -rf conftest*
17098   ol_cv_db_db_4=yes
17099 else
17100   echo "configure: failed program was:" >&5
17101   cat conftest.$ac_ext >&5
17102   rm -rf conftest*
17103   ol_cv_db_db_4=no
17104 fi
17105 rm -f conftest*
17106
17107         LIBS="$ol_LIBS"
17108
17109 fi
17110
17111 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17112
17113         if test $ol_cv_db_db_4 = yes ; then
17114                 ol_cv_lib_db=-ldb-4
17115         fi
17116 fi
17117
17118 if test $ol_cv_lib_db = no ; then
17119         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17120 echo "configure:17121: checking for Berkeley DB link (-ldb4)" >&5
17121 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17122   echo $ac_n "(cached) $ac_c" 1>&6
17123 else
17124   
17125         ol_DB_LIB=-ldb4
17126         ol_LIBS=$LIBS
17127         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17128
17129         cat > conftest.$ac_ext <<EOF
17130 #line 17131 "configure"
17131 #include "confdefs.h"
17132
17133 #ifdef HAVE_DB_185_H
17134 # include <db_185.h>
17135 #else
17136 # include <db.h>
17137 #endif
17138
17139 #ifndef DB_VERSION_MAJOR
17140 # define DB_VERSION_MAJOR 1
17141 #endif
17142
17143 #ifndef NULL
17144 #define NULL ((void*)0)
17145 #endif
17146
17147 int main() {
17148
17149 #if DB_VERSION_MAJOR > 1
17150         {
17151                 char *version;
17152                 int major, minor, patch;
17153
17154                 version = db_version( &major, &minor, &patch );
17155
17156                 if( major != DB_VERSION_MAJOR ||
17157                         minor < DB_VERSION_MINOR )
17158                 {
17159                         printf("Berkeley DB version mismatch\n"
17160                                 "\texpected: %s\n\tgot: %s\n",
17161                                 DB_VERSION_STRING, version);
17162                         return 1;
17163                 }
17164         }
17165 #endif
17166
17167 #if DB_VERSION_MAJOR > 2
17168         db_env_create( NULL, 0 );
17169 #elif DB_VERSION_MAJOR > 1
17170         db_appexit( NULL );
17171 #else
17172         (void) dbopen( NULL, 0, 0, 0, NULL);
17173 #endif
17174
17175 ; return 0; }
17176 EOF
17177 if { (eval echo configure:17178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17178   rm -rf conftest*
17179   ol_cv_db_db4=yes
17180 else
17181   echo "configure: failed program was:" >&5
17182   cat conftest.$ac_ext >&5
17183   rm -rf conftest*
17184   ol_cv_db_db4=no
17185 fi
17186 rm -f conftest*
17187
17188         LIBS="$ol_LIBS"
17189
17190 fi
17191
17192 echo "$ac_t""$ol_cv_db_db4" 1>&6
17193
17194         if test $ol_cv_db_db4 = yes ; then
17195                 ol_cv_lib_db=-ldb4
17196         fi
17197 fi
17198
17199 if test $ol_cv_lib_db = no ; then
17200         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17201 echo "configure:17202: checking for Berkeley DB link (-ldb)" >&5
17202 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17203   echo $ac_n "(cached) $ac_c" 1>&6
17204 else
17205   
17206         ol_DB_LIB=-ldb
17207         ol_LIBS=$LIBS
17208         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17209
17210         cat > conftest.$ac_ext <<EOF
17211 #line 17212 "configure"
17212 #include "confdefs.h"
17213
17214 #ifdef HAVE_DB_185_H
17215 # include <db_185.h>
17216 #else
17217 # include <db.h>
17218 #endif
17219
17220 #ifndef DB_VERSION_MAJOR
17221 # define DB_VERSION_MAJOR 1
17222 #endif
17223
17224 #ifndef NULL
17225 #define NULL ((void*)0)
17226 #endif
17227
17228 int main() {
17229
17230 #if DB_VERSION_MAJOR > 1
17231         {
17232                 char *version;
17233                 int major, minor, patch;
17234
17235                 version = db_version( &major, &minor, &patch );
17236
17237                 if( major != DB_VERSION_MAJOR ||
17238                         minor < DB_VERSION_MINOR )
17239                 {
17240                         printf("Berkeley DB version mismatch\n"
17241                                 "\texpected: %s\n\tgot: %s\n",
17242                                 DB_VERSION_STRING, version);
17243                         return 1;
17244                 }
17245         }
17246 #endif
17247
17248 #if DB_VERSION_MAJOR > 2
17249         db_env_create( NULL, 0 );
17250 #elif DB_VERSION_MAJOR > 1
17251         db_appexit( NULL );
17252 #else
17253         (void) dbopen( NULL, 0, 0, 0, NULL);
17254 #endif
17255
17256 ; return 0; }
17257 EOF
17258 if { (eval echo configure:17259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17259   rm -rf conftest*
17260   ol_cv_db_db=yes
17261 else
17262   echo "configure: failed program was:" >&5
17263   cat conftest.$ac_ext >&5
17264   rm -rf conftest*
17265   ol_cv_db_db=no
17266 fi
17267 rm -f conftest*
17268
17269         LIBS="$ol_LIBS"
17270
17271 fi
17272
17273 echo "$ac_t""$ol_cv_db_db" 1>&6
17274
17275         if test $ol_cv_db_db = yes ; then
17276                 ol_cv_lib_db=-ldb
17277         fi
17278 fi
17279
17280 if test $ol_cv_lib_db = no ; then
17281         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17282 echo "configure:17283: checking for Berkeley DB link (-ldb3)" >&5
17283 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17284   echo $ac_n "(cached) $ac_c" 1>&6
17285 else
17286   
17287         ol_DB_LIB=-ldb3
17288         ol_LIBS=$LIBS
17289         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17290
17291         cat > conftest.$ac_ext <<EOF
17292 #line 17293 "configure"
17293 #include "confdefs.h"
17294
17295 #ifdef HAVE_DB_185_H
17296 # include <db_185.h>
17297 #else
17298 # include <db.h>
17299 #endif
17300
17301 #ifndef DB_VERSION_MAJOR
17302 # define DB_VERSION_MAJOR 1
17303 #endif
17304
17305 #ifndef NULL
17306 #define NULL ((void*)0)
17307 #endif
17308
17309 int main() {
17310
17311 #if DB_VERSION_MAJOR > 1
17312         {
17313                 char *version;
17314                 int major, minor, patch;
17315
17316                 version = db_version( &major, &minor, &patch );
17317
17318                 if( major != DB_VERSION_MAJOR ||
17319                         minor < DB_VERSION_MINOR )
17320                 {
17321                         printf("Berkeley DB version mismatch\n"
17322                                 "\texpected: %s\n\tgot: %s\n",
17323                                 DB_VERSION_STRING, version);
17324                         return 1;
17325                 }
17326         }
17327 #endif
17328
17329 #if DB_VERSION_MAJOR > 2
17330         db_env_create( NULL, 0 );
17331 #elif DB_VERSION_MAJOR > 1
17332         db_appexit( NULL );
17333 #else
17334         (void) dbopen( NULL, 0, 0, 0, NULL);
17335 #endif
17336
17337 ; return 0; }
17338 EOF
17339 if { (eval echo configure:17340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17340   rm -rf conftest*
17341   ol_cv_db_db3=yes
17342 else
17343   echo "configure: failed program was:" >&5
17344   cat conftest.$ac_ext >&5
17345   rm -rf conftest*
17346   ol_cv_db_db3=no
17347 fi
17348 rm -f conftest*
17349
17350         LIBS="$ol_LIBS"
17351
17352 fi
17353
17354 echo "$ac_t""$ol_cv_db_db3" 1>&6
17355
17356         if test $ol_cv_db_db3 = yes ; then
17357                 ol_cv_lib_db=-ldb3
17358         fi
17359 fi
17360
17361 if test $ol_cv_lib_db = no ; then
17362         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17363 echo "configure:17364: checking for Berkeley DB link (-ldb-3)" >&5
17364 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17365   echo $ac_n "(cached) $ac_c" 1>&6
17366 else
17367   
17368         ol_DB_LIB=-ldb-3
17369         ol_LIBS=$LIBS
17370         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17371
17372         cat > conftest.$ac_ext <<EOF
17373 #line 17374 "configure"
17374 #include "confdefs.h"
17375
17376 #ifdef HAVE_DB_185_H
17377 # include <db_185.h>
17378 #else
17379 # include <db.h>
17380 #endif
17381
17382 #ifndef DB_VERSION_MAJOR
17383 # define DB_VERSION_MAJOR 1
17384 #endif
17385
17386 #ifndef NULL
17387 #define NULL ((void*)0)
17388 #endif
17389
17390 int main() {
17391
17392 #if DB_VERSION_MAJOR > 1
17393         {
17394                 char *version;
17395                 int major, minor, patch;
17396
17397                 version = db_version( &major, &minor, &patch );
17398
17399                 if( major != DB_VERSION_MAJOR ||
17400                         minor < DB_VERSION_MINOR )
17401                 {
17402                         printf("Berkeley DB version mismatch\n"
17403                                 "\texpected: %s\n\tgot: %s\n",
17404                                 DB_VERSION_STRING, version);
17405                         return 1;
17406                 }
17407         }
17408 #endif
17409
17410 #if DB_VERSION_MAJOR > 2
17411         db_env_create( NULL, 0 );
17412 #elif DB_VERSION_MAJOR > 1
17413         db_appexit( NULL );
17414 #else
17415         (void) dbopen( NULL, 0, 0, 0, NULL);
17416 #endif
17417
17418 ; return 0; }
17419 EOF
17420 if { (eval echo configure:17421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17421   rm -rf conftest*
17422   ol_cv_db_db_3=yes
17423 else
17424   echo "configure: failed program was:" >&5
17425   cat conftest.$ac_ext >&5
17426   rm -rf conftest*
17427   ol_cv_db_db_3=no
17428 fi
17429 rm -f conftest*
17430
17431         LIBS="$ol_LIBS"
17432
17433 fi
17434
17435 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17436
17437         if test $ol_cv_db_db_3 = yes ; then
17438                 ol_cv_lib_db=-ldb-3
17439         fi
17440 fi
17441
17442 if test $ol_cv_lib_db = no ; then
17443         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17444 echo "configure:17445: checking for Berkeley DB link (-ldb2)" >&5
17445 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17446   echo $ac_n "(cached) $ac_c" 1>&6
17447 else
17448   
17449         ol_DB_LIB=-ldb2
17450         ol_LIBS=$LIBS
17451         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17452
17453         cat > conftest.$ac_ext <<EOF
17454 #line 17455 "configure"
17455 #include "confdefs.h"
17456
17457 #ifdef HAVE_DB_185_H
17458 # include <db_185.h>
17459 #else
17460 # include <db.h>
17461 #endif
17462
17463 #ifndef DB_VERSION_MAJOR
17464 # define DB_VERSION_MAJOR 1
17465 #endif
17466
17467 #ifndef NULL
17468 #define NULL ((void*)0)
17469 #endif
17470
17471 int main() {
17472
17473 #if DB_VERSION_MAJOR > 1
17474         {
17475                 char *version;
17476                 int major, minor, patch;
17477
17478                 version = db_version( &major, &minor, &patch );
17479
17480                 if( major != DB_VERSION_MAJOR ||
17481                         minor < DB_VERSION_MINOR )
17482                 {
17483                         printf("Berkeley DB version mismatch\n"
17484                                 "\texpected: %s\n\tgot: %s\n",
17485                                 DB_VERSION_STRING, version);
17486                         return 1;
17487                 }
17488         }
17489 #endif
17490
17491 #if DB_VERSION_MAJOR > 2
17492         db_env_create( NULL, 0 );
17493 #elif DB_VERSION_MAJOR > 1
17494         db_appexit( NULL );
17495 #else
17496         (void) dbopen( NULL, 0, 0, 0, NULL);
17497 #endif
17498
17499 ; return 0; }
17500 EOF
17501 if { (eval echo configure:17502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17502   rm -rf conftest*
17503   ol_cv_db_db2=yes
17504 else
17505   echo "configure: failed program was:" >&5
17506   cat conftest.$ac_ext >&5
17507   rm -rf conftest*
17508   ol_cv_db_db2=no
17509 fi
17510 rm -f conftest*
17511
17512         LIBS="$ol_LIBS"
17513
17514 fi
17515
17516 echo "$ac_t""$ol_cv_db_db2" 1>&6
17517
17518         if test $ol_cv_db_db2 = yes ; then
17519                 ol_cv_lib_db=-ldb2
17520         fi
17521 fi
17522
17523 if test $ol_cv_lib_db = no ; then
17524         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17525 echo "configure:17526: checking for Berkeley DB link (-ldb-2)" >&5
17526 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17527   echo $ac_n "(cached) $ac_c" 1>&6
17528 else
17529   
17530         ol_DB_LIB=-ldb-2
17531         ol_LIBS=$LIBS
17532         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17533
17534         cat > conftest.$ac_ext <<EOF
17535 #line 17536 "configure"
17536 #include "confdefs.h"
17537
17538 #ifdef HAVE_DB_185_H
17539 # include <db_185.h>
17540 #else
17541 # include <db.h>
17542 #endif
17543
17544 #ifndef DB_VERSION_MAJOR
17545 # define DB_VERSION_MAJOR 1
17546 #endif
17547
17548 #ifndef NULL
17549 #define NULL ((void*)0)
17550 #endif
17551
17552 int main() {
17553
17554 #if DB_VERSION_MAJOR > 1
17555         {
17556                 char *version;
17557                 int major, minor, patch;
17558
17559                 version = db_version( &major, &minor, &patch );
17560
17561                 if( major != DB_VERSION_MAJOR ||
17562                         minor < DB_VERSION_MINOR )
17563                 {
17564                         printf("Berkeley DB version mismatch\n"
17565                                 "\texpected: %s\n\tgot: %s\n",
17566                                 DB_VERSION_STRING, version);
17567                         return 1;
17568                 }
17569         }
17570 #endif
17571
17572 #if DB_VERSION_MAJOR > 2
17573         db_env_create( NULL, 0 );
17574 #elif DB_VERSION_MAJOR > 1
17575         db_appexit( NULL );
17576 #else
17577         (void) dbopen( NULL, 0, 0, 0, NULL);
17578 #endif
17579
17580 ; return 0; }
17581 EOF
17582 if { (eval echo configure:17583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17583   rm -rf conftest*
17584   ol_cv_db_db_2=yes
17585 else
17586   echo "configure: failed program was:" >&5
17587   cat conftest.$ac_ext >&5
17588   rm -rf conftest*
17589   ol_cv_db_db_2=no
17590 fi
17591 rm -f conftest*
17592
17593         LIBS="$ol_LIBS"
17594
17595 fi
17596
17597 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17598
17599         if test $ol_cv_db_db_2 = yes ; then
17600                 ol_cv_lib_db=-ldb-2
17601         fi
17602 fi
17603
17604 if test $ol_cv_lib_db = no ; then
17605         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17606 echo "configure:17607: checking for Berkeley DB link (-ldb1)" >&5
17607 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17608   echo $ac_n "(cached) $ac_c" 1>&6
17609 else
17610   
17611         ol_DB_LIB=-ldb1
17612         ol_LIBS=$LIBS
17613         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17614
17615         cat > conftest.$ac_ext <<EOF
17616 #line 17617 "configure"
17617 #include "confdefs.h"
17618
17619 #ifdef HAVE_DB_185_H
17620 # include <db_185.h>
17621 #else
17622 # include <db.h>
17623 #endif
17624
17625 #ifndef DB_VERSION_MAJOR
17626 # define DB_VERSION_MAJOR 1
17627 #endif
17628
17629 #ifndef NULL
17630 #define NULL ((void*)0)
17631 #endif
17632
17633 int main() {
17634
17635 #if DB_VERSION_MAJOR > 1
17636         {
17637                 char *version;
17638                 int major, minor, patch;
17639
17640                 version = db_version( &major, &minor, &patch );
17641
17642                 if( major != DB_VERSION_MAJOR ||
17643                         minor < DB_VERSION_MINOR )
17644                 {
17645                         printf("Berkeley DB version mismatch\n"
17646                                 "\texpected: %s\n\tgot: %s\n",
17647                                 DB_VERSION_STRING, version);
17648                         return 1;
17649                 }
17650         }
17651 #endif
17652
17653 #if DB_VERSION_MAJOR > 2
17654         db_env_create( NULL, 0 );
17655 #elif DB_VERSION_MAJOR > 1
17656         db_appexit( NULL );
17657 #else
17658         (void) dbopen( NULL, 0, 0, 0, NULL);
17659 #endif
17660
17661 ; return 0; }
17662 EOF
17663 if { (eval echo configure:17664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17664   rm -rf conftest*
17665   ol_cv_db_db1=yes
17666 else
17667   echo "configure: failed program was:" >&5
17668   cat conftest.$ac_ext >&5
17669   rm -rf conftest*
17670   ol_cv_db_db1=no
17671 fi
17672 rm -f conftest*
17673
17674         LIBS="$ol_LIBS"
17675
17676 fi
17677
17678 echo "$ac_t""$ol_cv_db_db1" 1>&6
17679
17680         if test $ol_cv_db_db1 = yes ; then
17681                 ol_cv_lib_db=-ldb1
17682         fi
17683 fi
17684
17685 if test $ol_cv_lib_db = no ; then
17686         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17687 echo "configure:17688: checking for Berkeley DB link (-ldb-1)" >&5
17688 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17689   echo $ac_n "(cached) $ac_c" 1>&6
17690 else
17691   
17692         ol_DB_LIB=-ldb-1
17693         ol_LIBS=$LIBS
17694         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17695
17696         cat > conftest.$ac_ext <<EOF
17697 #line 17698 "configure"
17698 #include "confdefs.h"
17699
17700 #ifdef HAVE_DB_185_H
17701 # include <db_185.h>
17702 #else
17703 # include <db.h>
17704 #endif
17705
17706 #ifndef DB_VERSION_MAJOR
17707 # define DB_VERSION_MAJOR 1
17708 #endif
17709
17710 #ifndef NULL
17711 #define NULL ((void*)0)
17712 #endif
17713
17714 int main() {
17715
17716 #if DB_VERSION_MAJOR > 1
17717         {
17718                 char *version;
17719                 int major, minor, patch;
17720
17721                 version = db_version( &major, &minor, &patch );
17722
17723                 if( major != DB_VERSION_MAJOR ||
17724                         minor < DB_VERSION_MINOR )
17725                 {
17726                         printf("Berkeley DB version mismatch\n"
17727                                 "\texpected: %s\n\tgot: %s\n",
17728                                 DB_VERSION_STRING, version);
17729                         return 1;
17730                 }
17731         }
17732 #endif
17733
17734 #if DB_VERSION_MAJOR > 2
17735         db_env_create( NULL, 0 );
17736 #elif DB_VERSION_MAJOR > 1
17737         db_appexit( NULL );
17738 #else
17739         (void) dbopen( NULL, 0, 0, 0, NULL);
17740 #endif
17741
17742 ; return 0; }
17743 EOF
17744 if { (eval echo configure:17745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17745   rm -rf conftest*
17746   ol_cv_db_db_1=yes
17747 else
17748   echo "configure: failed program was:" >&5
17749   cat conftest.$ac_ext >&5
17750   rm -rf conftest*
17751   ol_cv_db_db_1=no
17752 fi
17753 rm -f conftest*
17754
17755         LIBS="$ol_LIBS"
17756
17757 fi
17758
17759 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17760
17761         if test $ol_cv_db_db_1 = yes ; then
17762                 ol_cv_lib_db=-ldb-1
17763         fi
17764 fi
17765
17766
17767                 if test "$ol_cv_lib_db" != no ; then
17768                         ol_cv_berkeley_db=yes
17769                 fi
17770         fi
17771 fi
17772
17773         else
17774                 ol_cv_berkeley_db=no
17775 for ac_hdr in db.h
17776 do
17777 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17778 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17779 echo "configure:17780: checking for $ac_hdr" >&5
17780 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17781   echo $ac_n "(cached) $ac_c" 1>&6
17782 else
17783   cat > conftest.$ac_ext <<EOF
17784 #line 17785 "configure"
17785 #include "confdefs.h"
17786 #include <$ac_hdr>
17787 EOF
17788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17789 { (eval echo configure:17790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17791 if test -z "$ac_err"; then
17792   rm -rf conftest*
17793   eval "ac_cv_header_$ac_safe=yes"
17794 else
17795   echo "$ac_err" >&5
17796   echo "configure: failed program was:" >&5
17797   cat conftest.$ac_ext >&5
17798   rm -rf conftest*
17799   eval "ac_cv_header_$ac_safe=no"
17800 fi
17801 rm -f conftest*
17802 fi
17803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17804   echo "$ac_t""yes" 1>&6
17805     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17806   cat >> confdefs.h <<EOF
17807 #define $ac_tr_hdr 1
17808 EOF
17809  
17810 else
17811   echo "$ac_t""no" 1>&6
17812 fi
17813 done
17814
17815 if test $ac_cv_header_db_h = yes; then
17816         ol_cv_lib_db=no
17817 if test $ol_cv_lib_db = no ; then
17818         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17819 echo "configure:17820: checking for Berkeley DB link (default)" >&5
17820 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17821   echo $ac_n "(cached) $ac_c" 1>&6
17822 else
17823   
17824         ol_DB_LIB=
17825         ol_LIBS=$LIBS
17826         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17827
17828         cat > conftest.$ac_ext <<EOF
17829 #line 17830 "configure"
17830 #include "confdefs.h"
17831
17832 #ifdef HAVE_DB_185_H
17833 # include <db_185.h>
17834 #else
17835 # include <db.h>
17836 #endif
17837
17838 #ifndef DB_VERSION_MAJOR
17839 # define DB_VERSION_MAJOR 1
17840 #endif
17841
17842 #ifndef NULL
17843 #define NULL ((void*)0)
17844 #endif
17845
17846 int main() {
17847
17848 #if DB_VERSION_MAJOR > 1
17849         {
17850                 char *version;
17851                 int major, minor, patch;
17852
17853                 version = db_version( &major, &minor, &patch );
17854
17855                 if( major != DB_VERSION_MAJOR ||
17856                         minor < DB_VERSION_MINOR )
17857                 {
17858                         printf("Berkeley DB version mismatch\n"
17859                                 "\texpected: %s\n\tgot: %s\n",
17860                                 DB_VERSION_STRING, version);
17861                         return 1;
17862                 }
17863         }
17864 #endif
17865
17866 #if DB_VERSION_MAJOR > 2
17867         db_env_create( NULL, 0 );
17868 #elif DB_VERSION_MAJOR > 1
17869         db_appexit( NULL );
17870 #else
17871         (void) dbopen( NULL, 0, 0, 0, NULL);
17872 #endif
17873
17874 ; return 0; }
17875 EOF
17876 if { (eval echo configure:17877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17877   rm -rf conftest*
17878   ol_cv_db_none=yes
17879 else
17880   echo "configure: failed program was:" >&5
17881   cat conftest.$ac_ext >&5
17882   rm -rf conftest*
17883   ol_cv_db_none=no
17884 fi
17885 rm -f conftest*
17886
17887         LIBS="$ol_LIBS"
17888
17889 fi
17890
17891 echo "$ac_t""$ol_cv_db_none" 1>&6
17892
17893         if test $ol_cv_db_none = yes ; then
17894                 ol_cv_lib_db=yes
17895         fi
17896 fi
17897
17898 if test $ol_cv_lib_db = no ; then
17899         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17900 echo "configure:17901: checking for Berkeley DB link (-ldb41)" >&5
17901 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17902   echo $ac_n "(cached) $ac_c" 1>&6
17903 else
17904   
17905         ol_DB_LIB=-ldb41
17906         ol_LIBS=$LIBS
17907         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17908
17909         cat > conftest.$ac_ext <<EOF
17910 #line 17911 "configure"
17911 #include "confdefs.h"
17912
17913 #ifdef HAVE_DB_185_H
17914 # include <db_185.h>
17915 #else
17916 # include <db.h>
17917 #endif
17918
17919 #ifndef DB_VERSION_MAJOR
17920 # define DB_VERSION_MAJOR 1
17921 #endif
17922
17923 #ifndef NULL
17924 #define NULL ((void*)0)
17925 #endif
17926
17927 int main() {
17928
17929 #if DB_VERSION_MAJOR > 1
17930         {
17931                 char *version;
17932                 int major, minor, patch;
17933
17934                 version = db_version( &major, &minor, &patch );
17935
17936                 if( major != DB_VERSION_MAJOR ||
17937                         minor < DB_VERSION_MINOR )
17938                 {
17939                         printf("Berkeley DB version mismatch\n"
17940                                 "\texpected: %s\n\tgot: %s\n",
17941                                 DB_VERSION_STRING, version);
17942                         return 1;
17943                 }
17944         }
17945 #endif
17946
17947 #if DB_VERSION_MAJOR > 2
17948         db_env_create( NULL, 0 );
17949 #elif DB_VERSION_MAJOR > 1
17950         db_appexit( NULL );
17951 #else
17952         (void) dbopen( NULL, 0, 0, 0, NULL);
17953 #endif
17954
17955 ; return 0; }
17956 EOF
17957 if { (eval echo configure:17958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17958   rm -rf conftest*
17959   ol_cv_db_db41=yes
17960 else
17961   echo "configure: failed program was:" >&5
17962   cat conftest.$ac_ext >&5
17963   rm -rf conftest*
17964   ol_cv_db_db41=no
17965 fi
17966 rm -f conftest*
17967
17968         LIBS="$ol_LIBS"
17969
17970 fi
17971
17972 echo "$ac_t""$ol_cv_db_db41" 1>&6
17973
17974         if test $ol_cv_db_db41 = yes ; then
17975                 ol_cv_lib_db=-ldb41
17976         fi
17977 fi
17978
17979 if test $ol_cv_lib_db = no ; then
17980         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17981 echo "configure:17982: checking for Berkeley DB link (-ldb-41)" >&5
17982 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17983   echo $ac_n "(cached) $ac_c" 1>&6
17984 else
17985   
17986         ol_DB_LIB=-ldb-41
17987         ol_LIBS=$LIBS
17988         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17989
17990         cat > conftest.$ac_ext <<EOF
17991 #line 17992 "configure"
17992 #include "confdefs.h"
17993
17994 #ifdef HAVE_DB_185_H
17995 # include <db_185.h>
17996 #else
17997 # include <db.h>
17998 #endif
17999
18000 #ifndef DB_VERSION_MAJOR
18001 # define DB_VERSION_MAJOR 1
18002 #endif
18003
18004 #ifndef NULL
18005 #define NULL ((void*)0)
18006 #endif
18007
18008 int main() {
18009
18010 #if DB_VERSION_MAJOR > 1
18011         {
18012                 char *version;
18013                 int major, minor, patch;
18014
18015                 version = db_version( &major, &minor, &patch );
18016
18017                 if( major != DB_VERSION_MAJOR ||
18018                         minor < DB_VERSION_MINOR )
18019                 {
18020                         printf("Berkeley DB version mismatch\n"
18021                                 "\texpected: %s\n\tgot: %s\n",
18022                                 DB_VERSION_STRING, version);
18023                         return 1;
18024                 }
18025         }
18026 #endif
18027
18028 #if DB_VERSION_MAJOR > 2
18029         db_env_create( NULL, 0 );
18030 #elif DB_VERSION_MAJOR > 1
18031         db_appexit( NULL );
18032 #else
18033         (void) dbopen( NULL, 0, 0, 0, NULL);
18034 #endif
18035
18036 ; return 0; }
18037 EOF
18038 if { (eval echo configure:18039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18039   rm -rf conftest*
18040   ol_cv_db_db_41=yes
18041 else
18042   echo "configure: failed program was:" >&5
18043   cat conftest.$ac_ext >&5
18044   rm -rf conftest*
18045   ol_cv_db_db_41=no
18046 fi
18047 rm -f conftest*
18048
18049         LIBS="$ol_LIBS"
18050
18051 fi
18052
18053 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18054
18055         if test $ol_cv_db_db_41 = yes ; then
18056                 ol_cv_lib_db=-ldb-41
18057         fi
18058 fi
18059
18060 if test $ol_cv_lib_db = no ; then
18061         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18062 echo "configure:18063: checking for Berkeley DB link (-ldb-4.1)" >&5
18063 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18064   echo $ac_n "(cached) $ac_c" 1>&6
18065 else
18066   
18067         ol_DB_LIB=-ldb-4.1
18068         ol_LIBS=$LIBS
18069         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18070
18071         cat > conftest.$ac_ext <<EOF
18072 #line 18073 "configure"
18073 #include "confdefs.h"
18074
18075 #ifdef HAVE_DB_185_H
18076 # include <db_185.h>
18077 #else
18078 # include <db.h>
18079 #endif
18080
18081 #ifndef DB_VERSION_MAJOR
18082 # define DB_VERSION_MAJOR 1
18083 #endif
18084
18085 #ifndef NULL
18086 #define NULL ((void*)0)
18087 #endif
18088
18089 int main() {
18090
18091 #if DB_VERSION_MAJOR > 1
18092         {
18093                 char *version;
18094                 int major, minor, patch;
18095
18096                 version = db_version( &major, &minor, &patch );
18097
18098                 if( major != DB_VERSION_MAJOR ||
18099                         minor < DB_VERSION_MINOR )
18100                 {
18101                         printf("Berkeley DB version mismatch\n"
18102                                 "\texpected: %s\n\tgot: %s\n",
18103                                 DB_VERSION_STRING, version);
18104                         return 1;
18105                 }
18106         }
18107 #endif
18108
18109 #if DB_VERSION_MAJOR > 2
18110         db_env_create( NULL, 0 );
18111 #elif DB_VERSION_MAJOR > 1
18112         db_appexit( NULL );
18113 #else
18114         (void) dbopen( NULL, 0, 0, 0, NULL);
18115 #endif
18116
18117 ; return 0; }
18118 EOF
18119 if { (eval echo configure:18120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18120   rm -rf conftest*
18121   ol_cv_db_db_4_dot_1=yes
18122 else
18123   echo "configure: failed program was:" >&5
18124   cat conftest.$ac_ext >&5
18125   rm -rf conftest*
18126   ol_cv_db_db_4_dot_1=no
18127 fi
18128 rm -f conftest*
18129
18130         LIBS="$ol_LIBS"
18131
18132 fi
18133
18134 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18135
18136         if test $ol_cv_db_db_4_dot_1 = yes ; then
18137                 ol_cv_lib_db=-ldb-4.1
18138         fi
18139 fi
18140
18141 if test $ol_cv_lib_db = no ; then
18142         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18143 echo "configure:18144: checking for Berkeley DB link (-ldb-4-1)" >&5
18144 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18145   echo $ac_n "(cached) $ac_c" 1>&6
18146 else
18147   
18148         ol_DB_LIB=-ldb-4-1
18149         ol_LIBS=$LIBS
18150         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18151
18152         cat > conftest.$ac_ext <<EOF
18153 #line 18154 "configure"
18154 #include "confdefs.h"
18155
18156 #ifdef HAVE_DB_185_H
18157 # include <db_185.h>
18158 #else
18159 # include <db.h>
18160 #endif
18161
18162 #ifndef DB_VERSION_MAJOR
18163 # define DB_VERSION_MAJOR 1
18164 #endif
18165
18166 #ifndef NULL
18167 #define NULL ((void*)0)
18168 #endif
18169
18170 int main() {
18171
18172 #if DB_VERSION_MAJOR > 1
18173         {
18174                 char *version;
18175                 int major, minor, patch;
18176
18177                 version = db_version( &major, &minor, &patch );
18178
18179                 if( major != DB_VERSION_MAJOR ||
18180                         minor < DB_VERSION_MINOR )
18181                 {
18182                         printf("Berkeley DB version mismatch\n"
18183                                 "\texpected: %s\n\tgot: %s\n",
18184                                 DB_VERSION_STRING, version);
18185                         return 1;
18186                 }
18187         }
18188 #endif
18189
18190 #if DB_VERSION_MAJOR > 2
18191         db_env_create( NULL, 0 );
18192 #elif DB_VERSION_MAJOR > 1
18193         db_appexit( NULL );
18194 #else
18195         (void) dbopen( NULL, 0, 0, 0, NULL);
18196 #endif
18197
18198 ; return 0; }
18199 EOF
18200 if { (eval echo configure:18201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18201   rm -rf conftest*
18202   ol_cv_db_db_4_1=yes
18203 else
18204   echo "configure: failed program was:" >&5
18205   cat conftest.$ac_ext >&5
18206   rm -rf conftest*
18207   ol_cv_db_db_4_1=no
18208 fi
18209 rm -f conftest*
18210
18211         LIBS="$ol_LIBS"
18212
18213 fi
18214
18215 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18216
18217         if test $ol_cv_db_db_4_1 = yes ; then
18218                 ol_cv_lib_db=-ldb-4-1
18219         fi
18220 fi
18221
18222 if test $ol_cv_lib_db = no ; then
18223         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18224 echo "configure:18225: checking for Berkeley DB link (-ldb-4)" >&5
18225 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18226   echo $ac_n "(cached) $ac_c" 1>&6
18227 else
18228   
18229         ol_DB_LIB=-ldb-4
18230         ol_LIBS=$LIBS
18231         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18232
18233         cat > conftest.$ac_ext <<EOF
18234 #line 18235 "configure"
18235 #include "confdefs.h"
18236
18237 #ifdef HAVE_DB_185_H
18238 # include <db_185.h>
18239 #else
18240 # include <db.h>
18241 #endif
18242
18243 #ifndef DB_VERSION_MAJOR
18244 # define DB_VERSION_MAJOR 1
18245 #endif
18246
18247 #ifndef NULL
18248 #define NULL ((void*)0)
18249 #endif
18250
18251 int main() {
18252
18253 #if DB_VERSION_MAJOR > 1
18254         {
18255                 char *version;
18256                 int major, minor, patch;
18257
18258                 version = db_version( &major, &minor, &patch );
18259
18260                 if( major != DB_VERSION_MAJOR ||
18261                         minor < DB_VERSION_MINOR )
18262                 {
18263                         printf("Berkeley DB version mismatch\n"
18264                                 "\texpected: %s\n\tgot: %s\n",
18265                                 DB_VERSION_STRING, version);
18266                         return 1;
18267                 }
18268         }
18269 #endif
18270
18271 #if DB_VERSION_MAJOR > 2
18272         db_env_create( NULL, 0 );
18273 #elif DB_VERSION_MAJOR > 1
18274         db_appexit( NULL );
18275 #else
18276         (void) dbopen( NULL, 0, 0, 0, NULL);
18277 #endif
18278
18279 ; return 0; }
18280 EOF
18281 if { (eval echo configure:18282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18282   rm -rf conftest*
18283   ol_cv_db_db_4=yes
18284 else
18285   echo "configure: failed program was:" >&5
18286   cat conftest.$ac_ext >&5
18287   rm -rf conftest*
18288   ol_cv_db_db_4=no
18289 fi
18290 rm -f conftest*
18291
18292         LIBS="$ol_LIBS"
18293
18294 fi
18295
18296 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18297
18298         if test $ol_cv_db_db_4 = yes ; then
18299                 ol_cv_lib_db=-ldb-4
18300         fi
18301 fi
18302
18303 if test $ol_cv_lib_db = no ; then
18304         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18305 echo "configure:18306: checking for Berkeley DB link (-ldb4)" >&5
18306 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18307   echo $ac_n "(cached) $ac_c" 1>&6
18308 else
18309   
18310         ol_DB_LIB=-ldb4
18311         ol_LIBS=$LIBS
18312         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18313
18314         cat > conftest.$ac_ext <<EOF
18315 #line 18316 "configure"
18316 #include "confdefs.h"
18317
18318 #ifdef HAVE_DB_185_H
18319 # include <db_185.h>
18320 #else
18321 # include <db.h>
18322 #endif
18323
18324 #ifndef DB_VERSION_MAJOR
18325 # define DB_VERSION_MAJOR 1
18326 #endif
18327
18328 #ifndef NULL
18329 #define NULL ((void*)0)
18330 #endif
18331
18332 int main() {
18333
18334 #if DB_VERSION_MAJOR > 1
18335         {
18336                 char *version;
18337                 int major, minor, patch;
18338
18339                 version = db_version( &major, &minor, &patch );
18340
18341                 if( major != DB_VERSION_MAJOR ||
18342                         minor < DB_VERSION_MINOR )
18343                 {
18344                         printf("Berkeley DB version mismatch\n"
18345                                 "\texpected: %s\n\tgot: %s\n",
18346                                 DB_VERSION_STRING, version);
18347                         return 1;
18348                 }
18349         }
18350 #endif
18351
18352 #if DB_VERSION_MAJOR > 2
18353         db_env_create( NULL, 0 );
18354 #elif DB_VERSION_MAJOR > 1
18355         db_appexit( NULL );
18356 #else
18357         (void) dbopen( NULL, 0, 0, 0, NULL);
18358 #endif
18359
18360 ; return 0; }
18361 EOF
18362 if { (eval echo configure:18363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18363   rm -rf conftest*
18364   ol_cv_db_db4=yes
18365 else
18366   echo "configure: failed program was:" >&5
18367   cat conftest.$ac_ext >&5
18368   rm -rf conftest*
18369   ol_cv_db_db4=no
18370 fi
18371 rm -f conftest*
18372
18373         LIBS="$ol_LIBS"
18374
18375 fi
18376
18377 echo "$ac_t""$ol_cv_db_db4" 1>&6
18378
18379         if test $ol_cv_db_db4 = yes ; then
18380                 ol_cv_lib_db=-ldb4
18381         fi
18382 fi
18383
18384 if test $ol_cv_lib_db = no ; then
18385         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18386 echo "configure:18387: checking for Berkeley DB link (-ldb)" >&5
18387 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18388   echo $ac_n "(cached) $ac_c" 1>&6
18389 else
18390   
18391         ol_DB_LIB=-ldb
18392         ol_LIBS=$LIBS
18393         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18394
18395         cat > conftest.$ac_ext <<EOF
18396 #line 18397 "configure"
18397 #include "confdefs.h"
18398
18399 #ifdef HAVE_DB_185_H
18400 # include <db_185.h>
18401 #else
18402 # include <db.h>
18403 #endif
18404
18405 #ifndef DB_VERSION_MAJOR
18406 # define DB_VERSION_MAJOR 1
18407 #endif
18408
18409 #ifndef NULL
18410 #define NULL ((void*)0)
18411 #endif
18412
18413 int main() {
18414
18415 #if DB_VERSION_MAJOR > 1
18416         {
18417                 char *version;
18418                 int major, minor, patch;
18419
18420                 version = db_version( &major, &minor, &patch );
18421
18422                 if( major != DB_VERSION_MAJOR ||
18423                         minor < DB_VERSION_MINOR )
18424                 {
18425                         printf("Berkeley DB version mismatch\n"
18426                                 "\texpected: %s\n\tgot: %s\n",
18427                                 DB_VERSION_STRING, version);
18428                         return 1;
18429                 }
18430         }
18431 #endif
18432
18433 #if DB_VERSION_MAJOR > 2
18434         db_env_create( NULL, 0 );
18435 #elif DB_VERSION_MAJOR > 1
18436         db_appexit( NULL );
18437 #else
18438         (void) dbopen( NULL, 0, 0, 0, NULL);
18439 #endif
18440
18441 ; return 0; }
18442 EOF
18443 if { (eval echo configure:18444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18444   rm -rf conftest*
18445   ol_cv_db_db=yes
18446 else
18447   echo "configure: failed program was:" >&5
18448   cat conftest.$ac_ext >&5
18449   rm -rf conftest*
18450   ol_cv_db_db=no
18451 fi
18452 rm -f conftest*
18453
18454         LIBS="$ol_LIBS"
18455
18456 fi
18457
18458 echo "$ac_t""$ol_cv_db_db" 1>&6
18459
18460         if test $ol_cv_db_db = yes ; then
18461                 ol_cv_lib_db=-ldb
18462         fi
18463 fi
18464
18465 if test $ol_cv_lib_db = no ; then
18466         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18467 echo "configure:18468: checking for Berkeley DB link (-ldb3)" >&5
18468 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18469   echo $ac_n "(cached) $ac_c" 1>&6
18470 else
18471   
18472         ol_DB_LIB=-ldb3
18473         ol_LIBS=$LIBS
18474         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18475
18476         cat > conftest.$ac_ext <<EOF
18477 #line 18478 "configure"
18478 #include "confdefs.h"
18479
18480 #ifdef HAVE_DB_185_H
18481 # include <db_185.h>
18482 #else
18483 # include <db.h>
18484 #endif
18485
18486 #ifndef DB_VERSION_MAJOR
18487 # define DB_VERSION_MAJOR 1
18488 #endif
18489
18490 #ifndef NULL
18491 #define NULL ((void*)0)
18492 #endif
18493
18494 int main() {
18495
18496 #if DB_VERSION_MAJOR > 1
18497         {
18498                 char *version;
18499                 int major, minor, patch;
18500
18501                 version = db_version( &major, &minor, &patch );
18502
18503                 if( major != DB_VERSION_MAJOR ||
18504                         minor < DB_VERSION_MINOR )
18505                 {
18506                         printf("Berkeley DB version mismatch\n"
18507                                 "\texpected: %s\n\tgot: %s\n",
18508                                 DB_VERSION_STRING, version);
18509                         return 1;
18510                 }
18511         }
18512 #endif
18513
18514 #if DB_VERSION_MAJOR > 2
18515         db_env_create( NULL, 0 );
18516 #elif DB_VERSION_MAJOR > 1
18517         db_appexit( NULL );
18518 #else
18519         (void) dbopen( NULL, 0, 0, 0, NULL);
18520 #endif
18521
18522 ; return 0; }
18523 EOF
18524 if { (eval echo configure:18525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18525   rm -rf conftest*
18526   ol_cv_db_db3=yes
18527 else
18528   echo "configure: failed program was:" >&5
18529   cat conftest.$ac_ext >&5
18530   rm -rf conftest*
18531   ol_cv_db_db3=no
18532 fi
18533 rm -f conftest*
18534
18535         LIBS="$ol_LIBS"
18536
18537 fi
18538
18539 echo "$ac_t""$ol_cv_db_db3" 1>&6
18540
18541         if test $ol_cv_db_db3 = yes ; then
18542                 ol_cv_lib_db=-ldb3
18543         fi
18544 fi
18545
18546 if test $ol_cv_lib_db = no ; then
18547         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18548 echo "configure:18549: checking for Berkeley DB link (-ldb-3)" >&5
18549 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18550   echo $ac_n "(cached) $ac_c" 1>&6
18551 else
18552   
18553         ol_DB_LIB=-ldb-3
18554         ol_LIBS=$LIBS
18555         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18556
18557         cat > conftest.$ac_ext <<EOF
18558 #line 18559 "configure"
18559 #include "confdefs.h"
18560
18561 #ifdef HAVE_DB_185_H
18562 # include <db_185.h>
18563 #else
18564 # include <db.h>
18565 #endif
18566
18567 #ifndef DB_VERSION_MAJOR
18568 # define DB_VERSION_MAJOR 1
18569 #endif
18570
18571 #ifndef NULL
18572 #define NULL ((void*)0)
18573 #endif
18574
18575 int main() {
18576
18577 #if DB_VERSION_MAJOR > 1
18578         {
18579                 char *version;
18580                 int major, minor, patch;
18581
18582                 version = db_version( &major, &minor, &patch );
18583
18584                 if( major != DB_VERSION_MAJOR ||
18585                         minor < DB_VERSION_MINOR )
18586                 {
18587                         printf("Berkeley DB version mismatch\n"
18588                                 "\texpected: %s\n\tgot: %s\n",
18589                                 DB_VERSION_STRING, version);
18590                         return 1;
18591                 }
18592         }
18593 #endif
18594
18595 #if DB_VERSION_MAJOR > 2
18596         db_env_create( NULL, 0 );
18597 #elif DB_VERSION_MAJOR > 1
18598         db_appexit( NULL );
18599 #else
18600         (void) dbopen( NULL, 0, 0, 0, NULL);
18601 #endif
18602
18603 ; return 0; }
18604 EOF
18605 if { (eval echo configure:18606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18606   rm -rf conftest*
18607   ol_cv_db_db_3=yes
18608 else
18609   echo "configure: failed program was:" >&5
18610   cat conftest.$ac_ext >&5
18611   rm -rf conftest*
18612   ol_cv_db_db_3=no
18613 fi
18614 rm -f conftest*
18615
18616         LIBS="$ol_LIBS"
18617
18618 fi
18619
18620 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18621
18622         if test $ol_cv_db_db_3 = yes ; then
18623                 ol_cv_lib_db=-ldb-3
18624         fi
18625 fi
18626
18627 if test $ol_cv_lib_db = no ; then
18628         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18629 echo "configure:18630: checking for Berkeley DB link (-ldb2)" >&5
18630 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18631   echo $ac_n "(cached) $ac_c" 1>&6
18632 else
18633   
18634         ol_DB_LIB=-ldb2
18635         ol_LIBS=$LIBS
18636         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18637
18638         cat > conftest.$ac_ext <<EOF
18639 #line 18640 "configure"
18640 #include "confdefs.h"
18641
18642 #ifdef HAVE_DB_185_H
18643 # include <db_185.h>
18644 #else
18645 # include <db.h>
18646 #endif
18647
18648 #ifndef DB_VERSION_MAJOR
18649 # define DB_VERSION_MAJOR 1
18650 #endif
18651
18652 #ifndef NULL
18653 #define NULL ((void*)0)
18654 #endif
18655
18656 int main() {
18657
18658 #if DB_VERSION_MAJOR > 1
18659         {
18660                 char *version;
18661                 int major, minor, patch;
18662
18663                 version = db_version( &major, &minor, &patch );
18664
18665                 if( major != DB_VERSION_MAJOR ||
18666                         minor < DB_VERSION_MINOR )
18667                 {
18668                         printf("Berkeley DB version mismatch\n"
18669                                 "\texpected: %s\n\tgot: %s\n",
18670                                 DB_VERSION_STRING, version);
18671                         return 1;
18672                 }
18673         }
18674 #endif
18675
18676 #if DB_VERSION_MAJOR > 2
18677         db_env_create( NULL, 0 );
18678 #elif DB_VERSION_MAJOR > 1
18679         db_appexit( NULL );
18680 #else
18681         (void) dbopen( NULL, 0, 0, 0, NULL);
18682 #endif
18683
18684 ; return 0; }
18685 EOF
18686 if { (eval echo configure:18687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18687   rm -rf conftest*
18688   ol_cv_db_db2=yes
18689 else
18690   echo "configure: failed program was:" >&5
18691   cat conftest.$ac_ext >&5
18692   rm -rf conftest*
18693   ol_cv_db_db2=no
18694 fi
18695 rm -f conftest*
18696
18697         LIBS="$ol_LIBS"
18698
18699 fi
18700
18701 echo "$ac_t""$ol_cv_db_db2" 1>&6
18702
18703         if test $ol_cv_db_db2 = yes ; then
18704                 ol_cv_lib_db=-ldb2
18705         fi
18706 fi
18707
18708 if test $ol_cv_lib_db = no ; then
18709         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18710 echo "configure:18711: checking for Berkeley DB link (-ldb-2)" >&5
18711 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18712   echo $ac_n "(cached) $ac_c" 1>&6
18713 else
18714   
18715         ol_DB_LIB=-ldb-2
18716         ol_LIBS=$LIBS
18717         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18718
18719         cat > conftest.$ac_ext <<EOF
18720 #line 18721 "configure"
18721 #include "confdefs.h"
18722
18723 #ifdef HAVE_DB_185_H
18724 # include <db_185.h>
18725 #else
18726 # include <db.h>
18727 #endif
18728
18729 #ifndef DB_VERSION_MAJOR
18730 # define DB_VERSION_MAJOR 1
18731 #endif
18732
18733 #ifndef NULL
18734 #define NULL ((void*)0)
18735 #endif
18736
18737 int main() {
18738
18739 #if DB_VERSION_MAJOR > 1
18740         {
18741                 char *version;
18742                 int major, minor, patch;
18743
18744                 version = db_version( &major, &minor, &patch );
18745
18746                 if( major != DB_VERSION_MAJOR ||
18747                         minor < DB_VERSION_MINOR )
18748                 {
18749                         printf("Berkeley DB version mismatch\n"
18750                                 "\texpected: %s\n\tgot: %s\n",
18751                                 DB_VERSION_STRING, version);
18752                         return 1;
18753                 }
18754         }
18755 #endif
18756
18757 #if DB_VERSION_MAJOR > 2
18758         db_env_create( NULL, 0 );
18759 #elif DB_VERSION_MAJOR > 1
18760         db_appexit( NULL );
18761 #else
18762         (void) dbopen( NULL, 0, 0, 0, NULL);
18763 #endif
18764
18765 ; return 0; }
18766 EOF
18767 if { (eval echo configure:18768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18768   rm -rf conftest*
18769   ol_cv_db_db_2=yes
18770 else
18771   echo "configure: failed program was:" >&5
18772   cat conftest.$ac_ext >&5
18773   rm -rf conftest*
18774   ol_cv_db_db_2=no
18775 fi
18776 rm -f conftest*
18777
18778         LIBS="$ol_LIBS"
18779
18780 fi
18781
18782 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18783
18784         if test $ol_cv_db_db_2 = yes ; then
18785                 ol_cv_lib_db=-ldb-2
18786         fi
18787 fi
18788
18789 if test $ol_cv_lib_db = no ; then
18790         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18791 echo "configure:18792: checking for Berkeley DB link (-ldb1)" >&5
18792 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18793   echo $ac_n "(cached) $ac_c" 1>&6
18794 else
18795   
18796         ol_DB_LIB=-ldb1
18797         ol_LIBS=$LIBS
18798         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18799
18800         cat > conftest.$ac_ext <<EOF
18801 #line 18802 "configure"
18802 #include "confdefs.h"
18803
18804 #ifdef HAVE_DB_185_H
18805 # include <db_185.h>
18806 #else
18807 # include <db.h>
18808 #endif
18809
18810 #ifndef DB_VERSION_MAJOR
18811 # define DB_VERSION_MAJOR 1
18812 #endif
18813
18814 #ifndef NULL
18815 #define NULL ((void*)0)
18816 #endif
18817
18818 int main() {
18819
18820 #if DB_VERSION_MAJOR > 1
18821         {
18822                 char *version;
18823                 int major, minor, patch;
18824
18825                 version = db_version( &major, &minor, &patch );
18826
18827                 if( major != DB_VERSION_MAJOR ||
18828                         minor < DB_VERSION_MINOR )
18829                 {
18830                         printf("Berkeley DB version mismatch\n"
18831                                 "\texpected: %s\n\tgot: %s\n",
18832                                 DB_VERSION_STRING, version);
18833                         return 1;
18834                 }
18835         }
18836 #endif
18837
18838 #if DB_VERSION_MAJOR > 2
18839         db_env_create( NULL, 0 );
18840 #elif DB_VERSION_MAJOR > 1
18841         db_appexit( NULL );
18842 #else
18843         (void) dbopen( NULL, 0, 0, 0, NULL);
18844 #endif
18845
18846 ; return 0; }
18847 EOF
18848 if { (eval echo configure:18849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18849   rm -rf conftest*
18850   ol_cv_db_db1=yes
18851 else
18852   echo "configure: failed program was:" >&5
18853   cat conftest.$ac_ext >&5
18854   rm -rf conftest*
18855   ol_cv_db_db1=no
18856 fi
18857 rm -f conftest*
18858
18859         LIBS="$ol_LIBS"
18860
18861 fi
18862
18863 echo "$ac_t""$ol_cv_db_db1" 1>&6
18864
18865         if test $ol_cv_db_db1 = yes ; then
18866                 ol_cv_lib_db=-ldb1
18867         fi
18868 fi
18869
18870 if test $ol_cv_lib_db = no ; then
18871         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18872 echo "configure:18873: checking for Berkeley DB link (-ldb-1)" >&5
18873 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18874   echo $ac_n "(cached) $ac_c" 1>&6
18875 else
18876   
18877         ol_DB_LIB=-ldb-1
18878         ol_LIBS=$LIBS
18879         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18880
18881         cat > conftest.$ac_ext <<EOF
18882 #line 18883 "configure"
18883 #include "confdefs.h"
18884
18885 #ifdef HAVE_DB_185_H
18886 # include <db_185.h>
18887 #else
18888 # include <db.h>
18889 #endif
18890
18891 #ifndef DB_VERSION_MAJOR
18892 # define DB_VERSION_MAJOR 1
18893 #endif
18894
18895 #ifndef NULL
18896 #define NULL ((void*)0)
18897 #endif
18898
18899 int main() {
18900
18901 #if DB_VERSION_MAJOR > 1
18902         {
18903                 char *version;
18904                 int major, minor, patch;
18905
18906                 version = db_version( &major, &minor, &patch );
18907
18908                 if( major != DB_VERSION_MAJOR ||
18909                         minor < DB_VERSION_MINOR )
18910                 {
18911                         printf("Berkeley DB version mismatch\n"
18912                                 "\texpected: %s\n\tgot: %s\n",
18913                                 DB_VERSION_STRING, version);
18914                         return 1;
18915                 }
18916         }
18917 #endif
18918
18919 #if DB_VERSION_MAJOR > 2
18920         db_env_create( NULL, 0 );
18921 #elif DB_VERSION_MAJOR > 1
18922         db_appexit( NULL );
18923 #else
18924         (void) dbopen( NULL, 0, 0, 0, NULL);
18925 #endif
18926
18927 ; return 0; }
18928 EOF
18929 if { (eval echo configure:18930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18930   rm -rf conftest*
18931   ol_cv_db_db_1=yes
18932 else
18933   echo "configure: failed program was:" >&5
18934   cat conftest.$ac_ext >&5
18935   rm -rf conftest*
18936   ol_cv_db_db_1=no
18937 fi
18938 rm -f conftest*
18939
18940         LIBS="$ol_LIBS"
18941
18942 fi
18943
18944 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18945
18946         if test $ol_cv_db_db_1 = yes ; then
18947                 ol_cv_lib_db=-ldb-1
18948         fi
18949 fi
18950
18951
18952         if test "$ol_cv_lib_db" != no ; then
18953                 ol_cv_berkeley_db=yes
18954                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18955 echo "configure:18956: checking for Berkeley DB thread support" >&5
18956 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18957   echo $ac_n "(cached) $ac_c" 1>&6
18958 else
18959   
18960         ol_LIBS="$LIBS"
18961         LIBS="$LTHREAD_LIBS $LIBS"
18962         if test $ol_cv_lib_db != yes ; then
18963                 LIBS="$ol_cv_lib_db $LIBS"
18964         fi
18965
18966         if test "$cross_compiling" = yes; then
18967   ol_cv_berkeley_db_thread=cross
18968 else
18969   cat > conftest.$ac_ext <<EOF
18970 #line 18971 "configure"
18971 #include "confdefs.h"
18972
18973 #ifdef HAVE_DB_185_H
18974         choke me;
18975 #else
18976 #include <db.h>
18977 #endif
18978 #ifndef NULL
18979 #define NULL ((void *)0)
18980 #endif
18981 main()
18982 {
18983         int rc;
18984         u_int32_t flags = DB_CREATE |
18985 #ifdef DB_PRIVATE
18986                 DB_PRIVATE |
18987 #endif
18988                 DB_THREAD;
18989
18990 #if DB_VERSION_MAJOR > 2
18991         DB_ENV *env = NULL;
18992
18993         rc = db_env_create( &env, 0 );
18994
18995         flags |= DB_INIT_MPOOL;
18996 #ifdef DB_MPOOL_PRIVATE
18997         flags |= DB_MPOOL_PRIVATE;
18998 #endif
18999
19000         if( rc ) {
19001                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19002                 return rc;
19003         }
19004
19005 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19006         rc = env->open( env, NULL, flags, 0 );
19007 #else
19008         rc = env->open( env, NULL, NULL, flags, 0 );
19009 #endif
19010
19011         if ( rc == 0 ) {
19012                 rc = env->close( env, 0 );
19013         }
19014
19015         if( rc ) {
19016                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19017                 return rc;
19018         }
19019
19020 #else
19021         DB_ENV env;
19022         memset( &env, '\0', sizeof(env) );
19023
19024         rc = db_appinit( NULL, NULL, &env, flags );
19025
19026         if( rc == 0 ) {
19027                 db_appexit( &env );
19028         }
19029
19030         unlink("__db_mpool.share");
19031         unlink("__db_lock.share");
19032 #endif
19033
19034         return rc;
19035 }
19036 EOF
19037 if { (eval echo configure:19038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19038 then
19039   ol_cv_berkeley_db_thread=yes
19040 else
19041   echo "configure: failed program was:" >&5
19042   cat conftest.$ac_ext >&5
19043   rm -fr conftest*
19044   ol_cv_berkeley_db_thread=no
19045 fi
19046 rm -fr conftest*
19047 fi
19048
19049
19050         LIBS="$ol_LIBS"
19051
19052 fi
19053
19054 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19055
19056         if test $ol_cv_berkeley_db_thread != no ; then
19057                 cat >> confdefs.h <<\EOF
19058 #define HAVE_BERKELEY_DB_THREAD 1
19059 EOF
19060
19061         fi
19062
19063         fi
19064 fi
19065
19066         fi
19067
19068         if test $ol_cv_berkeley_db != no ; then
19069                 cat >> confdefs.h <<\EOF
19070 #define HAVE_BERKELEY_DB 1
19071 EOF
19072
19073
19074                 ol_link_ldbm=berkeley
19075                 ol_with_ldbm_api=berkeley
19076
19077                 if test $ol_with_ldbm_type = hash ; then
19078                         cat >> confdefs.h <<\EOF
19079 #define LDBM_USE_DBHASH 1
19080 EOF
19081
19082                 else
19083                         cat >> confdefs.h <<\EOF
19084 #define LDBM_USE_DBBTREE 1
19085 EOF
19086
19087                 fi
19088
19089                                                 if test $ol_cv_lib_db != yes ; then
19090                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19091                 fi
19092         fi
19093 fi
19094
19095 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19096         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19097 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19098         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19099 echo "configure:19100: checking Berkeley DB version for BDB backend" >&5
19100 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19101   echo $ac_n "(cached) $ac_c" 1>&6
19102 else
19103   
19104         cat > conftest.$ac_ext <<EOF
19105 #line 19106 "configure"
19106 #include "confdefs.h"
19107
19108 #include <db.h>
19109
19110  /* this check could be improved */
19111 #ifndef DB_VERSION_MAJOR
19112 #       define DB_VERSION_MAJOR 1
19113 #endif
19114 #ifndef DB_VERSION_MINOR
19115 #       define DB_VERSION_MINOR 0
19116 #endif
19117
19118 /* require 4.1 or later */
19119 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
19120         __db_version_compat
19121 #endif
19122         
19123 EOF
19124 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19125   egrep "__db_version_compat" >/dev/null 2>&1; then
19126   rm -rf conftest*
19127   ol_cv_bdb_compat=yes
19128 else
19129   rm -rf conftest*
19130   ol_cv_bdb_compat=no
19131 fi
19132 rm -f conftest*
19133
19134 fi
19135
19136 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19137
19138
19139         if test $ol_cv_bdb_compat = yes ; then
19140                 ol_enable_bdb=yes
19141         elif test $ol_enable_bdb = yes ; then
19142                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19143         else
19144                 ol_enable_bdb=no
19145         fi
19146 fi
19147
19148 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19149         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19150         ol_with_ldbm_api=none
19151 fi
19152
19153 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19154         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19155 echo "configure:19156: checking for MDBM library" >&5
19156 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19157   echo $ac_n "(cached) $ac_c" 1>&6
19158 else
19159         ol_LIBS="$LIBS"
19160         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19161 echo "configure:19162: checking for mdbm_set_chain" >&5
19162 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19163   echo $ac_n "(cached) $ac_c" 1>&6
19164 else
19165   cat > conftest.$ac_ext <<EOF
19166 #line 19167 "configure"
19167 #include "confdefs.h"
19168 /* System header to define __stub macros and hopefully few prototypes,
19169     which can conflict with char mdbm_set_chain(); below.  */
19170 #include <assert.h>
19171 /* Override any gcc2 internal prototype to avoid an error.  */
19172 /* We use char because int might match the return type of a gcc2
19173     builtin and then its argument prototype would still apply.  */
19174 char mdbm_set_chain();
19175 char (*f)();
19176
19177 int main() {
19178
19179 /* The GNU C library defines this for functions which it implements
19180     to always fail with ENOSYS.  Some functions are actually named
19181     something starting with __ and the normal name is an alias.  */
19182 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19183 choke me
19184 #else
19185 f = mdbm_set_chain;
19186 #endif
19187
19188 ; return 0; }
19189 EOF
19190 if { (eval echo configure:19191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19191   rm -rf conftest*
19192   eval "ac_cv_func_mdbm_set_chain=yes"
19193 else
19194   echo "configure: failed program was:" >&5
19195   cat conftest.$ac_ext >&5
19196   rm -rf conftest*
19197   eval "ac_cv_func_mdbm_set_chain=no"
19198 fi
19199 rm -f conftest*
19200 fi
19201
19202 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19203   echo "$ac_t""yes" 1>&6
19204   ol_cv_lib_mdbm=yes
19205 else
19206   echo "$ac_t""no" 1>&6
19207
19208                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19209 echo "configure:19210: checking for mdbm_set_chain in -lmdbm" >&5
19210 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19211 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19212   echo $ac_n "(cached) $ac_c" 1>&6
19213 else
19214   ac_save_LIBS="$LIBS"
19215 LIBS="-lmdbm  $LIBS"
19216 cat > conftest.$ac_ext <<EOF
19217 #line 19218 "configure"
19218 #include "confdefs.h"
19219 /* Override any gcc2 internal prototype to avoid an error.  */
19220 /* We use char because int might match the return type of a gcc2
19221     builtin and then its argument prototype would still apply.  */
19222 char mdbm_set_chain();
19223
19224 int main() {
19225 mdbm_set_chain()
19226 ; return 0; }
19227 EOF
19228 if { (eval echo configure:19229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19229   rm -rf conftest*
19230   eval "ac_cv_lib_$ac_lib_var=yes"
19231 else
19232   echo "configure: failed program was:" >&5
19233   cat conftest.$ac_ext >&5
19234   rm -rf conftest*
19235   eval "ac_cv_lib_$ac_lib_var=no"
19236 fi
19237 rm -f conftest*
19238 LIBS="$ac_save_LIBS"
19239
19240 fi
19241 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19242   echo "$ac_t""yes" 1>&6
19243   ol_cv_lib_mdbm=-lmdbm
19244 else
19245   echo "$ac_t""no" 1>&6
19246 ol_cv_lib_mdbm=no
19247 fi
19248
19249         
19250 fi
19251
19252         LIBS="$ol_LIBS"
19253
19254 fi
19255
19256 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19257
19258
19259  for ac_hdr in mdbm.h
19260 do
19261 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19262 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19263 echo "configure:19264: checking for $ac_hdr" >&5
19264 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19265   echo $ac_n "(cached) $ac_c" 1>&6
19266 else
19267   cat > conftest.$ac_ext <<EOF
19268 #line 19269 "configure"
19269 #include "confdefs.h"
19270 #include <$ac_hdr>
19271 EOF
19272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19273 { (eval echo configure:19274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19275 if test -z "$ac_err"; then
19276   rm -rf conftest*
19277   eval "ac_cv_header_$ac_safe=yes"
19278 else
19279   echo "$ac_err" >&5
19280   echo "configure: failed program was:" >&5
19281   cat conftest.$ac_ext >&5
19282   rm -rf conftest*
19283   eval "ac_cv_header_$ac_safe=no"
19284 fi
19285 rm -f conftest*
19286 fi
19287 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19288   echo "$ac_t""yes" 1>&6
19289     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19290   cat >> confdefs.h <<EOF
19291 #define $ac_tr_hdr 1
19292 EOF
19293  
19294 else
19295   echo "$ac_t""no" 1>&6
19296 fi
19297 done
19298
19299  echo $ac_n "checking for db""... $ac_c" 1>&6
19300 echo "configure:19301: checking for db" >&5
19301 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19302   echo $ac_n "(cached) $ac_c" 1>&6
19303 else
19304   
19305         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19306                 ol_cv_mdbm=no
19307         else
19308                 ol_cv_mdbm=yes
19309         fi
19310
19311 fi
19312
19313 echo "$ac_t""$ol_cv_mdbm" 1>&6
19314  if test $ol_cv_mdbm = yes ; then
19315         cat >> confdefs.h <<\EOF
19316 #define HAVE_MDBM 1
19317 EOF
19318
19319  fi
19320
19321
19322         if test $ol_cv_mdbm = yes ; then
19323                 ol_link_ldbm=mdbm
19324                 ol_with_ldbm_api=mdbm
19325                 if test $ol_cv_lib_mdbm != yes ; then
19326                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19327                 fi
19328         fi
19329 fi
19330
19331 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19332         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19333 echo "configure:19334: checking for GDBM library" >&5
19334 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19335   echo $ac_n "(cached) $ac_c" 1>&6
19336 else
19337         ol_LIBS="$LIBS"
19338         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19339 echo "configure:19340: checking for gdbm_open" >&5
19340 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19341   echo $ac_n "(cached) $ac_c" 1>&6
19342 else
19343   cat > conftest.$ac_ext <<EOF
19344 #line 19345 "configure"
19345 #include "confdefs.h"
19346 /* System header to define __stub macros and hopefully few prototypes,
19347     which can conflict with char gdbm_open(); below.  */
19348 #include <assert.h>
19349 /* Override any gcc2 internal prototype to avoid an error.  */
19350 /* We use char because int might match the return type of a gcc2
19351     builtin and then its argument prototype would still apply.  */
19352 char gdbm_open();
19353 char (*f)();
19354
19355 int main() {
19356
19357 /* The GNU C library defines this for functions which it implements
19358     to always fail with ENOSYS.  Some functions are actually named
19359     something starting with __ and the normal name is an alias.  */
19360 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19361 choke me
19362 #else
19363 f = gdbm_open;
19364 #endif
19365
19366 ; return 0; }
19367 EOF
19368 if { (eval echo configure:19369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19369   rm -rf conftest*
19370   eval "ac_cv_func_gdbm_open=yes"
19371 else
19372   echo "configure: failed program was:" >&5
19373   cat conftest.$ac_ext >&5
19374   rm -rf conftest*
19375   eval "ac_cv_func_gdbm_open=no"
19376 fi
19377 rm -f conftest*
19378 fi
19379
19380 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19381   echo "$ac_t""yes" 1>&6
19382   ol_cv_lib_gdbm=yes
19383 else
19384   echo "$ac_t""no" 1>&6
19385
19386                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19387 echo "configure:19388: checking for gdbm_open in -lgdbm" >&5
19388 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19389 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19390   echo $ac_n "(cached) $ac_c" 1>&6
19391 else
19392   ac_save_LIBS="$LIBS"
19393 LIBS="-lgdbm  $LIBS"
19394 cat > conftest.$ac_ext <<EOF
19395 #line 19396 "configure"
19396 #include "confdefs.h"
19397 /* Override any gcc2 internal prototype to avoid an error.  */
19398 /* We use char because int might match the return type of a gcc2
19399     builtin and then its argument prototype would still apply.  */
19400 char gdbm_open();
19401
19402 int main() {
19403 gdbm_open()
19404 ; return 0; }
19405 EOF
19406 if { (eval echo configure:19407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19407   rm -rf conftest*
19408   eval "ac_cv_lib_$ac_lib_var=yes"
19409 else
19410   echo "configure: failed program was:" >&5
19411   cat conftest.$ac_ext >&5
19412   rm -rf conftest*
19413   eval "ac_cv_lib_$ac_lib_var=no"
19414 fi
19415 rm -f conftest*
19416 LIBS="$ac_save_LIBS"
19417
19418 fi
19419 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19420   echo "$ac_t""yes" 1>&6
19421   ol_cv_lib_gdbm=-lgdbm
19422 else
19423   echo "$ac_t""no" 1>&6
19424 ol_cv_lib_gdbm=no
19425 fi
19426
19427         
19428 fi
19429
19430         LIBS="$ol_LIBS"
19431
19432 fi
19433
19434 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19435
19436
19437  for ac_hdr in gdbm.h
19438 do
19439 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19440 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19441 echo "configure:19442: checking for $ac_hdr" >&5
19442 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19443   echo $ac_n "(cached) $ac_c" 1>&6
19444 else
19445   cat > conftest.$ac_ext <<EOF
19446 #line 19447 "configure"
19447 #include "confdefs.h"
19448 #include <$ac_hdr>
19449 EOF
19450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19451 { (eval echo configure:19452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19453 if test -z "$ac_err"; then
19454   rm -rf conftest*
19455   eval "ac_cv_header_$ac_safe=yes"
19456 else
19457   echo "$ac_err" >&5
19458   echo "configure: failed program was:" >&5
19459   cat conftest.$ac_ext >&5
19460   rm -rf conftest*
19461   eval "ac_cv_header_$ac_safe=no"
19462 fi
19463 rm -f conftest*
19464 fi
19465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19466   echo "$ac_t""yes" 1>&6
19467     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19468   cat >> confdefs.h <<EOF
19469 #define $ac_tr_hdr 1
19470 EOF
19471  
19472 else
19473   echo "$ac_t""no" 1>&6
19474 fi
19475 done
19476
19477  echo $ac_n "checking for db""... $ac_c" 1>&6
19478 echo "configure:19479: checking for db" >&5
19479 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19480   echo $ac_n "(cached) $ac_c" 1>&6
19481 else
19482   
19483         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19484                 ol_cv_gdbm=no
19485         else
19486                 ol_cv_gdbm=yes
19487         fi
19488
19489 fi
19490
19491 echo "$ac_t""$ol_cv_gdbm" 1>&6
19492  if test $ol_cv_gdbm = yes ; then
19493         cat >> confdefs.h <<\EOF
19494 #define HAVE_GDBM 1
19495 EOF
19496
19497  fi
19498
19499
19500         if test $ol_cv_gdbm = yes ; then
19501                 ol_link_ldbm=gdbm
19502                 ol_with_ldbm_api=gdbm
19503
19504                 if test $ol_cv_lib_gdbm != yes ; then
19505                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19506                 fi
19507         fi
19508 fi
19509
19510 if test $ol_with_ldbm_api = ndbm ; then
19511         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19512 echo "configure:19513: checking for NDBM library" >&5
19513 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19514   echo $ac_n "(cached) $ac_c" 1>&6
19515 else
19516         ol_LIBS="$LIBS"
19517         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19518 echo "configure:19519: checking for dbm_open" >&5
19519 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19520   echo $ac_n "(cached) $ac_c" 1>&6
19521 else
19522   cat > conftest.$ac_ext <<EOF
19523 #line 19524 "configure"
19524 #include "confdefs.h"
19525 /* System header to define __stub macros and hopefully few prototypes,
19526     which can conflict with char dbm_open(); below.  */
19527 #include <assert.h>
19528 /* Override any gcc2 internal prototype to avoid an error.  */
19529 /* We use char because int might match the return type of a gcc2
19530     builtin and then its argument prototype would still apply.  */
19531 char dbm_open();
19532 char (*f)();
19533
19534 int main() {
19535
19536 /* The GNU C library defines this for functions which it implements
19537     to always fail with ENOSYS.  Some functions are actually named
19538     something starting with __ and the normal name is an alias.  */
19539 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19540 choke me
19541 #else
19542 f = dbm_open;
19543 #endif
19544
19545 ; return 0; }
19546 EOF
19547 if { (eval echo configure:19548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19548   rm -rf conftest*
19549   eval "ac_cv_func_dbm_open=yes"
19550 else
19551   echo "configure: failed program was:" >&5
19552   cat conftest.$ac_ext >&5
19553   rm -rf conftest*
19554   eval "ac_cv_func_dbm_open=no"
19555 fi
19556 rm -f conftest*
19557 fi
19558
19559 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19560   echo "$ac_t""yes" 1>&6
19561   ol_cv_lib_ndbm=yes
19562 else
19563   echo "$ac_t""no" 1>&6
19564
19565                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19566 echo "configure:19567: checking for dbm_open in -lndbm" >&5
19567 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19568 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19569   echo $ac_n "(cached) $ac_c" 1>&6
19570 else
19571   ac_save_LIBS="$LIBS"
19572 LIBS="-lndbm  $LIBS"
19573 cat > conftest.$ac_ext <<EOF
19574 #line 19575 "configure"
19575 #include "confdefs.h"
19576 /* Override any gcc2 internal prototype to avoid an error.  */
19577 /* We use char because int might match the return type of a gcc2
19578     builtin and then its argument prototype would still apply.  */
19579 char dbm_open();
19580
19581 int main() {
19582 dbm_open()
19583 ; return 0; }
19584 EOF
19585 if { (eval echo configure:19586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19586   rm -rf conftest*
19587   eval "ac_cv_lib_$ac_lib_var=yes"
19588 else
19589   echo "configure: failed program was:" >&5
19590   cat conftest.$ac_ext >&5
19591   rm -rf conftest*
19592   eval "ac_cv_lib_$ac_lib_var=no"
19593 fi
19594 rm -f conftest*
19595 LIBS="$ac_save_LIBS"
19596
19597 fi
19598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19599   echo "$ac_t""yes" 1>&6
19600   ol_cv_lib_ndbm=-lndbm
19601 else
19602   echo "$ac_t""no" 1>&6
19603
19604                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19605 echo "configure:19606: checking for dbm_open in -ldbm" >&5
19606 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19607 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19608   echo $ac_n "(cached) $ac_c" 1>&6
19609 else
19610   ac_save_LIBS="$LIBS"
19611 LIBS="-ldbm  $LIBS"
19612 cat > conftest.$ac_ext <<EOF
19613 #line 19614 "configure"
19614 #include "confdefs.h"
19615 /* Override any gcc2 internal prototype to avoid an error.  */
19616 /* We use char because int might match the return type of a gcc2
19617     builtin and then its argument prototype would still apply.  */
19618 char dbm_open();
19619
19620 int main() {
19621 dbm_open()
19622 ; return 0; }
19623 EOF
19624 if { (eval echo configure:19625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19625   rm -rf conftest*
19626   eval "ac_cv_lib_$ac_lib_var=yes"
19627 else
19628   echo "configure: failed program was:" >&5
19629   cat conftest.$ac_ext >&5
19630   rm -rf conftest*
19631   eval "ac_cv_lib_$ac_lib_var=no"
19632 fi
19633 rm -f conftest*
19634 LIBS="$ac_save_LIBS"
19635
19636 fi
19637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19638   echo "$ac_t""yes" 1>&6
19639   ol_cv_lib_ndbm=-ldbm
19640 else
19641   echo "$ac_t""no" 1>&6
19642 ol_cv_lib_ndbm=no
19643 fi
19644                 
19645 fi
19646
19647         
19648 fi
19649
19650         LIBS="$ol_LIBS"
19651
19652 fi
19653
19654 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19655
19656
19657  for ac_hdr in ndbm.h
19658 do
19659 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19660 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19661 echo "configure:19662: checking for $ac_hdr" >&5
19662 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19663   echo $ac_n "(cached) $ac_c" 1>&6
19664 else
19665   cat > conftest.$ac_ext <<EOF
19666 #line 19667 "configure"
19667 #include "confdefs.h"
19668 #include <$ac_hdr>
19669 EOF
19670 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19671 { (eval echo configure:19672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19672 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19673 if test -z "$ac_err"; then
19674   rm -rf conftest*
19675   eval "ac_cv_header_$ac_safe=yes"
19676 else
19677   echo "$ac_err" >&5
19678   echo "configure: failed program was:" >&5
19679   cat conftest.$ac_ext >&5
19680   rm -rf conftest*
19681   eval "ac_cv_header_$ac_safe=no"
19682 fi
19683 rm -f conftest*
19684 fi
19685 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19686   echo "$ac_t""yes" 1>&6
19687     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19688   cat >> confdefs.h <<EOF
19689 #define $ac_tr_hdr 1
19690 EOF
19691  
19692 else
19693   echo "$ac_t""no" 1>&6
19694 fi
19695 done
19696
19697  echo $ac_n "checking for db""... $ac_c" 1>&6
19698 echo "configure:19699: checking for db" >&5
19699 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19700   echo $ac_n "(cached) $ac_c" 1>&6
19701 else
19702   
19703         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19704                 ol_cv_ndbm=no
19705         else
19706                 ol_cv_ndbm=yes
19707         fi
19708
19709 fi
19710
19711 echo "$ac_t""$ol_cv_ndbm" 1>&6
19712  if test $ol_cv_ndbm = yes ; then
19713         cat >> confdefs.h <<\EOF
19714 #define HAVE_NDBM 1
19715 EOF
19716
19717  fi
19718
19719
19720         if test $ol_cv_ndbm = yes ; then
19721                 ol_link_ldbm=ndbm
19722                 ol_with_ldbm_api=ndbm
19723
19724                 if test $ol_cv_lib_ndbm != yes ; then
19725                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19726                 fi
19727         fi
19728 fi
19729
19730 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19731         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19732         if test $ol_enable_ldbm = yes ; then
19733                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19734         fi
19735
19736         echo "configure: warning: disabling LDBM" 1>&2
19737         ol_enable_ldbm=no
19738 fi
19739
19740
19741 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19742         BUILD_LIBS_DYNAMIC=shared
19743         cat >> confdefs.h <<\EOF
19744 #define LDAP_LIBS_DYNAMIC 1
19745 EOF
19746
19747         LTSTATIC=""
19748 else
19749         BUILD_LIBS_DYNAMIC=static
19750         LTSTATIC="-static"
19751 fi
19752
19753 if test $ol_enable_wrappers != no ; then
19754         for ac_hdr in tcpd.h
19755 do
19756 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19757 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19758 echo "configure:19759: checking for $ac_hdr" >&5
19759 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19760   echo $ac_n "(cached) $ac_c" 1>&6
19761 else
19762   cat > conftest.$ac_ext <<EOF
19763 #line 19764 "configure"
19764 #include "confdefs.h"
19765 #include <$ac_hdr>
19766 EOF
19767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19768 { (eval echo configure:19769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19770 if test -z "$ac_err"; then
19771   rm -rf conftest*
19772   eval "ac_cv_header_$ac_safe=yes"
19773 else
19774   echo "$ac_err" >&5
19775   echo "configure: failed program was:" >&5
19776   cat conftest.$ac_ext >&5
19777   rm -rf conftest*
19778   eval "ac_cv_header_$ac_safe=no"
19779 fi
19780 rm -f conftest*
19781 fi
19782 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19783   echo "$ac_t""yes" 1>&6
19784     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19785   cat >> confdefs.h <<EOF
19786 #define $ac_tr_hdr 1
19787 EOF
19788  
19789                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19790 echo "configure:19791: checking for TCP wrappers library" >&5
19791                 save_LIBS="$LIBS"
19792                 LIBS="$LIBS -lwrap"
19793                 cat > conftest.$ac_ext <<EOF
19794 #line 19795 "configure"
19795 #include "confdefs.h"
19796
19797 #include <tcpd.h>
19798 int allow_severity = 0;
19799 int deny_severity  = 0;
19800
19801 struct request_info *req;
19802                 
19803 int main() {
19804
19805 hosts_access(req)
19806                 
19807 ; return 0; }
19808 EOF
19809 if { (eval echo configure:19810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19810   rm -rf conftest*
19811   echo "$ac_t""-lwrap" 1>&6
19812                 have_wrappers=yes
19813                 LIBS="$save_LIBS"
19814 else
19815   echo "configure: failed program was:" >&5
19816   cat conftest.$ac_ext >&5
19817   rm -rf conftest*
19818   
19819                                 LIBS="$LIBS -lnsl"
19820                 cat > conftest.$ac_ext <<EOF
19821 #line 19822 "configure"
19822 #include "confdefs.h"
19823
19824 #include <tcpd.h>
19825 int allow_severity = 0;
19826 int deny_severity  = 0;
19827
19828 struct request_info *req;
19829                 
19830 int main() {
19831
19832 hosts_access(req)
19833                 
19834 ; return 0; }
19835 EOF
19836 if { (eval echo configure:19837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19837   rm -rf conftest*
19838   echo "$ac_t""-lwrap -lnsl" 1>&6
19839                 have_wrappers=yes
19840                 LIBS="$save_LIBS -lnsl"
19841 else
19842   echo "configure: failed program was:" >&5
19843   cat conftest.$ac_ext >&5
19844   rm -rf conftest*
19845   
19846                 echo "$ac_t""no" 1>&6
19847                 have_wrappers=no
19848                 LIBS=$save_LIBS
19849 fi
19850 rm -f conftest*
19851 fi
19852 rm -f conftest*
19853 else
19854   echo "$ac_t""no" 1>&6
19855 have_wrappers=no
19856 fi
19857 done
19858
19859
19860         if test $have_wrappers = yes ; then
19861                 cat >> confdefs.h <<\EOF
19862 #define HAVE_TCPD 1
19863 EOF
19864
19865                 WRAP_LIBS="-lwrap"
19866         elif test $ol_enable_wrappers = yes ; then
19867                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19868         else
19869                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19870                 WRAP_LIBS=""
19871         fi
19872 fi
19873
19874 if test $ol_enable_syslog != no ; then
19875         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19876 echo "configure:19877: checking for openlog" >&5
19877 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19878   echo $ac_n "(cached) $ac_c" 1>&6
19879 else
19880   cat > conftest.$ac_ext <<EOF
19881 #line 19882 "configure"
19882 #include "confdefs.h"
19883 /* System header to define __stub macros and hopefully few prototypes,
19884     which can conflict with char openlog(); below.  */
19885 #include <assert.h>
19886 /* Override any gcc2 internal prototype to avoid an error.  */
19887 /* We use char because int might match the return type of a gcc2
19888     builtin and then its argument prototype would still apply.  */
19889 char openlog();
19890 char (*f)();
19891
19892 int main() {
19893
19894 /* The GNU C library defines this for functions which it implements
19895     to always fail with ENOSYS.  Some functions are actually named
19896     something starting with __ and the normal name is an alias.  */
19897 #if defined (__stub_openlog) || defined (__stub___openlog)
19898 choke me
19899 #else
19900 f = openlog;
19901 #endif
19902
19903 ; return 0; }
19904 EOF
19905 if { (eval echo configure:19906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19906   rm -rf conftest*
19907   eval "ac_cv_func_openlog=yes"
19908 else
19909   echo "configure: failed program was:" >&5
19910   cat conftest.$ac_ext >&5
19911   rm -rf conftest*
19912   eval "ac_cv_func_openlog=no"
19913 fi
19914 rm -f conftest*
19915 fi
19916
19917 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19918   echo "$ac_t""yes" 1>&6
19919   :
19920 else
19921   echo "$ac_t""no" 1>&6
19922 fi
19923
19924         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19925                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19926         fi
19927         ol_enable_syslog=$ac_cv_func_openlog
19928 fi
19929
19930
19931 ol_link_sql=no
19932 if test $ol_enable_sql != no ; then
19933         for ac_hdr in sql.h sqlext.h
19934 do
19935 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19936 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19937 echo "configure:19938: checking for $ac_hdr" >&5
19938 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19939   echo $ac_n "(cached) $ac_c" 1>&6
19940 else
19941   cat > conftest.$ac_ext <<EOF
19942 #line 19943 "configure"
19943 #include "confdefs.h"
19944 #include <$ac_hdr>
19945 EOF
19946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19947 { (eval echo configure:19948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19948 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19949 if test -z "$ac_err"; then
19950   rm -rf conftest*
19951   eval "ac_cv_header_$ac_safe=yes"
19952 else
19953   echo "$ac_err" >&5
19954   echo "configure: failed program was:" >&5
19955   cat conftest.$ac_ext >&5
19956   rm -rf conftest*
19957   eval "ac_cv_header_$ac_safe=no"
19958 fi
19959 rm -f conftest*
19960 fi
19961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19962   echo "$ac_t""yes" 1>&6
19963     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19964   cat >> confdefs.h <<EOF
19965 #define $ac_tr_hdr 1
19966 EOF
19967  
19968 else
19969   echo "$ac_t""no" 1>&6
19970 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
19971         
19972 fi
19973 done
19974
19975
19976         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19977 echo "configure:19978: checking for SQLDriverConnect in -liodbc" >&5
19978 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19979 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19980   echo $ac_n "(cached) $ac_c" 1>&6
19981 else
19982   ac_save_LIBS="$LIBS"
19983 LIBS="-liodbc  $LIBS"
19984 cat > conftest.$ac_ext <<EOF
19985 #line 19986 "configure"
19986 #include "confdefs.h"
19987 /* Override any gcc2 internal prototype to avoid an error.  */
19988 /* We use char because int might match the return type of a gcc2
19989     builtin and then its argument prototype would still apply.  */
19990 char SQLDriverConnect();
19991
19992 int main() {
19993 SQLDriverConnect()
19994 ; return 0; }
19995 EOF
19996 if { (eval echo configure:19997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19997   rm -rf conftest*
19998   eval "ac_cv_lib_$ac_lib_var=yes"
19999 else
20000   echo "configure: failed program was:" >&5
20001   cat conftest.$ac_ext >&5
20002   rm -rf conftest*
20003   eval "ac_cv_lib_$ac_lib_var=no"
20004 fi
20005 rm -f conftest*
20006 LIBS="$ac_save_LIBS"
20007
20008 fi
20009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20010   echo "$ac_t""yes" 1>&6
20011   have_iodbc=yes
20012 else
20013   echo "$ac_t""no" 1>&6
20014 have_iodbc=no
20015 fi
20016
20017         if test $have_iodbc = yes ; then
20018                 ol_link_sql="-liodbc"
20019         else
20020                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20021 echo "configure:20022: checking for SQLDriverConnect in -lodbc" >&5
20022 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20023 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20024   echo $ac_n "(cached) $ac_c" 1>&6
20025 else
20026   ac_save_LIBS="$LIBS"
20027 LIBS="-lodbc  $LIBS"
20028 cat > conftest.$ac_ext <<EOF
20029 #line 20030 "configure"
20030 #include "confdefs.h"
20031 /* Override any gcc2 internal prototype to avoid an error.  */
20032 /* We use char because int might match the return type of a gcc2
20033     builtin and then its argument prototype would still apply.  */
20034 char SQLDriverConnect();
20035
20036 int main() {
20037 SQLDriverConnect()
20038 ; return 0; }
20039 EOF
20040 if { (eval echo configure:20041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20041   rm -rf conftest*
20042   eval "ac_cv_lib_$ac_lib_var=yes"
20043 else
20044   echo "configure: failed program was:" >&5
20045   cat conftest.$ac_ext >&5
20046   rm -rf conftest*
20047   eval "ac_cv_lib_$ac_lib_var=no"
20048 fi
20049 rm -f conftest*
20050 LIBS="$ac_save_LIBS"
20051
20052 fi
20053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20054   echo "$ac_t""yes" 1>&6
20055   have_odbc=yes
20056 else
20057   echo "$ac_t""no" 1>&6
20058 have_odbc=no
20059 fi
20060
20061                 if test $have_odbc = yes ; then
20062                         ol_link_sql="-lodbc"
20063                 fi
20064         fi
20065
20066         if test $ol_link_sql != no ; then
20067                 SLAPD_SQL_LIBS="$ol_link_sql"
20068
20069         elif test $ol_enable_sql != auto ; then
20070                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20071         fi
20072 fi
20073
20074 ol_link_termcap=no
20075 for ac_hdr in termcap.h ncurses.h
20076 do
20077 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20078 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20079 echo "configure:20080: checking for $ac_hdr" >&5
20080 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20081   echo $ac_n "(cached) $ac_c" 1>&6
20082 else
20083   cat > conftest.$ac_ext <<EOF
20084 #line 20085 "configure"
20085 #include "confdefs.h"
20086 #include <$ac_hdr>
20087 EOF
20088 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20089 { (eval echo configure:20090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20090 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20091 if test -z "$ac_err"; then
20092   rm -rf conftest*
20093   eval "ac_cv_header_$ac_safe=yes"
20094 else
20095   echo "$ac_err" >&5
20096   echo "configure: failed program was:" >&5
20097   cat conftest.$ac_ext >&5
20098   rm -rf conftest*
20099   eval "ac_cv_header_$ac_safe=no"
20100 fi
20101 rm -f conftest*
20102 fi
20103 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20104   echo "$ac_t""yes" 1>&6
20105     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20106   cat >> confdefs.h <<EOF
20107 #define $ac_tr_hdr 1
20108 EOF
20109  
20110 else
20111   echo "$ac_t""no" 1>&6
20112 fi
20113 done
20114
20115
20116 if test $ol_link_termcap = no ; then
20117         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
20118 echo "configure:20119: checking for tputs in -ltermcap" >&5
20119 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
20120 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20121   echo $ac_n "(cached) $ac_c" 1>&6
20122 else
20123   ac_save_LIBS="$LIBS"
20124 LIBS="-ltermcap  $LIBS"
20125 cat > conftest.$ac_ext <<EOF
20126 #line 20127 "configure"
20127 #include "confdefs.h"
20128 /* Override any gcc2 internal prototype to avoid an error.  */
20129 /* We use char because int might match the return type of a gcc2
20130     builtin and then its argument prototype would still apply.  */
20131 char tputs();
20132
20133 int main() {
20134 tputs()
20135 ; return 0; }
20136 EOF
20137 if { (eval echo configure:20138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20138   rm -rf conftest*
20139   eval "ac_cv_lib_$ac_lib_var=yes"
20140 else
20141   echo "configure: failed program was:" >&5
20142   cat conftest.$ac_ext >&5
20143   rm -rf conftest*
20144   eval "ac_cv_lib_$ac_lib_var=no"
20145 fi
20146 rm -f conftest*
20147 LIBS="$ac_save_LIBS"
20148
20149 fi
20150 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20151   echo "$ac_t""yes" 1>&6
20152   have_termcap=yes
20153 else
20154   echo "$ac_t""no" 1>&6
20155 have_termcap=no
20156 fi
20157
20158         if test $have_termcap = yes ; then
20159                 cat >> confdefs.h <<\EOF
20160 #define HAVE_TERMCAP 1
20161 EOF
20162
20163                 ol_link_termcap=yes
20164                 TERMCAP_LIBS=-ltermcap
20165         fi
20166 fi
20167
20168 if test $ol_link_termcap = no ; then
20169         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20170 echo "configure:20171: checking for initscr in -lncurses" >&5
20171 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20172 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20173   echo $ac_n "(cached) $ac_c" 1>&6
20174 else
20175   ac_save_LIBS="$LIBS"
20176 LIBS="-lncurses  $LIBS"
20177 cat > conftest.$ac_ext <<EOF
20178 #line 20179 "configure"
20179 #include "confdefs.h"
20180 /* Override any gcc2 internal prototype to avoid an error.  */
20181 /* We use char because int might match the return type of a gcc2
20182     builtin and then its argument prototype would still apply.  */
20183 char initscr();
20184
20185 int main() {
20186 initscr()
20187 ; return 0; }
20188 EOF
20189 if { (eval echo configure:20190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20190   rm -rf conftest*
20191   eval "ac_cv_lib_$ac_lib_var=yes"
20192 else
20193   echo "configure: failed program was:" >&5
20194   cat conftest.$ac_ext >&5
20195   rm -rf conftest*
20196   eval "ac_cv_lib_$ac_lib_var=no"
20197 fi
20198 rm -f conftest*
20199 LIBS="$ac_save_LIBS"
20200
20201 fi
20202 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20203   echo "$ac_t""yes" 1>&6
20204   have_ncurses=yes
20205 else
20206   echo "$ac_t""no" 1>&6
20207 have_ncurses=no
20208 fi
20209
20210         if test $have_ncurses = yes ; then
20211                 cat >> confdefs.h <<\EOF
20212 #define HAVE_NCURSES 1
20213 EOF
20214
20215                 ol_link_termcap=yes
20216                 TERMCAP_LIBS=-lncurses
20217         fi
20218 fi
20219
20220 if test $ol_link_termcap = no ; then
20221         cat >> confdefs.h <<\EOF
20222 #define NO_TERMCAP 1
20223 EOF
20224
20225         TERMCAP_LIBS=
20226 fi
20227
20228 ol_link_sasl=no
20229 ol_link_spasswd=no
20230 if test $ol_with_cyrus_sasl != no ; then
20231         for ac_hdr in sasl/sasl.h sasl.h
20232 do
20233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20235 echo "configure:20236: checking for $ac_hdr" >&5
20236 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20237   echo $ac_n "(cached) $ac_c" 1>&6
20238 else
20239   cat > conftest.$ac_ext <<EOF
20240 #line 20241 "configure"
20241 #include "confdefs.h"
20242 #include <$ac_hdr>
20243 EOF
20244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20245 { (eval echo configure:20246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20247 if test -z "$ac_err"; then
20248   rm -rf conftest*
20249   eval "ac_cv_header_$ac_safe=yes"
20250 else
20251   echo "$ac_err" >&5
20252   echo "configure: failed program was:" >&5
20253   cat conftest.$ac_ext >&5
20254   rm -rf conftest*
20255   eval "ac_cv_header_$ac_safe=no"
20256 fi
20257 rm -f conftest*
20258 fi
20259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20260   echo "$ac_t""yes" 1>&6
20261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20262   cat >> confdefs.h <<EOF
20263 #define $ac_tr_hdr 1
20264 EOF
20265  
20266 else
20267   echo "$ac_t""no" 1>&6
20268 fi
20269 done
20270
20271
20272         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20273                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20274 echo "configure:20275: checking for sasl_client_init in -lsasl2" >&5
20275 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20276 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20277   echo $ac_n "(cached) $ac_c" 1>&6
20278 else
20279   ac_save_LIBS="$LIBS"
20280 LIBS="-lsasl2  $LIBS"
20281 cat > conftest.$ac_ext <<EOF
20282 #line 20283 "configure"
20283 #include "confdefs.h"
20284 /* Override any gcc2 internal prototype to avoid an error.  */
20285 /* We use char because int might match the return type of a gcc2
20286     builtin and then its argument prototype would still apply.  */
20287 char sasl_client_init();
20288
20289 int main() {
20290 sasl_client_init()
20291 ; return 0; }
20292 EOF
20293 if { (eval echo configure:20294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20294   rm -rf conftest*
20295   eval "ac_cv_lib_$ac_lib_var=yes"
20296 else
20297   echo "configure: failed program was:" >&5
20298   cat conftest.$ac_ext >&5
20299   rm -rf conftest*
20300   eval "ac_cv_lib_$ac_lib_var=no"
20301 fi
20302 rm -f conftest*
20303 LIBS="$ac_save_LIBS"
20304
20305 fi
20306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20307   echo "$ac_t""yes" 1>&6
20308   ol_link_sasl="-lsasl2"
20309 else
20310   echo "$ac_t""no" 1>&6
20311 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20312 echo "configure:20313: checking for sasl_client_init in -lsasl" >&5
20313 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20314 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20315   echo $ac_n "(cached) $ac_c" 1>&6
20316 else
20317   ac_save_LIBS="$LIBS"
20318 LIBS="-lsasl  $LIBS"
20319 cat > conftest.$ac_ext <<EOF
20320 #line 20321 "configure"
20321 #include "confdefs.h"
20322 /* Override any gcc2 internal prototype to avoid an error.  */
20323 /* We use char because int might match the return type of a gcc2
20324     builtin and then its argument prototype would still apply.  */
20325 char sasl_client_init();
20326
20327 int main() {
20328 sasl_client_init()
20329 ; return 0; }
20330 EOF
20331 if { (eval echo configure:20332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20332   rm -rf conftest*
20333   eval "ac_cv_lib_$ac_lib_var=yes"
20334 else
20335   echo "configure: failed program was:" >&5
20336   cat conftest.$ac_ext >&5
20337   rm -rf conftest*
20338   eval "ac_cv_lib_$ac_lib_var=no"
20339 fi
20340 rm -f conftest*
20341 LIBS="$ac_save_LIBS"
20342
20343 fi
20344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20345   echo "$ac_t""yes" 1>&6
20346   ol_link_sasl="-lsasl"
20347 else
20348   echo "$ac_t""no" 1>&6
20349 fi
20350
20351 fi
20352
20353         fi
20354
20355         if test $ol_link_sasl = no ; then
20356                 if test $ol_with_cyrus_sasl != auto ; then
20357                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20358                 else
20359                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20360                         echo "configure: warning: SASL authentication not supported!" 1>&2
20361                         if test $ol_link_tls = no ; then
20362                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20363                         fi
20364                 fi
20365         else
20366                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20367 echo "configure:20368: checking Cyrus SASL library version" >&5
20368 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20369   echo $ac_n "(cached) $ac_c" 1>&6
20370 else
20371   
20372         cat > conftest.$ac_ext <<EOF
20373 #line 20374 "configure"
20374 #include "confdefs.h"
20375
20376 #ifdef HAVE_SASL_SASL_H
20377 #include <sasl/sasl.h>
20378 #else
20379 #include <sasl.h>
20380 #endif
20381
20382 /* require 2.1.3 or later */
20383 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20384         char *__sasl_compat = "1.5.x okay";
20385 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20386         __sasl_compat "2.2+ or better okay (we guess)";
20387 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20388         && SASL_VERSION_STEP >=3
20389         __sasl_compat = "2.1.3+ or better okay";
20390 #endif
20391         
20392 EOF
20393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20394   egrep "__sasl_compat" >/dev/null 2>&1; then
20395   rm -rf conftest*
20396   ol_cv_sasl_compat=yes
20397 else
20398   rm -rf conftest*
20399   ol_cv_sasl_compat=no
20400 fi
20401 rm -f conftest*
20402
20403 fi
20404
20405 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20406
20407                 if test $ol_cv_sasl_compat = no ; then
20408                         ol_link_sasl=no
20409                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20410                 fi
20411
20412                 cat >> confdefs.h <<\EOF
20413 #define HAVE_CYRUS_SASL 1
20414 EOF
20415
20416                 SASL_LIBS="$ol_link_sasl"
20417                 if test $ol_enable_spasswd != no ; then
20418                         ol_link_spasswd=yes
20419                 fi
20420
20421                 ac_save_LIBS="$LIBS"
20422                 LIBS="$LIBS $ol_link_sasl"
20423                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20424 echo "configure:20425: checking for sasl_version" >&5
20425 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20426   echo $ac_n "(cached) $ac_c" 1>&6
20427 else
20428   cat > conftest.$ac_ext <<EOF
20429 #line 20430 "configure"
20430 #include "confdefs.h"
20431 /* System header to define __stub macros and hopefully few prototypes,
20432     which can conflict with char sasl_version(); below.  */
20433 #include <assert.h>
20434 /* Override any gcc2 internal prototype to avoid an error.  */
20435 /* We use char because int might match the return type of a gcc2
20436     builtin and then its argument prototype would still apply.  */
20437 char sasl_version();
20438 char (*f)();
20439
20440 int main() {
20441
20442 /* The GNU C library defines this for functions which it implements
20443     to always fail with ENOSYS.  Some functions are actually named
20444     something starting with __ and the normal name is an alias.  */
20445 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20446 choke me
20447 #else
20448 f = sasl_version;
20449 #endif
20450
20451 ; return 0; }
20452 EOF
20453 if { (eval echo configure:20454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20454   rm -rf conftest*
20455   eval "ac_cv_func_sasl_version=yes"
20456 else
20457   echo "configure: failed program was:" >&5
20458   cat conftest.$ac_ext >&5
20459   rm -rf conftest*
20460   eval "ac_cv_func_sasl_version=no"
20461 fi
20462 rm -f conftest*
20463 fi
20464
20465 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20466   echo "$ac_t""yes" 1>&6
20467   cat >> confdefs.h <<\EOF
20468 #define HAVE_SASL_VERSION 1
20469 EOF
20470
20471 else
20472   echo "$ac_t""no" 1>&6
20473 fi
20474
20475                 LIBS="$ac_save_LIBS"
20476         fi
20477
20478 else
20479         echo "configure: warning: SASL authentication not supported!" 1>&2
20480         if test $ol_link_tls = no ; then
20481                 echo "configure: warning: Strong authentication not supported!" 1>&2
20482         fi
20483 fi
20484
20485 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20486         dev=no
20487         if test -r /dev/urandom ; then
20488                 dev="/dev/urandom";
20489         elif test -r /idev/urandom ; then
20490                 dev="/idev/urandom";
20491         elif test -r /dev/srandom ; then
20492                 dev="/dev/srandom";
20493         elif test -r /dev/random ; then
20494                 dev="/dev/random";
20495         elif test -r /idev/random ; then
20496                 dev="/idev/random";
20497         fi
20498
20499         if test $dev != no ; then
20500                 cat >> confdefs.h <<EOF
20501 #define URANDOM_DEVICE "$dev"
20502 EOF
20503
20504         fi
20505 fi
20506
20507 ol_link_fetch=no
20508 if test $ol_with_fetch != no ; then
20509         ol_LIBS=$LIBS
20510 LIBS="-lfetch -lcom_err $LIBS"
20511 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20512 echo "configure:20513: checking fetch(3) library" >&5
20513 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20514   echo $ac_n "(cached) $ac_c" 1>&6
20515 else
20516   
20517         cat > conftest.$ac_ext <<EOF
20518 #line 20519 "configure"
20519 #include "confdefs.h"
20520
20521 #include <sys/param.h>
20522 #include <stdio.h>
20523 #include <fetch.h>
20524 int main() {
20525 struct url *u = fetchParseURL("file:///"); 
20526 ; return 0; }
20527 EOF
20528 if { (eval echo configure:20529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20529   rm -rf conftest*
20530   ol_cv_lib_fetch=yes
20531 else
20532   echo "configure: failed program was:" >&5
20533   cat conftest.$ac_ext >&5
20534   rm -rf conftest*
20535   ol_cv_lib_fetch=no
20536 fi
20537 rm -f conftest*
20538 fi
20539
20540 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20541 LIBS=$ol_LIBS
20542 if test $ol_cv_lib_fetch != no ; then
20543         ol_link_fetch="-lfetch -lcom_err"
20544         cat >> confdefs.h <<\EOF
20545 #define HAVE_FETCH 1
20546 EOF
20547
20548 fi
20549
20550
20551         if test $ol_cv_lib_fetch != no ; then
20552                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20553                 ol_link_fetch=freebsd
20554
20555         elif test $ol_with_fetch != auto ; then
20556                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20557         fi 
20558 fi
20559
20560 ol_link_readline=no
20561 if test $ol_with_readline != no ; then
20562         for ac_hdr in readline/readline.h readline/history.h
20563 do
20564 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20565 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20566 echo "configure:20567: checking for $ac_hdr" >&5
20567 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20568   echo $ac_n "(cached) $ac_c" 1>&6
20569 else
20570   cat > conftest.$ac_ext <<EOF
20571 #line 20572 "configure"
20572 #include "confdefs.h"
20573 #include <$ac_hdr>
20574 EOF
20575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20576 { (eval echo configure:20577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20578 if test -z "$ac_err"; then
20579   rm -rf conftest*
20580   eval "ac_cv_header_$ac_safe=yes"
20581 else
20582   echo "$ac_err" >&5
20583   echo "configure: failed program was:" >&5
20584   cat conftest.$ac_ext >&5
20585   rm -rf conftest*
20586   eval "ac_cv_header_$ac_safe=no"
20587 fi
20588 rm -f conftest*
20589 fi
20590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20591   echo "$ac_t""yes" 1>&6
20592     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20593   cat >> confdefs.h <<EOF
20594 #define $ac_tr_hdr 1
20595 EOF
20596  
20597 else
20598   echo "$ac_t""no" 1>&6
20599 fi
20600 done
20601
20602
20603         if test $ac_cv_header_readline_readline_h = yes ; then
20604                 save_LIBS="$LIBS"
20605                 LIBS="$TERMCAP_LIBS $LIBS"
20606                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
20607 echo "configure:20608: checking for readline in -lreadline" >&5
20608 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
20609 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20610   echo $ac_n "(cached) $ac_c" 1>&6
20611 else
20612   ac_save_LIBS="$LIBS"
20613 LIBS="-lreadline  $LIBS"
20614 cat > conftest.$ac_ext <<EOF
20615 #line 20616 "configure"
20616 #include "confdefs.h"
20617 /* Override any gcc2 internal prototype to avoid an error.  */
20618 /* We use char because int might match the return type of a gcc2
20619     builtin and then its argument prototype would still apply.  */
20620 char readline();
20621
20622 int main() {
20623 readline()
20624 ; return 0; }
20625 EOF
20626 if { (eval echo configure:20627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20627   rm -rf conftest*
20628   eval "ac_cv_lib_$ac_lib_var=yes"
20629 else
20630   echo "configure: failed program was:" >&5
20631   cat conftest.$ac_ext >&5
20632   rm -rf conftest*
20633   eval "ac_cv_lib_$ac_lib_var=no"
20634 fi
20635 rm -f conftest*
20636 LIBS="$ac_save_LIBS"
20637
20638 fi
20639 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20640   echo "$ac_t""yes" 1>&6
20641   have_readline=yes
20642 else
20643   echo "$ac_t""no" 1>&6
20644 have_readline=no
20645 fi
20646
20647                 LIBS="$save_LIBS"
20648                         
20649                 if test $have_readline = yes ; then
20650                         ol_with_readline=found
20651                         ol_link_readline=yes
20652
20653                         READLINE_LIBS="-lreadline"
20654                 fi
20655         fi
20656 fi
20657
20658 if test $ol_link_readline = yes ; then
20659         cat >> confdefs.h <<\EOF
20660 #define HAVE_READLINE 1
20661 EOF
20662
20663 fi
20664
20665
20666 if test $ol_enable_crypt != no ; then
20667         save_LIBS="$LIBS"
20668         LIBS="$TLS_LIBS $LIBS"
20669
20670         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20671 echo "configure:20672: checking for crypt" >&5
20672 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20673   echo $ac_n "(cached) $ac_c" 1>&6
20674 else
20675   cat > conftest.$ac_ext <<EOF
20676 #line 20677 "configure"
20677 #include "confdefs.h"
20678 /* System header to define __stub macros and hopefully few prototypes,
20679     which can conflict with char crypt(); below.  */
20680 #include <assert.h>
20681 /* Override any gcc2 internal prototype to avoid an error.  */
20682 /* We use char because int might match the return type of a gcc2
20683     builtin and then its argument prototype would still apply.  */
20684 char crypt();
20685 char (*f)();
20686
20687 int main() {
20688
20689 /* The GNU C library defines this for functions which it implements
20690     to always fail with ENOSYS.  Some functions are actually named
20691     something starting with __ and the normal name is an alias.  */
20692 #if defined (__stub_crypt) || defined (__stub___crypt)
20693 choke me
20694 #else
20695 f = crypt;
20696 #endif
20697
20698 ; return 0; }
20699 EOF
20700 if { (eval echo configure:20701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20701   rm -rf conftest*
20702   eval "ac_cv_func_crypt=yes"
20703 else
20704   echo "configure: failed program was:" >&5
20705   cat conftest.$ac_ext >&5
20706   rm -rf conftest*
20707   eval "ac_cv_func_crypt=no"
20708 fi
20709 rm -f conftest*
20710 fi
20711
20712 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20713   echo "$ac_t""yes" 1>&6
20714   have_crypt=yes
20715 else
20716   echo "$ac_t""no" 1>&6
20717
20718                 LIBS="$save_LIBS"
20719                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20720 echo "configure:20721: checking for crypt in -lcrypt" >&5
20721 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20722 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20723   echo $ac_n "(cached) $ac_c" 1>&6
20724 else
20725   ac_save_LIBS="$LIBS"
20726 LIBS="-lcrypt  $LIBS"
20727 cat > conftest.$ac_ext <<EOF
20728 #line 20729 "configure"
20729 #include "confdefs.h"
20730 /* Override any gcc2 internal prototype to avoid an error.  */
20731 /* We use char because int might match the return type of a gcc2
20732     builtin and then its argument prototype would still apply.  */
20733 char crypt();
20734
20735 int main() {
20736 crypt()
20737 ; return 0; }
20738 EOF
20739 if { (eval echo configure:20740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20740   rm -rf conftest*
20741   eval "ac_cv_lib_$ac_lib_var=yes"
20742 else
20743   echo "configure: failed program was:" >&5
20744   cat conftest.$ac_ext >&5
20745   rm -rf conftest*
20746   eval "ac_cv_lib_$ac_lib_var=no"
20747 fi
20748 rm -f conftest*
20749 LIBS="$ac_save_LIBS"
20750
20751 fi
20752 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20753   echo "$ac_t""yes" 1>&6
20754   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20755                         have_crypt=yes
20756 else
20757   echo "$ac_t""no" 1>&6
20758 have_crypt=no
20759 fi
20760
20761 fi
20762
20763
20764         LIBS="$save_LIBS"
20765
20766         if test $have_crypt = yes ; then
20767                 cat >> confdefs.h <<\EOF
20768 #define HAVE_CRYPT 1
20769 EOF
20770
20771         else
20772                 echo "configure: warning: could not find crypt" 1>&2
20773                 if test $ol_enable_crypt = yes ; then
20774                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20775                 fi
20776
20777                 echo "configure: warning: disabling crypt support" 1>&2
20778                 ol_enable_crypt=no
20779         fi
20780 fi
20781
20782 if test $ol_enable_proctitle != no ; then
20783         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20784 echo "configure:20785: checking for setproctitle" >&5
20785 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20786   echo $ac_n "(cached) $ac_c" 1>&6
20787 else
20788   cat > conftest.$ac_ext <<EOF
20789 #line 20790 "configure"
20790 #include "confdefs.h"
20791 /* System header to define __stub macros and hopefully few prototypes,
20792     which can conflict with char setproctitle(); below.  */
20793 #include <assert.h>
20794 /* Override any gcc2 internal prototype to avoid an error.  */
20795 /* We use char because int might match the return type of a gcc2
20796     builtin and then its argument prototype would still apply.  */
20797 char setproctitle();
20798 char (*f)();
20799
20800 int main() {
20801
20802 /* The GNU C library defines this for functions which it implements
20803     to always fail with ENOSYS.  Some functions are actually named
20804     something starting with __ and the normal name is an alias.  */
20805 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20806 choke me
20807 #else
20808 f = setproctitle;
20809 #endif
20810
20811 ; return 0; }
20812 EOF
20813 if { (eval echo configure:20814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20814   rm -rf conftest*
20815   eval "ac_cv_func_setproctitle=yes"
20816 else
20817   echo "configure: failed program was:" >&5
20818   cat conftest.$ac_ext >&5
20819   rm -rf conftest*
20820   eval "ac_cv_func_setproctitle=no"
20821 fi
20822 rm -f conftest*
20823 fi
20824
20825 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20826   echo "$ac_t""yes" 1>&6
20827   have_setproctitle=yes
20828 else
20829   echo "$ac_t""no" 1>&6
20830
20831                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20832 echo "configure:20833: checking for setproctitle in -lutil" >&5
20833 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20834 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20835   echo $ac_n "(cached) $ac_c" 1>&6
20836 else
20837   ac_save_LIBS="$LIBS"
20838 LIBS="-lutil  $LIBS"
20839 cat > conftest.$ac_ext <<EOF
20840 #line 20841 "configure"
20841 #include "confdefs.h"
20842 /* Override any gcc2 internal prototype to avoid an error.  */
20843 /* We use char because int might match the return type of a gcc2
20844     builtin and then its argument prototype would still apply.  */
20845 char setproctitle();
20846
20847 int main() {
20848 setproctitle()
20849 ; return 0; }
20850 EOF
20851 if { (eval echo configure:20852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20852   rm -rf conftest*
20853   eval "ac_cv_lib_$ac_lib_var=yes"
20854 else
20855   echo "configure: failed program was:" >&5
20856   cat conftest.$ac_ext >&5
20857   rm -rf conftest*
20858   eval "ac_cv_lib_$ac_lib_var=no"
20859 fi
20860 rm -f conftest*
20861 LIBS="$ac_save_LIBS"
20862
20863 fi
20864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20865   echo "$ac_t""yes" 1>&6
20866   have_setproctitle=yes
20867                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20868 else
20869   echo "$ac_t""no" 1>&6
20870 have_setproctitle=no
20871                         LIBOBJS="$LIBOBJS setproctitle.o"
20872                         LIBSRCS="$LIBSRCS setproctitle.c"
20873 fi
20874
20875 fi
20876
20877
20878         if test $have_setproctitle = yes ; then
20879                 cat >> confdefs.h <<\EOF
20880 #define HAVE_SETPROCTITLE 1
20881 EOF
20882
20883         fi
20884 fi
20885
20886 if test $ol_enable_slp != no ; then
20887         for ac_hdr in slp.h 
20888 do
20889 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20890 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20891 echo "configure:20892: checking for $ac_hdr" >&5
20892 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20893   echo $ac_n "(cached) $ac_c" 1>&6
20894 else
20895   cat > conftest.$ac_ext <<EOF
20896 #line 20897 "configure"
20897 #include "confdefs.h"
20898 #include <$ac_hdr>
20899 EOF
20900 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20901 { (eval echo configure:20902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20902 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20903 if test -z "$ac_err"; then
20904   rm -rf conftest*
20905   eval "ac_cv_header_$ac_safe=yes"
20906 else
20907   echo "$ac_err" >&5
20908   echo "configure: failed program was:" >&5
20909   cat conftest.$ac_ext >&5
20910   rm -rf conftest*
20911   eval "ac_cv_header_$ac_safe=no"
20912 fi
20913 rm -f conftest*
20914 fi
20915 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20916   echo "$ac_t""yes" 1>&6
20917     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20918   cat >> confdefs.h <<EOF
20919 #define $ac_tr_hdr 1
20920 EOF
20921  
20922 else
20923   echo "$ac_t""no" 1>&6
20924 fi
20925 done
20926
20927
20928         if test $ac_cv_header_slp_h = yes ; then
20929                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20930 echo "configure:20931: checking for SLPOpen in -lslp" >&5
20931 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20932 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20933   echo $ac_n "(cached) $ac_c" 1>&6
20934 else
20935   ac_save_LIBS="$LIBS"
20936 LIBS="-lslp  $LIBS"
20937 cat > conftest.$ac_ext <<EOF
20938 #line 20939 "configure"
20939 #include "confdefs.h"
20940 /* Override any gcc2 internal prototype to avoid an error.  */
20941 /* We use char because int might match the return type of a gcc2
20942     builtin and then its argument prototype would still apply.  */
20943 char SLPOpen();
20944
20945 int main() {
20946 SLPOpen()
20947 ; return 0; }
20948 EOF
20949 if { (eval echo configure:20950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20950   rm -rf conftest*
20951   eval "ac_cv_lib_$ac_lib_var=yes"
20952 else
20953   echo "configure: failed program was:" >&5
20954   cat conftest.$ac_ext >&5
20955   rm -rf conftest*
20956   eval "ac_cv_lib_$ac_lib_var=no"
20957 fi
20958 rm -f conftest*
20959 LIBS="$ac_save_LIBS"
20960
20961 fi
20962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20963   echo "$ac_t""yes" 1>&6
20964   have_slp=yes
20965 else
20966   echo "$ac_t""no" 1>&6
20967 have_slp=no
20968 fi
20969
20970                 if test $have_slp = yes ; then
20971                         cat >> confdefs.h <<\EOF
20972 #define HAVE_SLP 1
20973 EOF
20974
20975                         SLAPD_SLP_LIBS=-lslp
20976                 fi
20977
20978         elif test $ol_enable_slp = yes ; then
20979                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20980         fi
20981 fi
20982
20983 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20984 echo "configure:20985: checking for ANSI C header files" >&5
20985 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20986   echo $ac_n "(cached) $ac_c" 1>&6
20987 else
20988   cat > conftest.$ac_ext <<EOF
20989 #line 20990 "configure"
20990 #include "confdefs.h"
20991 #include <stdlib.h>
20992 #include <stdarg.h>
20993 #include <string.h>
20994 #include <float.h>
20995 EOF
20996 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20997 { (eval echo configure:20998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20998 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20999 if test -z "$ac_err"; then
21000   rm -rf conftest*
21001   ac_cv_header_stdc=yes
21002 else
21003   echo "$ac_err" >&5
21004   echo "configure: failed program was:" >&5
21005   cat conftest.$ac_ext >&5
21006   rm -rf conftest*
21007   ac_cv_header_stdc=no
21008 fi
21009 rm -f conftest*
21010
21011 if test $ac_cv_header_stdc = yes; then
21012   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21013 cat > conftest.$ac_ext <<EOF
21014 #line 21015 "configure"
21015 #include "confdefs.h"
21016 #include <string.h>
21017 EOF
21018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21019   egrep "memchr" >/dev/null 2>&1; then
21020   :
21021 else
21022   rm -rf conftest*
21023   ac_cv_header_stdc=no
21024 fi
21025 rm -f conftest*
21026
21027 fi
21028
21029 if test $ac_cv_header_stdc = yes; then
21030   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21031 cat > conftest.$ac_ext <<EOF
21032 #line 21033 "configure"
21033 #include "confdefs.h"
21034 #include <stdlib.h>
21035 EOF
21036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21037   egrep "free" >/dev/null 2>&1; then
21038   :
21039 else
21040   rm -rf conftest*
21041   ac_cv_header_stdc=no
21042 fi
21043 rm -f conftest*
21044
21045 fi
21046
21047 if test $ac_cv_header_stdc = yes; then
21048   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21049 if test "$cross_compiling" = yes; then
21050   :
21051 else
21052   cat > conftest.$ac_ext <<EOF
21053 #line 21054 "configure"
21054 #include "confdefs.h"
21055 #include <ctype.h>
21056 #if ((' ' & 0x0FF) == 0x020)
21057 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21058 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21059 #else
21060 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21061  || ('j' <= (c) && (c) <= 'r') \
21062  || ('s' <= (c) && (c) <= 'z'))
21063 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21064 #endif
21065 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21066 int main () { int i; for (i = 0; i < 256; i++)
21067 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21068 exit (0); }
21069
21070 EOF
21071 if { (eval echo configure:21072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21072 then
21073   :
21074 else
21075   echo "configure: failed program was:" >&5
21076   cat conftest.$ac_ext >&5
21077   rm -fr conftest*
21078   ac_cv_header_stdc=no
21079 fi
21080 rm -fr conftest*
21081 fi
21082
21083 fi
21084 fi
21085
21086 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21087 if test $ac_cv_header_stdc = yes; then
21088   cat >> confdefs.h <<\EOF
21089 #define STDC_HEADERS 1
21090 EOF
21091
21092 fi
21093
21094 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21095 echo "configure:21096: checking for mode_t" >&5
21096 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21097   echo $ac_n "(cached) $ac_c" 1>&6
21098 else
21099   cat > conftest.$ac_ext <<EOF
21100 #line 21101 "configure"
21101 #include "confdefs.h"
21102 #include <sys/types.h>
21103 #if STDC_HEADERS
21104 #include <stdlib.h>
21105 #include <stddef.h>
21106 #endif
21107
21108 EOF
21109 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21110   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21111   rm -rf conftest*
21112   eval "ac_cv_type_mode_t=yes"
21113 else
21114   rm -rf conftest*
21115   eval "ac_cv_type_mode_t=no"
21116 fi
21117 rm -f conftest*
21118
21119 fi
21120 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21121   echo "$ac_t""yes" 1>&6
21122 else
21123   echo "$ac_t""no" 1>&6
21124   cat >> confdefs.h <<EOF
21125 #define mode_t int
21126 EOF
21127
21128 fi
21129
21130 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21131 echo "configure:21132: checking for off_t" >&5
21132 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21133   echo $ac_n "(cached) $ac_c" 1>&6
21134 else
21135   cat > conftest.$ac_ext <<EOF
21136 #line 21137 "configure"
21137 #include "confdefs.h"
21138 #include <sys/types.h>
21139 #if STDC_HEADERS
21140 #include <stdlib.h>
21141 #include <stddef.h>
21142 #endif
21143
21144 EOF
21145 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21146   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21147   rm -rf conftest*
21148   eval "ac_cv_type_off_t=yes"
21149 else
21150   rm -rf conftest*
21151   eval "ac_cv_type_off_t=no"
21152 fi
21153 rm -f conftest*
21154
21155 fi
21156 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21157   echo "$ac_t""yes" 1>&6
21158 else
21159   echo "$ac_t""no" 1>&6
21160   cat >> confdefs.h <<EOF
21161 #define off_t long
21162 EOF
21163
21164 fi
21165
21166 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21167 echo "configure:21168: checking for pid_t" >&5
21168 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21169   echo $ac_n "(cached) $ac_c" 1>&6
21170 else
21171   cat > conftest.$ac_ext <<EOF
21172 #line 21173 "configure"
21173 #include "confdefs.h"
21174 #include <sys/types.h>
21175 #if STDC_HEADERS
21176 #include <stdlib.h>
21177 #include <stddef.h>
21178 #endif
21179
21180 EOF
21181 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21182   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21183   rm -rf conftest*
21184   eval "ac_cv_type_pid_t=yes"
21185 else
21186   rm -rf conftest*
21187   eval "ac_cv_type_pid_t=no"
21188 fi
21189 rm -f conftest*
21190
21191 fi
21192 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21193   echo "$ac_t""yes" 1>&6
21194 else
21195   echo "$ac_t""no" 1>&6
21196   cat >> confdefs.h <<EOF
21197 #define pid_t int
21198 EOF
21199
21200 fi
21201
21202 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21203 echo "configure:21204: checking for ptrdiff_t" >&5
21204 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21205   echo $ac_n "(cached) $ac_c" 1>&6
21206 else
21207   cat > conftest.$ac_ext <<EOF
21208 #line 21209 "configure"
21209 #include "confdefs.h"
21210 #include <stddef.h>
21211 int main() {
21212 ptrdiff_t p
21213 ; return 0; }
21214 EOF
21215 if { (eval echo configure:21216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21216   rm -rf conftest*
21217   am_cv_type_ptrdiff_t=yes
21218 else
21219   echo "configure: failed program was:" >&5
21220   cat conftest.$ac_ext >&5
21221   rm -rf conftest*
21222   am_cv_type_ptrdiff_t=no
21223 fi
21224 rm -f conftest*
21225 fi
21226
21227 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21228    if test $am_cv_type_ptrdiff_t = yes; then
21229      cat >> confdefs.h <<\EOF
21230 #define HAVE_PTRDIFF_T 1
21231 EOF
21232
21233    fi
21234
21235 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21236 echo "configure:21237: checking return type of signal handlers" >&5
21237 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21238   echo $ac_n "(cached) $ac_c" 1>&6
21239 else
21240   cat > conftest.$ac_ext <<EOF
21241 #line 21242 "configure"
21242 #include "confdefs.h"
21243 #include <sys/types.h>
21244 #include <signal.h>
21245 #ifdef signal
21246 #undef signal
21247 #endif
21248 #ifdef __cplusplus
21249 extern "C" void (*signal (int, void (*)(int)))(int);
21250 #else
21251 void (*signal ()) ();
21252 #endif
21253
21254 int main() {
21255 int i;
21256 ; return 0; }
21257 EOF
21258 if { (eval echo configure:21259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21259   rm -rf conftest*
21260   ac_cv_type_signal=void
21261 else
21262   echo "configure: failed program was:" >&5
21263   cat conftest.$ac_ext >&5
21264   rm -rf conftest*
21265   ac_cv_type_signal=int
21266 fi
21267 rm -f conftest*
21268 fi
21269
21270 echo "$ac_t""$ac_cv_type_signal" 1>&6
21271 cat >> confdefs.h <<EOF
21272 #define RETSIGTYPE $ac_cv_type_signal
21273 EOF
21274
21275
21276 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21277 echo "configure:21278: checking for size_t" >&5
21278 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21279   echo $ac_n "(cached) $ac_c" 1>&6
21280 else
21281   cat > conftest.$ac_ext <<EOF
21282 #line 21283 "configure"
21283 #include "confdefs.h"
21284 #include <sys/types.h>
21285 #if STDC_HEADERS
21286 #include <stdlib.h>
21287 #include <stddef.h>
21288 #endif
21289
21290 EOF
21291 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21292   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21293   rm -rf conftest*
21294   eval "ac_cv_type_size_t=yes"
21295 else
21296   rm -rf conftest*
21297   eval "ac_cv_type_size_t=no"
21298 fi
21299 rm -f conftest*
21300
21301 fi
21302 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21303   echo "$ac_t""yes" 1>&6
21304 else
21305   echo "$ac_t""no" 1>&6
21306   cat >> confdefs.h <<EOF
21307 #define size_t unsigned
21308 EOF
21309
21310 fi
21311
21312
21313 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21314 echo "configure:21315: checking for ssize_t" >&5
21315 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21316   echo $ac_n "(cached) $ac_c" 1>&6
21317 else
21318   cat > conftest.$ac_ext <<EOF
21319 #line 21320 "configure"
21320 #include "confdefs.h"
21321 #include <sys/types.h>
21322 #if STDC_HEADERS
21323 #include <stdlib.h>
21324 #include <stddef.h>
21325 #endif
21326
21327 EOF
21328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21329   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21330   rm -rf conftest*
21331   eval "ac_cv_type_ssize_t=yes"
21332 else
21333   rm -rf conftest*
21334   eval "ac_cv_type_ssize_t=no"
21335 fi
21336 rm -f conftest*
21337
21338 fi
21339 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21340   echo "$ac_t""yes" 1>&6
21341 else
21342   echo "$ac_t""no" 1>&6
21343   cat >> confdefs.h <<EOF
21344 #define ssize_t signed int
21345 EOF
21346
21347 fi
21348
21349 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21350 echo "configure:21351: checking for caddr_t" >&5
21351 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21352   echo $ac_n "(cached) $ac_c" 1>&6
21353 else
21354   cat > conftest.$ac_ext <<EOF
21355 #line 21356 "configure"
21356 #include "confdefs.h"
21357 #include <sys/types.h>
21358 #if STDC_HEADERS
21359 #include <stdlib.h>
21360 #include <stddef.h>
21361 #endif
21362
21363 EOF
21364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21365   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21366   rm -rf conftest*
21367   eval "ac_cv_type_caddr_t=yes"
21368 else
21369   rm -rf conftest*
21370   eval "ac_cv_type_caddr_t=no"
21371 fi
21372 rm -f conftest*
21373
21374 fi
21375 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21376   echo "$ac_t""yes" 1>&6
21377 else
21378   echo "$ac_t""no" 1>&6
21379   cat >> confdefs.h <<EOF
21380 #define caddr_t char *
21381 EOF
21382
21383 fi
21384
21385
21386 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21387 echo "configure:21388: checking for socklen_t" >&5
21388 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21389   echo $ac_n "(cached) $ac_c" 1>&6
21390 else
21391   cat > conftest.$ac_ext <<EOF
21392 #line 21393 "configure"
21393 #include "confdefs.h"
21394
21395 #ifdef HAVE_SYS_TYPES_H
21396 #include <sys/types.h>
21397 #endif
21398 #ifdef HAVE_SYS_SOCKET_H
21399 #include <sys/socket.h>
21400 #endif
21401
21402 int main() {
21403 socklen_t len;
21404 ; return 0; }
21405 EOF
21406 if { (eval echo configure:21407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21407   rm -rf conftest*
21408   ol_cv_type_socklen_t=yes
21409 else
21410   echo "configure: failed program was:" >&5
21411   cat conftest.$ac_ext >&5
21412   rm -rf conftest*
21413   ol_cv_type_socklen_t=no
21414 fi
21415 rm -f conftest*
21416 fi
21417
21418 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21419   if test $ol_cv_type_socklen_t = no; then
21420     cat >> confdefs.h <<\EOF
21421 #define socklen_t int
21422 EOF
21423
21424   fi
21425  
21426 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21427 echo "configure:21428: checking for member st_blksize in aggregate type struct stat" >&5
21428 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21429   echo $ac_n "(cached) $ac_c" 1>&6
21430 else
21431   cat > conftest.$ac_ext <<EOF
21432 #line 21433 "configure"
21433 #include "confdefs.h"
21434 #include <sys/types.h>
21435 #include <sys/stat.h>
21436 int main() {
21437 struct stat foo; foo.st_blksize;
21438 ; return 0; }
21439 EOF
21440 if { (eval echo configure:21441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21441   rm -rf conftest*
21442   ac_cv_c_struct_member_st_blksize=yes
21443 else
21444   echo "configure: failed program was:" >&5
21445   cat conftest.$ac_ext >&5
21446   rm -rf conftest*
21447   ac_cv_c_struct_member_st_blksize=no
21448 fi
21449 rm -f conftest*
21450 fi
21451
21452 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21453 st_blksize="$ac_cv_c_struct_member_st_blksize"
21454 if test $ac_cv_c_struct_member_st_blksize = yes; then
21455   cat >> confdefs.h <<\EOF
21456 #define HAVE_ST_BLKSIZE 1
21457 EOF
21458
21459 fi
21460
21461 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21462 echo "configure:21463: checking whether time.h and sys/time.h may both be included" >&5
21463 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21464   echo $ac_n "(cached) $ac_c" 1>&6
21465 else
21466   cat > conftest.$ac_ext <<EOF
21467 #line 21468 "configure"
21468 #include "confdefs.h"
21469 #include <sys/types.h>
21470 #include <sys/time.h>
21471 #include <time.h>
21472 int main() {
21473 struct tm *tp;
21474 ; return 0; }
21475 EOF
21476 if { (eval echo configure:21477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21477   rm -rf conftest*
21478   ac_cv_header_time=yes
21479 else
21480   echo "configure: failed program was:" >&5
21481   cat conftest.$ac_ext >&5
21482   rm -rf conftest*
21483   ac_cv_header_time=no
21484 fi
21485 rm -f conftest*
21486 fi
21487
21488 echo "$ac_t""$ac_cv_header_time" 1>&6
21489 if test $ac_cv_header_time = yes; then
21490   cat >> confdefs.h <<\EOF
21491 #define TIME_WITH_SYS_TIME 1
21492 EOF
21493
21494 fi
21495
21496 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21497 echo "configure:21498: checking whether struct tm is in sys/time.h or time.h" >&5
21498 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21499   echo $ac_n "(cached) $ac_c" 1>&6
21500 else
21501   cat > conftest.$ac_ext <<EOF
21502 #line 21503 "configure"
21503 #include "confdefs.h"
21504 #include <sys/types.h>
21505 #include <time.h>
21506 int main() {
21507 struct tm *tp; tp->tm_sec;
21508 ; return 0; }
21509 EOF
21510 if { (eval echo configure:21511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21511   rm -rf conftest*
21512   ac_cv_struct_tm=time.h
21513 else
21514   echo "configure: failed program was:" >&5
21515   cat conftest.$ac_ext >&5
21516   rm -rf conftest*
21517   ac_cv_struct_tm=sys/time.h
21518 fi
21519 rm -f conftest*
21520 fi
21521
21522 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21523 if test $ac_cv_struct_tm = sys/time.h; then
21524   cat >> confdefs.h <<\EOF
21525 #define TM_IN_SYS_TIME 1
21526 EOF
21527
21528 fi
21529
21530 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21531 echo "configure:21532: checking for uid_t in sys/types.h" >&5
21532 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21533   echo $ac_n "(cached) $ac_c" 1>&6
21534 else
21535   cat > conftest.$ac_ext <<EOF
21536 #line 21537 "configure"
21537 #include "confdefs.h"
21538 #include <sys/types.h>
21539 EOF
21540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21541   egrep "uid_t" >/dev/null 2>&1; then
21542   rm -rf conftest*
21543   ac_cv_type_uid_t=yes
21544 else
21545   rm -rf conftest*
21546   ac_cv_type_uid_t=no
21547 fi
21548 rm -f conftest*
21549
21550 fi
21551
21552 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21553 if test $ac_cv_type_uid_t = no; then
21554   cat >> confdefs.h <<\EOF
21555 #define uid_t int
21556 EOF
21557
21558   cat >> confdefs.h <<\EOF
21559 #define gid_t int
21560 EOF
21561
21562 fi
21563
21564 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21565 echo "configure:21566: checking for sig_atomic_t" >&5
21566 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21567   echo $ac_n "(cached) $ac_c" 1>&6
21568 else
21569   cat > conftest.$ac_ext <<EOF
21570 #line 21571 "configure"
21571 #include "confdefs.h"
21572 #include <signal.h>
21573 int main() {
21574 sig_atomic_t atomic;
21575 ; return 0; }
21576 EOF
21577 if { (eval echo configure:21578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21578   rm -rf conftest*
21579   ol_cv_type_sig_atomic_t=yes
21580 else
21581   echo "configure: failed program was:" >&5
21582   cat conftest.$ac_ext >&5
21583   rm -rf conftest*
21584   ol_cv_type_sig_atomic_t=no
21585 fi
21586 rm -f conftest*
21587 fi
21588
21589 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21590   if test $ol_cv_type_sig_atomic_t = no; then
21591     cat >> confdefs.h <<\EOF
21592 #define sig_atomic_t int
21593 EOF
21594
21595   fi
21596  
21597
21598
21599 # test for pw_gecos in struct passwd
21600 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21601 echo "configure:21602: checking struct passwd for pw_gecos" >&5
21602 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21603   echo $ac_n "(cached) $ac_c" 1>&6
21604 else
21605   
21606         cat > conftest.$ac_ext <<EOF
21607 #line 21608 "configure"
21608 #include "confdefs.h"
21609 #include <pwd.h>
21610 int main() {
21611
21612         struct passwd pwd;
21613         pwd.pw_gecos = pwd.pw_name;
21614
21615 ; return 0; }
21616 EOF
21617 if { (eval echo configure:21618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21618   rm -rf conftest*
21619   ol_cv_struct_passwd_pw_gecos=yes
21620 else
21621   echo "configure: failed program was:" >&5
21622   cat conftest.$ac_ext >&5
21623   rm -rf conftest*
21624   ol_cv_struct_passwd_pw_gecos=no
21625 fi
21626 rm -f conftest*
21627 fi
21628
21629 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21630 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21631         cat >> confdefs.h <<\EOF
21632 #define HAVE_PW_GECOS 1
21633 EOF
21634
21635 fi
21636
21637 # test for pw_passwd in struct passwd
21638 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21639 echo "configure:21640: checking struct passwd for pw_passwd" >&5
21640 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21641   echo $ac_n "(cached) $ac_c" 1>&6
21642 else
21643   
21644         cat > conftest.$ac_ext <<EOF
21645 #line 21646 "configure"
21646 #include "confdefs.h"
21647 #include <pwd.h>
21648 int main() {
21649
21650         struct passwd pwd;
21651         pwd.pw_passwd = pwd.pw_name;
21652
21653 ; return 0; }
21654 EOF
21655 if { (eval echo configure:21656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21656   rm -rf conftest*
21657   ol_cv_struct_passwd_pw_passwd=yes
21658 else
21659   echo "configure: failed program was:" >&5
21660   cat conftest.$ac_ext >&5
21661   rm -rf conftest*
21662   ol_cv_struct_passwd_pw_passwd=no
21663 fi
21664 rm -f conftest*
21665 fi
21666
21667 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21668 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21669         cat >> confdefs.h <<\EOF
21670 #define HAVE_PW_PASSWD 1
21671 EOF
21672
21673 fi
21674
21675
21676 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21677 echo "configure:21678: checking if toupper() requires islower()" >&5
21678 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21679   echo $ac_n "(cached) $ac_c" 1>&6
21680 else
21681   
21682         if test "$cross_compiling" = yes; then
21683   ol_cv_c_upper_lower=safe
21684 else
21685   cat > conftest.$ac_ext <<EOF
21686 #line 21687 "configure"
21687 #include "confdefs.h"
21688
21689 #include <ctype.h>
21690 main()
21691 {
21692         if ('C' == toupper('C'))
21693                 exit(0);
21694         else
21695                 exit(1);
21696 }
21697 EOF
21698 if { (eval echo configure:21699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21699 then
21700   ol_cv_c_upper_lower=no
21701 else
21702   echo "configure: failed program was:" >&5
21703   cat conftest.$ac_ext >&5
21704   rm -fr conftest*
21705   ol_cv_c_upper_lower=yes
21706 fi
21707 rm -fr conftest*
21708 fi
21709
21710 fi
21711
21712 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21713 if test $ol_cv_c_upper_lower != no ; then
21714         cat >> confdefs.h <<\EOF
21715 #define C_UPPER_LOWER 1
21716 EOF
21717
21718 fi
21719
21720 echo $ac_n "checking for working const""... $ac_c" 1>&6
21721 echo "configure:21722: checking for working const" >&5
21722 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21723   echo $ac_n "(cached) $ac_c" 1>&6
21724 else
21725   cat > conftest.$ac_ext <<EOF
21726 #line 21727 "configure"
21727 #include "confdefs.h"
21728
21729 int main() {
21730
21731 /* Ultrix mips cc rejects this.  */
21732 typedef int charset[2]; const charset x;
21733 /* SunOS 4.1.1 cc rejects this.  */
21734 char const *const *ccp;
21735 char **p;
21736 /* NEC SVR4.0.2 mips cc rejects this.  */
21737 struct point {int x, y;};
21738 static struct point const zero = {0,0};
21739 /* AIX XL C 1.02.0.0 rejects this.
21740    It does not let you subtract one const X* pointer from another in an arm
21741    of an if-expression whose if-part is not a constant expression */
21742 const char *g = "string";
21743 ccp = &g + (g ? g-g : 0);
21744 /* HPUX 7.0 cc rejects these. */
21745 ++ccp;
21746 p = (char**) ccp;
21747 ccp = (char const *const *) p;
21748 { /* SCO 3.2v4 cc rejects this.  */
21749   char *t;
21750   char const *s = 0 ? (char *) 0 : (char const *) 0;
21751
21752   *t++ = 0;
21753 }
21754 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21755   int x[] = {25, 17};
21756   const int *foo = &x[0];
21757   ++foo;
21758 }
21759 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21760   typedef const int *iptr;
21761   iptr p = 0;
21762   ++p;
21763 }
21764 { /* AIX XL C 1.02.0.0 rejects this saying
21765      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21766   struct s { int j; const int *ap[3]; };
21767   struct s *b; b->j = 5;
21768 }
21769 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21770   const int foo = 10;
21771 }
21772
21773 ; return 0; }
21774 EOF
21775 if { (eval echo configure:21776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21776   rm -rf conftest*
21777   ac_cv_c_const=yes
21778 else
21779   echo "configure: failed program was:" >&5
21780   cat conftest.$ac_ext >&5
21781   rm -rf conftest*
21782   ac_cv_c_const=no
21783 fi
21784 rm -f conftest*
21785 fi
21786
21787 echo "$ac_t""$ac_cv_c_const" 1>&6
21788 if test $ac_cv_c_const = no; then
21789   cat >> confdefs.h <<\EOF
21790 #define const 
21791 EOF
21792
21793 fi
21794
21795 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21796 echo "configure:21797: checking if compiler understands volatile" >&5
21797 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21798   echo $ac_n "(cached) $ac_c" 1>&6
21799 else
21800   cat > conftest.$ac_ext <<EOF
21801 #line 21802 "configure"
21802 #include "confdefs.h"
21803 int x, y, z;
21804 int main() {
21805 volatile int a; int * volatile b = x ? &y : &z;
21806       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21807       *b = 0;
21808 ; return 0; }
21809 EOF
21810 if { (eval echo configure:21811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21811   rm -rf conftest*
21812   ol_cv_c_volatile=yes
21813 else
21814   echo "configure: failed program was:" >&5
21815   cat conftest.$ac_ext >&5
21816   rm -rf conftest*
21817   ol_cv_c_volatile=no
21818 fi
21819 rm -f conftest*
21820 fi
21821
21822 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21823   if test $ol_cv_c_volatile = yes; then
21824     : 
21825   else
21826     cat >> confdefs.h <<\EOF
21827 #define volatile 
21828 EOF
21829
21830   fi
21831  
21832
21833 if test $cross_compiling = yes ; then
21834         cat >> confdefs.h <<\EOF
21835 #define CROSS_COMPILING 1
21836 EOF
21837
21838 else
21839         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21840 echo "configure:21841: checking whether byte ordering is bigendian" >&5
21841 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21842   echo $ac_n "(cached) $ac_c" 1>&6
21843 else
21844   ac_cv_c_bigendian=unknown
21845 # See if sys/param.h defines the BYTE_ORDER macro.
21846 cat > conftest.$ac_ext <<EOF
21847 #line 21848 "configure"
21848 #include "confdefs.h"
21849 #include <sys/types.h>
21850 #include <sys/param.h>
21851 int main() {
21852
21853 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21854  bogus endian macros
21855 #endif
21856 ; return 0; }
21857 EOF
21858 if { (eval echo configure:21859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21859   rm -rf conftest*
21860   # It does; now see whether it defined to BIG_ENDIAN or not.
21861 cat > conftest.$ac_ext <<EOF
21862 #line 21863 "configure"
21863 #include "confdefs.h"
21864 #include <sys/types.h>
21865 #include <sys/param.h>
21866 int main() {
21867
21868 #if BYTE_ORDER != BIG_ENDIAN
21869  not big endian
21870 #endif
21871 ; return 0; }
21872 EOF
21873 if { (eval echo configure:21874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21874   rm -rf conftest*
21875   ac_cv_c_bigendian=yes
21876 else
21877   echo "configure: failed program was:" >&5
21878   cat conftest.$ac_ext >&5
21879   rm -rf conftest*
21880   ac_cv_c_bigendian=no
21881 fi
21882 rm -f conftest*
21883 else
21884   echo "configure: failed program was:" >&5
21885   cat conftest.$ac_ext >&5
21886 fi
21887 rm -f conftest*
21888 if test $ac_cv_c_bigendian = unknown; then
21889 if test "$cross_compiling" = yes; then
21890     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21891 else
21892   cat > conftest.$ac_ext <<EOF
21893 #line 21894 "configure"
21894 #include "confdefs.h"
21895 main () {
21896   /* Are we little or big endian?  From Harbison&Steele.  */
21897   union
21898   {
21899     long l;
21900     char c[sizeof (long)];
21901   } u;
21902   u.l = 1;
21903   exit (u.c[sizeof (long) - 1] == 1);
21904 }
21905 EOF
21906 if { (eval echo configure:21907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21907 then
21908   ac_cv_c_bigendian=no
21909 else
21910   echo "configure: failed program was:" >&5
21911   cat conftest.$ac_ext >&5
21912   rm -fr conftest*
21913   ac_cv_c_bigendian=yes
21914 fi
21915 rm -fr conftest*
21916 fi
21917
21918 fi
21919 fi
21920
21921 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21922 if test $ac_cv_c_bigendian = yes; then
21923   cat >> confdefs.h <<\EOF
21924 #define WORDS_BIGENDIAN 1
21925 EOF
21926
21927 fi
21928
21929 fi
21930
21931 echo $ac_n "checking size of short""... $ac_c" 1>&6
21932 echo "configure:21933: checking size of short" >&5 
21933 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21934   echo $ac_n "(cached) $ac_c" 1>&6
21935 else
21936   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21937   cat > conftest.$ac_ext <<EOF
21938 #line 21939 "configure"
21939 #include "confdefs.h"
21940 #include "confdefs.h" 
21941 #include <sys/types.h> 
21942  
21943
21944 int main() {
21945 switch (0) case 0: case (sizeof (short) == $ac_size):;
21946 ; return 0; }
21947 EOF
21948 if { (eval echo configure:21949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21949   rm -rf conftest*
21950   ac_cv_sizeof_short=$ac_size
21951 else
21952   echo "configure: failed program was:" >&5
21953   cat conftest.$ac_ext >&5
21954 fi
21955 rm -f conftest* 
21956   if test x$ac_cv_sizeof_short != x ; then break; fi 
21957 done 
21958
21959 fi
21960  
21961 if test x$ac_cv_sizeof_short = x ; then 
21962   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21963 fi 
21964 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21965 cat >> confdefs.h <<EOF
21966 #define SIZEOF_SHORT $ac_cv_sizeof_short
21967 EOF
21968  
21969  
21970 echo $ac_n "checking size of int""... $ac_c" 1>&6
21971 echo "configure:21972: checking size of int" >&5 
21972 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21973   echo $ac_n "(cached) $ac_c" 1>&6
21974 else
21975   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21976   cat > conftest.$ac_ext <<EOF
21977 #line 21978 "configure"
21978 #include "confdefs.h"
21979 #include "confdefs.h" 
21980 #include <sys/types.h> 
21981  
21982
21983 int main() {
21984 switch (0) case 0: case (sizeof (int) == $ac_size):;
21985 ; return 0; }
21986 EOF
21987 if { (eval echo configure:21988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21988   rm -rf conftest*
21989   ac_cv_sizeof_int=$ac_size
21990 else
21991   echo "configure: failed program was:" >&5
21992   cat conftest.$ac_ext >&5
21993 fi
21994 rm -f conftest* 
21995   if test x$ac_cv_sizeof_int != x ; then break; fi 
21996 done 
21997
21998 fi
21999  
22000 if test x$ac_cv_sizeof_int = x ; then 
22001   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22002 fi 
22003 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22004 cat >> confdefs.h <<EOF
22005 #define SIZEOF_INT $ac_cv_sizeof_int
22006 EOF
22007  
22008  
22009 echo $ac_n "checking size of long""... $ac_c" 1>&6
22010 echo "configure:22011: checking size of long" >&5 
22011 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22012   echo $ac_n "(cached) $ac_c" 1>&6
22013 else
22014   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22015   cat > conftest.$ac_ext <<EOF
22016 #line 22017 "configure"
22017 #include "confdefs.h"
22018 #include "confdefs.h" 
22019 #include <sys/types.h> 
22020  
22021
22022 int main() {
22023 switch (0) case 0: case (sizeof (long) == $ac_size):;
22024 ; return 0; }
22025 EOF
22026 if { (eval echo configure:22027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22027   rm -rf conftest*
22028   ac_cv_sizeof_long=$ac_size
22029 else
22030   echo "configure: failed program was:" >&5
22031   cat conftest.$ac_ext >&5
22032 fi
22033 rm -f conftest* 
22034   if test x$ac_cv_sizeof_long != x ; then break; fi 
22035 done 
22036
22037 fi
22038  
22039 if test x$ac_cv_sizeof_long = x ; then 
22040   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22041 fi 
22042 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22043 cat >> confdefs.h <<EOF
22044 #define SIZEOF_LONG $ac_cv_sizeof_long
22045 EOF
22046  
22047
22048
22049 if test "$ac_cv_sizeof_int" -lt 4 ; then
22050         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22051
22052         cat >> confdefs.h <<\EOF
22053 #define LBER_INT_T long
22054 EOF
22055
22056 else
22057         cat >> confdefs.h <<\EOF
22058 #define LBER_INT_T int
22059 EOF
22060
22061 fi
22062
22063 cat >> confdefs.h <<\EOF
22064 #define LBER_LEN_T long
22065 EOF
22066
22067 cat >> confdefs.h <<\EOF
22068 #define LBER_SOCKET_T int
22069 EOF
22070
22071 cat >> confdefs.h <<\EOF
22072 #define LBER_TAG_T long
22073 EOF
22074
22075
22076 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22077 echo "configure:22078: checking for 8-bit clean memcmp" >&5
22078 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22079   echo $ac_n "(cached) $ac_c" 1>&6
22080 else
22081   if test "$cross_compiling" = yes; then
22082   ac_cv_func_memcmp_clean=no
22083 else
22084   cat > conftest.$ac_ext <<EOF
22085 #line 22086 "configure"
22086 #include "confdefs.h"
22087
22088 main()
22089 {
22090   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22091   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22092 }
22093
22094 EOF
22095 if { (eval echo configure:22096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22096 then
22097   ac_cv_func_memcmp_clean=yes
22098 else
22099   echo "configure: failed program was:" >&5
22100   cat conftest.$ac_ext >&5
22101   rm -fr conftest*
22102   ac_cv_func_memcmp_clean=no
22103 fi
22104 rm -fr conftest*
22105 fi
22106
22107 fi
22108
22109 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22110 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22111
22112 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22113 echo "configure:22114: checking for strftime" >&5
22114 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22115   echo $ac_n "(cached) $ac_c" 1>&6
22116 else
22117   cat > conftest.$ac_ext <<EOF
22118 #line 22119 "configure"
22119 #include "confdefs.h"
22120 /* System header to define __stub macros and hopefully few prototypes,
22121     which can conflict with char strftime(); below.  */
22122 #include <assert.h>
22123 /* Override any gcc2 internal prototype to avoid an error.  */
22124 /* We use char because int might match the return type of a gcc2
22125     builtin and then its argument prototype would still apply.  */
22126 char strftime();
22127 char (*f)();
22128
22129 int main() {
22130
22131 /* The GNU C library defines this for functions which it implements
22132     to always fail with ENOSYS.  Some functions are actually named
22133     something starting with __ and the normal name is an alias.  */
22134 #if defined (__stub_strftime) || defined (__stub___strftime)
22135 choke me
22136 #else
22137 f = strftime;
22138 #endif
22139
22140 ; return 0; }
22141 EOF
22142 if { (eval echo configure:22143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22143   rm -rf conftest*
22144   eval "ac_cv_func_strftime=yes"
22145 else
22146   echo "configure: failed program was:" >&5
22147   cat conftest.$ac_ext >&5
22148   rm -rf conftest*
22149   eval "ac_cv_func_strftime=no"
22150 fi
22151 rm -f conftest*
22152 fi
22153
22154 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22155   echo "$ac_t""yes" 1>&6
22156   cat >> confdefs.h <<\EOF
22157 #define HAVE_STRFTIME 1
22158 EOF
22159
22160 else
22161   echo "$ac_t""no" 1>&6
22162 # strftime is in -lintl on SCO UNIX.
22163 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22164 echo "configure:22165: checking for strftime in -lintl" >&5
22165 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22166 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22167   echo $ac_n "(cached) $ac_c" 1>&6
22168 else
22169   ac_save_LIBS="$LIBS"
22170 LIBS="-lintl  $LIBS"
22171 cat > conftest.$ac_ext <<EOF
22172 #line 22173 "configure"
22173 #include "confdefs.h"
22174 /* Override any gcc2 internal prototype to avoid an error.  */
22175 /* We use char because int might match the return type of a gcc2
22176     builtin and then its argument prototype would still apply.  */
22177 char strftime();
22178
22179 int main() {
22180 strftime()
22181 ; return 0; }
22182 EOF
22183 if { (eval echo configure:22184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22184   rm -rf conftest*
22185   eval "ac_cv_lib_$ac_lib_var=yes"
22186 else
22187   echo "configure: failed program was:" >&5
22188   cat conftest.$ac_ext >&5
22189   rm -rf conftest*
22190   eval "ac_cv_lib_$ac_lib_var=no"
22191 fi
22192 rm -f conftest*
22193 LIBS="$ac_save_LIBS"
22194
22195 fi
22196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22197   echo "$ac_t""yes" 1>&6
22198   cat >> confdefs.h <<\EOF
22199 #define HAVE_STRFTIME 1
22200 EOF
22201
22202 LIBS="-lintl $LIBS"
22203 else
22204   echo "$ac_t""no" 1>&6
22205 fi
22206
22207 fi
22208
22209
22210 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22211 echo "configure:22212: checking for inet_aton()" >&5
22212 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22213   echo $ac_n "(cached) $ac_c" 1>&6
22214 else
22215   cat > conftest.$ac_ext <<EOF
22216 #line 22217 "configure"
22217 #include "confdefs.h"
22218
22219 #ifdef HAVE_SYS_TYPES_H
22220 #       include <sys/types.h>
22221 #endif
22222 #ifdef HAVE_SYS_SOCKET_H
22223 #       include <sys/socket.h>
22224 #       ifdef HAVE_SYS_SELECT_H
22225 #               include <sys/select.h>
22226 #       endif
22227 #       include <netinet/in.h>
22228 #       ifdef HAVE_ARPA_INET_H
22229 #               include <arpa/inet.h>
22230 #       endif
22231 #endif
22232
22233 int main() {
22234 struct in_addr in;
22235 int rc = inet_aton( "255.255.255.255", &in );
22236 ; return 0; }
22237 EOF
22238 if { (eval echo configure:22239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22239   rm -rf conftest*
22240   ol_cv_func_inet_aton=yes
22241 else
22242   echo "configure: failed program was:" >&5
22243   cat conftest.$ac_ext >&5
22244   rm -rf conftest*
22245   ol_cv_func_inet_aton=no
22246 fi
22247 rm -f conftest*
22248 fi
22249
22250 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22251   if test $ol_cv_func_inet_aton != no; then
22252     cat >> confdefs.h <<\EOF
22253 #define HAVE_INET_ATON 1
22254 EOF
22255
22256   fi
22257  
22258
22259 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22260 echo "configure:22261: checking for _spawnlp" >&5
22261 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22262   echo $ac_n "(cached) $ac_c" 1>&6
22263 else
22264   cat > conftest.$ac_ext <<EOF
22265 #line 22266 "configure"
22266 #include "confdefs.h"
22267 /* System header to define __stub macros and hopefully few prototypes,
22268     which can conflict with char _spawnlp(); below.  */
22269 #include <assert.h>
22270 /* Override any gcc2 internal prototype to avoid an error.  */
22271 /* We use char because int might match the return type of a gcc2
22272     builtin and then its argument prototype would still apply.  */
22273 char _spawnlp();
22274 char (*f)();
22275
22276 int main() {
22277
22278 /* The GNU C library defines this for functions which it implements
22279     to always fail with ENOSYS.  Some functions are actually named
22280     something starting with __ and the normal name is an alias.  */
22281 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22282 choke me
22283 #else
22284 f = _spawnlp;
22285 #endif
22286
22287 ; return 0; }
22288 EOF
22289 if { (eval echo configure:22290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22290   rm -rf conftest*
22291   eval "ac_cv_func__spawnlp=yes"
22292 else
22293   echo "configure: failed program was:" >&5
22294   cat conftest.$ac_ext >&5
22295   rm -rf conftest*
22296   eval "ac_cv_func__spawnlp=no"
22297 fi
22298 rm -f conftest*
22299 fi
22300
22301 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22302   echo "$ac_t""yes" 1>&6
22303   cat >> confdefs.h <<\EOF
22304 #define HAVE_SPAWNLP 1
22305 EOF
22306
22307 else
22308   echo "$ac_t""no" 1>&6
22309 fi
22310
22311
22312 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22313 echo "configure:22314: checking for _snprintf" >&5
22314 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22315   echo $ac_n "(cached) $ac_c" 1>&6
22316 else
22317   cat > conftest.$ac_ext <<EOF
22318 #line 22319 "configure"
22319 #include "confdefs.h"
22320 /* System header to define __stub macros and hopefully few prototypes,
22321     which can conflict with char _snprintf(); below.  */
22322 #include <assert.h>
22323 /* Override any gcc2 internal prototype to avoid an error.  */
22324 /* We use char because int might match the return type of a gcc2
22325     builtin and then its argument prototype would still apply.  */
22326 char _snprintf();
22327 char (*f)();
22328
22329 int main() {
22330
22331 /* The GNU C library defines this for functions which it implements
22332     to always fail with ENOSYS.  Some functions are actually named
22333     something starting with __ and the normal name is an alias.  */
22334 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22335 choke me
22336 #else
22337 f = _snprintf;
22338 #endif
22339
22340 ; return 0; }
22341 EOF
22342 if { (eval echo configure:22343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22343   rm -rf conftest*
22344   eval "ac_cv_func__snprintf=yes"
22345 else
22346   echo "configure: failed program was:" >&5
22347   cat conftest.$ac_ext >&5
22348   rm -rf conftest*
22349   eval "ac_cv_func__snprintf=no"
22350 fi
22351 rm -f conftest*
22352 fi
22353
22354 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22355   echo "$ac_t""yes" 1>&6
22356   ac_cv_func_snprintf=yes
22357         cat >> confdefs.h <<\EOF
22358 #define snprintf _snprintf
22359 EOF
22360
22361
22362 else
22363   echo "$ac_t""no" 1>&6
22364 fi
22365
22366
22367 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22368 echo "configure:22369: checking for _vsnprintf" >&5
22369 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22370   echo $ac_n "(cached) $ac_c" 1>&6
22371 else
22372   cat > conftest.$ac_ext <<EOF
22373 #line 22374 "configure"
22374 #include "confdefs.h"
22375 /* System header to define __stub macros and hopefully few prototypes,
22376     which can conflict with char _vsnprintf(); below.  */
22377 #include <assert.h>
22378 /* Override any gcc2 internal prototype to avoid an error.  */
22379 /* We use char because int might match the return type of a gcc2
22380     builtin and then its argument prototype would still apply.  */
22381 char _vsnprintf();
22382 char (*f)();
22383
22384 int main() {
22385
22386 /* The GNU C library defines this for functions which it implements
22387     to always fail with ENOSYS.  Some functions are actually named
22388     something starting with __ and the normal name is an alias.  */
22389 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22390 choke me
22391 #else
22392 f = _vsnprintf;
22393 #endif
22394
22395 ; return 0; }
22396 EOF
22397 if { (eval echo configure:22398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22398   rm -rf conftest*
22399   eval "ac_cv_func__vsnprintf=yes"
22400 else
22401   echo "configure: failed program was:" >&5
22402   cat conftest.$ac_ext >&5
22403   rm -rf conftest*
22404   eval "ac_cv_func__vsnprintf=no"
22405 fi
22406 rm -f conftest*
22407 fi
22408
22409 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22410   echo "$ac_t""yes" 1>&6
22411   ac_cv_func_vsnprintf=yes
22412         cat >> confdefs.h <<\EOF
22413 #define vsnprintf _vsnprintf
22414 EOF
22415
22416
22417 else
22418   echo "$ac_t""no" 1>&6
22419 fi
22420
22421
22422 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22423 echo "configure:22424: checking for vprintf" >&5
22424 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22425   echo $ac_n "(cached) $ac_c" 1>&6
22426 else
22427   cat > conftest.$ac_ext <<EOF
22428 #line 22429 "configure"
22429 #include "confdefs.h"
22430 /* System header to define __stub macros and hopefully few prototypes,
22431     which can conflict with char vprintf(); below.  */
22432 #include <assert.h>
22433 /* Override any gcc2 internal prototype to avoid an error.  */
22434 /* We use char because int might match the return type of a gcc2
22435     builtin and then its argument prototype would still apply.  */
22436 char vprintf();
22437 char (*f)();
22438
22439 int main() {
22440
22441 /* The GNU C library defines this for functions which it implements
22442     to always fail with ENOSYS.  Some functions are actually named
22443     something starting with __ and the normal name is an alias.  */
22444 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22445 choke me
22446 #else
22447 f = vprintf;
22448 #endif
22449
22450 ; return 0; }
22451 EOF
22452 if { (eval echo configure:22453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22453   rm -rf conftest*
22454   eval "ac_cv_func_vprintf=yes"
22455 else
22456   echo "configure: failed program was:" >&5
22457   cat conftest.$ac_ext >&5
22458   rm -rf conftest*
22459   eval "ac_cv_func_vprintf=no"
22460 fi
22461 rm -f conftest*
22462 fi
22463
22464 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22465   echo "$ac_t""yes" 1>&6
22466   cat >> confdefs.h <<\EOF
22467 #define HAVE_VPRINTF 1
22468 EOF
22469
22470 else
22471   echo "$ac_t""no" 1>&6
22472 fi
22473
22474 if test "$ac_cv_func_vprintf" != yes; then
22475 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22476 echo "configure:22477: checking for _doprnt" >&5
22477 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22478   echo $ac_n "(cached) $ac_c" 1>&6
22479 else
22480   cat > conftest.$ac_ext <<EOF
22481 #line 22482 "configure"
22482 #include "confdefs.h"
22483 /* System header to define __stub macros and hopefully few prototypes,
22484     which can conflict with char _doprnt(); below.  */
22485 #include <assert.h>
22486 /* Override any gcc2 internal prototype to avoid an error.  */
22487 /* We use char because int might match the return type of a gcc2
22488     builtin and then its argument prototype would still apply.  */
22489 char _doprnt();
22490 char (*f)();
22491
22492 int main() {
22493
22494 /* The GNU C library defines this for functions which it implements
22495     to always fail with ENOSYS.  Some functions are actually named
22496     something starting with __ and the normal name is an alias.  */
22497 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22498 choke me
22499 #else
22500 f = _doprnt;
22501 #endif
22502
22503 ; return 0; }
22504 EOF
22505 if { (eval echo configure:22506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22506   rm -rf conftest*
22507   eval "ac_cv_func__doprnt=yes"
22508 else
22509   echo "configure: failed program was:" >&5
22510   cat conftest.$ac_ext >&5
22511   rm -rf conftest*
22512   eval "ac_cv_func__doprnt=no"
22513 fi
22514 rm -f conftest*
22515 fi
22516
22517 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22518   echo "$ac_t""yes" 1>&6
22519   cat >> confdefs.h <<\EOF
22520 #define HAVE_DOPRNT 1
22521 EOF
22522
22523 else
22524   echo "$ac_t""no" 1>&6
22525 fi
22526
22527 fi
22528
22529
22530 if test $ac_cv_func_vprintf = yes ; then
22531                 for ac_func in snprintf vsnprintf
22532 do
22533 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22534 echo "configure:22535: checking for $ac_func" >&5
22535 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22536   echo $ac_n "(cached) $ac_c" 1>&6
22537 else
22538   cat > conftest.$ac_ext <<EOF
22539 #line 22540 "configure"
22540 #include "confdefs.h"
22541 /* System header to define __stub macros and hopefully few prototypes,
22542     which can conflict with char $ac_func(); below.  */
22543 #include <assert.h>
22544 /* Override any gcc2 internal prototype to avoid an error.  */
22545 /* We use char because int might match the return type of a gcc2
22546     builtin and then its argument prototype would still apply.  */
22547 char $ac_func();
22548 char (*f)();
22549
22550 int main() {
22551
22552 /* The GNU C library defines this for functions which it implements
22553     to always fail with ENOSYS.  Some functions are actually named
22554     something starting with __ and the normal name is an alias.  */
22555 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22556 choke me
22557 #else
22558 f = $ac_func;
22559 #endif
22560
22561 ; return 0; }
22562 EOF
22563 if { (eval echo configure:22564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22564   rm -rf conftest*
22565   eval "ac_cv_func_$ac_func=yes"
22566 else
22567   echo "configure: failed program was:" >&5
22568   cat conftest.$ac_ext >&5
22569   rm -rf conftest*
22570   eval "ac_cv_func_$ac_func=no"
22571 fi
22572 rm -f conftest*
22573 fi
22574
22575 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22576   echo "$ac_t""yes" 1>&6
22577     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22578   cat >> confdefs.h <<EOF
22579 #define $ac_tr_func 1
22580 EOF
22581  
22582 else
22583   echo "$ac_t""no" 1>&6
22584 fi
22585 done
22586
22587 fi
22588
22589 for ac_func in \
22590         bcopy                   \
22591         closesocket             \
22592         chroot                  \
22593         endgrent                \
22594         endpwent                \
22595         fcntl                   \
22596         flock                   \
22597         fstat                   \
22598         getdtablesize   \
22599         getgrgid                \
22600         gethostname             \
22601         getpass                 \
22602         getpassphrase   \
22603         getpwuid                \
22604         getpwnam                \
22605         getspnam                \
22606         gettimeofday    \
22607         initgroups              \
22608         lockf                   \
22609         memcpy                  \
22610         memmove                 \
22611         mkstemp                 \
22612         mktemp                  \
22613         pipe                    \
22614         read                    \
22615         recv                    \
22616         recvfrom                \
22617         setpwfile               \
22618         setgid                  \
22619         setegid                 \
22620         setsid                  \
22621         setuid                  \
22622         seteuid                 \
22623         sigaction               \
22624         signal                  \
22625         sigset                  \
22626         strdup                  \
22627         strerror                \
22628         strpbrk                 \
22629         strrchr                 \
22630         strsep                  \
22631         strstr                  \
22632         strtol                  \
22633         strtoul                 \
22634         strspn                  \
22635         sysconf                 \
22636         usleep                  \
22637         waitpid                 \
22638         wait4                   \
22639         write                   \
22640         send                    \
22641         sendmsg                 \
22642         sendto                  \
22643
22644 do
22645 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22646 echo "configure:22647: checking for $ac_func" >&5
22647 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22648   echo $ac_n "(cached) $ac_c" 1>&6
22649 else
22650   cat > conftest.$ac_ext <<EOF
22651 #line 22652 "configure"
22652 #include "confdefs.h"
22653 /* System header to define __stub macros and hopefully few prototypes,
22654     which can conflict with char $ac_func(); below.  */
22655 #include <assert.h>
22656 /* Override any gcc2 internal prototype to avoid an error.  */
22657 /* We use char because int might match the return type of a gcc2
22658     builtin and then its argument prototype would still apply.  */
22659 char $ac_func();
22660 char (*f)();
22661
22662 int main() {
22663
22664 /* The GNU C library defines this for functions which it implements
22665     to always fail with ENOSYS.  Some functions are actually named
22666     something starting with __ and the normal name is an alias.  */
22667 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22668 choke me
22669 #else
22670 f = $ac_func;
22671 #endif
22672
22673 ; return 0; }
22674 EOF
22675 if { (eval echo configure:22676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22676   rm -rf conftest*
22677   eval "ac_cv_func_$ac_func=yes"
22678 else
22679   echo "configure: failed program was:" >&5
22680   cat conftest.$ac_ext >&5
22681   rm -rf conftest*
22682   eval "ac_cv_func_$ac_func=no"
22683 fi
22684 rm -f conftest*
22685 fi
22686
22687 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22688   echo "$ac_t""yes" 1>&6
22689     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22690   cat >> confdefs.h <<EOF
22691 #define $ac_tr_func 1
22692 EOF
22693  
22694 else
22695   echo "$ac_t""no" 1>&6
22696 fi
22697 done
22698
22699
22700 for ac_func in getopt getpeereid
22701 do
22702 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22703 echo "configure:22704: checking for $ac_func" >&5
22704 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22705   echo $ac_n "(cached) $ac_c" 1>&6
22706 else
22707   cat > conftest.$ac_ext <<EOF
22708 #line 22709 "configure"
22709 #include "confdefs.h"
22710 /* System header to define __stub macros and hopefully few prototypes,
22711     which can conflict with char $ac_func(); below.  */
22712 #include <assert.h>
22713 /* Override any gcc2 internal prototype to avoid an error.  */
22714 /* We use char because int might match the return type of a gcc2
22715     builtin and then its argument prototype would still apply.  */
22716 char $ac_func();
22717 char (*f)();
22718
22719 int main() {
22720
22721 /* The GNU C library defines this for functions which it implements
22722     to always fail with ENOSYS.  Some functions are actually named
22723     something starting with __ and the normal name is an alias.  */
22724 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22725 choke me
22726 #else
22727 f = $ac_func;
22728 #endif
22729
22730 ; return 0; }
22731 EOF
22732 if { (eval echo configure:22733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22733   rm -rf conftest*
22734   eval "ac_cv_func_$ac_func=yes"
22735 else
22736   echo "configure: failed program was:" >&5
22737   cat conftest.$ac_ext >&5
22738   rm -rf conftest*
22739   eval "ac_cv_func_$ac_func=no"
22740 fi
22741 rm -f conftest*
22742 fi
22743
22744 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22745   echo "$ac_t""yes" 1>&6
22746     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22747   cat >> confdefs.h <<EOF
22748 #define $ac_tr_func 1
22749 EOF
22750  
22751 else
22752   echo "$ac_t""no" 1>&6
22753 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22754 fi
22755 done
22756
22757
22758
22759 if test "$ac_cv_func_getopt" != yes; then
22760         LIBSRCS="$LIBSRCS getopt.c"
22761 fi
22762 if test "$ac_cv_func_getpeereid" != yes; then
22763         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
22764 echo "configure:22765: checking for msg_accrights in msghdr" >&5
22765 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
22766   echo $ac_n "(cached) $ac_c" 1>&6
22767 else
22768   cat > conftest.$ac_ext <<EOF
22769 #line 22770 "configure"
22770 #include "confdefs.h"
22771 #include <sys/socket.h>
22772 int main() {
22773 struct msghdr m; m.msg_accrightslen=0
22774 ; return 0; }
22775 EOF
22776 if { (eval echo configure:22777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22777   rm -rf conftest*
22778   ol_cv_msghdr_msg_accrights=yes
22779 else
22780   echo "configure: failed program was:" >&5
22781   cat conftest.$ac_ext >&5
22782   rm -rf conftest*
22783   ol_cv_msghdr_msg_accrights=no
22784 fi
22785 rm -f conftest*
22786         
22787 fi
22788
22789 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
22790   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
22791         cat >> confdefs.h <<\EOF
22792 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
22793 EOF
22794
22795   fi
22796
22797         LIBSRCS="$LIBSRCS getpeereid.c"
22798 fi
22799 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22800         if test "$ac_cv_func_snprintf" != yes; then
22801                 cat >> confdefs.h <<\EOF
22802 #define snprintf ber_pvt_snprintf
22803 EOF
22804
22805         fi
22806         if test "$ac_cv_func_vsnprintf" != yes; then
22807                 cat >> confdefs.h <<\EOF
22808 #define vsnprintf ber_pvt_vsnprintf
22809 EOF
22810
22811         fi
22812 fi
22813
22814 # Check Configuration
22815 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22816 echo "configure:22817: checking declaration of sys_errlist" >&5
22817 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22818   echo $ac_n "(cached) $ac_c" 1>&6
22819 else
22820   
22821         cat > conftest.$ac_ext <<EOF
22822 #line 22823 "configure"
22823 #include "confdefs.h"
22824
22825 #include <stdio.h>
22826 #include <sys/types.h>
22827 #include <errno.h>
22828 #ifdef WINNT
22829 #include <stdlib.h>
22830 #endif 
22831 int main() {
22832 char *c = (char *) *sys_errlist
22833 ; return 0; }
22834 EOF
22835 if { (eval echo configure:22836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22836   rm -rf conftest*
22837   ol_cv_dcl_sys_errlist=yes
22838         ol_cv_have_sys_errlist=yes
22839 else
22840   echo "configure: failed program was:" >&5
22841   cat conftest.$ac_ext >&5
22842   rm -rf conftest*
22843   ol_cv_dcl_sys_errlist=no
22844 fi
22845 rm -f conftest*
22846 fi
22847
22848 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22849 #
22850 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22851 if test $ol_cv_dcl_sys_errlist = no ; then
22852         cat >> confdefs.h <<\EOF
22853 #define DECL_SYS_ERRLIST 1
22854 EOF
22855
22856
22857         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22858 echo "configure:22859: checking existence of sys_errlist" >&5
22859 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22860   echo $ac_n "(cached) $ac_c" 1>&6
22861 else
22862   
22863                 cat > conftest.$ac_ext <<EOF
22864 #line 22865 "configure"
22865 #include "confdefs.h"
22866 #include <errno.h>
22867 int main() {
22868 char *c = (char *) *sys_errlist
22869 ; return 0; }
22870 EOF
22871 if { (eval echo configure:22872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22872   rm -rf conftest*
22873   ol_cv_have_sys_errlist=yes
22874 else
22875   echo "configure: failed program was:" >&5
22876   cat conftest.$ac_ext >&5
22877   rm -rf conftest*
22878   ol_cv_have_sys_errlist=no
22879 fi
22880 rm -f conftest*
22881 fi
22882
22883 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22884 fi
22885 if test $ol_cv_have_sys_errlist = yes ; then
22886         cat >> confdefs.h <<\EOF
22887 #define HAVE_SYS_ERRLIST 1
22888 EOF
22889
22890 fi
22891
22892
22893
22894 if test "$ol_enable_debug" != no ; then
22895         cat >> confdefs.h <<\EOF
22896 #define LDAP_DEBUG 1
22897 EOF
22898
22899 fi
22900 if test "$ol_enable_syslog" = yes ; then
22901         cat >> confdefs.h <<\EOF
22902 #define LDAP_SYSLOG 1
22903 EOF
22904
22905 fi
22906 if test "$ol_link_kbind" != no ; then
22907         cat >> confdefs.h <<\EOF
22908 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22909 EOF
22910
22911 fi
22912 if test "$ol_enable_proctitle" != no ; then
22913         cat >> confdefs.h <<\EOF
22914 #define LDAP_PROCTITLE 1
22915 EOF
22916
22917 fi
22918 if test "$ol_enable_referrals" != no ; then
22919         cat >> confdefs.h <<\EOF
22920 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22921 EOF
22922
22923 fi
22924 if test "$ol_enable_local" != no; then
22925         cat >> confdefs.h <<\EOF
22926 #define LDAP_PF_LOCAL 1
22927 EOF
22928
22929 fi
22930 if test "$ol_link_ipv6" != no; then
22931         cat >> confdefs.h <<\EOF
22932 #define LDAP_PF_INET6 1
22933 EOF
22934
22935 fi
22936 if test "$ol_enable_cleartext" != no ; then
22937         cat >> confdefs.h <<\EOF
22938 #define SLAPD_CLEARTEXT 1
22939 EOF
22940
22941 fi
22942 if test "$ol_enable_crypt" != no ; then
22943         cat >> confdefs.h <<\EOF
22944 #define SLAPD_CRYPT 1
22945 EOF
22946
22947 fi
22948 if test "$ol_link_kpasswd" != no ; then
22949         cat >> confdefs.h <<\EOF
22950 #define SLAPD_KPASSWD 1
22951 EOF
22952
22953 fi
22954 if test "$ol_link_spasswd" != no ; then
22955         cat >> confdefs.h <<\EOF
22956 #define SLAPD_SPASSWD 1
22957 EOF
22958
22959 fi
22960 if test "$ol_enable_multimaster" != no ; then
22961         cat >> confdefs.h <<\EOF
22962 #define SLAPD_MULTIMASTER 1
22963 EOF
22964
22965 fi
22966 if test "$ol_enable_phonetic" != no ; then
22967         cat >> confdefs.h <<\EOF
22968 #define SLAPD_PHONETIC 1
22969 EOF
22970
22971 fi
22972 if test "$ol_enable_rlookups" != no ; then
22973         cat >> confdefs.h <<\EOF
22974 #define SLAPD_RLOOKUPS 1
22975 EOF
22976
22977 fi
22978 if test "$ol_enable_aci" != no ; then
22979         cat >> confdefs.h <<\EOF
22980 #define SLAPD_ACI_ENABLED 1
22981 EOF
22982
22983 fi
22984
22985 if test "$ol_link_modules" != no ; then
22986         cat >> confdefs.h <<\EOF
22987 #define SLAPD_MODULES 1
22988 EOF
22989
22990         BUILD_SLAPD=yes
22991         SLAPD_MODULES_LDFLAGS="-dlopen self"
22992 fi
22993
22994 if test "$ol_enable_bdb" != no ; then
22995         cat >> confdefs.h <<\EOF
22996 #define SLAPD_BDB 1
22997 EOF
22998
22999         BUILD_SLAPD=yes
23000         BUILD_BDB=yes
23001         if test "$ol_with_bdb_module" != static ; then
23002                 cat >> confdefs.h <<\EOF
23003 #define SLAPD_BDB_DYNAMIC 1
23004 EOF
23005
23006                 BUILD_BDB=mod
23007                 BUILD_BDB_DYNAMIC=shared
23008                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23009         else
23010                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23011         fi
23012 fi
23013
23014 if test "$ol_link_dnssrv" != no ; then
23015         cat >> confdefs.h <<\EOF
23016 #define SLAPD_DNSSRV 1
23017 EOF
23018
23019         BUILD_SLAPD=yes
23020         BUILD_DNSSRV=yes
23021         if test "$ol_with_dnssrv_module" != static ; then
23022                 cat >> confdefs.h <<\EOF
23023 #define SLAPD_DNSSRV_DYNAMIC 1
23024 EOF
23025
23026                 BUILD_DNSSRV=mod
23027                 BUILD_DNSSRV_DYNAMIC=shared
23028                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23029         else
23030                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23031         fi
23032 fi
23033
23034 if test "$ol_enable_ldap" != no ; then
23035         cat >> confdefs.h <<\EOF
23036 #define SLAPD_LDAP 1
23037 EOF
23038
23039         BUILD_SLAPD=yes
23040         BUILD_LDAP=yes
23041         if test "$ol_with_ldap_module" != static ; then
23042                 cat >> confdefs.h <<\EOF
23043 #define SLAPD_LDAP_DYNAMIC 1
23044 EOF
23045
23046                 BUILD_LDAP=mod
23047                 BUILD_LDAP_DYNAMIC=shared
23048                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23049         else
23050                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23051         fi
23052 fi
23053
23054 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23055         cat >> confdefs.h <<\EOF
23056 #define SLAPD_LDBM 1
23057 EOF
23058
23059         BUILD_SLAPD=yes
23060         BUILD_LDBM=yes
23061         if test "$ol_with_ldbm_module" != static ; then
23062                 cat >> confdefs.h <<\EOF
23063 #define SLAPD_LDBM_DYNAMIC 1
23064 EOF
23065
23066                 BUILD_LDBM=mod
23067                 BUILD_LDBM_DYNAMIC=shared
23068                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23069         else
23070                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23071         fi
23072 fi
23073
23074 if test "$ol_enable_meta" != no ; then
23075         if test "$ol_enable_ldap" = no ; then
23076                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23077         fi
23078         if test "$ol_enable_rewrite" = no ; then
23079                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23080         fi
23081         cat >> confdefs.h <<\EOF
23082 #define SLAPD_META 1
23083 EOF
23084
23085         BUILD_SLAPD=yes
23086         BUILD_META=yes
23087         BUILD_REWRITE=yes
23088         if test "$ol_with_meta_module" != static ; then
23089                 cat >> confdefs.h <<\EOF
23090 #define SLAPD_META_DYNAMIC 1
23091 EOF
23092
23093                 BUILD_META=mod
23094                 BUILD_META_DYNAMIC=shared
23095                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23096         else
23097                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23098         fi
23099 fi
23100
23101 if test "$ol_enable_monitor" != no ; then
23102         cat >> confdefs.h <<\EOF
23103 #define SLAPD_MONITOR 1
23104 EOF
23105
23106         BUILD_SLAPD=yes
23107         BUILD_MONITOR=yes
23108         if test "$ol_with_monitor_module" != static ; then
23109                 cat >> confdefs.h <<\EOF
23110 #define SLAPD_MONITOR_DYNAMIC 1
23111 EOF
23112
23113                 BUILD_MONITOR=mod
23114                 BUILD_MONITOR_DYNAMIC=shared
23115                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23116         else
23117                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23118         fi
23119 fi
23120
23121 if test "$ol_enable_null" != no ; then
23122         cat >> confdefs.h <<\EOF
23123 #define SLAPD_NULL 1
23124 EOF
23125
23126         BUILD_SLAPD=yes
23127         BUILD_NULL=yes
23128         if test "$ol_with_null_module" != static ; then
23129                 cat >> confdefs.h <<\EOF
23130 #define SLAPD_NULL_DYNAMIC 1
23131 EOF
23132
23133                 BUILD_NULL=mod
23134                 BUILD_NULL_DYNAMIC=shared
23135                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23136         else
23137                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23138         fi
23139 fi
23140
23141 if test "$ol_enable_passwd" != no ; then
23142         cat >> confdefs.h <<\EOF
23143 #define SLAPD_PASSWD 1
23144 EOF
23145
23146         BUILD_SLAPD=yes
23147         BUILD_PASSWD=yes
23148         if test "$ol_with_passwd_module" != static ; then
23149                 cat >> confdefs.h <<\EOF
23150 #define SLAPD_PASSWD_DYNAMIC 1
23151 EOF
23152
23153                 BUILD_PASSWD=mod
23154                 BUILD_PASSWD_DYNAMIC=shared
23155                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23156         else
23157                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23158         fi
23159 fi
23160
23161 if test "$ol_link_perl" != no ; then
23162         cat >> confdefs.h <<\EOF
23163 #define SLAPD_PERL 1
23164 EOF
23165
23166         BUILD_SLAPD=yes
23167         BUILD_PERL=yes
23168         if test "$ol_with_perl_module" != static ; then
23169                 cat >> confdefs.h <<\EOF
23170 #define SLAPD_PERL_DYNAMIC 1
23171 EOF
23172
23173                 BUILD_PERL=mod
23174                 BUILD_PERL_DYNAMIC=shared
23175                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23176         else
23177                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23178         fi
23179 fi
23180
23181 if test "$ol_enable_shell" != no ; then
23182         if test "$ol_link_thread" != no ; then
23183                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23184         fi
23185         cat >> confdefs.h <<\EOF
23186 #define SLAPD_SHELL 1
23187 EOF
23188
23189         BUILD_SLAPD=yes
23190         BUILD_SHELL=yes
23191         if test "$ol_with_shell_module" != static ; then
23192                 cat >> confdefs.h <<\EOF
23193 #define SLAPD_SHELL_DYNAMIC 1
23194 EOF
23195
23196                 BUILD_SHELL=mod
23197                 BUILD_SHELL_DYNAMIC=shared
23198                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23199         else
23200                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23201         fi
23202 fi
23203
23204 if test "$ol_link_sql" != no ; then
23205         cat >> confdefs.h <<\EOF
23206 #define SLAPD_SQL 1
23207 EOF
23208
23209         BUILD_SLAPD=yes
23210         BUILD_SQL=yes
23211         if test "$ol_with_sql_module" != static; then
23212                 cat >> confdefs.h <<\EOF
23213 #define SLAPD_SQL_DYNAMIC 1
23214 EOF
23215
23216                 BUILD_SQL=mod
23217                 BUILD_SQL_DYNAMIC=shared
23218                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23219         else
23220                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23221         fi
23222 fi
23223
23224 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23225         $BUILD_SLAPD = yes ; then
23226         BUILD_SLURPD=yes
23227 fi
23228
23229 if test "$ol_enable_rewrite" != no ; then
23230         cat >> confdefs.h <<\EOF
23231 #define ENABLE_REWRITE 1
23232 EOF
23233
23234         BUILD_REWRITE=yes
23235 fi
23236
23237
23238
23239 if test "$ac_cv_mingw32" = yes ; then
23240         PLAT=NT
23241         SLAPD_MODULES_LDFLAGS=
23242 else
23243         PLAT=UNIX
23244 fi
23245
23246 if test -z "$SLAPD_STATIC_BACKENDS"; then
23247         SLAPD_NO_STATIC='#'
23248 else
23249         SLAPD_NO_STATIC=
23250 fi
23251
23252
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 # Check whether --with-xxinstall or --without-xxinstall was given.
23317 if test "${with_xxinstall+set}" = set; then
23318   withval="$with_xxinstall"
23319   :
23320 fi
23321
23322
23323
23324 trap '' 1 2 15
23325
23326 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23327
23328 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23329 # Let make expand exec_prefix.
23330 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23331
23332 # Any assignment to VPATH causes Sun make to only execute
23333 # the first set of double-colon rules, so remove it if not needed.
23334 # If there is a colon in the path, we need to keep it.
23335 if test "x$srcdir" = x.; then
23336   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23337 fi
23338
23339 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23340
23341 DEFS=-DHAVE_CONFIG_H
23342
23343 # Without the "./", some shells look in PATH for config.status.
23344 : ${CONFIG_STATUS=./config.status}
23345
23346 echo creating $CONFIG_STATUS
23347 rm -f $CONFIG_STATUS
23348 cat > $CONFIG_STATUS <<EOF
23349 #! /bin/sh
23350 # Generated automatically by configure.
23351 # Run this file to recreate the current configuration.
23352 # This directory was configured as follows,
23353 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23354 #
23355 # $0 $ac_configure_args
23356 #
23357 # Compiler output produced by configure, useful for debugging
23358 # configure, is in ./config.log if it exists.
23359
23360 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23361 for ac_option
23362 do
23363   case "\$ac_option" in
23364   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23365     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23366     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23367   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23368     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23369     exit 0 ;;
23370   -help | --help | --hel | --he | --h)
23371     echo "\$ac_cs_usage"; exit 0 ;;
23372   *) echo "\$ac_cs_usage"; exit 1 ;;
23373   esac
23374 done
23375
23376 ac_given_srcdir=$srcdir
23377 ac_given_INSTALL="$INSTALL"
23378
23379 trap 'rm -fr `echo "\
23380 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23381 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23382 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23383 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23384 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23385 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23386 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23387 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23388 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23389 include/Makefile:build/top.mk:include/Makefile.in \
23390 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23391 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23392 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23393 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23394 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23395 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23396 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23397 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23398 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23399 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23400 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23401 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23402 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23403 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23404 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23405 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23406 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23407 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23408 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23409 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23410 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23411 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23412 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23413 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23414 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23415 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23416 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23417 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23418  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23419 EOF
23420 cat >> $CONFIG_STATUS <<EOF
23421
23422 # Protect against being on the right side of a sed subst in config.status.
23423 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23424  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23425 $ac_vpsub
23426 $extrasub
23427 s%@SHELL@%$SHELL%g
23428 s%@CFLAGS@%$CFLAGS%g
23429 s%@CPPFLAGS@%$CPPFLAGS%g
23430 s%@CXXFLAGS@%$CXXFLAGS%g
23431 s%@FFLAGS@%$FFLAGS%g
23432 s%@DEFS@%$DEFS%g
23433 s%@LDFLAGS@%$LDFLAGS%g
23434 s%@LIBS@%$LIBS%g
23435 s%@exec_prefix@%$exec_prefix%g
23436 s%@prefix@%$prefix%g
23437 s%@program_transform_name@%$program_transform_name%g
23438 s%@bindir@%$bindir%g
23439 s%@sbindir@%$sbindir%g
23440 s%@libexecdir@%$libexecdir%g
23441 s%@datadir@%$datadir%g
23442 s%@sysconfdir@%$sysconfdir%g
23443 s%@sharedstatedir@%$sharedstatedir%g
23444 s%@localstatedir@%$localstatedir%g
23445 s%@libdir@%$libdir%g
23446 s%@includedir@%$includedir%g
23447 s%@oldincludedir@%$oldincludedir%g
23448 s%@infodir@%$infodir%g
23449 s%@mandir@%$mandir%g
23450 s%@host@%$host%g
23451 s%@host_alias@%$host_alias%g
23452 s%@host_cpu@%$host_cpu%g
23453 s%@host_vendor@%$host_vendor%g
23454 s%@host_os@%$host_os%g
23455 s%@target@%$target%g
23456 s%@target_alias@%$target_alias%g
23457 s%@target_cpu@%$target_cpu%g
23458 s%@target_vendor@%$target_vendor%g
23459 s%@target_os@%$target_os%g
23460 s%@build@%$build%g
23461 s%@build_alias@%$build_alias%g
23462 s%@build_cpu@%$build_cpu%g
23463 s%@build_vendor@%$build_vendor%g
23464 s%@build_os@%$build_os%g
23465 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23466 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23467 s%@INSTALL_DATA@%$INSTALL_DATA%g
23468 s%@PACKAGE@%$PACKAGE%g
23469 s%@VERSION@%$VERSION%g
23470 s%@ACLOCAL@%$ACLOCAL%g
23471 s%@AUTOCONF@%$AUTOCONF%g
23472 s%@AUTOMAKE@%$AUTOMAKE%g
23473 s%@AUTOHEADER@%$AUTOHEADER%g
23474 s%@MAKEINFO@%$MAKEINFO%g
23475 s%@install_sh@%$install_sh%g
23476 s%@AMTAR@%$AMTAR%g
23477 s%@AWK@%$AWK%g
23478 s%@AMTARFLAGS@%$AMTARFLAGS%g
23479 s%@SET_MAKE@%$SET_MAKE%g
23480 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23481 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23482 s%@top_builddir@%$top_builddir%g
23483 s%@ldap_subdir@%$ldap_subdir%g
23484 s%@CC@%$CC%g
23485 s%@AR@%$AR%g
23486 s%@LN_S@%$LN_S%g
23487 s%@OBJEXT@%$OBJEXT%g
23488 s%@EXEEXT@%$EXEEXT%g
23489 s%@ECHO@%$ECHO%g
23490 s%@RANLIB@%$RANLIB%g
23491 s%@STRIP@%$STRIP%g
23492 s%@DLLTOOL@%$DLLTOOL%g
23493 s%@AS@%$AS%g
23494 s%@OBJDUMP@%$OBJDUMP%g
23495 s%@CPP@%$CPP%g
23496 s%@LIBTOOL@%$LIBTOOL%g
23497 s%@LN_H@%$LN_H%g
23498 s%@PERLBIN@%$PERLBIN%g
23499 s%@OL_MKDEP@%$OL_MKDEP%g
23500 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23501 s%@LTSTATIC@%$LTSTATIC%g
23502 s%@LIBOBJS@%$LIBOBJS%g
23503 s%@LIBSRCS@%$LIBSRCS%g
23504 s%@PLAT@%$PLAT%g
23505 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23506 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23507 s%@BUILD_BDB@%$BUILD_BDB%g
23508 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23509 s%@BUILD_LDAP@%$BUILD_LDAP%g
23510 s%@BUILD_LDBM@%$BUILD_LDBM%g
23511 s%@BUILD_META@%$BUILD_META%g
23512 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23513 s%@BUILD_NULL@%$BUILD_NULL%g
23514 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23515 s%@BUILD_PERL@%$BUILD_PERL%g
23516 s%@BUILD_SHELL@%$BUILD_SHELL%g
23517 s%@BUILD_SQL@%$BUILD_SQL%g
23518 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23519 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23520 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23521 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23522 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23523 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23524 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23525 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23526 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23527 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23528 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23529 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23530 s%@LDAP_LIBS@%$LDAP_LIBS%g
23531 s%@LDIF_LIBS@%$LDIF_LIBS%g
23532 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23533 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23534 s%@LDBM_LIBS@%$LDBM_LIBS%g
23535 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23536 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23537 s%@WRAP_LIBS@%$WRAP_LIBS%g
23538 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23539 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23540 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23541 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23542 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23543 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23544 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23545 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23546 s%@KRB4_LIBS@%$KRB4_LIBS%g
23547 s%@KRB5_LIBS@%$KRB5_LIBS%g
23548 s%@READLINE_LIBS@%$READLINE_LIBS%g
23549 s%@SASL_LIBS@%$SASL_LIBS%g
23550 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23551 s%@TLS_LIBS@%$TLS_LIBS%g
23552 s%@MODULES_LIBS@%$MODULES_LIBS%g
23553 s%@AUTH_LIBS@%$AUTH_LIBS%g
23554 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23555 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23556 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23557 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23558
23559 CEOF
23560 EOF
23561
23562 cat >> $CONFIG_STATUS <<\EOF
23563
23564 # Split the substitutions into bite-sized pieces for seds with
23565 # small command number limits, like on Digital OSF/1 and HP-UX.
23566 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23567 ac_file=1 # Number of current file.
23568 ac_beg=1 # First line for current file.
23569 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23570 ac_more_lines=:
23571 ac_sed_cmds=""
23572 while $ac_more_lines; do
23573   if test $ac_beg -gt 1; then
23574     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23575   else
23576     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23577   fi
23578   if test ! -s conftest.s$ac_file; then
23579     ac_more_lines=false
23580     rm -f conftest.s$ac_file
23581   else
23582     if test -z "$ac_sed_cmds"; then
23583       ac_sed_cmds="sed -f conftest.s$ac_file"
23584     else
23585       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23586     fi
23587     ac_file=`expr $ac_file + 1`
23588     ac_beg=$ac_end
23589     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23590   fi
23591 done
23592 if test -z "$ac_sed_cmds"; then
23593   ac_sed_cmds=cat
23594 fi
23595 EOF
23596
23597 cat >> $CONFIG_STATUS <<EOF
23598
23599 CONFIG_FILES=\${CONFIG_FILES-"\
23600 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23601 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23602 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23603 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23604 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23605 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23606 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23607 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23608 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23609 include/Makefile:build/top.mk:include/Makefile.in \
23610 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23611 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23612 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23613 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23614 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23615 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23616 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23617 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23618 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23619 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23620 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23621 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23622 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23623 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23624 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23625 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23626 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23627 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23628 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23629 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23630 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23631 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23632 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23633 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23634 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23635 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23636 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23637 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23638 "}
23639 EOF
23640 cat >> $CONFIG_STATUS <<\EOF
23641 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23642   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23643   case "$ac_file" in
23644   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23645        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23646   *) ac_file_in="${ac_file}.in" ;;
23647   esac
23648
23649   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23650
23651   # Remove last slash and all that follows it.  Not all systems have dirname.
23652   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23653   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23654     # The file is in a subdirectory.
23655     test ! -d "$ac_dir" && mkdir "$ac_dir"
23656     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23657     # A "../" for each directory in $ac_dir_suffix.
23658     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23659   else
23660     ac_dir_suffix= ac_dots=
23661   fi
23662
23663   case "$ac_given_srcdir" in
23664   .)  srcdir=.
23665       if test -z "$ac_dots"; then top_srcdir=.
23666       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23667   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23668   *) # Relative path.
23669     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23670     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23671   esac
23672
23673   case "$ac_given_INSTALL" in
23674   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23675   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23676   esac
23677
23678   echo creating "$ac_file"
23679   rm -f "$ac_file"
23680   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23681   case "$ac_file" in
23682   *[Mm]akefile*) ac_comsub="1i\\
23683 # $configure_input" ;;
23684   *) ac_comsub= ;;
23685   esac
23686
23687   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23688   sed -e "$ac_comsub
23689 s%@configure_input@%$configure_input%g
23690 s%@srcdir@%$srcdir%g
23691 s%@top_srcdir@%$top_srcdir%g
23692 s%@INSTALL@%$INSTALL%g
23693 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23694 fi; done
23695 rm -f conftest.s*
23696
23697 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23698 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23699 #
23700 # ac_d sets the value in "#define NAME VALUE" lines.
23701 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23702 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23703 ac_dC='\3'
23704 ac_dD='%g'
23705 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23706 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23707 ac_uB='\([      ]\)%\1#\2define\3'
23708 ac_uC=' '
23709 ac_uD='\4%g'
23710 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23711 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23712 ac_eB='$%\1#\2define\3'
23713 ac_eC=' '
23714 ac_eD='%g'
23715
23716 if test "${CONFIG_HEADERS+set}" != set; then
23717 EOF
23718 cat >> $CONFIG_STATUS <<EOF
23719   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23720 EOF
23721 cat >> $CONFIG_STATUS <<\EOF
23722 fi
23723 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23724   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23725   case "$ac_file" in
23726   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23727        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23728   *) ac_file_in="${ac_file}.in" ;;
23729   esac
23730
23731   echo creating $ac_file
23732
23733   rm -f conftest.frag conftest.in conftest.out
23734   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23735   cat $ac_file_inputs > conftest.in
23736
23737 EOF
23738
23739 # Transform confdefs.h into a sed script conftest.vals that substitutes
23740 # the proper values into config.h.in to produce config.h.  And first:
23741 # Protect against being on the right side of a sed subst in config.status.
23742 # Protect against being in an unquoted here document in config.status.
23743 rm -f conftest.vals
23744 cat > conftest.hdr <<\EOF
23745 s/[\\&%]/\\&/g
23746 s%[\\$`]%\\&%g
23747 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23748 s%ac_d%ac_u%gp
23749 s%ac_u%ac_e%gp
23750 EOF
23751 sed -n -f conftest.hdr confdefs.h > conftest.vals
23752 rm -f conftest.hdr
23753
23754 # This sed command replaces #undef with comments.  This is necessary, for
23755 # example, in the case of _POSIX_SOURCE, which is predefined and required
23756 # on some systems where configure will not decide to define it.
23757 cat >> conftest.vals <<\EOF
23758 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23759 EOF
23760
23761 # Break up conftest.vals because some shells have a limit on
23762 # the size of here documents, and old seds have small limits too.
23763
23764 rm -f conftest.tail
23765 while :
23766 do
23767   ac_lines=`grep -c . conftest.vals`
23768   # grep -c gives empty output for an empty file on some AIX systems.
23769   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23770   # Write a limited-size here document to conftest.frag.
23771   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23772   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23773   echo 'CEOF
23774   sed -f conftest.frag conftest.in > conftest.out
23775   rm -f conftest.in
23776   mv conftest.out conftest.in
23777 ' >> $CONFIG_STATUS
23778   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23779   rm -f conftest.vals
23780   mv conftest.tail conftest.vals
23781 done
23782 rm -f conftest.vals
23783
23784 cat >> $CONFIG_STATUS <<\EOF
23785   rm -f conftest.frag conftest.h
23786   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23787   cat conftest.in >> conftest.h
23788   rm -f conftest.in
23789   if cmp -s $ac_file conftest.h 2>/dev/null; then
23790     echo "$ac_file is unchanged"
23791     rm -f conftest.h
23792   else
23793     # Remove last slash and all that follows it.  Not all systems have dirname.
23794       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23795       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23796       # The file is in a subdirectory.
23797       test ! -d "$ac_dir" && mkdir "$ac_dir"
23798     fi
23799     rm -f $ac_file
23800     mv conftest.h $ac_file
23801   fi
23802 fi; done
23803
23804 EOF
23805 cat >> $CONFIG_STATUS <<EOF
23806
23807 EOF
23808 cat >> $CONFIG_STATUS <<\EOF
23809
23810 date > stamp-h
23811 echo Please run \"make depend\" to build dependencies
23812
23813 exit 0
23814 EOF
23815 chmod +x $CONFIG_STATUS
23816 rm -fr confdefs* $ac_clean_files
23817 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23818