]> git.sur5r.net Git - openldap/blob - configure
unifdef LDAP_SYNC and LDAP_SYNCREPL
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.480 2003/06/21 16:46:20 kurt Exp  
4
5 # Copyright 1998-2003 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2003 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
34 ac_help="$ac_help
35   --enable-syslog         enable syslog support [auto]"
36 ac_help="$ac_help
37   --enable-proctitle      enable proctitle support [yes]"
38 ac_help="$ac_help
39   --enable-ipv6           enable IPv6 support [auto]"
40 ac_help="$ac_help
41   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
42 ac_help="$ac_help
43   --enable-x-compile      enable cross compiling [no]"
44 ac_help="$ac_help
45   --with-cyrus-sasl       with Cyrus SASL support [auto]"
46 ac_help="$ac_help
47   --with-fetch            with fetch(3) URL support [auto]"
48 ac_help="$ac_help
49   --with-kerberos         with Kerberos support [auto]"
50 ac_help="$ac_help
51   --with-threads          with threads [auto]"
52 ac_help="$ac_help
53   --with-tls              with TLS/SSL support [auto]"
54 ac_help="$ac_help
55   --with-yielding-select  with implicitly yielding select [auto]"
56 ac_help="$ac_help
57
58 SLAPD (Standalone LDAP Daemon) Options:"
59 ac_help="$ac_help
60   --enable-slapd          enable building slapd [yes]"
61 ac_help="$ac_help
62     --enable-aci          enable per-object ACIs (experimental) [no]"
63 ac_help="$ac_help
64     --enable-cleartext    enable cleartext passwords [yes]"
65 ac_help="$ac_help
66     --enable-crypt        enable crypt(3) passwords [no]"
67 ac_help="$ac_help
68     --enable-kpasswd      enable Kerberos password verification [no]"
69 ac_help="$ac_help
70     --enable-lmpasswd     enable LAN Manager passwords [no]"
71 ac_help="$ac_help
72     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
73 ac_help="$ac_help
74     --enable-modules      enable dynamic module support [no]"
75 ac_help="$ac_help
76     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
77 ac_help="$ac_help
78     --enable-rlookups     enable reverse lookups of client hostnames [no]"
79 ac_help="$ac_help
80     --enable-slapi        enable SLAPI support (experimental) [no]"
81 ac_help="$ac_help
82     --enable-slp          enable SLPv2 support [no]"
83 ac_help="$ac_help
84     --enable-wrappers     enable tcp wrapper support [no]"
85 ac_help="$ac_help
86     --enable-bdb          enable Berkeley DB backend [yes]"
87 ac_help="$ac_help
88     --with-bdb-module     module type static|dynamic [static]"
89 ac_help="$ac_help
90     --enable-dnssrv       enable dnssrv backend [no]"
91 ac_help="$ac_help
92     --with-dnssrv-module  module type static|dynamic [static]"
93 ac_help="$ac_help
94     --enable-hdb          enable Hierarchical DB backend [no]"
95 ac_help="$ac_help
96     --with-hdb-module     module type static|dynamic [static]"
97 ac_help="$ac_help
98     --enable-ldap         enable ldap backend [no]"
99 ac_help="$ac_help
100     --with-ldap-module    module type static|dynamic [static]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend [no]"
103 ac_help="$ac_help
104     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
105 ac_help="$ac_help
106     --with-ldbm-module    module type static|dynamic [static]"
107 ac_help="$ac_help
108     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
109 ac_help="$ac_help
110     --enable-meta         enable metadirectory backend [no]"
111 ac_help="$ac_help
112     --with-meta-module    module type static|dynamic [static]"
113 ac_help="$ac_help
114     --enable-monitor      enable monitor backend [no]"
115 ac_help="$ac_help
116     --with-monitor-module module type static|dynamic [static]"
117 ac_help="$ac_help
118     --enable-null         enable null backend [no]"
119 ac_help="$ac_help
120     --with-null-module    module type static|dynamic [static]"
121 ac_help="$ac_help
122     --enable-passwd       enable passwd backend [no]"
123 ac_help="$ac_help
124     --with-passwd-module  module type static|dynamic [static]"
125 ac_help="$ac_help
126     --enable-perl         enable perl backend [no]"
127 ac_help="$ac_help
128     --with-perl-module    module type static|dynamic [static]"
129 ac_help="$ac_help
130     --enable-shell        enable shell backend [no]"
131 ac_help="$ac_help
132     --with-shell-module   module type static|dynamic [static]"
133 ac_help="$ac_help
134     --enable-sql          enable sql backend [no]"
135 ac_help="$ac_help
136     --with-sql-module     module type static|dynamic [static]"
137 ac_help="$ac_help
138     --enable-tcl          enable tcl backend [no]"
139 ac_help="$ac_help
140     --with-tcl-module     module type static|dynamic [static]"
141 ac_help="$ac_help
142
143 SLURPD (Replication Daemon) Options:"
144 ac_help="$ac_help
145   --enable-slurpd         enable building slurpd [auto]"
146 ac_help="$ac_help
147
148 Library Generation & Linking Options"
149 ac_help="$ac_help
150   --enable-static[=PKGS]  build static libraries [default=yes]"
151 ac_help="$ac_help
152   --enable-shared[=PKGS]  build shared libraries [default=yes]"
153 ac_help="$ac_help
154   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
155 ac_help="$ac_help
156   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
157
158 # Find the correct PATH separator.  Usually this is `:', but
159 # DJGPP uses `;' like DOS.
160 if test "X${PATH_SEPARATOR+set}" != Xset; then
161   UNAME=${UNAME-`uname 2>/dev/null`}
162   case X$UNAME in
163     *-DOS) lt_cv_sys_path_separator=';' ;;
164     *)     lt_cv_sys_path_separator=':' ;;
165   esac
166   PATH_SEPARATOR=$lt_cv_sys_path_separator
167 fi
168
169
170 # Check that we are running under the correct shell.
171 SHELL=${CONFIG_SHELL-/bin/sh}
172
173 case X$ECHO in
174 X*--fallback-echo)
175   # Remove one level of quotation (which was required for Make).
176   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
177   ;;
178 esac
179
180 echo=${ECHO-echo}
181 if test "X$1" = X--no-reexec; then
182   # Discard the --no-reexec flag, and continue.
183   shift
184 elif test "X$1" = X--fallback-echo; then
185   # Avoid inline document here, it may be left over
186   :
187 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
188   # Yippee, $echo works!
189   :
190 else
191   # Restart under the correct shell.
192   exec $SHELL "$0" --no-reexec ${1+"$@"}
193 fi
194
195 if test "X$1" = X--fallback-echo; then
196   # used as fallback echo
197   shift
198   cat <<EOF
199
200 EOF
201   exit 0
202 fi
203
204 # The HP-UX ksh and POSIX shell print the target directory to stdout
205 # if CDPATH is set.
206 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
207
208 if test -z "$ECHO"; then
209 if test "X${echo_test_string+set}" != Xset; then
210 # find a string as large as possible, as long as the shell can cope with it
211   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
212     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
213     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
214        echo_test_string="`eval $cmd`" &&
215        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
216     then
217       break
218     fi
219   done
220 fi
221
222 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
223    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
224    test "X$echo_testing_string" = "X$echo_test_string"; then
225   :
226 else
227   # The Solaris, AIX, and Digital Unix default echo programs unquote
228   # backslashes.  This makes it impossible to quote backslashes using
229   #   echo "$something" | sed 's/\\/\\\\/g'
230   #
231   # So, first we look for a working echo in the user's PATH.
232
233   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
234   for dir in $PATH /usr/ucb; do
235     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
236        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
237        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
238        test "X$echo_testing_string" = "X$echo_test_string"; then
239       echo="$dir/echo"
240       break
241     fi
242   done
243   IFS="$save_ifs"
244
245   if test "X$echo" = Xecho; then
246     # We didn't find a better echo, so look for alternatives.
247     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
248        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
249        test "X$echo_testing_string" = "X$echo_test_string"; then
250       # This shell has a builtin print -r that does the trick.
251       echo='print -r'
252     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
253          test "X$CONFIG_SHELL" != X/bin/ksh; then
254       # If we have ksh, try running configure again with it.
255       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
256       export ORIGINAL_CONFIG_SHELL
257       CONFIG_SHELL=/bin/ksh
258       export CONFIG_SHELL
259       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
260     else
261       # Try using printf.
262       echo='printf %s\n'
263       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
264          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
265          test "X$echo_testing_string" = "X$echo_test_string"; then
266         # Cool, printf works
267         :
268       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
269            test "X$echo_testing_string" = 'X\t' &&
270            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
271            test "X$echo_testing_string" = "X$echo_test_string"; then
272         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
273         export CONFIG_SHELL
274         SHELL="$CONFIG_SHELL"
275         export SHELL
276         echo="$CONFIG_SHELL $0 --fallback-echo"
277       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
278            test "X$echo_testing_string" = 'X\t' &&
279            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
280            test "X$echo_testing_string" = "X$echo_test_string"; then
281         echo="$CONFIG_SHELL $0 --fallback-echo"
282       else
283         # maybe with a smaller string...
284         prev=:
285
286         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
287           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
288           then
289             break
290           fi
291           prev="$cmd"
292         done
293
294         if test "$prev" != 'sed 50q "$0"'; then
295           echo_test_string=`eval $prev`
296           export echo_test_string
297           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
298         else
299           # Oops.  We lost completely, so just stick with echo.
300           echo=echo
301         fi
302       fi
303     fi
304   fi
305 fi
306 fi
307
308 # Copy echo and quote the copy suitably for passing to libtool from
309 # the Makefile, instead of quoting the original, which is used later.
310 ECHO=$echo
311 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
312    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
313 fi
314
315
316 ac_help="$ac_help
317   --disable-libtool-lock  avoid locking (might break parallel builds)"
318 ac_help="$ac_help
319   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
320 ac_help="$ac_help
321
322 See INSTALL file for further details."
323
324 # Initialize some variables set by options.
325 # The variables have the same names as the options, with
326 # dashes changed to underlines.
327 build=NONE
328 cache_file=./config.cache
329 exec_prefix=NONE
330 host=NONE
331 no_create=
332 nonopt=NONE
333 no_recursion=
334 prefix=NONE
335 program_prefix=NONE
336 program_suffix=NONE
337 program_transform_name=s,x,x,
338 silent=
339 site=
340 srcdir=
341 target=NONE
342 verbose=
343 x_includes=NONE
344 x_libraries=NONE
345 bindir='${exec_prefix}/bin'
346 sbindir='${exec_prefix}/sbin'
347 libexecdir='${exec_prefix}/libexec'
348 datadir='${prefix}/share'
349 sysconfdir='${prefix}/etc'
350 sharedstatedir='${prefix}/com'
351 localstatedir='${prefix}/var'
352 libdir='${exec_prefix}/lib'
353 includedir='${prefix}/include'
354 oldincludedir='/usr/include'
355 infodir='${prefix}/info'
356 mandir='${prefix}/man'
357
358 # Initialize some other variables.
359 subdirs=
360 MFLAGS= MAKEFLAGS=
361 SHELL=${CONFIG_SHELL-/bin/sh}
362 # Maximum number of lines to put in a shell here document.
363 ac_max_here_lines=12
364
365 ac_prev=
366 for ac_option
367 do
368
369   # If the previous option needs an argument, assign it.
370   if test -n "$ac_prev"; then
371     eval "$ac_prev=\$ac_option"
372     ac_prev=
373     continue
374   fi
375
376   case "$ac_option" in
377   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
378   *) ac_optarg= ;;
379   esac
380
381   # Accept the important Cygnus configure options, so we can diagnose typos.
382
383   case "$ac_option" in
384
385   -bindir | --bindir | --bindi | --bind | --bin | --bi)
386     ac_prev=bindir ;;
387   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
388     bindir="$ac_optarg" ;;
389
390   -build | --build | --buil | --bui | --bu)
391     ac_prev=build ;;
392   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
393     build="$ac_optarg" ;;
394
395   -cache-file | --cache-file | --cache-fil | --cache-fi \
396   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
397     ac_prev=cache_file ;;
398   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
399   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
400     cache_file="$ac_optarg" ;;
401
402   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
403     ac_prev=datadir ;;
404   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
405   | --da=*)
406     datadir="$ac_optarg" ;;
407
408   -disable-* | --disable-*)
409     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
410     # Reject names that are not valid shell variable names.
411     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
412       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
413     fi
414     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
415     eval "enable_${ac_feature}=no" ;;
416
417   -enable-* | --enable-*)
418     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
419     # Reject names that are not valid shell variable names.
420     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
421       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
422     fi
423     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
424     case "$ac_option" in
425       *=*) ;;
426       *) ac_optarg=yes ;;
427     esac
428     eval "enable_${ac_feature}='$ac_optarg'" ;;
429
430   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
431   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
432   | --exec | --exe | --ex)
433     ac_prev=exec_prefix ;;
434   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
435   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
436   | --exec=* | --exe=* | --ex=*)
437     exec_prefix="$ac_optarg" ;;
438
439   -gas | --gas | --ga | --g)
440     # Obsolete; use --with-gas.
441     with_gas=yes ;;
442
443   -help | --help | --hel | --he)
444     # Omit some internal or obsolete options to make the list less imposing.
445     # This message is too long to be a string in the A/UX 3.1 sh.
446     cat << EOF
447 Usage: configure [options] [host]
448 Options: [defaults in brackets after descriptions]
449 Configuration:
450   --cache-file=FILE       cache test results in FILE
451   --help                  print this message
452   --no-create             do not create output files
453   --quiet, --silent       do not print \`checking...' messages
454   --version               print the version of autoconf that created configure
455 Directory and file names:
456   --prefix=PREFIX         install architecture-independent files in PREFIX
457                           [$ac_default_prefix]
458   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
459                           [same as prefix]
460   --bindir=DIR            user executables in DIR [EPREFIX/bin]
461   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
462   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
463   --datadir=DIR           read-only architecture-independent data in DIR
464                           [PREFIX/share]
465   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
466   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
467                           [PREFIX/com]
468   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
469   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
470   --includedir=DIR        C header files in DIR [PREFIX/include]
471   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
472   --infodir=DIR           info documentation in DIR [PREFIX/info]
473   --mandir=DIR            man documentation in DIR [PREFIX/man]
474   --srcdir=DIR            find the sources in DIR [configure dir or ..]
475   --program-prefix=PREFIX prepend PREFIX to installed program names
476   --program-suffix=SUFFIX append SUFFIX to installed program names
477   --program-transform-name=PROGRAM
478                           run sed PROGRAM on installed program names
479 EOF
480     cat << EOF
481 Host type:
482   --build=BUILD           configure for building on BUILD [BUILD=HOST]
483   --host=HOST             configure for HOST [guessed]
484   --target=TARGET         configure for TARGET [TARGET=HOST]
485 Features and packages:
486   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
487   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
488   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
489   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
490   --x-includes=DIR        X include files are in DIR
491   --x-libraries=DIR       X library files are in DIR
492 EOF
493     if test -n "$ac_help"; then
494       echo "--enable and --with options recognized:$ac_help"
495     fi
496     exit 0 ;;
497
498   -host | --host | --hos | --ho)
499     ac_prev=host ;;
500   -host=* | --host=* | --hos=* | --ho=*)
501     host="$ac_optarg" ;;
502
503   -includedir | --includedir | --includedi | --included | --include \
504   | --includ | --inclu | --incl | --inc)
505     ac_prev=includedir ;;
506   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
507   | --includ=* | --inclu=* | --incl=* | --inc=*)
508     includedir="$ac_optarg" ;;
509
510   -infodir | --infodir | --infodi | --infod | --info | --inf)
511     ac_prev=infodir ;;
512   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
513     infodir="$ac_optarg" ;;
514
515   -libdir | --libdir | --libdi | --libd)
516     ac_prev=libdir ;;
517   -libdir=* | --libdir=* | --libdi=* | --libd=*)
518     libdir="$ac_optarg" ;;
519
520   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
521   | --libexe | --libex | --libe)
522     ac_prev=libexecdir ;;
523   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
524   | --libexe=* | --libex=* | --libe=*)
525     libexecdir="$ac_optarg" ;;
526
527   -localstatedir | --localstatedir | --localstatedi | --localstated \
528   | --localstate | --localstat | --localsta | --localst \
529   | --locals | --local | --loca | --loc | --lo)
530     ac_prev=localstatedir ;;
531   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
532   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
533   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
534     localstatedir="$ac_optarg" ;;
535
536   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
537     ac_prev=mandir ;;
538   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
539     mandir="$ac_optarg" ;;
540
541   -nfp | --nfp | --nf)
542     # Obsolete; use --without-fp.
543     with_fp=no ;;
544
545   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
546   | --no-cr | --no-c)
547     no_create=yes ;;
548
549   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
550   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
551     no_recursion=yes ;;
552
553   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
554   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
555   | --oldin | --oldi | --old | --ol | --o)
556     ac_prev=oldincludedir ;;
557   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
558   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
559   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
560     oldincludedir="$ac_optarg" ;;
561
562   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
563     ac_prev=prefix ;;
564   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
565     prefix="$ac_optarg" ;;
566
567   -program-prefix | --program-prefix | --program-prefi | --program-pref \
568   | --program-pre | --program-pr | --program-p)
569     ac_prev=program_prefix ;;
570   -program-prefix=* | --program-prefix=* | --program-prefi=* \
571   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
572     program_prefix="$ac_optarg" ;;
573
574   -program-suffix | --program-suffix | --program-suffi | --program-suff \
575   | --program-suf | --program-su | --program-s)
576     ac_prev=program_suffix ;;
577   -program-suffix=* | --program-suffix=* | --program-suffi=* \
578   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
579     program_suffix="$ac_optarg" ;;
580
581   -program-transform-name | --program-transform-name \
582   | --program-transform-nam | --program-transform-na \
583   | --program-transform-n | --program-transform- \
584   | --program-transform | --program-transfor \
585   | --program-transfo | --program-transf \
586   | --program-trans | --program-tran \
587   | --progr-tra | --program-tr | --program-t)
588     ac_prev=program_transform_name ;;
589   -program-transform-name=* | --program-transform-name=* \
590   | --program-transform-nam=* | --program-transform-na=* \
591   | --program-transform-n=* | --program-transform-=* \
592   | --program-transform=* | --program-transfor=* \
593   | --program-transfo=* | --program-transf=* \
594   | --program-trans=* | --program-tran=* \
595   | --progr-tra=* | --program-tr=* | --program-t=*)
596     program_transform_name="$ac_optarg" ;;
597
598   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
599   | -silent | --silent | --silen | --sile | --sil)
600     silent=yes ;;
601
602   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
603     ac_prev=sbindir ;;
604   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
605   | --sbi=* | --sb=*)
606     sbindir="$ac_optarg" ;;
607
608   -sharedstatedir | --sharedstatedir | --sharedstatedi \
609   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
610   | --sharedst | --shareds | --shared | --share | --shar \
611   | --sha | --sh)
612     ac_prev=sharedstatedir ;;
613   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
614   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
615   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
616   | --sha=* | --sh=*)
617     sharedstatedir="$ac_optarg" ;;
618
619   -site | --site | --sit)
620     ac_prev=site ;;
621   -site=* | --site=* | --sit=*)
622     site="$ac_optarg" ;;
623
624   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
625     ac_prev=srcdir ;;
626   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
627     srcdir="$ac_optarg" ;;
628
629   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
630   | --syscon | --sysco | --sysc | --sys | --sy)
631     ac_prev=sysconfdir ;;
632   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
633   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
634     sysconfdir="$ac_optarg" ;;
635
636   -target | --target | --targe | --targ | --tar | --ta | --t)
637     ac_prev=target ;;
638   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
639     target="$ac_optarg" ;;
640
641   -v | -verbose | --verbose | --verbos | --verbo | --verb)
642     verbose=yes ;;
643
644   -version | --version | --versio | --versi | --vers)
645     echo "configure generated by autoconf version 2.13.1"
646     exit 0 ;;
647
648   -with-* | --with-*)
649     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
650     # Reject names that are not valid shell variable names.
651     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
652       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
653     fi
654     ac_package=`echo $ac_package| sed 's/-/_/g'`
655     case "$ac_option" in
656       *=*) ;;
657       *) ac_optarg=yes ;;
658     esac
659     eval "with_${ac_package}='$ac_optarg'" ;;
660
661   -without-* | --without-*)
662     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
663     # Reject names that are not valid shell variable names.
664     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
665       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
666     fi
667     ac_package=`echo $ac_package| sed 's/-/_/g'`
668     eval "with_${ac_package}=no" ;;
669
670   --x)
671     # Obsolete; use --with-x.
672     with_x=yes ;;
673
674   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
675   | --x-incl | --x-inc | --x-in | --x-i)
676     ac_prev=x_includes ;;
677   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
678   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
679     x_includes="$ac_optarg" ;;
680
681   -x-libraries | --x-libraries | --x-librarie | --x-librari \
682   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
683     ac_prev=x_libraries ;;
684   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
685   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
686     x_libraries="$ac_optarg" ;;
687
688   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
689     ;;
690
691   *)
692     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
693       echo "configure: warning: $ac_option: invalid host type" 1>&2
694     fi
695     if test "x$nonopt" != xNONE; then
696       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
697     fi
698     nonopt="$ac_option"
699     ;;
700
701   esac
702 done
703
704 if test -n "$ac_prev"; then
705   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
706 fi
707
708 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
709
710 # File descriptor usage:
711 # 0 standard input
712 # 1 file creation
713 # 2 errors and warnings
714 # 3 some systems may open it to /dev/tty
715 # 4 used on the Kubota Titan
716 # 6 checking for... messages and results
717 # 5 compiler messages saved in config.log
718 if test "$silent" = yes; then
719   exec 6>/dev/null
720 else
721   exec 6>&1
722 fi
723 exec 5>./config.log
724
725 echo "\
726 This file contains any messages produced by compilers while
727 running configure, to aid debugging if configure makes a mistake.
728 " 1>&5
729
730 # Strip out --no-create and --no-recursion so they do not pile up.
731 # Also quote any args containing shell metacharacters.
732 ac_configure_args=
733 for ac_arg
734 do
735   case "$ac_arg" in
736   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
737   | --no-cr | --no-c) ;;
738   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
739   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
740   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
741   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
742   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
743   esac
744 done
745
746 # NLS nuisances.
747 # Only set these to C if already set.  These must not be set unconditionally
748 # because not all systems understand e.g. LANG=C (notably SCO).
749 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
750 # Non-C LC_CTYPE values break the ctype check.
751 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
752 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
753 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
754 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
755
756 # confdefs.h avoids OS command line length limits that DEFS can exceed.
757 rm -rf conftest* confdefs.h
758 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
759 echo > confdefs.h
760
761 # A filename unique to this package, relative to the directory that
762 # configure is in, which we can look for to find out if srcdir is correct.
763 ac_unique_file=build/version.sh
764
765 # Find the source files, if location was not specified.
766 if test -z "$srcdir"; then
767   ac_srcdir_defaulted=yes
768   # Try the directory containing this script, then its parent.
769   ac_prog=$0
770   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
771   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
772   srcdir=$ac_confdir
773   if test ! -r $srcdir/$ac_unique_file; then
774     srcdir=..
775   fi
776 else
777   ac_srcdir_defaulted=no
778 fi
779 if test ! -r $srcdir/$ac_unique_file; then
780   if test "$ac_srcdir_defaulted" = yes; then
781     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
782   else
783     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
784   fi
785 fi
786 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
787
788 # Prefer explicitly selected file to automatically selected ones.
789 if test -z "$CONFIG_SITE"; then
790   if test "x$prefix" != xNONE; then
791     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
792   else
793     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
794   fi
795 fi
796 for ac_site_file in $CONFIG_SITE; do
797   if test -r "$ac_site_file"; then
798     echo "loading site script $ac_site_file"
799     . "$ac_site_file"
800   fi
801 done
802
803
804 ac_ext=c
805 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
806 ac_cpp='$CPP $CPPFLAGS'
807 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
808 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
809 cross_compiling=$ac_cv_prog_cc_cross
810
811 ac_exeext=
812 ac_objext=o
813 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
814   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
815   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
816     ac_n= ac_c='
817 ' ac_t='        '
818   else
819     ac_n=-n ac_c= ac_t=
820   fi
821 else
822   ac_n= ac_c='\c' ac_t=
823 fi
824
825
826 # set unset (borrowed from autoconf 2.49c)
827 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
828   ol_unset=unset
829 else
830   ol_unset=false
831 fi
832 # unset CDPATH
833 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
834
835 ac_aux_dir=
836 for ac_dir in build $srcdir/build; do
837   if test -f $ac_dir/install-sh; then
838     ac_aux_dir=$ac_dir
839     ac_install_sh="$ac_aux_dir/install-sh -c"
840     break
841   elif test -f $ac_dir/install.sh; then
842     ac_aux_dir=$ac_dir
843     ac_install_sh="$ac_aux_dir/install.sh -c"
844     break
845   elif test -f $ac_dir/shtool; then
846     ac_aux_dir=$ac_dir
847     ac_install_sh="$ac_aux_dir/shtool install -c"
848     break
849   fi
850 done
851 if test -z "$ac_aux_dir"; then
852   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
853 fi
854 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
855 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
856 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
857
858 eval `$ac_aux_dir/version.sh`
859 if test -z "$OL_STRING"; then
860         { echo "configure: error: could not determine version" 1>&2; exit 1; }
861 fi
862
863 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
864         ac_cv_shtool="$ac_aux_dir/shtool"
865 else
866         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
867 fi
868
869 SHTOOL="$ac_cv_shtool"
870
871 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
872 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
873
874 OPENLDAP_CVS=""
875 if test -d $ac_aux_dir/CVS; then
876         OPENLDAP_CVS="(from CVS sources) "
877 fi
878
879 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
880
881
882 echo $ac_n "checking host system type""... $ac_c" 1>&6
883 echo "configure:884: checking host system type" >&5
884 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
885
886 # Make sure we can run config.sub.
887   if $ac_config_sub sun4 >/dev/null 2>&1; then :
888     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
889   fi
890
891   ac_cv_host_alias=$host
892   case "$ac_cv_host_alias" in
893   NONE)
894     case $nonopt in
895     NONE)
896       if ac_cv_host_alias=`$ac_config_guess`; then :
897       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
898       fi ;;
899     *) ac_cv_host_alias=$nonopt ;;
900     esac ;;
901   esac
902
903   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
904   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
905   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
906   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
907 else
908   echo $ac_n "(cached) $ac_c" 1>&6
909 fi
910
911 echo "$ac_t""$ac_cv_host" 1>&6
912
913 host=$ac_cv_host
914 host_alias=$ac_cv_host_alias
915 host_cpu=$ac_cv_host_cpu
916 host_vendor=$ac_cv_host_vendor
917 host_os=$ac_cv_host_os
918
919
920
921
922
923 echo $ac_n "checking target system type""... $ac_c" 1>&6
924 echo "configure:925: checking target system type" >&5
925 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
926
927 # Make sure we can run config.sub.
928   if $ac_config_sub sun4 >/dev/null 2>&1; then :
929     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
930   fi
931
932   ac_cv_target_alias=$target
933   case "$ac_cv_target_alias" in
934   NONE)
935     case $nonopt in
936     NONE)
937       ac_cv_target_alias=$host_alias ;;
938
939     *) ac_cv_target_alias=$nonopt ;;
940     esac ;;
941   esac
942
943   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
944   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
945   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
946   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
947 else
948   echo $ac_n "(cached) $ac_c" 1>&6
949 fi
950
951 echo "$ac_t""$ac_cv_target" 1>&6
952
953 target=$ac_cv_target
954 target_alias=$ac_cv_target_alias
955 target_cpu=$ac_cv_target_cpu
956 target_vendor=$ac_cv_target_vendor
957 target_os=$ac_cv_target_os
958
959
960
961
962
963 echo $ac_n "checking build system type""... $ac_c" 1>&6
964 echo "configure:965: checking build system type" >&5
965 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
966
967 # Make sure we can run config.sub.
968   if $ac_config_sub sun4 >/dev/null 2>&1; then :
969     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
970   fi
971
972   ac_cv_build_alias=$build
973   case "$ac_cv_build_alias" in
974   NONE)
975     case $nonopt in
976     NONE)
977       ac_cv_build_alias=$host_alias ;;
978
979     *) ac_cv_build_alias=$nonopt ;;
980     esac ;;
981   esac
982
983   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
984   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
985   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
986   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
987 else
988   echo $ac_n "(cached) $ac_c" 1>&6
989 fi
990
991 echo "$ac_t""$ac_cv_build" 1>&6
992
993 build=$ac_cv_build
994 build_alias=$ac_cv_build_alias
995 build_cpu=$ac_cv_build_cpu
996 build_vendor=$ac_cv_build_vendor
997 build_os=$ac_cv_build_os
998
999
1000
1001
1002
1003 # Do some error checking and defaulting for the host and target type.
1004 # The inputs are:
1005 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1006 #
1007 # The rules are:
1008 # 1. You are not allowed to specify --host, --target, and nonopt at the
1009 #    same time.
1010 # 2. Host defaults to nonopt.
1011 # 3. If nonopt is not specified, then host defaults to the current host,
1012 #    as determined by config.guess.
1013 # 4. Target and build default to nonopt.
1014 # 5. If nonopt is not specified, then target and build default to host.
1015
1016 # The aliases save the names the user supplied, while $host etc.
1017 # will get canonicalized.
1018 case $host---$target---$nonopt in
1019 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1020 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1021 esac
1022
1023 test "$host_alias" != "$target_alias" &&
1024   test "$program_prefix$program_suffix$program_transform_name" = \
1025     NONENONEs,x,x, &&
1026   program_prefix=${target_alias}-
1027
1028
1029 # Find a good install program.  We prefer a C program (faster),
1030 # so one script is as good as another.  But avoid the broken or
1031 # incompatible versions:
1032 # SysV /etc/install, /usr/sbin/install
1033 # SunOS /usr/etc/install
1034 # IRIX /sbin/install
1035 # AIX /bin/install
1036 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1037 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1038 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1039 # ./install, which can be erroneously created by make from ./install.sh.
1040 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1041 echo "configure:1042: checking for a BSD compatible install" >&5
1042 if test -z "$INSTALL"; then
1043 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1044   echo $ac_n "(cached) $ac_c" 1>&6
1045 else
1046     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1047   for ac_dir in $PATH; do
1048     # Account for people who put trailing slashes in PATH elements.
1049     case "$ac_dir/" in
1050     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1051     *)
1052       # OSF1 and SCO ODT 3.0 have their own names for install.
1053       # Don't use installbsd from OSF since it installs stuff as root
1054       # by default.
1055       for ac_prog in ginstall scoinst install; do
1056         if test -f $ac_dir/$ac_prog; then
1057           if test $ac_prog = install &&
1058             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1059             # AIX install.  It has an incompatible calling convention.
1060             :
1061           elif test $ac_prog = install &&
1062             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1063             # program-specific install script used by HP pwplus--don't use.
1064             :
1065           else
1066             ac_cv_path_install="$ac_dir/$ac_prog -c"
1067             break 2
1068           fi
1069         fi
1070       done
1071       ;;
1072     esac
1073   done
1074   IFS="$ac_save_IFS"
1075
1076 fi
1077   if test "${ac_cv_path_install+set}" = set; then
1078     INSTALL="$ac_cv_path_install"
1079   else
1080     # As a last resort, use the slow shell script.  We don't cache a
1081     # path for INSTALL within a source directory, because that will
1082     # break other packages using the cache if that directory is
1083     # removed, or if the path is relative.
1084     INSTALL="$ac_install_sh"
1085   fi
1086 fi
1087 echo "$ac_t""$INSTALL" 1>&6
1088
1089 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1090 # It thinks the first close brace ends the variable substitution.
1091 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1092
1093 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1094
1095 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1096
1097 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1098 echo "configure:1099: checking whether build environment is sane" >&5
1099 # Just in case
1100 sleep 1
1101 echo timestamp > conftestfile
1102 # Do `set' in a subshell so we don't clobber the current shell's
1103 # arguments.  Must try -L first in case configure is actually a
1104 # symlink; some systems play weird games with the mod time of symlinks
1105 # (eg FreeBSD returns the mod time of the symlink's containing
1106 # directory).
1107 if (
1108    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1109    if test "$*" = "X"; then
1110       # -L didn't work.
1111       set X `ls -t $srcdir/configure conftestfile`
1112    fi
1113    if test "$*" != "X $srcdir/configure conftestfile" \
1114       && test "$*" != "X conftestfile $srcdir/configure"; then
1115
1116       # If neither matched, then we have a broken ls.  This can happen
1117       # if, for instance, CONFIG_SHELL is bash and it inherits a
1118       # broken ls alias from the environment.  This has actually
1119       # happened.  Such a system could not be considered "sane".
1120       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1121 alias in your environment" 1>&2; exit 1; }
1122    fi
1123
1124    test "$2" = conftestfile
1125    )
1126 then
1127    # Ok.
1128    :
1129 else
1130    { echo "configure: error: newly created file is older than distributed files!
1131 Check your system clock" 1>&2; exit 1; }
1132 fi
1133 rm -f conftest*
1134 echo "$ac_t""yes" 1>&6
1135 if test "$program_transform_name" = s,x,x,; then
1136   program_transform_name=
1137 else
1138   # Double any \ or $.  echo might interpret backslashes.
1139   cat <<\EOF_SED > conftestsed
1140 s,\\,\\\\,g; s,\$,$$,g
1141 EOF_SED
1142   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1143   rm -f conftestsed
1144 fi
1145 test "$program_prefix" != NONE &&
1146   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1147 # Use a double $ so make ignores it.
1148 test "$program_suffix" != NONE &&
1149   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1150
1151 # sed with no file args requires a program.
1152 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1153
1154 for ac_prog in mawk gawk nawk awk
1155 do
1156 # Extract the first word of "$ac_prog", so it can be a program name with args.
1157 set dummy $ac_prog; ac_word=$2
1158 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1159 echo "configure:1160: checking for $ac_word" >&5
1160 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1161   echo $ac_n "(cached) $ac_c" 1>&6
1162 else
1163   if test -n "$AWK"; then
1164   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1165 else
1166   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1167   ac_dummy="$PATH"
1168   for ac_dir in $ac_dummy; do
1169     test -z "$ac_dir" && ac_dir=.
1170     if test -f $ac_dir/$ac_word; then
1171       ac_cv_prog_AWK="$ac_prog"
1172       break
1173     fi
1174   done
1175   IFS="$ac_save_ifs"
1176 fi
1177 fi
1178 AWK="$ac_cv_prog_AWK"
1179 if test -n "$AWK"; then
1180   echo "$ac_t""$AWK" 1>&6
1181 else
1182   echo "$ac_t""no" 1>&6
1183 fi
1184
1185 test -n "$AWK" && break
1186 done
1187
1188 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1189 echo "configure:1190: checking whether ${MAKE-make} sets \${MAKE}" >&5
1190 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1191 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1192   echo $ac_n "(cached) $ac_c" 1>&6
1193 else
1194   cat > conftestmake <<\EOF
1195 all:
1196         @echo 'ac_maketemp="${MAKE}"'
1197 EOF
1198 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1199 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1200 if test -n "$ac_maketemp"; then
1201   eval ac_cv_prog_make_${ac_make}_set=yes
1202 else
1203   eval ac_cv_prog_make_${ac_make}_set=no
1204 fi
1205 rm -f conftestmake
1206 fi
1207 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1208   echo "$ac_t""yes" 1>&6
1209   SET_MAKE=
1210 else
1211   echo "$ac_t""no" 1>&6
1212   SET_MAKE="MAKE=${MAKE-make}"
1213 fi
1214
1215
1216
1217 PACKAGE=$OL_PACKAGE
1218
1219 VERSION=$OL_VERSION
1220
1221 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1222   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1223 fi
1224
1225
1226
1227 missing_dir=`cd $ac_aux_dir && pwd`
1228 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1229 echo "configure:1230: checking for working aclocal" >&5
1230 # Run test in a subshell; some versions of sh will print an error if
1231 # an executable is not found, even if stderr is redirected.
1232 # Redirect stdin to placate older versions of autoconf.  Sigh.
1233 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1234    ACLOCAL=aclocal
1235    echo "$ac_t""found" 1>&6
1236 else
1237    ACLOCAL="$missing_dir/missing aclocal"
1238    echo "$ac_t""missing" 1>&6
1239 fi
1240
1241 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1242 echo "configure:1243: checking for working autoconf" >&5
1243 # Run test in a subshell; some versions of sh will print an error if
1244 # an executable is not found, even if stderr is redirected.
1245 # Redirect stdin to placate older versions of autoconf.  Sigh.
1246 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1247    AUTOCONF=autoconf
1248    echo "$ac_t""found" 1>&6
1249 else
1250    AUTOCONF="$missing_dir/missing autoconf"
1251    echo "$ac_t""missing" 1>&6
1252 fi
1253
1254 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1255 echo "configure:1256: checking for working automake" >&5
1256 # Run test in a subshell; some versions of sh will print an error if
1257 # an executable is not found, even if stderr is redirected.
1258 # Redirect stdin to placate older versions of autoconf.  Sigh.
1259 if (automake --version) < /dev/null > /dev/null 2>&1; then
1260    AUTOMAKE=automake
1261    echo "$ac_t""found" 1>&6
1262 else
1263    AUTOMAKE="$missing_dir/missing automake"
1264    echo "$ac_t""missing" 1>&6
1265 fi
1266
1267 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1268 echo "configure:1269: checking for working autoheader" >&5
1269 # Run test in a subshell; some versions of sh will print an error if
1270 # an executable is not found, even if stderr is redirected.
1271 # Redirect stdin to placate older versions of autoconf.  Sigh.
1272 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1273    AUTOHEADER=autoheader
1274    echo "$ac_t""found" 1>&6
1275 else
1276    AUTOHEADER="$missing_dir/missing autoheader"
1277    echo "$ac_t""missing" 1>&6
1278 fi
1279
1280 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1281 echo "configure:1282: checking for working makeinfo" >&5
1282 # Run test in a subshell; some versions of sh will print an error if
1283 # an executable is not found, even if stderr is redirected.
1284 # Redirect stdin to placate older versions of autoconf.  Sigh.
1285 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1286    MAKEINFO=makeinfo
1287    echo "$ac_t""found" 1>&6
1288 else
1289    MAKEINFO="$missing_dir/missing makeinfo"
1290    echo "$ac_t""missing" 1>&6
1291 fi
1292
1293 install_sh="$missing_dir/install-sh"
1294 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1295
1296 for ac_prog in gnutar gtar tar
1297 do
1298 # Extract the first word of "$ac_prog", so it can be a program name with args.
1299 set dummy $ac_prog; ac_word=$2
1300 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1301 echo "configure:1302: checking for $ac_word" >&5
1302 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1303   echo $ac_n "(cached) $ac_c" 1>&6
1304 else
1305   if test -n "$AMTAR"; then
1306   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1307 else
1308   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1309   ac_dummy="$PATH"
1310   for ac_dir in $ac_dummy; do
1311     test -z "$ac_dir" && ac_dir=.
1312     if test -f $ac_dir/$ac_word; then
1313       ac_cv_prog_AMTAR="$ac_prog"
1314       break
1315     fi
1316   done
1317   IFS="$ac_save_ifs"
1318 fi
1319 fi
1320 AMTAR="$ac_cv_prog_AMTAR"
1321 if test -n "$AMTAR"; then
1322   echo "$ac_t""$AMTAR" 1>&6
1323 else
1324   echo "$ac_t""no" 1>&6
1325 fi
1326
1327 test -n "$AMTAR" && break
1328 done
1329
1330
1331 AMTARFLAGS=
1332 if test -n "$AMTAR"; then
1333   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1334         AMTARFLAGS=o
1335   fi
1336 fi
1337
1338 cat >> confdefs.h <<EOF
1339 #define OPENLDAP_PACKAGE "$PACKAGE"
1340 EOF
1341
1342 cat >> confdefs.h <<EOF
1343 #define OPENLDAP_VERSION "$VERSION"
1344 EOF
1345
1346
1347 cat >> confdefs.h <<EOF
1348 #define LDAP_VENDOR_VERSION $OL_API_INC
1349 EOF
1350
1351 cat >> confdefs.h <<EOF
1352 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1353 EOF
1354
1355 cat >> confdefs.h <<EOF
1356 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1357 EOF
1358
1359 cat >> confdefs.h <<EOF
1360 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1361 EOF
1362
1363
1364 OPENLDAP_LIBVERSION=$OL_API_LIB
1365
1366 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1367
1368
1369
1370 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1371 echo "configure:1372: checking configure arguments" >&5
1372
1373
1374 top_builddir=`pwd`
1375
1376 ldap_subdir="/openldap"
1377
1378 # Check whether --with-subdir or --without-subdir was given.
1379 if test "${with_subdir+set}" = set; then
1380   withval="$with_subdir"
1381   case "$withval" in
1382         no) ldap_subdir=""
1383                 ;;
1384         yes)
1385                 ;;
1386         /*|\\*)
1387                 ldap_subdir="$withval"
1388                 ;;
1389         *)
1390                 ldap_subdir="/$withval"
1391                 ;;
1392 esac
1393
1394 fi
1395
1396
1397 # OpenLDAP --enable-debug
1398         # Check whether --enable-debug or --disable-debug was given.
1399 if test "${enable_debug+set}" = set; then
1400   enableval="$enable_debug"
1401   
1402         ol_arg=invalid
1403         for ol_val in auto yes no ; do
1404                 if test "$enableval" = "$ol_val" ; then
1405                         ol_arg="$ol_val"
1406                 fi
1407         done
1408         if test "$ol_arg" = "invalid" ; then
1409                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1410         fi
1411         ol_enable_debug="$ol_arg"
1412
1413 else
1414         ol_enable_debug="yes"
1415 fi
1416 # end --enable-debug
1417 # OpenLDAP --enable-dynamic
1418         # Check whether --enable-dynamic or --disable-dynamic was given.
1419 if test "${enable_dynamic+set}" = set; then
1420   enableval="$enable_dynamic"
1421   
1422         ol_arg=invalid
1423         for ol_val in auto yes no ; do
1424                 if test "$enableval" = "$ol_val" ; then
1425                         ol_arg="$ol_val"
1426                 fi
1427         done
1428         if test "$ol_arg" = "invalid" ; then
1429                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1430         fi
1431         ol_enable_dynamic="$ol_arg"
1432
1433 else
1434         ol_enable_dynamic="no"
1435 fi
1436 # end --enable-dynamic
1437 # OpenLDAP --enable-syslog
1438         # Check whether --enable-syslog or --disable-syslog was given.
1439 if test "${enable_syslog+set}" = set; then
1440   enableval="$enable_syslog"
1441   
1442         ol_arg=invalid
1443         for ol_val in auto yes no ; do
1444                 if test "$enableval" = "$ol_val" ; then
1445                         ol_arg="$ol_val"
1446                 fi
1447         done
1448         if test "$ol_arg" = "invalid" ; then
1449                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1450         fi
1451         ol_enable_syslog="$ol_arg"
1452
1453 else
1454         ol_enable_syslog="auto"
1455 fi
1456 # end --enable-syslog
1457 # OpenLDAP --enable-proctitle
1458         # Check whether --enable-proctitle or --disable-proctitle was given.
1459 if test "${enable_proctitle+set}" = set; then
1460   enableval="$enable_proctitle"
1461   
1462         ol_arg=invalid
1463         for ol_val in auto yes no ; do
1464                 if test "$enableval" = "$ol_val" ; then
1465                         ol_arg="$ol_val"
1466                 fi
1467         done
1468         if test "$ol_arg" = "invalid" ; then
1469                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1470         fi
1471         ol_enable_proctitle="$ol_arg"
1472
1473 else
1474         ol_enable_proctitle="yes"
1475 fi
1476 # end --enable-proctitle
1477 ol_enable_referrals=${ol_enable_referrals-no}
1478 ol_enable_kbind=${ol_enable_kbind-no}
1479 # OpenLDAP --enable-ipv6
1480         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1481 if test "${enable_ipv6+set}" = set; then
1482   enableval="$enable_ipv6"
1483   
1484         ol_arg=invalid
1485         for ol_val in auto yes no ; do
1486                 if test "$enableval" = "$ol_val" ; then
1487                         ol_arg="$ol_val"
1488                 fi
1489         done
1490         if test "$ol_arg" = "invalid" ; then
1491                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1492         fi
1493         ol_enable_ipv6="$ol_arg"
1494
1495 else
1496         ol_enable_ipv6="auto"
1497 fi
1498 # end --enable-ipv6
1499 # OpenLDAP --enable-local
1500         # Check whether --enable-local or --disable-local was given.
1501 if test "${enable_local+set}" = set; then
1502   enableval="$enable_local"
1503   
1504         ol_arg=invalid
1505         for ol_val in auto yes no ; do
1506                 if test "$enableval" = "$ol_val" ; then
1507                         ol_arg="$ol_val"
1508                 fi
1509         done
1510         if test "$ol_arg" = "invalid" ; then
1511                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1512         fi
1513         ol_enable_local="$ol_arg"
1514
1515 else
1516         ol_enable_local="auto"
1517 fi
1518 # end --enable-local
1519 # OpenLDAP --enable-x_compile
1520         # Check whether --enable-x_compile or --disable-x_compile was given.
1521 if test "${enable_x_compile+set}" = set; then
1522   enableval="$enable_x_compile"
1523   
1524         ol_arg=invalid
1525         for ol_val in yes no ; do
1526                 if test "$enableval" = "$ol_val" ; then
1527                         ol_arg="$ol_val"
1528                 fi
1529         done
1530         if test "$ol_arg" = "invalid" ; then
1531                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1532         fi
1533         ol_enable_x_compile="$ol_arg"
1534
1535 else
1536         ol_enable_x_compile="no"
1537 fi
1538 # end --enable-x_compile
1539
1540
1541 # OpenLDAP --with-cyrus_sasl
1542         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1543 if test "${with_cyrus_sasl+set}" = set; then
1544   withval="$with_cyrus_sasl"
1545   
1546         ol_arg=invalid
1547         for ol_val in auto yes no  ; do
1548                 if test "$withval" = "$ol_val" ; then
1549                         ol_arg="$ol_val"
1550                 fi
1551         done
1552         if test "$ol_arg" = "invalid" ; then
1553                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1554         fi
1555         ol_with_cyrus_sasl="$ol_arg"
1556
1557 else
1558         ol_with_cyrus_sasl="auto"
1559 fi
1560 # end --with-cyrus_sasl
1561
1562 # OpenLDAP --with-fetch
1563         # Check whether --with-fetch or --without-fetch was given.
1564 if test "${with_fetch+set}" = set; then
1565   withval="$with_fetch"
1566   
1567         ol_arg=invalid
1568         for ol_val in auto yes no  ; do
1569                 if test "$withval" = "$ol_val" ; then
1570                         ol_arg="$ol_val"
1571                 fi
1572         done
1573         if test "$ol_arg" = "invalid" ; then
1574                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1575         fi
1576         ol_with_fetch="$ol_arg"
1577
1578 else
1579         ol_with_fetch="auto"
1580 fi
1581 # end --with-fetch
1582
1583 # OpenLDAP --with-kerberos
1584         # Check whether --with-kerberos or --without-kerberos was given.
1585 if test "${with_kerberos+set}" = set; then
1586   withval="$with_kerberos"
1587   
1588         ol_arg=invalid
1589         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1590                 if test "$withval" = "$ol_val" ; then
1591                         ol_arg="$ol_val"
1592                 fi
1593         done
1594         if test "$ol_arg" = "invalid" ; then
1595                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1596         fi
1597         ol_with_kerberos="$ol_arg"
1598
1599 else
1600         ol_with_kerberos="auto"
1601 fi
1602 # end --with-kerberos
1603
1604 # OpenLDAP --with-threads
1605         # Check whether --with-threads or --without-threads was given.
1606 if test "${with_threads+set}" = set; then
1607   withval="$with_threads"
1608   
1609         ol_arg=invalid
1610         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1611                 if test "$withval" = "$ol_val" ; then
1612                         ol_arg="$ol_val"
1613                 fi
1614         done
1615         if test "$ol_arg" = "invalid" ; then
1616                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1617         fi
1618         ol_with_threads="$ol_arg"
1619
1620 else
1621         ol_with_threads="auto"
1622 fi
1623 # end --with-threads
1624
1625 # OpenLDAP --with-tls
1626         # Check whether --with-tls or --without-tls was given.
1627 if test "${with_tls+set}" = set; then
1628   withval="$with_tls"
1629   
1630         ol_arg=invalid
1631         for ol_val in auto ssleay openssl yes no  ; do
1632                 if test "$withval" = "$ol_val" ; then
1633                         ol_arg="$ol_val"
1634                 fi
1635         done
1636         if test "$ol_arg" = "invalid" ; then
1637                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1638         fi
1639         ol_with_tls="$ol_arg"
1640
1641 else
1642         ol_with_tls="auto"
1643 fi
1644 # end --with-tls
1645
1646 # OpenLDAP --with-yielding_select
1647         # Check whether --with-yielding_select or --without-yielding_select was given.
1648 if test "${with_yielding_select+set}" = set; then
1649   withval="$with_yielding_select"
1650   
1651         ol_arg=invalid
1652         for ol_val in auto yes no manual  ; do
1653                 if test "$withval" = "$ol_val" ; then
1654                         ol_arg="$ol_val"
1655                 fi
1656         done
1657         if test "$ol_arg" = "invalid" ; then
1658                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1659         fi
1660         ol_with_yielding_select="$ol_arg"
1661
1662 else
1663         ol_with_yielding_select="auto"
1664 fi
1665 # end --with-yielding_select
1666
1667
1668
1669 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1670 if test "${with_xxslapdoptions+set}" = set; then
1671   withval="$with_xxslapdoptions"
1672   :
1673 fi
1674
1675 # OpenLDAP --enable-slapd
1676         # Check whether --enable-slapd or --disable-slapd was given.
1677 if test "${enable_slapd+set}" = set; then
1678   enableval="$enable_slapd"
1679   
1680         ol_arg=invalid
1681         for ol_val in auto yes no ; do
1682                 if test "$enableval" = "$ol_val" ; then
1683                         ol_arg="$ol_val"
1684                 fi
1685         done
1686         if test "$ol_arg" = "invalid" ; then
1687                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1688         fi
1689         ol_enable_slapd="$ol_arg"
1690
1691 else
1692         ol_enable_slapd="yes"
1693 fi
1694 # end --enable-slapd
1695 # OpenLDAP --enable-aci
1696         # Check whether --enable-aci or --disable-aci was given.
1697 if test "${enable_aci+set}" = set; then
1698   enableval="$enable_aci"
1699   
1700         ol_arg=invalid
1701         for ol_val in auto yes no ; do
1702                 if test "$enableval" = "$ol_val" ; then
1703                         ol_arg="$ol_val"
1704                 fi
1705         done
1706         if test "$ol_arg" = "invalid" ; then
1707                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1708         fi
1709         ol_enable_aci="$ol_arg"
1710
1711 else
1712         ol_enable_aci="no"
1713 fi
1714 # end --enable-aci
1715 # OpenLDAP --enable-cleartext
1716         # Check whether --enable-cleartext or --disable-cleartext was given.
1717 if test "${enable_cleartext+set}" = set; then
1718   enableval="$enable_cleartext"
1719   
1720         ol_arg=invalid
1721         for ol_val in auto yes no ; do
1722                 if test "$enableval" = "$ol_val" ; then
1723                         ol_arg="$ol_val"
1724                 fi
1725         done
1726         if test "$ol_arg" = "invalid" ; then
1727                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1728         fi
1729         ol_enable_cleartext="$ol_arg"
1730
1731 else
1732         ol_enable_cleartext="yes"
1733 fi
1734 # end --enable-cleartext
1735 # OpenLDAP --enable-crypt
1736         # Check whether --enable-crypt or --disable-crypt was given.
1737 if test "${enable_crypt+set}" = set; then
1738   enableval="$enable_crypt"
1739   
1740         ol_arg=invalid
1741         for ol_val in auto yes no ; do
1742                 if test "$enableval" = "$ol_val" ; then
1743                         ol_arg="$ol_val"
1744                 fi
1745         done
1746         if test "$ol_arg" = "invalid" ; then
1747                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1748         fi
1749         ol_enable_crypt="$ol_arg"
1750
1751 else
1752         ol_enable_crypt="no"
1753 fi
1754 # end --enable-crypt
1755 # OpenLDAP --enable-kpasswd
1756         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1757 if test "${enable_kpasswd+set}" = set; then
1758   enableval="$enable_kpasswd"
1759   
1760         ol_arg=invalid
1761         for ol_val in auto yes no ; do
1762                 if test "$enableval" = "$ol_val" ; then
1763                         ol_arg="$ol_val"
1764                 fi
1765         done
1766         if test "$ol_arg" = "invalid" ; then
1767                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1768         fi
1769         ol_enable_kpasswd="$ol_arg"
1770
1771 else
1772         ol_enable_kpasswd="no"
1773 fi
1774 # end --enable-kpasswd
1775 # OpenLDAP --enable-lmpasswd
1776         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1777 if test "${enable_lmpasswd+set}" = set; then
1778   enableval="$enable_lmpasswd"
1779   
1780         ol_arg=invalid
1781         for ol_val in auto yes no ; do
1782                 if test "$enableval" = "$ol_val" ; then
1783                         ol_arg="$ol_val"
1784                 fi
1785         done
1786         if test "$ol_arg" = "invalid" ; then
1787                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1788         fi
1789         ol_enable_lmpasswd="$ol_arg"
1790
1791 else
1792         ol_enable_lmpasswd="no"
1793 fi
1794 # end --enable-lmpasswd
1795 # OpenLDAP --enable-spasswd
1796         # Check whether --enable-spasswd or --disable-spasswd was given.
1797 if test "${enable_spasswd+set}" = set; then
1798   enableval="$enable_spasswd"
1799   
1800         ol_arg=invalid
1801         for ol_val in auto yes no ; do
1802                 if test "$enableval" = "$ol_val" ; then
1803                         ol_arg="$ol_val"
1804                 fi
1805         done
1806         if test "$ol_arg" = "invalid" ; then
1807                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1808         fi
1809         ol_enable_spasswd="$ol_arg"
1810
1811 else
1812         ol_enable_spasswd="no"
1813 fi
1814 # end --enable-spasswd
1815 # OpenLDAP --enable-modules
1816         # Check whether --enable-modules or --disable-modules was given.
1817 if test "${enable_modules+set}" = set; then
1818   enableval="$enable_modules"
1819   
1820         ol_arg=invalid
1821         for ol_val in auto yes no ; do
1822                 if test "$enableval" = "$ol_val" ; then
1823                         ol_arg="$ol_val"
1824                 fi
1825         done
1826         if test "$ol_arg" = "invalid" ; then
1827                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1828         fi
1829         ol_enable_modules="$ol_arg"
1830
1831 else
1832         ol_enable_modules="no"
1833 fi
1834 # end --enable-modules
1835 ol_enable_multimaster=${ol_enable_multimaster-no}
1836 # OpenLDAP --enable-rewrite
1837         # Check whether --enable-rewrite or --disable-rewrite was given.
1838 if test "${enable_rewrite+set}" = set; then
1839   enableval="$enable_rewrite"
1840   
1841         ol_arg=invalid
1842         for ol_val in auto yes no ; do
1843                 if test "$enableval" = "$ol_val" ; then
1844                         ol_arg="$ol_val"
1845                 fi
1846         done
1847         if test "$ol_arg" = "invalid" ; then
1848                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1849         fi
1850         ol_enable_rewrite="$ol_arg"
1851
1852 else
1853         ol_enable_rewrite="no"
1854 fi
1855 # end --enable-rewrite
1856 # OpenLDAP --enable-rlookups
1857         # Check whether --enable-rlookups or --disable-rlookups was given.
1858 if test "${enable_rlookups+set}" = set; then
1859   enableval="$enable_rlookups"
1860   
1861         ol_arg=invalid
1862         for ol_val in auto yes no ; do
1863                 if test "$enableval" = "$ol_val" ; then
1864                         ol_arg="$ol_val"
1865                 fi
1866         done
1867         if test "$ol_arg" = "invalid" ; then
1868                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1869         fi
1870         ol_enable_rlookups="$ol_arg"
1871
1872 else
1873         ol_enable_rlookups="no"
1874 fi
1875 # end --enable-rlookups
1876 # OpenLDAP --enable-slapi
1877         # Check whether --enable-slapi or --disable-slapi was given.
1878 if test "${enable_slapi+set}" = set; then
1879   enableval="$enable_slapi"
1880   
1881         ol_arg=invalid
1882         for ol_val in auto yes no ; do
1883                 if test "$enableval" = "$ol_val" ; then
1884                         ol_arg="$ol_val"
1885                 fi
1886         done
1887         if test "$ol_arg" = "invalid" ; then
1888                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1889         fi
1890         ol_enable_slapi="$ol_arg"
1891
1892 else
1893         ol_enable_slapi="no"
1894 fi
1895 # end --enable-slapi
1896 # OpenLDAP --enable-slp
1897         # Check whether --enable-slp or --disable-slp was given.
1898 if test "${enable_slp+set}" = set; then
1899   enableval="$enable_slp"
1900   
1901         ol_arg=invalid
1902         for ol_val in auto yes no ; do
1903                 if test "$enableval" = "$ol_val" ; then
1904                         ol_arg="$ol_val"
1905                 fi
1906         done
1907         if test "$ol_arg" = "invalid" ; then
1908                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1909         fi
1910         ol_enable_slp="$ol_arg"
1911
1912 else
1913         ol_enable_slp="no"
1914 fi
1915 # end --enable-slp
1916 # OpenLDAP --enable-wrappers
1917         # Check whether --enable-wrappers or --disable-wrappers was given.
1918 if test "${enable_wrappers+set}" = set; then
1919   enableval="$enable_wrappers"
1920   
1921         ol_arg=invalid
1922         for ol_val in auto yes no ; do
1923                 if test "$enableval" = "$ol_val" ; then
1924                         ol_arg="$ol_val"
1925                 fi
1926         done
1927         if test "$ol_arg" = "invalid" ; then
1928                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1929         fi
1930         ol_enable_wrappers="$ol_arg"
1931
1932 else
1933         ol_enable_wrappers="no"
1934 fi
1935 # end --enable-wrappers
1936
1937
1938 # OpenLDAP --enable-bdb
1939         # Check whether --enable-bdb or --disable-bdb was given.
1940 if test "${enable_bdb+set}" = set; then
1941   enableval="$enable_bdb"
1942   
1943         ol_arg=invalid
1944         for ol_val in auto yes no ; do
1945                 if test "$enableval" = "$ol_val" ; then
1946                         ol_arg="$ol_val"
1947                 fi
1948         done
1949         if test "$ol_arg" = "invalid" ; then
1950                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1951         fi
1952         ol_enable_bdb="$ol_arg"
1953
1954 else
1955         ol_enable_bdb="yes"
1956 fi
1957 # end --enable-bdb
1958 # OpenLDAP --with-bdb_module
1959         # Check whether --with-bdb_module or --without-bdb_module was given.
1960 if test "${with_bdb_module+set}" = set; then
1961   withval="$with_bdb_module"
1962   
1963         ol_arg=invalid
1964         for ol_val in static dynamic ; do
1965                 if test "$withval" = "$ol_val" ; then
1966                         ol_arg="$ol_val"
1967                 fi
1968         done
1969         if test "$ol_arg" = "invalid" ; then
1970                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1971         fi
1972         ol_with_bdb_module="$ol_arg"
1973
1974 else
1975         ol_with_bdb_module="static"
1976 fi
1977 # end --with-bdb_module
1978
1979 # OpenLDAP --enable-dnssrv
1980         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1981 if test "${enable_dnssrv+set}" = set; then
1982   enableval="$enable_dnssrv"
1983   
1984         ol_arg=invalid
1985         for ol_val in auto yes no ; do
1986                 if test "$enableval" = "$ol_val" ; then
1987                         ol_arg="$ol_val"
1988                 fi
1989         done
1990         if test "$ol_arg" = "invalid" ; then
1991                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1992         fi
1993         ol_enable_dnssrv="$ol_arg"
1994
1995 else
1996         ol_enable_dnssrv="no"
1997 fi
1998 # end --enable-dnssrv
1999 # OpenLDAP --with-dnssrv_module
2000         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2001 if test "${with_dnssrv_module+set}" = set; then
2002   withval="$with_dnssrv_module"
2003   
2004         ol_arg=invalid
2005         for ol_val in static dynamic ; do
2006                 if test "$withval" = "$ol_val" ; then
2007                         ol_arg="$ol_val"
2008                 fi
2009         done
2010         if test "$ol_arg" = "invalid" ; then
2011                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2012         fi
2013         ol_with_dnssrv_module="$ol_arg"
2014
2015 else
2016         ol_with_dnssrv_module="static"
2017 fi
2018 # end --with-dnssrv_module
2019
2020 # OpenLDAP --enable-hdb
2021         # Check whether --enable-hdb or --disable-hdb was given.
2022 if test "${enable_hdb+set}" = set; then
2023   enableval="$enable_hdb"
2024   
2025         ol_arg=invalid
2026         for ol_val in auto yes no ; do
2027                 if test "$enableval" = "$ol_val" ; then
2028                         ol_arg="$ol_val"
2029                 fi
2030         done
2031         if test "$ol_arg" = "invalid" ; then
2032                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
2033         fi
2034         ol_enable_hdb="$ol_arg"
2035
2036 else
2037         ol_enable_hdb="no"
2038 fi
2039 # end --enable-hdb
2040 # OpenLDAP --with-hdb_module
2041         # Check whether --with-hdb_module or --without-hdb_module was given.
2042 if test "${with_hdb_module+set}" = set; then
2043   withval="$with_hdb_module"
2044   
2045         ol_arg=invalid
2046         for ol_val in static dynamic ; do
2047                 if test "$withval" = "$ol_val" ; then
2048                         ol_arg="$ol_val"
2049                 fi
2050         done
2051         if test "$ol_arg" = "invalid" ; then
2052                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2053         fi
2054         ol_with_hdb_module="$ol_arg"
2055
2056 else
2057         ol_with_hdb_module="static"
2058 fi
2059 # end --with-hdb_module
2060
2061 # OpenLDAP --enable-ldap
2062         # Check whether --enable-ldap or --disable-ldap was given.
2063 if test "${enable_ldap+set}" = set; then
2064   enableval="$enable_ldap"
2065   
2066         ol_arg=invalid
2067         for ol_val in auto yes no ; do
2068                 if test "$enableval" = "$ol_val" ; then
2069                         ol_arg="$ol_val"
2070                 fi
2071         done
2072         if test "$ol_arg" = "invalid" ; then
2073                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2074         fi
2075         ol_enable_ldap="$ol_arg"
2076
2077 else
2078         ol_enable_ldap="no"
2079 fi
2080 # end --enable-ldap
2081 # OpenLDAP --with-ldap_module
2082         # Check whether --with-ldap_module or --without-ldap_module was given.
2083 if test "${with_ldap_module+set}" = set; then
2084   withval="$with_ldap_module"
2085   
2086         ol_arg=invalid
2087         for ol_val in static dynamic ; do
2088                 if test "$withval" = "$ol_val" ; then
2089                         ol_arg="$ol_val"
2090                 fi
2091         done
2092         if test "$ol_arg" = "invalid" ; then
2093                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2094         fi
2095         ol_with_ldap_module="$ol_arg"
2096
2097 else
2098         ol_with_ldap_module="static"
2099 fi
2100 # end --with-ldap_module
2101
2102 # OpenLDAP --enable-ldbm
2103         # Check whether --enable-ldbm or --disable-ldbm was given.
2104 if test "${enable_ldbm+set}" = set; then
2105   enableval="$enable_ldbm"
2106   
2107         ol_arg=invalid
2108         for ol_val in auto yes no ; do
2109                 if test "$enableval" = "$ol_val" ; then
2110                         ol_arg="$ol_val"
2111                 fi
2112         done
2113         if test "$ol_arg" = "invalid" ; then
2114                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2115         fi
2116         ol_enable_ldbm="$ol_arg"
2117
2118 else
2119         ol_enable_ldbm="no"
2120 fi
2121 # end --enable-ldbm
2122 # OpenLDAP --with-ldbm_api
2123         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2124 if test "${with_ldbm_api+set}" = set; then
2125   withval="$with_ldbm_api"
2126   
2127         ol_arg=invalid
2128         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2129                 if test "$withval" = "$ol_val" ; then
2130                         ol_arg="$ol_val"
2131                 fi
2132         done
2133         if test "$ol_arg" = "invalid" ; then
2134                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2135         fi
2136         ol_with_ldbm_api="$ol_arg"
2137
2138 else
2139         ol_with_ldbm_api="auto"
2140 fi
2141 # end --with-ldbm_api
2142
2143 # OpenLDAP --with-ldbm_module
2144         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2145 if test "${with_ldbm_module+set}" = set; then
2146   withval="$with_ldbm_module"
2147   
2148         ol_arg=invalid
2149         for ol_val in static dynamic ; do
2150                 if test "$withval" = "$ol_val" ; then
2151                         ol_arg="$ol_val"
2152                 fi
2153         done
2154         if test "$ol_arg" = "invalid" ; then
2155                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2156         fi
2157         ol_with_ldbm_module="$ol_arg"
2158
2159 else
2160         ol_with_ldbm_module="static"
2161 fi
2162 # end --with-ldbm_module
2163
2164 # OpenLDAP --with-ldbm_type
2165         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2166 if test "${with_ldbm_type+set}" = set; then
2167   withval="$with_ldbm_type"
2168   
2169         ol_arg=invalid
2170         for ol_val in auto btree hash ; do
2171                 if test "$withval" = "$ol_val" ; then
2172                         ol_arg="$ol_val"
2173                 fi
2174         done
2175         if test "$ol_arg" = "invalid" ; then
2176                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2177         fi
2178         ol_with_ldbm_type="$ol_arg"
2179
2180 else
2181         ol_with_ldbm_type="auto"
2182 fi
2183 # end --with-ldbm_type
2184
2185 # OpenLDAP --enable-meta
2186         # Check whether --enable-meta or --disable-meta was given.
2187 if test "${enable_meta+set}" = set; then
2188   enableval="$enable_meta"
2189   
2190         ol_arg=invalid
2191         for ol_val in auto yes no ; do
2192                 if test "$enableval" = "$ol_val" ; then
2193                         ol_arg="$ol_val"
2194                 fi
2195         done
2196         if test "$ol_arg" = "invalid" ; then
2197                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2198         fi
2199         ol_enable_meta="$ol_arg"
2200
2201 else
2202         ol_enable_meta="no"
2203 fi
2204 # end --enable-meta
2205 # OpenLDAP --with-meta_module
2206         # Check whether --with-meta_module or --without-meta_module was given.
2207 if test "${with_meta_module+set}" = set; then
2208   withval="$with_meta_module"
2209   
2210         ol_arg=invalid
2211         for ol_val in static dynamic ; do
2212                 if test "$withval" = "$ol_val" ; then
2213                         ol_arg="$ol_val"
2214                 fi
2215         done
2216         if test "$ol_arg" = "invalid" ; then
2217                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2218         fi
2219         ol_with_meta_module="$ol_arg"
2220
2221 else
2222         ol_with_meta_module="static"
2223 fi
2224 # end --with-meta_module
2225
2226 # OpenLDAP --enable-monitor
2227         # Check whether --enable-monitor or --disable-monitor was given.
2228 if test "${enable_monitor+set}" = set; then
2229   enableval="$enable_monitor"
2230   
2231         ol_arg=invalid
2232         for ol_val in auto yes no ; do
2233                 if test "$enableval" = "$ol_val" ; then
2234                         ol_arg="$ol_val"
2235                 fi
2236         done
2237         if test "$ol_arg" = "invalid" ; then
2238                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2239         fi
2240         ol_enable_monitor="$ol_arg"
2241
2242 else
2243         ol_enable_monitor="no"
2244 fi
2245 # end --enable-monitor
2246 # OpenLDAP --with-monitor_module
2247         # Check whether --with-monitor_module or --without-monitor_module was given.
2248 if test "${with_monitor_module+set}" = set; then
2249   withval="$with_monitor_module"
2250   
2251         ol_arg=invalid
2252         for ol_val in static dynamic ; do
2253                 if test "$withval" = "$ol_val" ; then
2254                         ol_arg="$ol_val"
2255                 fi
2256         done
2257         if test "$ol_arg" = "invalid" ; then
2258                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2259         fi
2260         ol_with_monitor_module="$ol_arg"
2261
2262 else
2263         ol_with_monitor_module="static"
2264 fi
2265 # end --with-monitor_module
2266
2267 # OpenLDAP --enable-null
2268         # Check whether --enable-null or --disable-null was given.
2269 if test "${enable_null+set}" = set; then
2270   enableval="$enable_null"
2271   
2272         ol_arg=invalid
2273         for ol_val in auto yes no ; do
2274                 if test "$enableval" = "$ol_val" ; then
2275                         ol_arg="$ol_val"
2276                 fi
2277         done
2278         if test "$ol_arg" = "invalid" ; then
2279                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2280         fi
2281         ol_enable_null="$ol_arg"
2282
2283 else
2284         ol_enable_null="no"
2285 fi
2286 # end --enable-null
2287 # OpenLDAP --with-null_module
2288         # Check whether --with-null_module or --without-null_module was given.
2289 if test "${with_null_module+set}" = set; then
2290   withval="$with_null_module"
2291   
2292         ol_arg=invalid
2293         for ol_val in static dynamic ; do
2294                 if test "$withval" = "$ol_val" ; then
2295                         ol_arg="$ol_val"
2296                 fi
2297         done
2298         if test "$ol_arg" = "invalid" ; then
2299                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2300         fi
2301         ol_with_null_module="$ol_arg"
2302
2303 else
2304         ol_with_null_module="static"
2305 fi
2306 # end --with-null_module
2307
2308 # OpenLDAP --enable-passwd
2309         # Check whether --enable-passwd or --disable-passwd was given.
2310 if test "${enable_passwd+set}" = set; then
2311   enableval="$enable_passwd"
2312   
2313         ol_arg=invalid
2314         for ol_val in auto yes no ; do
2315                 if test "$enableval" = "$ol_val" ; then
2316                         ol_arg="$ol_val"
2317                 fi
2318         done
2319         if test "$ol_arg" = "invalid" ; then
2320                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2321         fi
2322         ol_enable_passwd="$ol_arg"
2323
2324 else
2325         ol_enable_passwd="no"
2326 fi
2327 # end --enable-passwd
2328 # OpenLDAP --with-passwd_module
2329         # Check whether --with-passwd_module or --without-passwd_module was given.
2330 if test "${with_passwd_module+set}" = set; then
2331   withval="$with_passwd_module"
2332   
2333         ol_arg=invalid
2334         for ol_val in static dynamic ; do
2335                 if test "$withval" = "$ol_val" ; then
2336                         ol_arg="$ol_val"
2337                 fi
2338         done
2339         if test "$ol_arg" = "invalid" ; then
2340                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2341         fi
2342         ol_with_passwd_module="$ol_arg"
2343
2344 else
2345         ol_with_passwd_module="static"
2346 fi
2347 # end --with-passwd_module
2348
2349 # OpenLDAP --enable-perl
2350         # Check whether --enable-perl or --disable-perl was given.
2351 if test "${enable_perl+set}" = set; then
2352   enableval="$enable_perl"
2353   
2354         ol_arg=invalid
2355         for ol_val in auto yes no ; do
2356                 if test "$enableval" = "$ol_val" ; then
2357                         ol_arg="$ol_val"
2358                 fi
2359         done
2360         if test "$ol_arg" = "invalid" ; then
2361                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2362         fi
2363         ol_enable_perl="$ol_arg"
2364
2365 else
2366         ol_enable_perl="no"
2367 fi
2368 # end --enable-perl
2369 # OpenLDAP --with-perl_module
2370         # Check whether --with-perl_module or --without-perl_module was given.
2371 if test "${with_perl_module+set}" = set; then
2372   withval="$with_perl_module"
2373   
2374         ol_arg=invalid
2375         for ol_val in static dynamic ; do
2376                 if test "$withval" = "$ol_val" ; then
2377                         ol_arg="$ol_val"
2378                 fi
2379         done
2380         if test "$ol_arg" = "invalid" ; then
2381                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2382         fi
2383         ol_with_perl_module="$ol_arg"
2384
2385 else
2386         ol_with_perl_module="static"
2387 fi
2388 # end --with-perl_module
2389
2390 # OpenLDAP --enable-shell
2391         # Check whether --enable-shell or --disable-shell was given.
2392 if test "${enable_shell+set}" = set; then
2393   enableval="$enable_shell"
2394   
2395         ol_arg=invalid
2396         for ol_val in auto yes no ; do
2397                 if test "$enableval" = "$ol_val" ; then
2398                         ol_arg="$ol_val"
2399                 fi
2400         done
2401         if test "$ol_arg" = "invalid" ; then
2402                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2403         fi
2404         ol_enable_shell="$ol_arg"
2405
2406 else
2407         ol_enable_shell="no"
2408 fi
2409 # end --enable-shell
2410 # OpenLDAP --with-shell_module
2411         # Check whether --with-shell_module or --without-shell_module was given.
2412 if test "${with_shell_module+set}" = set; then
2413   withval="$with_shell_module"
2414   
2415         ol_arg=invalid
2416         for ol_val in static dynamic ; do
2417                 if test "$withval" = "$ol_val" ; then
2418                         ol_arg="$ol_val"
2419                 fi
2420         done
2421         if test "$ol_arg" = "invalid" ; then
2422                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2423         fi
2424         ol_with_shell_module="$ol_arg"
2425
2426 else
2427         ol_with_shell_module="static"
2428 fi
2429 # end --with-shell_module
2430
2431 # OpenLDAP --enable-sql
2432         # Check whether --enable-sql or --disable-sql was given.
2433 if test "${enable_sql+set}" = set; then
2434   enableval="$enable_sql"
2435   
2436         ol_arg=invalid
2437         for ol_val in auto yes no ; do
2438                 if test "$enableval" = "$ol_val" ; then
2439                         ol_arg="$ol_val"
2440                 fi
2441         done
2442         if test "$ol_arg" = "invalid" ; then
2443                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2444         fi
2445         ol_enable_sql="$ol_arg"
2446
2447 else
2448         ol_enable_sql="no"
2449 fi
2450 # end --enable-sql
2451 # OpenLDAP --with-sql_module
2452         # Check whether --with-sql_module or --without-sql_module was given.
2453 if test "${with_sql_module+set}" = set; then
2454   withval="$with_sql_module"
2455   
2456         ol_arg=invalid
2457         for ol_val in static dynamic ; do
2458                 if test "$withval" = "$ol_val" ; then
2459                         ol_arg="$ol_val"
2460                 fi
2461         done
2462         if test "$ol_arg" = "invalid" ; then
2463                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2464         fi
2465         ol_with_sql_module="$ol_arg"
2466
2467 else
2468         ol_with_sql_module="static"
2469 fi
2470 # end --with-sql_module
2471
2472 # OpenLDAP --enable-tcl
2473         # Check whether --enable-tcl or --disable-tcl was given.
2474 if test "${enable_tcl+set}" = set; then
2475   enableval="$enable_tcl"
2476   
2477         ol_arg=invalid
2478         for ol_val in auto yes no ; do
2479                 if test "$enableval" = "$ol_val" ; then
2480                         ol_arg="$ol_val"
2481                 fi
2482         done
2483         if test "$ol_arg" = "invalid" ; then
2484                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2485         fi
2486         ol_enable_tcl="$ol_arg"
2487
2488 else
2489         ol_enable_tcl="no"
2490 fi
2491 # end --enable-tcl
2492 # OpenLDAP --with-tcl_module
2493         # Check whether --with-tcl_module or --without-tcl_module was given.
2494 if test "${with_tcl_module+set}" = set; then
2495   withval="$with_tcl_module"
2496   
2497         ol_arg=invalid
2498         for ol_val in static dynamic ; do
2499                 if test "$withval" = "$ol_val" ; then
2500                         ol_arg="$ol_val"
2501                 fi
2502         done
2503         if test "$ol_arg" = "invalid" ; then
2504                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2505         fi
2506         ol_with_tcl_module="$ol_arg"
2507
2508 else
2509         ol_with_tcl_module="static"
2510 fi
2511 # end --with-tcl_module
2512
2513
2514 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2515 if test "${with_xxslurpdoptions+set}" = set; then
2516   withval="$with_xxslurpdoptions"
2517   :
2518 fi
2519
2520 # OpenLDAP --enable-slurpd
2521         # Check whether --enable-slurpd or --disable-slurpd was given.
2522 if test "${enable_slurpd+set}" = set; then
2523   enableval="$enable_slurpd"
2524   
2525         ol_arg=invalid
2526         for ol_val in auto yes no ; do
2527                 if test "$enableval" = "$ol_val" ; then
2528                         ol_arg="$ol_val"
2529                 fi
2530         done
2531         if test "$ol_arg" = "invalid" ; then
2532                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2533         fi
2534         ol_enable_slurpd="$ol_arg"
2535
2536 else
2537         ol_enable_slurpd="auto"
2538 fi
2539 # end --enable-slurpd
2540
2541 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2542 if test "${with_xxliboptions+set}" = set; then
2543   withval="$with_xxliboptions"
2544   :
2545 fi
2546
2547 # Check whether --enable-static or --disable-static was given.
2548 if test "${enable_static+set}" = set; then
2549   enableval="$enable_static"
2550   p=${PACKAGE-default}
2551 case $enableval in
2552 yes) enable_static=yes ;;
2553 no) enable_static=no ;;
2554 *)
2555   enable_static=no
2556   # Look at the argument we got.  We use all the common list separators.
2557   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2558   for pkg in $enableval; do
2559     if test "X$pkg" = "X$p"; then
2560       enable_static=yes
2561     fi
2562   done
2563   IFS="$ac_save_ifs"
2564   ;;
2565 esac
2566 else
2567   enable_static=yes
2568 fi
2569
2570 # Check whether --enable-shared or --disable-shared was given.
2571 if test "${enable_shared+set}" = set; then
2572   enableval="$enable_shared"
2573   p=${PACKAGE-default}
2574 case $enableval in
2575 yes) enable_shared=yes ;;
2576 no) enable_shared=no ;;
2577 *)
2578   enable_shared=no
2579   # Look at the argument we got.  We use all the common list separators.
2580   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2581   for pkg in $enableval; do
2582     if test "X$pkg" = "X$p"; then
2583       enable_shared=yes
2584     fi
2585   done
2586   IFS="$ac_save_ifs"
2587   ;;
2588 esac
2589 else
2590   enable_shared=yes
2591 fi
2592
2593
2594
2595 # validate options
2596 if test $ol_enable_slapd = no ; then
2597                 if test $ol_enable_slapi = yes ; then
2598                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2599         fi
2600         if test $ol_enable_bdb = yes ; then
2601                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2602         fi
2603         if test $ol_enable_dnssrv = yes ; then
2604                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2605         fi
2606         if test $ol_enable_hdb = yes ; then
2607                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2608         fi
2609         if test $ol_enable_ldap = yes ; then
2610                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2611         fi
2612         if test $ol_enable_ldbm = yes ; then
2613                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2614         fi
2615         if test $ol_enable_meta = yes ; then
2616                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2617         fi
2618         if test $ol_enable_monitor = yes ; then
2619                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2620         fi
2621         if test $ol_enable_null = yes ; then
2622                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2623         fi
2624         if test $ol_enable_passwd = yes ; then
2625                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2626         fi
2627         if test $ol_enable_perl = yes ; then
2628                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2629         fi
2630         if test $ol_enable_shell = yes ; then
2631                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2632         fi
2633         if test $ol_enable_tcl = yes ; then
2634                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2635         fi
2636         if test $ol_enable_sql = yes ; then
2637                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2638         fi
2639         if test $ol_enable_modules = yes ; then
2640                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2641         fi
2642         if test $ol_enable_multimaster = yes ; then
2643                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2644         fi
2645         if test $ol_enable_wrappers = yes ; then
2646                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2647         fi
2648         if test $ol_enable_rlookups = yes ; then
2649                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2650         fi
2651         if test $ol_enable_aci = yes ; then
2652                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2653         fi
2654         if test $ol_with_ldbm_api != auto ; then
2655                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2656         fi
2657         if test $ol_with_ldbm_type != auto ; then
2658                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2659         fi
2660         if test $ol_with_bdb_module != static ; then
2661                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2662         fi
2663         if test $ol_with_dnssrv_module != static ; then
2664                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2665         fi
2666         if test $ol_with_hdb_module != static ; then
2667                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2668         fi
2669         if test $ol_with_ldap_module != static ; then
2670                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2671         fi
2672         if test $ol_with_ldbm_module != static ; then
2673                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2674         fi
2675         if test $ol_with_meta_module != static ; then
2676                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2677         fi
2678         if test $ol_with_monitor_module != static ; then
2679                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2680         fi
2681         if test $ol_with_null_module != static ; then
2682                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2683         fi
2684         if test $ol_with_passwd_module != static ; then
2685                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2686         fi
2687         if test $ol_with_perl_module != static ; then
2688                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2689         fi
2690         if test $ol_with_shell_module != static ; then
2691                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2692         fi
2693         if test $ol_with_tcl_module != static ; then
2694                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2695         fi
2696         if test $ol_with_sql_module != static ; then
2697                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2698         fi
2699         if test $ol_enable_slurpd = yes ; then
2700                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2701         fi
2702         if test $ol_enable_rewrite = yes ; then
2703                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2704         fi
2705
2706         # force settings to no
2707         ol_enable_slapi=no
2708         ol_enable_bdb=no
2709         ol_enable_dnssrv=no
2710         ol_enable_hdb=no
2711         ol_enable_ldap=no
2712         ol_enable_ldbm=no
2713         ol_enable_meta=no
2714         ol_enable_monitor=no
2715         ol_enable_null=no
2716         ol_enable_passwd=no
2717         ol_enable_perl=no
2718         ol_enable_shell=no
2719         ol_enable_tcl=no
2720         ol_enable_sql=no
2721
2722         ol_enable_modules=no
2723         ol_enable_multimaster=no
2724         ol_enable_rlookups=no
2725         ol_enable_aci=no
2726         ol_enable_wrappers=no
2727         ol_enable_dynamic=no
2728
2729         ol_with_ldbm_api=no
2730         ol_with_ldbm_type=no
2731
2732         ol_with_bdb_module=static
2733         ol_with_dnssrv_module=static
2734         ol_with_hdb_module=static
2735         ol_with_ldap_module=static
2736         ol_with_ldbm_module=static
2737         ol_with_meta_module=static
2738         ol_with_monitor_module=static
2739         ol_with_null_module=static
2740         ol_with_passwd_module=static
2741         ol_with_perl_module=static
2742         ol_with_shell_module=static
2743         ol_with_tcl_module=static
2744         ol_with_sql_module=static
2745
2746         ol_enable_slurpd=no
2747
2748         ol_enable_rewrite=no
2749
2750 elif test $ol_enable_ldbm = no ; then
2751         
2752         if test $ol_with_ldbm_api != auto ; then
2753                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2754         fi
2755
2756         if test $ol_with_ldbm_type != auto ; then
2757                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2758         fi
2759
2760         if test $ol_with_ldbm_module != static ; then
2761                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2762         fi
2763
2764         if test $ol_enable_modules != yes -a \
2765                 $ol_enable_bdb = no -a \
2766                 $ol_enable_dnssrv = no -a \
2767                 $ol_enable_hdb = no -a \
2768                 $ol_enable_ldap = no -a \
2769                 $ol_enable_meta = no -a \
2770                 $ol_enable_monitor = no -a \
2771                 $ol_enable_null = no -a \
2772                 $ol_enable_passwd = no -a \
2773                 $ol_enable_perl = no -a \
2774                 $ol_enable_shell = no -a \
2775                 $ol_enable_sql = no -a \
2776                 $ol_enable_tcl = no ; then
2777
2778                 if test $ol_enable_slapd = yes ; then
2779                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2780                 else
2781                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2782                         ol_enable_slapd=no
2783                 fi
2784         fi
2785
2786         ol_with_ldbm_api=no
2787         ol_with_ldbm_type=no
2788         ol_with_ldbm_module=static
2789
2790         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2791                 ol_with_ldbm_api=berkeley
2792         fi
2793
2794 else
2795                 if test $ol_with_ldbm_api = gdbm -a \
2796                 $ol_with_ldbm_type = btree ; then
2797                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2798         fi
2799         if test $ol_with_ldbm_api = mdbm -a \
2800                 $ol_with_ldbm_type = btree ; then
2801                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2802         fi
2803         if test $ol_with_ldbm_api = ndbm -a \
2804                 $ol_with_ldbm_type = btree ; then
2805                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2806         fi
2807
2808         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2809                 if test $ol_with_ldbm_api = auto ; then
2810                         ol_with_ldbm_api=berkeley
2811                 elif test $ol_with_ldbm_api != berkeley ; then
2812                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2813                 fi
2814
2815         elif test $ol_enable_bdb = auto ; then
2816                 if test $ol_with_ldbm_api != berkeley \
2817                         -o $ol_with_ldbm_api != auto ; then
2818                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2819                         ol_enable_bdb=no
2820                 fi
2821         fi
2822 fi
2823
2824 if test $ol_enable_slurpd = yes ; then
2825                 if test $ol_with_threads = no ; then
2826                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2827         fi
2828 fi
2829
2830 if test $ol_enable_lmpasswd = yes ; then
2831         if test $ol_with_tls = no ; then
2832                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2833         fi
2834 fi
2835
2836 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2837         if test $ol_with_kerberos = no ; then
2838                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2839         elif test $ol_with_kerberos = auto ; then
2840                 ol_with_kerberos=yes
2841         fi
2842
2843 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2844         if test $ol_with_kerberos = auto ; then
2845                 ol_with_kerberos=no
2846         elif test $ol_with_kerberos != no ; then
2847                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2848                 ol_with_kerberos=no
2849         fi
2850 fi
2851
2852 if test $ol_enable_spasswd = yes ; then
2853         if test $ol_with_cyrus_sasl = no ; then
2854                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2855         fi
2856         ol_with_cyrus_sasl=yes
2857 fi
2858
2859 echo "$ac_t""done" 1>&6
2860
2861 LDAP_LIBS=
2862 LDIF_LIBS=
2863 LDBM_LIBS=
2864 LTHREAD_LIBS=
2865 LUTIL_LIBS=
2866
2867 SLAPD_LIBS=
2868 SLURPD_LIBS=
2869
2870 BUILD_SLAPD=no
2871 BUILD_SLURPD=no
2872
2873 BUILD_THREAD=no
2874
2875 BUILD_SLAPI=no
2876 SLAPD_SLAPI_DEPEND=
2877
2878 BUILD_BDB=no
2879 BUILD_DNSSRV=no
2880 BUILD_HDB=no
2881 BUILD_LDAP=no
2882 BUILD_LDBM=no
2883 BUILD_META=no
2884 BUILD_MONITOR=no
2885 BUILD_CACHE=no
2886 BUILD_NULL=no
2887 BUILD_PASSWD=no
2888 BUILD_PERL=no
2889 BUILD_SHELL=no
2890 BUILD_SQL=no
2891 BUILD_TCL=no
2892
2893 BUILD_BDB_DYNAMIC=static
2894 BUILD_DNSSRV_DYNAMIC=static
2895 BUILD_HDB_DYNAMIC=static
2896 BUILD_LDAP_DYNAMIC=static
2897 BUILD_LDBM_DYNAMIC=static
2898 BUILD_META_DYNAMIC=static
2899 BUILD_MONITOR_DYNAMIC=static
2900 BUILD_NULL_DYNAMIC=static
2901 BUILD_PASSWD_DYNAMIC=static
2902 BUILD_PERL_DYNAMIC=static
2903 BUILD_SHELL_DYNAMIC=static
2904 BUILD_TCL_DYNAMIC=static
2905 BUILD_SQL_DYNAMIC=static
2906
2907 SLAPD_MODULES_LDFLAGS=
2908 SLAPD_MODULES_CPPFLAGS=
2909
2910 SLAPD_STATIC_BACKENDS=
2911 SLAPD_DYNAMIC_BACKENDS=
2912
2913 SLAPD_PERL_LDFLAGS=
2914 MOD_PERL_LDFLAGS=
2915 PERL_CPPFLAGS=
2916
2917 SLAPD_SQL_LDFLAGS=
2918 SLAPD_SQL_LIBS=
2919 SLAPD_SQL_INCLUDES=
2920
2921 MOD_TCL_LIB=
2922 KRB4_LIBS=
2923 KRB5_LIBS=
2924 SASL_LIBS=
2925 TERMCAP_LIBS=
2926 TLS_LIBS=
2927 MODULES_LIBS=
2928 SLAPI_LIBS=
2929 LIBSLAPI=
2930 LIBSLAPITOOLS=
2931 AUTH_LIBS=
2932
2933 SLAPD_SLP_LIBS=
2934
2935
2936 # Find a good install program.  We prefer a C program (faster),
2937 # so one script is as good as another.  But avoid the broken or
2938 # incompatible versions:
2939 # SysV /etc/install, /usr/sbin/install
2940 # SunOS /usr/etc/install
2941 # IRIX /sbin/install
2942 # AIX /bin/install
2943 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2944 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2945 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2946 # ./install, which can be erroneously created by make from ./install.sh.
2947 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2948 echo "configure:2948: checking for a BSD compatible install" >&5
2949 if test -z "$INSTALL"; then
2950 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2951   echo $ac_n "(cached) $ac_c" 1>&6
2952 else
2953     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2954   for ac_dir in $PATH; do
2955     # Account for people who put trailing slashes in PATH elements.
2956     case "$ac_dir/" in
2957     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2958     *)
2959       # OSF1 and SCO ODT 3.0 have their own names for install.
2960       # Don't use installbsd from OSF since it installs stuff as root
2961       # by default.
2962       for ac_prog in ginstall scoinst install; do
2963         if test -f $ac_dir/$ac_prog; then
2964           if test $ac_prog = install &&
2965             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2966             # AIX install.  It has an incompatible calling convention.
2967             :
2968           elif test $ac_prog = install &&
2969             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2970             # program-specific install script used by HP pwplus--don't use.
2971             :
2972           else
2973             ac_cv_path_install="$ac_dir/$ac_prog -c"
2974             break 2
2975           fi
2976         fi
2977       done
2978       ;;
2979     esac
2980   done
2981   IFS="$ac_save_IFS"
2982
2983 fi
2984   if test "${ac_cv_path_install+set}" = set; then
2985     INSTALL="$ac_cv_path_install"
2986   else
2987     # As a last resort, use the slow shell script.  We don't cache a
2988     # path for INSTALL within a source directory, because that will
2989     # break other packages using the cache if that directory is
2990     # removed, or if the path is relative.
2991     INSTALL="$ac_install_sh"
2992   fi
2993 fi
2994 echo "$ac_t""$INSTALL" 1>&6
2995
2996 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2997 # It thinks the first close brace ends the variable substitution.
2998 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2999
3000 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3001
3002 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3003
3004
3005 cat >> confdefs.h <<\EOF
3006 #define HAVE_MKVERSION 1
3007 EOF
3008
3009
3010
3011
3012 ol_aix_threads=no
3013 case "$target" in
3014 *-*-aix*)       if test -z "$CC" ; then
3015                 case "$ol_with_threads" in
3016                 auto | yes |  posix) ol_aix_threads=yes ;;
3017                 esac
3018         fi
3019 ;;
3020 esac
3021
3022 if test $ol_aix_threads = yes ; then
3023         if test -z "${CC}" ; then
3024                 for ac_prog in cc_r xlc_r cc
3025 do
3026 # Extract the first word of "$ac_prog", so it can be a program name with args.
3027 set dummy $ac_prog; ac_word=$2
3028 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3029 echo "configure:3029: checking for $ac_word" >&5
3030 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3031   echo $ac_n "(cached) $ac_c" 1>&6
3032 else
3033   if test -n "$CC"; then
3034   ac_cv_prog_CC="$CC" # Let the user override the test.
3035 else
3036   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3037   ac_dummy="$PATH"
3038   for ac_dir in $ac_dummy; do
3039     test -z "$ac_dir" && ac_dir=.
3040     if test -f $ac_dir/$ac_word; then
3041       ac_cv_prog_CC="$ac_prog"
3042       break
3043     fi
3044   done
3045   IFS="$ac_save_ifs"
3046 fi
3047 fi
3048 CC="$ac_cv_prog_CC"
3049 if test -n "$CC"; then
3050   echo "$ac_t""$CC" 1>&6
3051 else
3052   echo "$ac_t""no" 1>&6
3053 fi
3054
3055 test -n "$CC" && break
3056 done
3057
3058
3059                 if test "$CC" = cc ; then
3060                                                 if test $ol_with_threads != auto ; then
3061                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3062                         else
3063                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3064                         fi
3065                         ol_with_threads=no
3066                 fi
3067         fi
3068
3069         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3070                 ol_with_threads=posix
3071                 ol_cv_pthread_create=yes
3072         fi
3073 fi
3074
3075 if test -z "${CC}"; then
3076         for ac_prog in cc gcc
3077 do
3078 # Extract the first word of "$ac_prog", so it can be a program name with args.
3079 set dummy $ac_prog; ac_word=$2
3080 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3081 echo "configure:3081: checking for $ac_word" >&5
3082 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3083   echo $ac_n "(cached) $ac_c" 1>&6
3084 else
3085   if test -n "$CC"; then
3086   ac_cv_prog_CC="$CC" # Let the user override the test.
3087 else
3088   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3089   ac_dummy="$PATH"
3090   for ac_dir in $ac_dummy; do
3091     test -z "$ac_dir" && ac_dir=.
3092     if test -f $ac_dir/$ac_word; then
3093       ac_cv_prog_CC="$ac_prog"
3094       break
3095     fi
3096   done
3097   IFS="$ac_save_ifs"
3098 fi
3099 fi
3100 CC="$ac_cv_prog_CC"
3101 if test -n "$CC"; then
3102   echo "$ac_t""$CC" 1>&6
3103 else
3104   echo "$ac_t""no" 1>&6
3105 fi
3106
3107 test -n "$CC" && break
3108 done
3109 test -n "$CC" || CC="missing"
3110
3111
3112         if test "${CC}" = "missing" ; then
3113                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3114         fi
3115 fi
3116
3117 if test -z "${AR}"; then
3118         for ac_prog in ar gar
3119 do
3120 # Extract the first word of "$ac_prog", so it can be a program name with args.
3121 set dummy $ac_prog; ac_word=$2
3122 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3123 echo "configure:3123: checking for $ac_word" >&5
3124 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3125   echo $ac_n "(cached) $ac_c" 1>&6
3126 else
3127   if test -n "$AR"; then
3128   ac_cv_prog_AR="$AR" # Let the user override the test.
3129 else
3130   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3131   ac_dummy="$PATH"
3132   for ac_dir in $ac_dummy; do
3133     test -z "$ac_dir" && ac_dir=.
3134     if test -f $ac_dir/$ac_word; then
3135       ac_cv_prog_AR="$ac_prog"
3136       break
3137     fi
3138   done
3139   IFS="$ac_save_ifs"
3140 fi
3141 fi
3142 AR="$ac_cv_prog_AR"
3143 if test -n "$AR"; then
3144   echo "$ac_t""$AR" 1>&6
3145 else
3146   echo "$ac_t""no" 1>&6
3147 fi
3148
3149 test -n "$AR" && break
3150 done
3151 test -n "$AR" || AR="missing"
3152
3153
3154         if test "${AR}" = "missing" ; then
3155                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3156         fi
3157 fi
3158
3159
3160
3161 # Find the correct PATH separator.  Usually this is `:', but
3162 # DJGPP uses `;' like DOS.
3163 if test "X${PATH_SEPARATOR+set}" != Xset; then
3164   UNAME=${UNAME-`uname 2>/dev/null`}
3165   case X$UNAME in
3166     *-DOS) lt_cv_sys_path_separator=';' ;;
3167     *)     lt_cv_sys_path_separator=':' ;;
3168   esac
3169   PATH_SEPARATOR=$lt_cv_sys_path_separator
3170 fi
3171
3172 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3173 echo "configure:3173: checking for Cygwin environment" >&5
3174 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3175   echo $ac_n "(cached) $ac_c" 1>&6
3176 else
3177   cat > conftest.$ac_ext <<EOF
3178 #line 3178 "configure"
3179 #include "confdefs.h"
3180
3181 int main() {
3182
3183 #ifndef __CYGWIN__
3184 #define __CYGWIN__ __CYGWIN32__
3185 #endif
3186 return __CYGWIN__;
3187 ; return 0; }
3188 EOF
3189 if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3190   rm -rf conftest*
3191   ac_cv_cygwin=yes
3192 else
3193   echo "configure: failed program was:" >&5
3194   cat conftest.$ac_ext >&5
3195   rm -rf conftest*
3196   ac_cv_cygwin=no
3197 fi
3198 rm -f conftest*
3199 fi
3200
3201 echo "$ac_t""$ac_cv_cygwin" 1>&6
3202 CYGWIN=
3203 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3204 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3205 echo "configure:3205: checking for mingw32 environment" >&5
3206 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3207   echo $ac_n "(cached) $ac_c" 1>&6
3208 else
3209   cat > conftest.$ac_ext <<EOF
3210 #line 3210 "configure"
3211 #include "confdefs.h"
3212
3213 int main() {
3214 return __MINGW32__;
3215 ; return 0; }
3216 EOF
3217 if { (eval echo configure:3217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3218   rm -rf conftest*
3219   ac_cv_mingw32=yes
3220 else
3221   echo "configure: failed program was:" >&5
3222   cat conftest.$ac_ext >&5
3223   rm -rf conftest*
3224   ac_cv_mingw32=no
3225 fi
3226 rm -f conftest*
3227 fi
3228
3229 echo "$ac_t""$ac_cv_mingw32" 1>&6
3230 MINGW32=
3231 test "$ac_cv_mingw32" = yes && MINGW32=yes
3232 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3233 echo "configure:3233: checking for EMX OS/2 environment" >&5
3234 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3235   echo $ac_n "(cached) $ac_c" 1>&6
3236 else
3237   cat > conftest.$ac_ext <<EOF
3238 #line 3238 "configure"
3239 #include "confdefs.h"
3240
3241 int main() {
3242 return __EMX__;
3243 ; return 0; }
3244 EOF
3245 if { (eval echo configure:3245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3246   rm -rf conftest*
3247   ac_cv_emxos2=yes
3248 else
3249   echo "configure: failed program was:" >&5
3250   cat conftest.$ac_ext >&5
3251   rm -rf conftest*
3252   ac_cv_emxos2=no
3253 fi
3254 rm -f conftest*
3255 fi
3256
3257 echo "$ac_t""$ac_cv_emxos2" 1>&6
3258 EMXOS2=
3259 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3260 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3261 echo "configure:3261: checking how to run the C preprocessor" >&5
3262 # On Suns, sometimes $CPP names a directory.
3263 if test -n "$CPP" && test -d "$CPP"; then
3264   CPP=
3265 fi
3266 if test -z "$CPP"; then
3267 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3268   echo $ac_n "(cached) $ac_c" 1>&6
3269 else
3270     # This must be in double quotes, not single quotes, because CPP may get
3271   # substituted into the Makefile and "${CC-cc}" will confuse make.
3272   CPP="${CC-cc} -E"
3273   # On the NeXT, cc -E runs the code through the compiler's parser,
3274   # not just through cpp.
3275   cat > conftest.$ac_ext <<EOF
3276 #line 3276 "configure"
3277 #include "confdefs.h"
3278 #include <assert.h>
3279 Syntax Error
3280 EOF
3281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3282 { (eval echo configure:3282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3284 if test -z "$ac_err"; then
3285   :
3286 else
3287   echo "$ac_err" >&5
3288   echo "configure: failed program was:" >&5
3289   cat conftest.$ac_ext >&5
3290   rm -rf conftest*
3291   CPP="${CC-cc} -E -traditional-cpp"
3292   cat > conftest.$ac_ext <<EOF
3293 #line 3293 "configure"
3294 #include "confdefs.h"
3295 #include <assert.h>
3296 Syntax Error
3297 EOF
3298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3299 { (eval echo configure:3299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3300 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3301 if test -z "$ac_err"; then
3302   :
3303 else
3304   echo "$ac_err" >&5
3305   echo "configure: failed program was:" >&5
3306   cat conftest.$ac_ext >&5
3307   rm -rf conftest*
3308   CPP="${CC-cc} -nologo -E"
3309   cat > conftest.$ac_ext <<EOF
3310 #line 3310 "configure"
3311 #include "confdefs.h"
3312 #include <assert.h>
3313 Syntax Error
3314 EOF
3315 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3316 { (eval echo configure:3316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3317 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3318 if test -z "$ac_err"; then
3319   :
3320 else
3321   echo "$ac_err" >&5
3322   echo "configure: failed program was:" >&5
3323   cat conftest.$ac_ext >&5
3324   rm -rf conftest*
3325   CPP=/lib/cpp
3326 fi
3327 rm -f conftest*
3328 fi
3329 rm -f conftest*
3330 fi
3331 rm -f conftest*
3332   ac_cv_prog_CPP="$CPP"
3333 fi
3334   CPP="$ac_cv_prog_CPP"
3335 else
3336   ac_cv_prog_CPP="$CPP"
3337 fi
3338 echo "$ac_t""$CPP" 1>&6
3339
3340 # Check whether --enable-fast-install or --disable-fast-install was given.
3341 if test "${enable_fast_install+set}" = set; then
3342   enableval="$enable_fast_install"
3343   p=${PACKAGE-default}
3344 case $enableval in
3345 yes) enable_fast_install=yes ;;
3346 no) enable_fast_install=no ;;
3347 *)
3348   enable_fast_install=no
3349   # Look at the argument we got.  We use all the common list separators.
3350   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3351   for pkg in $enableval; do
3352     if test "X$pkg" = "X$p"; then
3353       enable_fast_install=yes
3354     fi
3355   done
3356   IFS="$ac_save_ifs"
3357   ;;
3358 esac
3359 else
3360   enable_fast_install=yes
3361 fi
3362
3363 # Extract the first word of "gcc", so it can be a program name with args.
3364 set dummy gcc; ac_word=$2
3365 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3366 echo "configure:3366: checking for $ac_word" >&5
3367 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3368   echo $ac_n "(cached) $ac_c" 1>&6
3369 else
3370   if test -n "$CC"; then
3371   ac_cv_prog_CC="$CC" # Let the user override the test.
3372 else
3373   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3374   ac_dummy="$PATH"
3375   for ac_dir in $ac_dummy; do
3376     test -z "$ac_dir" && ac_dir=.
3377     if test -f $ac_dir/$ac_word; then
3378       ac_cv_prog_CC="gcc"
3379       break
3380     fi
3381   done
3382   IFS="$ac_save_ifs"
3383 fi
3384 fi
3385 CC="$ac_cv_prog_CC"
3386 if test -n "$CC"; then
3387   echo "$ac_t""$CC" 1>&6
3388 else
3389   echo "$ac_t""no" 1>&6
3390 fi
3391
3392 if test -z "$CC"; then
3393   # Extract the first word of "cc", so it can be a program name with args.
3394 set dummy cc; ac_word=$2
3395 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3396 echo "configure:3396: checking for $ac_word" >&5
3397 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3398   echo $ac_n "(cached) $ac_c" 1>&6
3399 else
3400   if test -n "$CC"; then
3401   ac_cv_prog_CC="$CC" # Let the user override the test.
3402 else
3403   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3404   ac_prog_rejected=no
3405   ac_dummy="$PATH"
3406   for ac_dir in $ac_dummy; do
3407     test -z "$ac_dir" && ac_dir=.
3408     if test -f $ac_dir/$ac_word; then
3409       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3410         ac_prog_rejected=yes
3411         continue
3412       fi
3413       ac_cv_prog_CC="cc"
3414       break
3415     fi
3416   done
3417   IFS="$ac_save_ifs"
3418 if test $ac_prog_rejected = yes; then
3419   # We found a bogon in the path, so make sure we never use it.
3420   set dummy $ac_cv_prog_CC
3421   shift
3422   if test $# -gt 0; then
3423     # We chose a different compiler from the bogus one.
3424     # However, it has the same basename, so the bogon will be chosen
3425     # first if we set CC to just the basename; use the full file name.
3426     shift
3427     set dummy "$ac_dir/$ac_word" "$@"
3428     shift
3429     ac_cv_prog_CC="$@"
3430   fi
3431 fi
3432 fi
3433 fi
3434 CC="$ac_cv_prog_CC"
3435 if test -n "$CC"; then
3436   echo "$ac_t""$CC" 1>&6
3437 else
3438   echo "$ac_t""no" 1>&6
3439 fi
3440
3441   if test -z "$CC"; then
3442     case "`uname -s`" in
3443     *win32* | *WIN32* | *CYGWIN*)
3444       # Extract the first word of "cl", so it can be a program name with args.
3445 set dummy cl; ac_word=$2
3446 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3447 echo "configure:3447: checking for $ac_word" >&5
3448 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3449   echo $ac_n "(cached) $ac_c" 1>&6
3450 else
3451   if test -n "$CC"; then
3452   ac_cv_prog_CC="$CC" # Let the user override the test.
3453 else
3454   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3455   ac_dummy="$PATH"
3456   for ac_dir in $ac_dummy; do
3457     test -z "$ac_dir" && ac_dir=.
3458     if test -f $ac_dir/$ac_word; then
3459       ac_cv_prog_CC="cl"
3460       break
3461     fi
3462   done
3463   IFS="$ac_save_ifs"
3464 fi
3465 fi
3466 CC="$ac_cv_prog_CC"
3467 if test -n "$CC"; then
3468   echo "$ac_t""$CC" 1>&6
3469 else
3470   echo "$ac_t""no" 1>&6
3471 fi
3472  ;;
3473     esac
3474   fi
3475   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3476 fi
3477
3478 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3479 echo "configure:3479: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3480
3481 ac_ext=c
3482 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3483 ac_cpp='$CPP $CPPFLAGS'
3484 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3485 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3486 cross_compiling=$ac_cv_prog_cc_cross
3487
3488 cat > conftest.$ac_ext << EOF
3489
3490 #line 3490 "configure"
3491 #include "confdefs.h"
3492
3493 main(){return(0);}
3494 EOF
3495 if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3496   ac_cv_prog_cc_works=yes
3497   # If we can't run a trivial program, we are probably using a cross compiler.
3498   if (./conftest; exit) 2>/dev/null; then
3499     ac_cv_prog_cc_cross=no
3500   else
3501     ac_cv_prog_cc_cross=yes
3502   fi
3503 else
3504   echo "configure: failed program was:" >&5
3505   cat conftest.$ac_ext >&5
3506   ac_cv_prog_cc_works=no
3507 fi
3508 rm -fr conftest*
3509 ac_ext=c
3510 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3511 ac_cpp='$CPP $CPPFLAGS'
3512 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3513 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3514 cross_compiling=$ac_cv_prog_cc_cross
3515
3516 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3517 if test $ac_cv_prog_cc_works = no; then
3518   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3519 fi
3520 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3521 echo "configure:3521: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3522 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3523 cross_compiling=$ac_cv_prog_cc_cross
3524
3525 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3526 echo "configure:3526: checking whether we are using GNU C" >&5
3527 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3528   echo $ac_n "(cached) $ac_c" 1>&6
3529 else
3530   cat > conftest.c <<EOF
3531 #ifdef __GNUC__
3532   yes;
3533 #endif
3534 EOF
3535 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3536   ac_cv_prog_gcc=yes
3537 else
3538   ac_cv_prog_gcc=no
3539 fi
3540 fi
3541
3542 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3543
3544 if test $ac_cv_prog_gcc = yes; then
3545   GCC=yes
3546 else
3547   GCC=
3548 fi
3549
3550 ac_test_CFLAGS="${CFLAGS+set}"
3551 ac_save_CFLAGS="$CFLAGS"
3552 CFLAGS=
3553 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3554 echo "configure:3554: checking whether ${CC-cc} accepts -g" >&5
3555 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3556   echo $ac_n "(cached) $ac_c" 1>&6
3557 else
3558   echo 'void f(){}' > conftest.c
3559 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3560   ac_cv_prog_cc_g=yes
3561 else
3562   ac_cv_prog_cc_g=no
3563 fi
3564 rm -f conftest*
3565
3566 fi
3567
3568 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3569 if test "$ac_test_CFLAGS" = set; then
3570   CFLAGS="$ac_save_CFLAGS"
3571 elif test $ac_cv_prog_cc_g = yes; then
3572   if test "$GCC" = yes; then
3573     CFLAGS="-g -O2"
3574   else
3575     CFLAGS="-g"
3576   fi
3577 else
3578   if test "$GCC" = yes; then
3579     CFLAGS="-O2"
3580   else
3581     CFLAGS=
3582   fi
3583 fi
3584
3585 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3586 if test "${with_gnu_ld+set}" = set; then
3587   withval="$with_gnu_ld"
3588   test "$withval" = no || with_gnu_ld=yes
3589 else
3590   with_gnu_ld=no
3591 fi
3592
3593 ac_prog=ld
3594 if test "$GCC" = yes; then
3595   # Check if gcc -print-prog-name=ld gives a path.
3596   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3597 echo "configure:3597: checking for ld used by GCC" >&5
3598   case $host in
3599   *-*-mingw*)
3600     # gcc leaves a trailing carriage return which upsets mingw
3601     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3602   *)
3603     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3604   esac
3605   case $ac_prog in
3606     # Accept absolute paths.
3607     [\\/]* | [A-Za-z]:[\\/]*)
3608       re_direlt='/[^/][^/]*/\.\./'
3609       # Canonicalize the path of ld
3610       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3611       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3612         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3613       done
3614       test -z "$LD" && LD="$ac_prog"
3615       ;;
3616   "")
3617     # If it fails, then pretend we aren't using GCC.
3618     ac_prog=ld
3619     ;;
3620   *)
3621     # If it is relative, then search for the first ld in PATH.
3622     with_gnu_ld=unknown
3623     ;;
3624   esac
3625 elif test "$with_gnu_ld" = yes; then
3626   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3627 echo "configure:3627: checking for GNU ld" >&5
3628 else
3629   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3630 echo "configure:3630: checking for non-GNU ld" >&5
3631 fi
3632 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3633   echo $ac_n "(cached) $ac_c" 1>&6
3634 else
3635   if test -z "$LD"; then
3636   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3637   for ac_dir in $PATH; do
3638     test -z "$ac_dir" && ac_dir=.
3639     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3640       lt_cv_path_LD="$ac_dir/$ac_prog"
3641       # Check to see if the program is GNU ld.  I'd rather use --version,
3642       # but apparently some GNU ld's only accept -v.
3643       # Break only if it was the GNU/non-GNU ld that we prefer.
3644       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3645         test "$with_gnu_ld" != no && break
3646       else
3647         test "$with_gnu_ld" != yes && break
3648       fi
3649     fi
3650   done
3651   IFS="$ac_save_ifs"
3652 else
3653   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3654 fi
3655 fi
3656
3657 LD="$lt_cv_path_LD"
3658 if test -n "$LD"; then
3659   echo "$ac_t""$LD" 1>&6
3660 else
3661   echo "$ac_t""no" 1>&6
3662 fi
3663 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3664 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3665 echo "configure:3665: checking if the linker ($LD) is GNU ld" >&5
3666 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3667   echo $ac_n "(cached) $ac_c" 1>&6
3668 else
3669   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3670 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3671   lt_cv_prog_gnu_ld=yes
3672 else
3673   lt_cv_prog_gnu_ld=no
3674 fi
3675 fi
3676
3677 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3678 with_gnu_ld=$lt_cv_prog_gnu_ld
3679
3680
3681 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3682 echo "configure:3682: checking for $LD option to reload object files" >&5
3683 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3684   echo $ac_n "(cached) $ac_c" 1>&6
3685 else
3686   lt_cv_ld_reload_flag='-r'
3687 fi
3688
3689 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3690 reload_flag=$lt_cv_ld_reload_flag
3691 test -n "$reload_flag" && reload_flag=" $reload_flag"
3692
3693 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3694 echo "configure:3694: checking for BSD-compatible nm" >&5
3695 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3696   echo $ac_n "(cached) $ac_c" 1>&6
3697 else
3698   if test -n "$NM"; then
3699   # Let the user override the test.
3700   lt_cv_path_NM="$NM"
3701 else
3702   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3703   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3704     test -z "$ac_dir" && ac_dir=.
3705     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3706     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3707       # Check to see if the nm accepts a BSD-compat flag.
3708       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3709       #   nm: unknown option "B" ignored
3710       # Tru64's nm complains that /dev/null is an invalid object file
3711       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3712         lt_cv_path_NM="$tmp_nm -B"
3713         break
3714       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3715         lt_cv_path_NM="$tmp_nm -p"
3716         break
3717       else
3718         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3719         continue # so that we can try to find one that supports BSD flags
3720       fi
3721     fi
3722   done
3723   IFS="$ac_save_ifs"
3724   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3725 fi
3726 fi
3727
3728 NM="$lt_cv_path_NM"
3729 echo "$ac_t""$NM" 1>&6
3730
3731 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3732 echo "configure:3732: checking for a sed that does not truncate output" >&5
3733 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3734   echo $ac_n "(cached) $ac_c" 1>&6
3735 else
3736   # Loop through the user's path and test for sed and gsed.
3737 # Then use that list of sed's as ones to test for truncation.
3738 as_executable_p="test -f"
3739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3740 for as_dir in $PATH
3741 do
3742   IFS=$as_save_IFS
3743   test -z "$as_dir" && as_dir=.
3744   for ac_prog in sed gsed; do
3745     for ac_exec_ext in '' $ac_executable_extensions; do
3746       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3747         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3748       fi
3749     done
3750   done
3751 done
3752
3753   # Create a temporary directory, and hook for its removal unless debugging.
3754 $debug ||
3755 {
3756   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3757   trap '{ (exit 1); exit 1; }' 1 2 13 15
3758 }
3759
3760 # Create a (secure) tmp directory for tmp files.
3761 : ${TMPDIR=/tmp}
3762 {
3763   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3764   test -n "$tmp" && test -d "$tmp"
3765 }  ||
3766 {
3767   tmp=$TMPDIR/sed$$-$RANDOM
3768   (umask 077 && mkdir $tmp)
3769 } ||
3770 {
3771    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3772    { (exit 1); exit 1; }
3773 }
3774   _max=0
3775   _count=0
3776   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3777   # along with /bin/sed that truncates output.
3778   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3779     test ! -f ${_sed} && break
3780     cat /dev/null > "$tmp/sed.in"
3781     _count=0
3782     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3783     # Check for GNU sed and select it if it is found.
3784     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3785       lt_cv_path_SED=${_sed}
3786       break
3787     fi
3788     while true; do
3789       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3790       mv "$tmp/sed.tmp" "$tmp/sed.in"
3791       cp "$tmp/sed.in" "$tmp/sed.nl"
3792       echo >>"$tmp/sed.nl"
3793       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3794       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3795       # 40000 chars as input seems more than enough
3796       test $_count -gt 10 && break
3797       _count=`expr $_count + 1`
3798       if test $_count -gt $_max; then
3799         _max=$_count
3800         lt_cv_path_SED=$_sed
3801       fi
3802     done
3803   done
3804   rm -rf "$tmp"
3805
3806 fi
3807
3808 if test "X$SED" != "X"; then
3809   lt_cv_path_SED=$SED
3810 else
3811   SED=$lt_cv_path_SED
3812 fi
3813 echo "$ac_t""$SED" 1>&6
3814
3815 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3816 echo "configure:3816: checking whether ln -s works" >&5
3817 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3818   echo $ac_n "(cached) $ac_c" 1>&6
3819 else
3820   rm -f conftestdata
3821 if ln -s X conftestdata 2>/dev/null
3822 then
3823   rm -f conftestdata
3824   ac_cv_prog_LN_S="ln -s"
3825 else
3826   ac_cv_prog_LN_S=ln
3827 fi
3828 fi
3829 LN_S="$ac_cv_prog_LN_S"
3830 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3831   echo "$ac_t""yes" 1>&6
3832 else
3833   echo "$ac_t""no" 1>&6
3834 fi
3835
3836 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3837 echo "configure:3837: checking how to recognise dependent libraries" >&5
3838 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3839   echo $ac_n "(cached) $ac_c" 1>&6
3840 else
3841   lt_cv_file_magic_cmd='$MAGIC_CMD'
3842 lt_cv_file_magic_test_file=
3843 lt_cv_deplibs_check_method='unknown'
3844 # Need to set the preceding variable on all platforms that support
3845 # interlibrary dependencies.
3846 # 'none' -- dependencies not supported.
3847 # `unknown' -- same as none, but documents that we really don't know.
3848 # 'pass_all' -- all dependencies passed with no checks.
3849 # 'test_compile' -- check by making test program.
3850 # 'file_magic [[regex]]' -- check by looking for files in library path
3851 # which responds to the $file_magic_cmd with a given egrep regex.
3852 # If you have `file' or equivalent on your system and you're not sure
3853 # whether `pass_all' will *always* work, you probably want this one.
3854
3855 case $host_os in
3856 aix4* | aix5*)
3857   lt_cv_deplibs_check_method=pass_all
3858   ;;
3859
3860 beos*)
3861   lt_cv_deplibs_check_method=pass_all
3862   ;;
3863
3864 bsdi4*)
3865   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3866   lt_cv_file_magic_cmd='/usr/bin/file -L'
3867   lt_cv_file_magic_test_file=/shlib/libc.so
3868   ;;
3869
3870 cygwin* | mingw* | pw32*)
3871   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3872   lt_cv_file_magic_cmd='$OBJDUMP -f'
3873   ;;
3874
3875 darwin* | rhapsody*)
3876   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3877   lt_cv_file_magic_cmd='/usr/bin/file -L'
3878   case "$host_os" in
3879   rhapsody* | darwin1.[012])
3880     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3881     ;;
3882   *) # Darwin 1.3 on
3883     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3884     ;;
3885   esac
3886   ;;
3887
3888 freebsd*)
3889   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3890     case $host_cpu in
3891     i*86 )
3892       # Not sure whether the presence of OpenBSD here was a mistake.
3893       # Let's accept both of them until this is cleared up.
3894       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3895       lt_cv_file_magic_cmd=/usr/bin/file
3896       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3897       ;;
3898     esac
3899   else
3900     lt_cv_deplibs_check_method=pass_all
3901   fi
3902   ;;
3903
3904 gnu*)
3905   lt_cv_deplibs_check_method=pass_all
3906   ;;
3907
3908 hpux10.20*|hpux11*)
3909   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3910   lt_cv_file_magic_cmd=/usr/bin/file
3911   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3912   ;;
3913
3914 irix5* | irix6* | nonstopux*)
3915   case $host_os in
3916   irix5* | nonstopux*)
3917     # this will be overridden with pass_all, but let us keep it just in case
3918     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3919     ;;
3920   *)
3921     case $LD in
3922     *-32|*"-32 ") libmagic=32-bit;;
3923     *-n32|*"-n32 ") libmagic=N32;;
3924     *-64|*"-64 ") libmagic=64-bit;;
3925     *) libmagic=never-match;;
3926     esac
3927     # this will be overridden with pass_all, but let us keep it just in case
3928     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3929     ;;
3930   esac
3931   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3932   lt_cv_deplibs_check_method=pass_all
3933   ;;
3934
3935 # This must be Linux ELF.
3936 linux-gnu*)
3937   case $host_cpu in
3938   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3939     lt_cv_deplibs_check_method=pass_all ;;
3940   *)
3941     # glibc up to 2.1.1 does not perform some relocations on ARM
3942     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3943   esac
3944   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3945   ;;
3946
3947 netbsd*)
3948   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3949     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3950   else
3951     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3952   fi
3953   ;;
3954
3955 newos6*)
3956   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3957   lt_cv_file_magic_cmd=/usr/bin/file
3958   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3959   ;;
3960
3961 openbsd*)
3962   lt_cv_file_magic_cmd=/usr/bin/file
3963   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3964   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3965     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3966   else
3967     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3968   fi
3969   ;;
3970
3971 osf3* | osf4* | osf5*)
3972   # this will be overridden with pass_all, but let us keep it just in case
3973   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3974   lt_cv_file_magic_test_file=/shlib/libc.so
3975   lt_cv_deplibs_check_method=pass_all
3976   ;;
3977
3978 sco3.2v5*)
3979   lt_cv_deplibs_check_method=pass_all
3980   ;;
3981
3982 solaris*)
3983   lt_cv_deplibs_check_method=pass_all
3984   lt_cv_file_magic_test_file=/lib/libc.so
3985   ;;
3986
3987 sysv5uw[78]* | sysv4*uw2*)
3988   lt_cv_deplibs_check_method=pass_all
3989   ;;
3990
3991 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3992   case $host_vendor in
3993   motorola)
3994     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]'
3995     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3996     ;;
3997   ncr)
3998     lt_cv_deplibs_check_method=pass_all
3999     ;;
4000   sequent)
4001     lt_cv_file_magic_cmd='/bin/file'
4002     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4003     ;;
4004   sni)
4005     lt_cv_file_magic_cmd='/bin/file'
4006     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4007     lt_cv_file_magic_test_file=/lib/libc.so
4008     ;;
4009   siemens)
4010     lt_cv_deplibs_check_method=pass_all
4011     ;;
4012   esac
4013   ;;
4014 esac
4015
4016 fi
4017
4018 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
4019 file_magic_cmd=$lt_cv_file_magic_cmd
4020 deplibs_check_method=$lt_cv_deplibs_check_method
4021
4022 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4023 echo "configure:4023: checking for object suffix" >&5
4024 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4025   echo $ac_n "(cached) $ac_c" 1>&6
4026 else
4027   rm -f conftest*
4028 echo 'int i = 1;' > conftest.$ac_ext
4029 if { (eval echo configure:4029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4030   for ac_file in conftest.*; do
4031     case $ac_file in
4032     *.c) ;;
4033     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4034     esac
4035   done
4036 else
4037   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4038 fi
4039 rm -f conftest*
4040 fi
4041
4042 echo "$ac_t""$ac_cv_objext" 1>&6
4043 OBJEXT=$ac_cv_objext
4044 ac_objext=$ac_cv_objext
4045
4046
4047
4048
4049 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4050 echo "configure:4050: checking for executable suffix" >&5
4051 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4052   echo $ac_n "(cached) $ac_c" 1>&6
4053 else
4054   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4055   ac_cv_exeext=.exe
4056 else
4057   rm -f conftest*
4058   echo 'int main () { return 0; }' > conftest.$ac_ext
4059   ac_cv_exeext=
4060   if { (eval echo configure:4060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4061     for file in conftest.*; do
4062       case $file in
4063       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4064       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4065       esac
4066     done
4067   else
4068     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4069   fi
4070   rm -f conftest*
4071   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4072 fi
4073 fi
4074
4075 EXEEXT=""
4076 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4077 echo "$ac_t""${ac_cv_exeext}" 1>&6
4078 ac_exeext=$EXEEXT
4079
4080 if test $host != $build; then
4081   ac_tool_prefix=${host_alias}-
4082 else
4083   ac_tool_prefix=
4084 fi
4085
4086
4087
4088
4089 # Check for command to grab the raw symbol name followed by C symbol from nm.
4090 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4091 echo "configure:4091: checking command to parse $NM output" >&5
4092 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4093   echo $ac_n "(cached) $ac_c" 1>&6
4094 else
4095   
4096 # These are sane defaults that work on at least a few old systems.
4097 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4098
4099 # Character class describing NM global symbol codes.
4100 symcode='[BCDEGRST]'
4101
4102 # Regexp to match symbols that can be accessed directly from C.
4103 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4104
4105 # Transform the above into a raw symbol and a C symbol.
4106 symxfrm='\1 \2\3 \3'
4107
4108 # Transform an extracted symbol line into a proper C declaration
4109 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4110
4111 # Transform an extracted symbol line into symbol name and symbol address
4112 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'"
4113
4114 # Define system-specific variables.
4115 case $host_os in
4116 aix*)
4117   symcode='[BCDT]'
4118   ;;
4119 cygwin* | mingw* | pw32*)
4120   symcode='[ABCDGISTW]'
4121   ;;
4122 hpux*) # Its linker distinguishes data from code symbols
4123   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4124   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'"
4125   ;;
4126 irix* | nonstopux*)
4127   symcode='[BCDEGRST]'
4128   ;;
4129 osf*)
4130   symcode='[BCDEGQRST]'
4131   ;;
4132 solaris* | sysv5*)
4133   symcode='[BDT]'
4134   ;;
4135 sysv4)
4136   symcode='[DFNSTU]'
4137   ;;
4138 esac
4139
4140 # Handle CRLF in mingw tool chain
4141 opt_cr=
4142 case $host_os in
4143 mingw*)
4144   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4145   ;;
4146 esac
4147
4148 # If we're using GNU nm, then use its standard symbol codes.
4149 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4150   symcode='[ABCDGISTW]'
4151 fi
4152
4153 # Try without a prefix undercore, then with it.
4154 for ac_symprfx in "" "_"; do
4155
4156   # Write the raw and C identifiers.
4157 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4158
4159   # Check to see that the pipe works correctly.
4160   pipe_works=no
4161   rm -f conftest*
4162   cat > conftest.$ac_ext <<EOF
4163 #ifdef __cplusplus
4164 extern "C" {
4165 #endif
4166 char nm_test_var;
4167 void nm_test_func(){}
4168 #ifdef __cplusplus
4169 }
4170 #endif
4171 int main(){nm_test_var='a';nm_test_func();return(0);}
4172 EOF
4173
4174   if { (eval echo configure:4174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4175     # Now try to grab the symbols.
4176     nlist=conftest.nm
4177     if { (eval echo configure:4177: \"$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
4178       # Try sorting and uniquifying the output.
4179       if sort "$nlist" | uniq > "$nlist"T; then
4180         mv -f "$nlist"T "$nlist"
4181       else
4182         rm -f "$nlist"T
4183       fi
4184
4185       # Make sure that we snagged all the symbols we need.
4186       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4187         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4188           cat <<EOF > conftest.$ac_ext
4189 #ifdef __cplusplus
4190 extern "C" {
4191 #endif
4192
4193 EOF
4194           # Now generate the symbol file.
4195           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4196
4197           cat <<EOF >> conftest.$ac_ext
4198 #if defined (__STDC__) && __STDC__
4199 # define lt_ptr void *
4200 #else
4201 # define lt_ptr char *
4202 # define const
4203 #endif
4204
4205 /* The mapping between symbol names and symbols. */
4206 const struct {
4207   const char *name;
4208   lt_ptr address;
4209 }
4210 lt_preloaded_symbols[] =
4211 {
4212 EOF
4213           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4214           cat <<\EOF >> conftest.$ac_ext
4215   {0, (lt_ptr) 0}
4216 };
4217
4218 #ifdef __cplusplus
4219 }
4220 #endif
4221 EOF
4222           # Now try linking the two files.
4223           mv conftest.$ac_objext conftstm.$ac_objext
4224           save_LIBS="$LIBS"
4225           save_CFLAGS="$CFLAGS"
4226           LIBS="conftstm.$ac_objext"
4227           CFLAGS="$CFLAGS$no_builtin_flag"
4228           if { (eval echo configure:4228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4229             pipe_works=yes
4230           fi
4231           LIBS="$save_LIBS"
4232           CFLAGS="$save_CFLAGS"
4233         else
4234           echo "cannot find nm_test_func in $nlist" >&5
4235         fi
4236       else
4237         echo "cannot find nm_test_var in $nlist" >&5
4238       fi
4239     else
4240       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4241     fi
4242   else
4243     echo "$progname: failed program was:" >&5
4244     cat conftest.$ac_ext >&5
4245   fi
4246   rm -f conftest* conftst*
4247
4248   # Do not use the global_symbol_pipe unless it works.
4249   if test "$pipe_works" = yes; then
4250     break
4251   else
4252     lt_cv_sys_global_symbol_pipe=
4253   fi
4254 done
4255
4256 fi
4257
4258 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4259 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4260   global_symbol_to_cdecl=
4261   global_symbol_to_c_name_address=
4262 else
4263   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4264   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4265 fi
4266 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4267 then
4268   echo "$ac_t""failed" 1>&6
4269 else
4270   echo "$ac_t""ok" 1>&6
4271 fi
4272
4273 for ac_hdr in dlfcn.h
4274 do
4275 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4276 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4277 echo "configure:4277: checking for $ac_hdr" >&5
4278 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4279   echo $ac_n "(cached) $ac_c" 1>&6
4280 else
4281   cat > conftest.$ac_ext <<EOF
4282 #line 4282 "configure"
4283 #include "confdefs.h"
4284 #include <$ac_hdr>
4285 EOF
4286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4287 { (eval echo configure:4287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4289 if test -z "$ac_err"; then
4290   rm -rf conftest*
4291   eval "ac_cv_header_$ac_safe=yes"
4292 else
4293   echo "$ac_err" >&5
4294   echo "configure: failed program was:" >&5
4295   cat conftest.$ac_ext >&5
4296   rm -rf conftest*
4297   eval "ac_cv_header_$ac_safe=no"
4298 fi
4299 rm -f conftest*
4300 fi
4301 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4302   echo "$ac_t""yes" 1>&6
4303     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4304   cat >> confdefs.h <<EOF
4305 #define $ac_tr_hdr 1
4306 EOF
4307  
4308 else
4309   echo "$ac_t""no" 1>&6
4310 fi
4311 done
4312
4313
4314
4315
4316
4317
4318 # Only perform the check for file, if the check method requires it
4319 case $deplibs_check_method in
4320 file_magic*)
4321   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4322     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4323 echo "configure:4323: checking for ${ac_tool_prefix}file" >&5
4324 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4325   echo $ac_n "(cached) $ac_c" 1>&6
4326 else
4327   case $MAGIC_CMD in
4328   /*)
4329   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4330   ;;
4331   ?:/*)
4332   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4333   ;;
4334   *)
4335   ac_save_MAGIC_CMD="$MAGIC_CMD"
4336   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4337   ac_dummy="/usr/bin:$PATH"
4338   for ac_dir in $ac_dummy; do
4339     test -z "$ac_dir" && ac_dir=.
4340     if test -f $ac_dir/${ac_tool_prefix}file; then
4341       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4342       if test -n "$file_magic_test_file"; then
4343         case $deplibs_check_method in
4344         "file_magic "*)
4345           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4346           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4347           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4348             egrep "$file_magic_regex" > /dev/null; then
4349             :
4350           else
4351             cat <<EOF 1>&2
4352
4353 *** Warning: the command libtool uses to detect shared libraries,
4354 *** $file_magic_cmd, produces output that libtool cannot recognize.
4355 *** The result is that libtool may fail to recognize shared libraries
4356 *** as such.  This will affect the creation of libtool libraries that
4357 *** depend on shared libraries, but programs linked with such libtool
4358 *** libraries will work regardless of this problem.  Nevertheless, you
4359 *** may want to report the problem to your system manager and/or to
4360 *** bug-libtool@gnu.org
4361
4362 EOF
4363           fi ;;
4364         esac
4365       fi
4366       break
4367     fi
4368   done
4369   IFS="$ac_save_ifs"
4370   MAGIC_CMD="$ac_save_MAGIC_CMD"
4371   ;;
4372 esac
4373 fi
4374
4375 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4376 if test -n "$MAGIC_CMD"; then
4377   echo "$ac_t""$MAGIC_CMD" 1>&6
4378 else
4379   echo "$ac_t""no" 1>&6
4380 fi
4381
4382 if test -z "$lt_cv_path_MAGIC_CMD"; then
4383   if test -n "$ac_tool_prefix"; then
4384     echo $ac_n "checking for file""... $ac_c" 1>&6
4385 echo "configure:4385: checking for file" >&5
4386 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4387   echo $ac_n "(cached) $ac_c" 1>&6
4388 else
4389   case $MAGIC_CMD in
4390   /*)
4391   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4392   ;;
4393   ?:/*)
4394   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4395   ;;
4396   *)
4397   ac_save_MAGIC_CMD="$MAGIC_CMD"
4398   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4399   ac_dummy="/usr/bin:$PATH"
4400   for ac_dir in $ac_dummy; do
4401     test -z "$ac_dir" && ac_dir=.
4402     if test -f $ac_dir/file; then
4403       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4404       if test -n "$file_magic_test_file"; then
4405         case $deplibs_check_method in
4406         "file_magic "*)
4407           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4408           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4409           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4410             egrep "$file_magic_regex" > /dev/null; then
4411             :
4412           else
4413             cat <<EOF 1>&2
4414
4415 *** Warning: the command libtool uses to detect shared libraries,
4416 *** $file_magic_cmd, produces output that libtool cannot recognize.
4417 *** The result is that libtool may fail to recognize shared libraries
4418 *** as such.  This will affect the creation of libtool libraries that
4419 *** depend on shared libraries, but programs linked with such libtool
4420 *** libraries will work regardless of this problem.  Nevertheless, you
4421 *** may want to report the problem to your system manager and/or to
4422 *** bug-libtool@gnu.org
4423
4424 EOF
4425           fi ;;
4426         esac
4427       fi
4428       break
4429     fi
4430   done
4431   IFS="$ac_save_ifs"
4432   MAGIC_CMD="$ac_save_MAGIC_CMD"
4433   ;;
4434 esac
4435 fi
4436
4437 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4438 if test -n "$MAGIC_CMD"; then
4439   echo "$ac_t""$MAGIC_CMD" 1>&6
4440 else
4441   echo "$ac_t""no" 1>&6
4442 fi
4443
4444   else
4445     MAGIC_CMD=:
4446   fi
4447 fi
4448
4449   fi
4450   ;;
4451 esac
4452
4453 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4454 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4455 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4456 echo "configure:4456: checking for $ac_word" >&5
4457 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4458   echo $ac_n "(cached) $ac_c" 1>&6
4459 else
4460   if test -n "$RANLIB"; then
4461   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4462 else
4463   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4464   ac_dummy="$PATH"
4465   for ac_dir in $ac_dummy; do
4466     test -z "$ac_dir" && ac_dir=.
4467     if test -f $ac_dir/$ac_word; then
4468       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4469       break
4470     fi
4471   done
4472   IFS="$ac_save_ifs"
4473 fi
4474 fi
4475 RANLIB="$ac_cv_prog_RANLIB"
4476 if test -n "$RANLIB"; then
4477   echo "$ac_t""$RANLIB" 1>&6
4478 else
4479   echo "$ac_t""no" 1>&6
4480 fi
4481
4482
4483 if test -z "$ac_cv_prog_RANLIB"; then
4484 if test -n "$ac_tool_prefix"; then
4485   # Extract the first word of "ranlib", so it can be a program name with args.
4486 set dummy ranlib; ac_word=$2
4487 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4488 echo "configure:4488: checking for $ac_word" >&5
4489 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4490   echo $ac_n "(cached) $ac_c" 1>&6
4491 else
4492   if test -n "$RANLIB"; then
4493   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4494 else
4495   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4496   ac_dummy="$PATH"
4497   for ac_dir in $ac_dummy; do
4498     test -z "$ac_dir" && ac_dir=.
4499     if test -f $ac_dir/$ac_word; then
4500       ac_cv_prog_RANLIB="ranlib"
4501       break
4502     fi
4503   done
4504   IFS="$ac_save_ifs"
4505   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4506 fi
4507 fi
4508 RANLIB="$ac_cv_prog_RANLIB"
4509 if test -n "$RANLIB"; then
4510   echo "$ac_t""$RANLIB" 1>&6
4511 else
4512   echo "$ac_t""no" 1>&6
4513 fi
4514
4515 else
4516   RANLIB=":"
4517 fi
4518 fi
4519
4520 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4521 set dummy ${ac_tool_prefix}strip; ac_word=$2
4522 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4523 echo "configure:4523: checking for $ac_word" >&5
4524 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4525   echo $ac_n "(cached) $ac_c" 1>&6
4526 else
4527   if test -n "$STRIP"; then
4528   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4529 else
4530   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4531   ac_dummy="$PATH"
4532   for ac_dir in $ac_dummy; do
4533     test -z "$ac_dir" && ac_dir=.
4534     if test -f $ac_dir/$ac_word; then
4535       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4536       break
4537     fi
4538   done
4539   IFS="$ac_save_ifs"
4540 fi
4541 fi
4542 STRIP="$ac_cv_prog_STRIP"
4543 if test -n "$STRIP"; then
4544   echo "$ac_t""$STRIP" 1>&6
4545 else
4546   echo "$ac_t""no" 1>&6
4547 fi
4548
4549
4550 if test -z "$ac_cv_prog_STRIP"; then
4551 if test -n "$ac_tool_prefix"; then
4552   # Extract the first word of "strip", so it can be a program name with args.
4553 set dummy strip; ac_word=$2
4554 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4555 echo "configure:4555: checking for $ac_word" >&5
4556 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4557   echo $ac_n "(cached) $ac_c" 1>&6
4558 else
4559   if test -n "$STRIP"; then
4560   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4561 else
4562   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4563   ac_dummy="$PATH"
4564   for ac_dir in $ac_dummy; do
4565     test -z "$ac_dir" && ac_dir=.
4566     if test -f $ac_dir/$ac_word; then
4567       ac_cv_prog_STRIP="strip"
4568       break
4569     fi
4570   done
4571   IFS="$ac_save_ifs"
4572   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4573 fi
4574 fi
4575 STRIP="$ac_cv_prog_STRIP"
4576 if test -n "$STRIP"; then
4577   echo "$ac_t""$STRIP" 1>&6
4578 else
4579   echo "$ac_t""no" 1>&6
4580 fi
4581
4582 else
4583   STRIP=":"
4584 fi
4585 fi
4586
4587
4588 enable_dlopen=yes
4589 enable_win32_dll=yes
4590
4591 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4592 if test "${enable_libtool_lock+set}" = set; then
4593   enableval="$enable_libtool_lock"
4594   :
4595 fi
4596
4597 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4598
4599 # Some flags need to be propagated to the compiler or linker for good
4600 # libtool support.
4601 case $host in
4602 *-*-irix6*)
4603   # Find out which ABI we are using.
4604   echo '#line 4604 "configure"' > conftest.$ac_ext
4605   if { (eval echo configure:4605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4606     case `/usr/bin/file conftest.$ac_objext` in
4607     *32-bit*)
4608       LD="${LD-ld} -32"
4609       ;;
4610     *N32*)
4611       LD="${LD-ld} -n32"
4612       ;;
4613     *64-bit*)
4614       LD="${LD-ld} -64"
4615       ;;
4616     esac
4617   fi
4618   rm -rf conftest*
4619   ;;
4620
4621 *-*-sco3.2v5*)
4622   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4623   SAVE_CFLAGS="$CFLAGS"
4624   CFLAGS="$CFLAGS -belf"
4625   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4626 echo "configure:4626: checking whether the C compiler needs -belf" >&5
4627 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4628   echo $ac_n "(cached) $ac_c" 1>&6
4629 else
4630   
4631      ac_ext=c
4632 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4633 ac_cpp='$CPP $CPPFLAGS'
4634 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4635 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4636 cross_compiling=$ac_cv_prog_cc_cross
4637
4638      cat > conftest.$ac_ext <<EOF
4639 #line 4639 "configure"
4640 #include "confdefs.h"
4641
4642 int main() {
4643
4644 ; return 0; }
4645 EOF
4646 if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4647   rm -rf conftest*
4648   lt_cv_cc_needs_belf=yes
4649 else
4650   echo "configure: failed program was:" >&5
4651   cat conftest.$ac_ext >&5
4652   rm -rf conftest*
4653   lt_cv_cc_needs_belf=no
4654 fi
4655 rm -f conftest*
4656      ac_ext=c
4657 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4658 ac_cpp='$CPP $CPPFLAGS'
4659 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4660 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4661 cross_compiling=$ac_cv_prog_cc_cross
4662
4663 fi
4664
4665 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4666   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4667     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4668     CFLAGS="$SAVE_CFLAGS"
4669   fi
4670   ;;
4671
4672 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4673   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4674 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4675 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4676 echo "configure:4676: checking for $ac_word" >&5
4677 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4678   echo $ac_n "(cached) $ac_c" 1>&6
4679 else
4680   if test -n "$DLLTOOL"; then
4681   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4682 else
4683   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4684   ac_dummy="$PATH"
4685   for ac_dir in $ac_dummy; do
4686     test -z "$ac_dir" && ac_dir=.
4687     if test -f $ac_dir/$ac_word; then
4688       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4689       break
4690     fi
4691   done
4692   IFS="$ac_save_ifs"
4693 fi
4694 fi
4695 DLLTOOL="$ac_cv_prog_DLLTOOL"
4696 if test -n "$DLLTOOL"; then
4697   echo "$ac_t""$DLLTOOL" 1>&6
4698 else
4699   echo "$ac_t""no" 1>&6
4700 fi
4701
4702
4703 if test -z "$ac_cv_prog_DLLTOOL"; then
4704 if test -n "$ac_tool_prefix"; then
4705   # Extract the first word of "dlltool", so it can be a program name with args.
4706 set dummy dlltool; ac_word=$2
4707 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4708 echo "configure:4708: checking for $ac_word" >&5
4709 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4710   echo $ac_n "(cached) $ac_c" 1>&6
4711 else
4712   if test -n "$DLLTOOL"; then
4713   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4714 else
4715   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4716   ac_dummy="$PATH"
4717   for ac_dir in $ac_dummy; do
4718     test -z "$ac_dir" && ac_dir=.
4719     if test -f $ac_dir/$ac_word; then
4720       ac_cv_prog_DLLTOOL="dlltool"
4721       break
4722     fi
4723   done
4724   IFS="$ac_save_ifs"
4725   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4726 fi
4727 fi
4728 DLLTOOL="$ac_cv_prog_DLLTOOL"
4729 if test -n "$DLLTOOL"; then
4730   echo "$ac_t""$DLLTOOL" 1>&6
4731 else
4732   echo "$ac_t""no" 1>&6
4733 fi
4734
4735 else
4736   DLLTOOL="false"
4737 fi
4738 fi
4739
4740   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4741 set dummy ${ac_tool_prefix}as; ac_word=$2
4742 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4743 echo "configure:4743: checking for $ac_word" >&5
4744 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4745   echo $ac_n "(cached) $ac_c" 1>&6
4746 else
4747   if test -n "$AS"; then
4748   ac_cv_prog_AS="$AS" # Let the user override the test.
4749 else
4750   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4751   ac_dummy="$PATH"
4752   for ac_dir in $ac_dummy; do
4753     test -z "$ac_dir" && ac_dir=.
4754     if test -f $ac_dir/$ac_word; then
4755       ac_cv_prog_AS="${ac_tool_prefix}as"
4756       break
4757     fi
4758   done
4759   IFS="$ac_save_ifs"
4760 fi
4761 fi
4762 AS="$ac_cv_prog_AS"
4763 if test -n "$AS"; then
4764   echo "$ac_t""$AS" 1>&6
4765 else
4766   echo "$ac_t""no" 1>&6
4767 fi
4768
4769
4770 if test -z "$ac_cv_prog_AS"; then
4771 if test -n "$ac_tool_prefix"; then
4772   # Extract the first word of "as", so it can be a program name with args.
4773 set dummy as; ac_word=$2
4774 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4775 echo "configure:4775: checking for $ac_word" >&5
4776 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4777   echo $ac_n "(cached) $ac_c" 1>&6
4778 else
4779   if test -n "$AS"; then
4780   ac_cv_prog_AS="$AS" # Let the user override the test.
4781 else
4782   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4783   ac_dummy="$PATH"
4784   for ac_dir in $ac_dummy; do
4785     test -z "$ac_dir" && ac_dir=.
4786     if test -f $ac_dir/$ac_word; then
4787       ac_cv_prog_AS="as"
4788       break
4789     fi
4790   done
4791   IFS="$ac_save_ifs"
4792   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4793 fi
4794 fi
4795 AS="$ac_cv_prog_AS"
4796 if test -n "$AS"; then
4797   echo "$ac_t""$AS" 1>&6
4798 else
4799   echo "$ac_t""no" 1>&6
4800 fi
4801
4802 else
4803   AS="false"
4804 fi
4805 fi
4806
4807   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4808 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4809 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4810 echo "configure:4810: checking for $ac_word" >&5
4811 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4812   echo $ac_n "(cached) $ac_c" 1>&6
4813 else
4814   if test -n "$OBJDUMP"; then
4815   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4816 else
4817   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4818   ac_dummy="$PATH"
4819   for ac_dir in $ac_dummy; do
4820     test -z "$ac_dir" && ac_dir=.
4821     if test -f $ac_dir/$ac_word; then
4822       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4823       break
4824     fi
4825   done
4826   IFS="$ac_save_ifs"
4827 fi
4828 fi
4829 OBJDUMP="$ac_cv_prog_OBJDUMP"
4830 if test -n "$OBJDUMP"; then
4831   echo "$ac_t""$OBJDUMP" 1>&6
4832 else
4833   echo "$ac_t""no" 1>&6
4834 fi
4835
4836
4837 if test -z "$ac_cv_prog_OBJDUMP"; then
4838 if test -n "$ac_tool_prefix"; then
4839   # Extract the first word of "objdump", so it can be a program name with args.
4840 set dummy objdump; ac_word=$2
4841 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4842 echo "configure:4842: checking for $ac_word" >&5
4843 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4844   echo $ac_n "(cached) $ac_c" 1>&6
4845 else
4846   if test -n "$OBJDUMP"; then
4847   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4848 else
4849   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4850   ac_dummy="$PATH"
4851   for ac_dir in $ac_dummy; do
4852     test -z "$ac_dir" && ac_dir=.
4853     if test -f $ac_dir/$ac_word; then
4854       ac_cv_prog_OBJDUMP="objdump"
4855       break
4856     fi
4857   done
4858   IFS="$ac_save_ifs"
4859   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4860 fi
4861 fi
4862 OBJDUMP="$ac_cv_prog_OBJDUMP"
4863 if test -n "$OBJDUMP"; then
4864   echo "$ac_t""$OBJDUMP" 1>&6
4865 else
4866   echo "$ac_t""no" 1>&6
4867 fi
4868
4869 else
4870   OBJDUMP="false"
4871 fi
4872 fi
4873
4874
4875   # recent cygwin and mingw systems supply a stub DllMain which the user
4876   # can override, but on older systems we have to supply one
4877   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4878 echo "configure:4878: checking if libtool should supply DllMain function" >&5
4879 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4880   echo $ac_n "(cached) $ac_c" 1>&6
4881 else
4882   cat > conftest.$ac_ext <<EOF
4883 #line 4883 "configure"
4884 #include "confdefs.h"
4885
4886 int main() {
4887 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4888       DllMain (0, 0, 0);
4889 ; return 0; }
4890 EOF
4891 if { (eval echo configure:4891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4892   rm -rf conftest*
4893   lt_cv_need_dllmain=no
4894 else
4895   echo "configure: failed program was:" >&5
4896   cat conftest.$ac_ext >&5
4897   rm -rf conftest*
4898   lt_cv_need_dllmain=yes
4899 fi
4900 rm -f conftest*
4901 fi
4902
4903 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4904
4905   case $host/$CC in
4906   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4907     # old mingw systems require "-dll" to link a DLL, while more recent ones
4908     # require "-mdll"
4909     SAVE_CFLAGS="$CFLAGS"
4910     CFLAGS="$CFLAGS -mdll"
4911     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4912 echo "configure:4912: checking how to link DLLs" >&5
4913 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4914   echo $ac_n "(cached) $ac_c" 1>&6
4915 else
4916   cat > conftest.$ac_ext <<EOF
4917 #line 4917 "configure"
4918 #include "confdefs.h"
4919
4920 int main() {
4921
4922 ; return 0; }
4923 EOF
4924 if { (eval echo configure:4924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4925   rm -rf conftest*
4926   lt_cv_cc_dll_switch=-mdll
4927 else
4928   echo "configure: failed program was:" >&5
4929   cat conftest.$ac_ext >&5
4930   rm -rf conftest*
4931   lt_cv_cc_dll_switch=-dll
4932 fi
4933 rm -f conftest*
4934 fi
4935
4936 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4937     CFLAGS="$SAVE_CFLAGS" ;;
4938   *-*-cygwin* | *-*-pw32*)
4939     # cygwin systems need to pass --dll to the linker, and not link
4940     # crt.o which will require a WinMain@16 definition.
4941     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4942   esac
4943   ;;
4944   
4945 esac
4946
4947 # Sed substitution that helps us do robust quoting.  It backslashifies
4948 # metacharacters that are still active within double-quoted strings.
4949 Xsed='sed -e s/^X//'
4950 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4951
4952 # Same as above, but do not quote variable references.
4953 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4954
4955 # Sed substitution to delay expansion of an escaped shell variable in a
4956 # double_quote_subst'ed string.
4957 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4958
4959 # Constants:
4960 rm="rm -f"
4961
4962 # Global variables:
4963 default_ofile=libtool
4964 can_build_shared=yes
4965
4966 # All known linkers require a `.a' archive for static linking (except M$VC,
4967 # which needs '.lib').
4968 libext=a
4969 ltmain="$ac_aux_dir/ltmain.sh"
4970 ofile="$default_ofile"
4971 with_gnu_ld="$lt_cv_prog_gnu_ld"
4972 need_locks="$enable_libtool_lock"
4973
4974 old_CC="$CC"
4975 old_CFLAGS="$CFLAGS"
4976
4977 # Set sane defaults for various variables
4978 test -z "$AR" && AR=ar
4979 test -z "$AR_FLAGS" && AR_FLAGS=cru
4980 test -z "$AS" && AS=as
4981 test -z "$CC" && CC=cc
4982 test -z "$DLLTOOL" && DLLTOOL=dlltool
4983 test -z "$LD" && LD=ld
4984 test -z "$LN_S" && LN_S="ln -s"
4985 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4986 test -z "$NM" && NM=nm
4987 test -z "$OBJDUMP" && OBJDUMP=objdump
4988 test -z "$RANLIB" && RANLIB=:
4989 test -z "$STRIP" && STRIP=:
4990 test -z "$ac_objext" && ac_objext=o
4991
4992 if test x"$host" != x"$build"; then
4993   ac_tool_prefix=${host_alias}-
4994 else
4995   ac_tool_prefix=
4996 fi
4997
4998 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4999 case $host_os in
5000 linux-gnu*) ;;
5001 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
5002 esac
5003
5004 case $host_os in
5005 aix3*)
5006   # AIX sometimes has problems with the GCC collect2 program.  For some
5007   # reason, if we set the COLLECT_NAMES environment variable, the problems
5008   # vanish in a puff of smoke.
5009   if test "X${COLLECT_NAMES+set}" != Xset; then
5010     COLLECT_NAMES=
5011     export COLLECT_NAMES
5012   fi
5013   ;;
5014 esac
5015
5016 # Determine commands to create old-style static archives.
5017 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5018 old_postinstall_cmds='chmod 644 $oldlib'
5019 old_postuninstall_cmds=
5020
5021 if test -n "$RANLIB"; then
5022   case $host_os in
5023   openbsd*)
5024     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5025     ;;
5026   *)
5027     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5028     ;;
5029   esac
5030   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5031 fi
5032
5033 # Allow CC to be a program name with arguments.
5034 set dummy $CC
5035 compiler="$2"
5036
5037 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5038 echo "configure:5038: checking for objdir" >&5
5039 rm -f .libs 2>/dev/null
5040 mkdir .libs 2>/dev/null
5041 if test -d .libs; then
5042   objdir=.libs
5043 else
5044   # MS-DOS does not allow filenames that begin with a dot.
5045   objdir=_libs
5046 fi
5047 rmdir .libs 2>/dev/null
5048 echo "$ac_t""$objdir" 1>&6
5049
5050
5051 # Check whether --with-pic or --without-pic was given.
5052 if test "${with_pic+set}" = set; then
5053   withval="$with_pic"
5054   pic_mode="$withval"
5055 else
5056   pic_mode=default
5057 fi
5058
5059 test -z "$pic_mode" && pic_mode=default
5060
5061 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5062 # in isolation, and that seeing it set (from the cache) indicates that
5063 # the associated values are set (in the cache) correctly too.
5064 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5065 echo "configure:5065: checking for $compiler option to produce PIC" >&5
5066 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5067   echo $ac_n "(cached) $ac_c" 1>&6
5068 else
5069    lt_cv_prog_cc_pic=
5070   lt_cv_prog_cc_shlib=
5071   lt_cv_prog_cc_wl=
5072   lt_cv_prog_cc_static=
5073   lt_cv_prog_cc_no_builtin=
5074   lt_cv_prog_cc_can_build_shared=$can_build_shared
5075
5076   if test "$GCC" = yes; then
5077     lt_cv_prog_cc_wl='-Wl,'
5078     lt_cv_prog_cc_static='-static'
5079
5080     case $host_os in
5081     aix*)
5082       # Below there is a dirty hack to force normal static linking with -ldl
5083       # The problem is because libdl dynamically linked with both libc and
5084       # libC (AIX C++ library), which obviously doesn't included in libraries
5085       # list by gcc. This cause undefined symbols with -static flags.
5086       # This hack allows C programs to be linked with "-static -ldl", but
5087       # not sure about C++ programs.
5088       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5089       ;;
5090     amigaos*)
5091       # FIXME: we need at least 68020 code to build shared libraries, but
5092       # adding the `-m68020' flag to GCC prevents building anything better,
5093       # like `-m68040'.
5094       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5095       ;;
5096     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5097       # PIC is the default for these OSes.
5098       ;;
5099     darwin* | rhapsody*)
5100       # PIC is the default on this platform
5101       # Common symbols not allowed in MH_DYLIB files
5102       lt_cv_prog_cc_pic='-fno-common'
5103       ;;
5104     cygwin* | mingw* | pw32* | os2*)
5105       # This hack is so that the source file can tell whether it is being
5106       # built for inclusion in a dll (and should export symbols for example).
5107       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5108       ;;
5109     sysv4*MP*)
5110       if test -d /usr/nec; then
5111          lt_cv_prog_cc_pic=-Kconform_pic
5112       fi
5113       ;;
5114     *)
5115       lt_cv_prog_cc_pic='-fPIC'
5116       ;;
5117     esac
5118   else
5119     # PORTME Check for PIC flags for the system compiler.
5120     case $host_os in
5121     aix3* | aix4* | aix5*)
5122       lt_cv_prog_cc_wl='-Wl,'
5123       # All AIX code is PIC.
5124       if test "$host_cpu" = ia64; then
5125         # AIX 5 now supports IA64 processor
5126         lt_cv_prog_cc_static='-Bstatic'
5127       else
5128         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5129       fi
5130       ;;
5131
5132     hpux9* | hpux10* | hpux11*)
5133       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5134       lt_cv_prog_cc_wl='-Wl,'
5135       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5136       lt_cv_prog_cc_pic='+Z'
5137       ;;
5138
5139     irix5* | irix6* | nonstopux*)
5140       lt_cv_prog_cc_wl='-Wl,'
5141       lt_cv_prog_cc_static='-non_shared'
5142       # PIC (with -KPIC) is the default.
5143       ;;
5144
5145     cygwin* | mingw* | pw32* | os2*)
5146       # This hack is so that the source file can tell whether it is being
5147       # built for inclusion in a dll (and should export symbols for example).
5148       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5149       ;;
5150
5151     newsos6)
5152       lt_cv_prog_cc_pic='-KPIC'
5153       lt_cv_prog_cc_static='-Bstatic'
5154       ;;
5155
5156     osf3* | osf4* | osf5*)
5157       # All OSF/1 code is PIC.
5158       lt_cv_prog_cc_wl='-Wl,'
5159       lt_cv_prog_cc_static='-non_shared'
5160       ;;
5161
5162     sco3.2v5*)
5163       lt_cv_prog_cc_pic='-Kpic'
5164       lt_cv_prog_cc_static='-dn'
5165       lt_cv_prog_cc_shlib='-belf'
5166       ;;
5167
5168     solaris*)
5169       lt_cv_prog_cc_pic='-KPIC'
5170       lt_cv_prog_cc_static='-Bstatic'
5171       lt_cv_prog_cc_wl='-Wl,'
5172       ;;
5173
5174     sunos4*)
5175       lt_cv_prog_cc_pic='-PIC'
5176       lt_cv_prog_cc_static='-Bstatic'
5177       lt_cv_prog_cc_wl='-Qoption ld '
5178       ;;
5179
5180     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5181       lt_cv_prog_cc_pic='-KPIC'
5182       lt_cv_prog_cc_static='-Bstatic'
5183       lt_cv_prog_cc_wl='-Wl,'
5184       ;;
5185
5186     uts4*)
5187       lt_cv_prog_cc_pic='-pic'
5188       lt_cv_prog_cc_static='-Bstatic'
5189       ;;
5190
5191     sysv4*MP*)
5192       if test -d /usr/nec ;then
5193         lt_cv_prog_cc_pic='-Kconform_pic'
5194         lt_cv_prog_cc_static='-Bstatic'
5195       fi
5196       ;;
5197
5198     *)
5199       lt_cv_prog_cc_can_build_shared=no
5200       ;;
5201     esac
5202   fi
5203
5204 fi
5205
5206 if test -z "$lt_cv_prog_cc_pic"; then
5207   echo "$ac_t""none" 1>&6
5208 else
5209   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5210
5211   # Check to make sure the pic_flag actually works.
5212   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5213 echo "configure:5213: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5214   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5215   echo $ac_n "(cached) $ac_c" 1>&6
5216 else
5217       save_CFLAGS="$CFLAGS"
5218     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5219     cat > conftest.$ac_ext <<EOF
5220 #line 5220 "configure"
5221 #include "confdefs.h"
5222
5223 int main() {
5224
5225 ; return 0; }
5226 EOF
5227 if { (eval echo configure:5227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5228   rm -rf conftest*
5229         case $host_os in
5230       hpux9* | hpux10* | hpux11*)
5231         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5232         # they create non-PIC objects.  So, if there were any warnings, we
5233         # assume that PIC is not supported.
5234         if test -s conftest.err; then
5235           lt_cv_prog_cc_pic_works=no
5236         else
5237           lt_cv_prog_cc_pic_works=yes
5238         fi
5239         ;;
5240       *)
5241         lt_cv_prog_cc_pic_works=yes
5242         ;;
5243       esac
5244     
5245 else
5246   echo "configure: failed program was:" >&5
5247   cat conftest.$ac_ext >&5
5248   rm -rf conftest*
5249         lt_cv_prog_cc_pic_works=no
5250     
5251 fi
5252 rm -f conftest*
5253     CFLAGS="$save_CFLAGS"
5254   
5255 fi
5256
5257
5258   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5259     lt_cv_prog_cc_pic=
5260     lt_cv_prog_cc_can_build_shared=no
5261   else
5262     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5263   fi
5264
5265   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5266 fi
5267
5268 # Check for any special shared library compilation flags.
5269 if test -n "$lt_cv_prog_cc_shlib"; then
5270   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5271   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5272   else
5273    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5274     lt_cv_prog_cc_can_build_shared=no
5275   fi
5276 fi
5277
5278 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5279 echo "configure:5279: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5280 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5281   echo $ac_n "(cached) $ac_c" 1>&6
5282 else
5283     lt_cv_prog_cc_static_works=no
5284   save_LDFLAGS="$LDFLAGS"
5285   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5286   cat > conftest.$ac_ext <<EOF
5287 #line 5287 "configure"
5288 #include "confdefs.h"
5289
5290 int main() {
5291
5292 ; return 0; }
5293 EOF
5294 if { (eval echo configure:5294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5295   rm -rf conftest*
5296   lt_cv_prog_cc_static_works=yes
5297 else
5298   echo "configure: failed program was:" >&5
5299   cat conftest.$ac_ext >&5
5300 fi
5301 rm -f conftest*
5302   LDFLAGS="$save_LDFLAGS"
5303
5304 fi
5305
5306
5307 # Belt *and* braces to stop my trousers falling down:
5308 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5309 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5310
5311 pic_flag="$lt_cv_prog_cc_pic"
5312 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5313 wl="$lt_cv_prog_cc_wl"
5314 link_static_flag="$lt_cv_prog_cc_static"
5315 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5316 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5317
5318
5319 # Check to see if options -o and -c are simultaneously supported by compiler
5320 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5321 echo "configure:5321: checking if $compiler supports -c -o file.$ac_objext" >&5
5322 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5323   echo $ac_n "(cached) $ac_c" 1>&6
5324 else
5325   
5326 $rm -r conftest 2>/dev/null
5327 mkdir conftest
5328 cd conftest
5329 echo "int some_variable = 0;" > conftest.$ac_ext
5330 mkdir out
5331 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5332 # that will create temporary files in the current directory regardless of
5333 # the output directory.  Thus, making CWD read-only will cause this test
5334 # to fail, enabling locking or at least warning the user not to do parallel
5335 # builds.
5336 chmod -w .
5337 save_CFLAGS="$CFLAGS"
5338 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5339 compiler_c_o=no
5340 if { (eval echo configure:5340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5341   # The compiler can only warn and ignore the option if not recognized
5342   # So say no if there are warnings
5343   if test -s out/conftest.err; then
5344     lt_cv_compiler_c_o=no
5345   else
5346     lt_cv_compiler_c_o=yes
5347   fi
5348 else
5349   # Append any errors to the config.log.
5350   cat out/conftest.err 1>&5
5351   lt_cv_compiler_c_o=no
5352 fi
5353 CFLAGS="$save_CFLAGS"
5354 chmod u+w .
5355 $rm conftest* out/*
5356 rmdir out
5357 cd ..
5358 rmdir conftest
5359 $rm -r conftest 2>/dev/null
5360
5361 fi
5362
5363 compiler_c_o=$lt_cv_compiler_c_o
5364 echo "$ac_t""$compiler_c_o" 1>&6
5365
5366 if test x"$compiler_c_o" = x"yes"; then
5367   # Check to see if we can write to a .lo
5368   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5369 echo "configure:5369: checking if $compiler supports -c -o file.lo" >&5
5370   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5371   echo $ac_n "(cached) $ac_c" 1>&6
5372 else
5373   
5374   lt_cv_compiler_o_lo=no
5375   save_CFLAGS="$CFLAGS"
5376   CFLAGS="$CFLAGS -c -o conftest.lo"
5377   save_objext="$ac_objext"
5378   ac_objext=lo
5379   cat > conftest.$ac_ext <<EOF
5380 #line 5380 "configure"
5381 #include "confdefs.h"
5382
5383 int main() {
5384 int some_variable = 0;
5385 ; return 0; }
5386 EOF
5387 if { (eval echo configure:5387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5388   rm -rf conftest*
5389       # The compiler can only warn and ignore the option if not recognized
5390     # So say no if there are warnings
5391     if test -s conftest.err; then
5392       lt_cv_compiler_o_lo=no
5393     else
5394       lt_cv_compiler_o_lo=yes
5395     fi
5396   
5397 else
5398   echo "configure: failed program was:" >&5
5399   cat conftest.$ac_ext >&5
5400 fi
5401 rm -f conftest*
5402   ac_objext="$save_objext"
5403   CFLAGS="$save_CFLAGS"
5404   
5405 fi
5406
5407   compiler_o_lo=$lt_cv_compiler_o_lo
5408   echo "$ac_t""$compiler_o_lo" 1>&6
5409 else
5410   compiler_o_lo=no
5411 fi
5412
5413 # Check to see if we can do hard links to lock some files if needed
5414 hard_links="nottested"
5415 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5416   # do not overwrite the value of need_locks provided by the user
5417   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5418 echo "configure:5418: checking if we can lock with hard links" >&5
5419   hard_links=yes
5420   $rm conftest*
5421   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5422   touch conftest.a
5423   ln conftest.a conftest.b 2>&5 || hard_links=no
5424   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5425   echo "$ac_t""$hard_links" 1>&6
5426   if test "$hard_links" = no; then
5427     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5428     need_locks=warn
5429   fi
5430 else
5431   need_locks=no
5432 fi
5433
5434 if test "$GCC" = yes; then
5435   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5436   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5437 echo "configure:5437: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5438   echo "int some_variable = 0;" > conftest.$ac_ext
5439   save_CFLAGS="$CFLAGS"
5440   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5441   compiler_rtti_exceptions=no
5442   cat > conftest.$ac_ext <<EOF
5443 #line 5443 "configure"
5444 #include "confdefs.h"
5445
5446 int main() {
5447 int some_variable = 0;
5448 ; return 0; }
5449 EOF
5450 if { (eval echo configure:5450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5451   rm -rf conftest*
5452       # The compiler can only warn and ignore the option if not recognized
5453     # So say no if there are warnings
5454     if test -s conftest.err; then
5455       compiler_rtti_exceptions=no
5456     else
5457       compiler_rtti_exceptions=yes
5458     fi
5459   
5460 else
5461   echo "configure: failed program was:" >&5
5462   cat conftest.$ac_ext >&5
5463 fi
5464 rm -f conftest*
5465   CFLAGS="$save_CFLAGS"
5466   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5467
5468   if test "$compiler_rtti_exceptions" = "yes"; then
5469     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5470   else
5471     no_builtin_flag=' -fno-builtin'
5472   fi
5473 fi
5474
5475 # See if the linker supports building shared libraries.
5476 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5477 echo "configure:5477: checking whether the linker ($LD) supports shared libraries" >&5
5478
5479 allow_undefined_flag=
5480 no_undefined_flag=
5481 need_lib_prefix=unknown
5482 need_version=unknown
5483 # when you set need_version to no, make sure it does not cause -set_version
5484 # flags to be left without arguments
5485 archive_cmds=
5486 archive_expsym_cmds=
5487 old_archive_from_new_cmds=
5488 old_archive_from_expsyms_cmds=
5489 export_dynamic_flag_spec=
5490 whole_archive_flag_spec=
5491 thread_safe_flag_spec=
5492 hardcode_into_libs=no
5493 hardcode_libdir_flag_spec=
5494 hardcode_libdir_separator=
5495 hardcode_direct=no
5496 hardcode_minus_L=no
5497 hardcode_shlibpath_var=unsupported
5498 runpath_var=
5499 link_all_deplibs=unknown
5500 always_export_symbols=no
5501 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5502 # include_expsyms should be a list of space-separated symbols to be *always*
5503 # included in the symbol list
5504 include_expsyms=
5505 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5506 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5507 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5508 # as well as any symbol that contains `d'.
5509 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5510 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5511 # platforms (ab)use it in PIC code, but their linkers get confused if
5512 # the symbol is explicitly referenced.  Since portable code cannot
5513 # rely on this symbol name, it's probably fine to never include it in
5514 # preloaded symbol tables.
5515 extract_expsyms_cmds=
5516
5517 case $host_os in
5518 cygwin* | mingw* | pw32*)
5519   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5520   # When not using gcc, we currently assume that we are using
5521   # Microsoft Visual C++.
5522   if test "$GCC" != yes; then
5523     with_gnu_ld=no
5524   fi
5525   ;;
5526 openbsd*)
5527   with_gnu_ld=no
5528   ;;
5529 esac
5530
5531 ld_shlibs=yes
5532 if test "$with_gnu_ld" = yes; then
5533   # If archive_cmds runs LD, not CC, wlarc should be empty
5534   wlarc='${wl}'
5535
5536   # See if GNU ld supports shared libraries.
5537   case $host_os in
5538   aix3* | aix4* | aix5*)
5539     # On AIX, the GNU linker is very broken
5540     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5541     ld_shlibs=no
5542     cat <<EOF 1>&2
5543
5544 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5545 *** to be unable to reliably create shared libraries on AIX.
5546 *** Therefore, libtool is disabling shared libraries support.  If you
5547 *** really care for shared libraries, you may want to modify your PATH
5548 *** so that a non-GNU linker is found, and then restart.
5549
5550 EOF
5551     ;;
5552
5553   amigaos*)
5554     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)'
5555     hardcode_libdir_flag_spec='-L$libdir'
5556     hardcode_minus_L=yes
5557
5558     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5559     # that the semantics of dynamic libraries on AmigaOS, at least up
5560     # to version 4, is to share data among multiple programs linked
5561     # with the same dynamic library.  Since this doesn't match the
5562     # behavior of shared libraries on other platforms, we can use
5563     # them.
5564     ld_shlibs=no
5565     ;;
5566
5567   beos*)
5568     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5569       allow_undefined_flag=unsupported
5570       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5571       # support --undefined.  This deserves some investigation.  FIXME
5572       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5573     else
5574       ld_shlibs=no
5575     fi
5576     ;;
5577
5578   cygwin* | mingw* | pw32*)
5579     # hardcode_libdir_flag_spec is actually meaningless, as there is
5580     # no search path for DLLs.
5581     hardcode_libdir_flag_spec='-L$libdir'
5582     allow_undefined_flag=unsupported
5583     always_export_symbols=yes
5584
5585     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5586       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5587       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5588       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5589       else $CC -o impgen impgen.c ; fi)~
5590       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5591
5592     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5593
5594     # cygwin and mingw dlls have different entry points and sets of symbols
5595     # to exclude.
5596     # FIXME: what about values for MSVC?
5597     dll_entry=__cygwin_dll_entry@12
5598     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5599     case $host_os in
5600     mingw*)
5601       # mingw values
5602       dll_entry=_DllMainCRTStartup@12
5603       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5604       ;;
5605     esac
5606
5607     # mingw and cygwin differ, and it's simplest to just exclude the union
5608     # of the two symbol sets.
5609     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5610
5611     # recent cygwin and mingw systems supply a stub DllMain which the user
5612     # can override, but on older systems we have to supply one (in ltdll.c)
5613     if test "x$lt_cv_need_dllmain" = "xyes"; then
5614       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5615       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~
5616         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5617     else
5618       ltdll_obj=
5619       ltdll_cmds=
5620     fi
5621
5622     # Extract the symbol export list from an `--export-all' def file,
5623     # then regenerate the def file from the symbol export list, so that
5624     # the compiled dll only exports the symbol export list.
5625     # Be careful not to strip the DATA tag left be newer dlltools.
5626     export_symbols_cmds="$ltdll_cmds"'
5627       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5628       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5629
5630     # If the export-symbols file already is a .def file (1st line
5631     # is EXPORTS), use it as is.
5632     # If DATA tags from a recent dlltool are present, honour them!
5633     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5634         cp $export_symbols $output_objdir/$soname-def;
5635       else
5636         echo EXPORTS > $output_objdir/$soname-def;
5637         _lt_hint=1;
5638         cat $export_symbols | while read symbol; do
5639          set dummy \$symbol;
5640          case \$# in
5641            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5642            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5643            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5644          esac;
5645          _lt_hint=`expr 1 + \$_lt_hint`;
5646         done;
5647       fi~
5648       '"$ltdll_cmds"'
5649       $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~
5650       $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~
5651       $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~
5652       $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~
5653       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5654     ;;
5655
5656   netbsd*)
5657     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5658       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5659       wlarc=
5660     else
5661       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5662       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5663     fi
5664     ;;
5665
5666   solaris* | sysv5*)
5667     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5668       ld_shlibs=no
5669       cat <<EOF 1>&2
5670
5671 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5672 *** create shared libraries on Solaris systems.  Therefore, libtool
5673 *** is disabling shared libraries support.  We urge you to upgrade GNU
5674 *** binutils to release 2.9.1 or newer.  Another option is to modify
5675 *** your PATH or compiler configuration so that the native linker is
5676 *** used, and then restart.
5677
5678 EOF
5679     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5680       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5681       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5682     else
5683       ld_shlibs=no
5684     fi
5685     ;;
5686
5687   sunos4*)
5688     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5689     wlarc=
5690     hardcode_direct=yes
5691     hardcode_shlibpath_var=no
5692     ;;
5693
5694   *)
5695     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5696       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5697       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5698     else
5699       ld_shlibs=no
5700     fi
5701     ;;
5702   esac
5703
5704   if test "$ld_shlibs" = yes; then
5705     runpath_var=LD_RUN_PATH
5706     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5707     export_dynamic_flag_spec='${wl}--export-dynamic'
5708     case $host_os in
5709     cygwin* | mingw* | pw32*)
5710       # dlltool doesn't understand --whole-archive et. al.
5711       whole_archive_flag_spec=
5712       ;;
5713     *)
5714       # ancient GNU ld didn't support --whole-archive et. al.
5715       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5716         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5717       else
5718         whole_archive_flag_spec=
5719       fi
5720       ;;
5721     esac
5722   fi
5723 else
5724   # PORTME fill in a description of your system's linker (not GNU ld)
5725   case $host_os in
5726   aix3*)
5727     allow_undefined_flag=unsupported
5728     always_export_symbols=yes
5729     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'
5730     # Note: this linker hardcodes the directories in LIBPATH if there
5731     # are no directories specified by -L.
5732     hardcode_minus_L=yes
5733     if test "$GCC" = yes && test -z "$link_static_flag"; then
5734       # Neither direct hardcoding nor static linking is supported with a
5735       # broken collect2.
5736       hardcode_direct=unsupported
5737     fi
5738     ;;
5739
5740   aix4* | aix5*)
5741     if test "$host_cpu" = ia64; then
5742       # On IA64, the linker does run time linking by default, so we don't
5743       # have to do anything special.
5744       aix_use_runtimelinking=no
5745       exp_sym_flag='-Bexport'
5746       no_entry_flag=""
5747     else
5748       aix_use_runtimelinking=no
5749
5750       # Test if we are trying to use run time linking or normal
5751       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5752       # need to do runtime linking.
5753       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5754         for ld_flag in $LDFLAGS; do
5755           case $ld_flag in
5756           *-brtl*)
5757             aix_use_runtimelinking=yes
5758             break
5759           ;;
5760           esac
5761         done
5762       esac
5763
5764       exp_sym_flag='-bexport'
5765       no_entry_flag='-bnoentry'
5766     fi
5767
5768     # When large executables or shared objects are built, AIX ld can
5769     # have problems creating the table of contents.  If linking a library
5770     # or program results in "error TOC overflow" add -mminimal-toc to
5771     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5772     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5773
5774     hardcode_direct=yes
5775     archive_cmds=''
5776     hardcode_libdir_separator=':'
5777     if test "$GCC" = yes; then
5778       case $host_os in aix4.[012]|aix4.[012].*)
5779         collect2name=`${CC} -print-prog-name=collect2`
5780         if test -f "$collect2name" && \
5781           strings "$collect2name" | grep resolve_lib_name >/dev/null
5782         then
5783           # We have reworked collect2
5784           hardcode_direct=yes
5785         else
5786           # We have old collect2
5787           hardcode_direct=unsupported
5788           # It fails to find uninstalled libraries when the uninstalled
5789           # path is not listed in the libpath.  Setting hardcode_minus_L
5790           # to unsupported forces relinking
5791           hardcode_minus_L=yes
5792           hardcode_libdir_flag_spec='-L$libdir'
5793           hardcode_libdir_separator=
5794         fi
5795       esac
5796
5797       shared_flag='-shared'
5798     else
5799       # not using gcc
5800       if test "$host_cpu" = ia64; then
5801         shared_flag='${wl}-G'
5802       else
5803         if test "$aix_use_runtimelinking" = yes; then
5804           shared_flag='${wl}-G'
5805         else
5806           shared_flag='${wl}-bM:SRE'
5807         fi
5808       fi
5809     fi
5810
5811     # It seems that -bexpall can do strange things, so it is better to
5812     # generate a list of symbols to export.
5813     always_export_symbols=yes
5814     if test "$aix_use_runtimelinking" = yes; then
5815       # Warning - without using the other runtime loading flags (-brtl),
5816       # -berok will link without error, but may produce a broken library.
5817       allow_undefined_flag='-berok'
5818       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5819       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"
5820     else
5821       if test "$host_cpu" = ia64; then
5822         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5823         allow_undefined_flag="-z nodefs"
5824         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"
5825       else
5826         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5827         # Warning - without using the other run time loading flags,
5828         # -berok will link without error, but may produce a broken library.
5829         allow_undefined_flag='${wl}-berok'
5830         # This is a bit strange, but is similar to how AIX traditionally builds
5831         # it's shared libraries.
5832         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'
5833       fi
5834     fi
5835     ;;
5836
5837   amigaos*)
5838     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)'
5839     hardcode_libdir_flag_spec='-L$libdir'
5840     hardcode_minus_L=yes
5841     # see comment about different semantics on the GNU ld section
5842     ld_shlibs=no
5843     ;;
5844
5845   cygwin* | mingw* | pw32*)
5846     # When not using gcc, we currently assume that we are using
5847     # Microsoft Visual C++.
5848     # hardcode_libdir_flag_spec is actually meaningless, as there is
5849     # no search path for DLLs.
5850     hardcode_libdir_flag_spec=' '
5851     allow_undefined_flag=unsupported
5852     # Tell ltmain to make .lib files, not .a files.
5853     libext=lib
5854     # FIXME: Setting linknames here is a bad hack.
5855     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5856     # The linker will automatically build a .lib file if we build a DLL.
5857     old_archive_from_new_cmds='true'
5858     # FIXME: Should let the user specify the lib program.
5859     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5860     fix_srcfile_path='`cygpath -w "$srcfile"`'
5861     ;;
5862
5863   darwin* | rhapsody*)
5864     case "$host_os" in
5865     rhapsody* | darwin1.[012])
5866       allow_undefined_flag='-undefined suppress'
5867       ;;
5868     *) # Darwin 1.3 on
5869       allow_undefined_flag='-flat_namespace -undefined suppress'
5870       ;;
5871     esac
5872     # FIXME: Relying on posixy $() will cause problems for
5873     #        cross-compilation, but unfortunately the echo tests do not
5874     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5875     #        `"' quotes if we put them in here... so don't!
5876     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)'
5877     # We need to add '_' to the symbols in $export_symbols first
5878     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5879     hardcode_direct=yes
5880     hardcode_shlibpath_var=no
5881     whole_archive_flag_spec='-all_load $convenience'
5882     ;;
5883
5884   freebsd1*)
5885     ld_shlibs=no
5886     ;;
5887
5888   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5889   # support.  Future versions do this automatically, but an explicit c++rt0.o
5890   # does not break anything, and helps significantly (at the cost of a little
5891   # extra space).
5892   freebsd2.2*)
5893     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5894     hardcode_libdir_flag_spec='-R$libdir'
5895     hardcode_direct=yes
5896     hardcode_shlibpath_var=no
5897     ;;
5898
5899   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5900   freebsd2*)
5901     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5902     hardcode_direct=yes
5903     hardcode_minus_L=yes
5904     hardcode_shlibpath_var=no
5905     ;;
5906
5907   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5908   freebsd*)
5909     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5910     hardcode_libdir_flag_spec='-R$libdir'
5911     hardcode_direct=yes
5912     hardcode_shlibpath_var=no
5913     ;;
5914
5915   hpux9* | hpux10* | hpux11*)
5916     case $host_os in
5917     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' ;;
5918     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5919     esac
5920     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5921     hardcode_libdir_separator=:
5922     hardcode_direct=yes
5923     hardcode_minus_L=yes # Not in the search PATH, but as the default
5924                          # location of the library.
5925     export_dynamic_flag_spec='${wl}-E'
5926     ;;
5927
5928   irix5* | irix6* | nonstopux*)
5929     if test "$GCC" = yes; then
5930       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'
5931       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5932     else
5933       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'
5934       hardcode_libdir_flag_spec='-rpath $libdir'
5935     fi
5936     hardcode_libdir_separator=:
5937     link_all_deplibs=yes
5938     ;;
5939
5940   netbsd*)
5941     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5942       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5943     else
5944       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5945     fi
5946     hardcode_libdir_flag_spec='-R$libdir'
5947     hardcode_direct=yes
5948     hardcode_shlibpath_var=no
5949     ;;
5950
5951   newsos6)
5952     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5953     hardcode_direct=yes
5954     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5955     hardcode_libdir_separator=:
5956     hardcode_shlibpath_var=no
5957     ;;
5958
5959   openbsd*)
5960     hardcode_direct=yes
5961     hardcode_shlibpath_var=no
5962     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5963       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5964       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5965       export_dynamic_flag_spec='${wl}-E'
5966     else
5967       case "$host_os" in
5968       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5969         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5970         hardcode_libdir_flag_spec='-R$libdir'
5971         ;;
5972       *)
5973         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5974         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5975         ;;
5976       esac
5977     fi
5978     ;;
5979
5980   os2*)
5981     hardcode_libdir_flag_spec='-L$libdir'
5982     hardcode_minus_L=yes
5983     allow_undefined_flag=unsupported
5984     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'
5985     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5986     ;;
5987
5988   osf3*)
5989     if test "$GCC" = yes; then
5990       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5991       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'
5992     else
5993       allow_undefined_flag=' -expect_unresolved \*'
5994       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'
5995     fi
5996     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5997     hardcode_libdir_separator=:
5998     ;;
5999
6000   osf4* | osf5*)        # as osf3* with the addition of -msym flag
6001     if test "$GCC" = yes; then
6002       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6003       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'
6004       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6005     else
6006       allow_undefined_flag=' -expect_unresolved \*'
6007       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'
6008       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6009       $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'
6010
6011       #Both c and cxx compiler support -rpath directly
6012       hardcode_libdir_flag_spec='-rpath $libdir'
6013     fi
6014     hardcode_libdir_separator=:
6015     ;;
6016
6017   sco3.2v5*)
6018     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6019     hardcode_shlibpath_var=no
6020     runpath_var=LD_RUN_PATH
6021     hardcode_runpath_var=yes
6022     export_dynamic_flag_spec='${wl}-Bexport'
6023     ;;
6024
6025   solaris*)
6026     # gcc --version < 3.0 without binutils cannot create self contained
6027     # shared libraries reliably, requiring libgcc.a to resolve some of
6028     # the object symbols generated in some cases.  Libraries that use
6029     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6030     # a copy of libgcc.a into every shared library to guarantee resolving
6031     # such symbols causes other problems:  According to Tim Van Holder
6032     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6033     # (to the application) exception stack for one thing.
6034     no_undefined_flag=' -z defs'
6035     if test "$GCC" = yes; then
6036       case `$CC --version 2>/dev/null` in
6037       [12].*)
6038         cat <<EOF 1>&2
6039
6040 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6041 *** create self contained shared libraries on Solaris systems, without
6042 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6043 *** -no-undefined support, which will at least allow you to build shared
6044 *** libraries.  However, you may find that when you link such libraries
6045 *** into an application without using GCC, you have to manually add
6046 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6047 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6048 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6049
6050 EOF
6051         no_undefined_flag=
6052         ;;
6053       esac
6054     fi
6055     # $CC -shared without GNU ld will not create a library from C++
6056     # object files and a static libstdc++, better avoid it by now
6057     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6058     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6059                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6060     hardcode_libdir_flag_spec='-R$libdir'
6061     hardcode_shlibpath_var=no
6062     case $host_os in
6063     solaris2.[0-5] | solaris2.[0-5].*) ;;
6064     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6065       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6066     esac
6067     link_all_deplibs=yes
6068     ;;
6069
6070   sunos4*)
6071     if test "x$host_vendor" = xsequent; then
6072       # Use $CC to link under sequent, because it throws in some extra .o
6073       # files that make .init and .fini sections work.
6074       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6075     else
6076       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6077     fi
6078     hardcode_libdir_flag_spec='-L$libdir'
6079     hardcode_direct=yes
6080     hardcode_minus_L=yes
6081     hardcode_shlibpath_var=no
6082     ;;
6083
6084   sysv4)
6085     case $host_vendor in
6086       sni)
6087         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6088         hardcode_direct=yes # is this really true???
6089         ;;
6090       siemens)
6091         ## LD is ld it makes a PLAMLIB
6092         ## CC just makes a GrossModule.
6093         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6094         reload_cmds='$CC -r -o $output$reload_objs'
6095         hardcode_direct=no
6096         ;;
6097       motorola)
6098         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6099         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6100         ;;
6101     esac
6102     runpath_var='LD_RUN_PATH'
6103     hardcode_shlibpath_var=no
6104     ;;
6105
6106   sysv4.3*)
6107     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6108     hardcode_shlibpath_var=no
6109     export_dynamic_flag_spec='-Bexport'
6110     ;;
6111
6112   sysv5*)
6113     no_undefined_flag=' -z text'
6114     # $CC -shared without GNU ld will not create a library from C++
6115     # object files and a static libstdc++, better avoid it by now
6116     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6117     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6118                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6119     hardcode_libdir_flag_spec=
6120     hardcode_shlibpath_var=no
6121     runpath_var='LD_RUN_PATH'
6122     ;;
6123
6124   uts4*)
6125     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6126     hardcode_libdir_flag_spec='-L$libdir'
6127     hardcode_shlibpath_var=no
6128     ;;
6129
6130   dgux*)
6131     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6132     hardcode_libdir_flag_spec='-L$libdir'
6133     hardcode_shlibpath_var=no
6134     ;;
6135
6136   sysv4*MP*)
6137     if test -d /usr/nec; then
6138       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6139       hardcode_shlibpath_var=no
6140       runpath_var=LD_RUN_PATH
6141       hardcode_runpath_var=yes
6142       ld_shlibs=yes
6143     fi
6144     ;;
6145
6146   sysv4.2uw2*)
6147     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6148     hardcode_direct=yes
6149     hardcode_minus_L=no
6150     hardcode_shlibpath_var=no
6151     hardcode_runpath_var=yes
6152     runpath_var=LD_RUN_PATH
6153     ;;
6154
6155   sysv5uw7* | unixware7*)
6156     no_undefined_flag='${wl}-z ${wl}text'
6157     if test "$GCC" = yes; then
6158       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6159     else
6160       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6161     fi
6162     runpath_var='LD_RUN_PATH'
6163     hardcode_shlibpath_var=no
6164     ;;
6165
6166   *)
6167     ld_shlibs=no
6168     ;;
6169   esac
6170 fi
6171 echo "$ac_t""$ld_shlibs" 1>&6
6172 test "$ld_shlibs" = no && can_build_shared=no
6173
6174 # Check hardcoding attributes.
6175 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6176 echo "configure:6176: checking how to hardcode library paths into programs" >&5
6177 hardcode_action=
6178 if test -n "$hardcode_libdir_flag_spec" || \
6179    test -n "$runpath_var"; then
6180
6181   # We can hardcode non-existant directories.
6182   if test "$hardcode_direct" != no &&
6183      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6184      # have to relink, otherwise we might link with an installed library
6185      # when we should be linking with a yet-to-be-installed one
6186      ## test "$hardcode_shlibpath_var" != no &&
6187      test "$hardcode_minus_L" != no; then
6188     # Linking always hardcodes the temporary library directory.
6189     hardcode_action=relink
6190   else
6191     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6192     hardcode_action=immediate
6193   fi
6194 else
6195   # We cannot hardcode anything, or else we can only hardcode existing
6196   # directories.
6197   hardcode_action=unsupported
6198 fi
6199 echo "$ac_t""$hardcode_action" 1>&6
6200
6201 striplib=
6202 old_striplib=
6203 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6204 echo "configure:6204: checking whether stripping libraries is possible" >&5
6205 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6206   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6207   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6208   echo "$ac_t""yes" 1>&6
6209 else
6210   echo "$ac_t""no" 1>&6
6211 fi
6212
6213 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6214 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6215
6216 # PORTME Fill in your ld.so characteristics
6217 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6218 echo "configure:6218: checking dynamic linker characteristics" >&5
6219 library_names_spec=
6220 libname_spec='lib$name'
6221 soname_spec=
6222 postinstall_cmds=
6223 postuninstall_cmds=
6224 finish_cmds=
6225 finish_eval=
6226 shlibpath_var=
6227 shlibpath_overrides_runpath=unknown
6228 version_type=none
6229 dynamic_linker="$host_os ld.so"
6230 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6231 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6232
6233 case $host_os in
6234 aix3*)
6235   version_type=linux
6236   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6237   shlibpath_var=LIBPATH
6238
6239   # AIX has no versioning support, so we append a major version to the name.
6240   soname_spec='${libname}${release}.so$major'
6241   ;;
6242
6243 aix4* | aix5*)
6244   version_type=linux
6245   need_lib_prefix=no
6246   need_version=no
6247   hardcode_into_libs=yes
6248   if test "$host_cpu" = ia64; then
6249     # AIX 5 supports IA64
6250     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6251     shlibpath_var=LD_LIBRARY_PATH
6252   else
6253     # With GCC up to 2.95.x, collect2 would create an import file
6254     # for dependence libraries.  The import file would start with
6255     # the line `#! .'.  This would cause the generated library to
6256     # depend on `.', always an invalid library.  This was fixed in
6257     # development snapshots of GCC prior to 3.0.
6258     case $host_os in
6259       aix4 | aix4.[01] | aix4.[01].*)
6260         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6261              echo ' yes '
6262              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6263           :
6264         else
6265           can_build_shared=no
6266         fi
6267         ;;
6268     esac
6269     # AIX (on Power*) has no versioning support, so currently we can
6270     # not hardcode correct soname into executable. Probably we can
6271     # add versioning support to collect2, so additional links can
6272     # be useful in future.
6273     if test "$aix_use_runtimelinking" = yes; then
6274       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6275       # instead of lib<name>.a to let people know that these are not
6276       # typical AIX shared libraries.
6277       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6278     else
6279       # We preserve .a as extension for shared libraries through AIX4.2
6280       # and later when we are not doing run time linking.
6281       library_names_spec='${libname}${release}.a $libname.a'
6282       soname_spec='${libname}${release}.so$major'
6283     fi
6284     shlibpath_var=LIBPATH
6285   fi
6286   hardcode_into_libs=yes
6287   ;;
6288
6289 amigaos*)
6290   library_names_spec='$libname.ixlibrary $libname.a'
6291   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6292   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'
6293   ;;
6294
6295 beos*)
6296   library_names_spec='${libname}.so'
6297   dynamic_linker="$host_os ld.so"
6298   shlibpath_var=LIBRARY_PATH
6299   ;;
6300
6301 bsdi4*)
6302   version_type=linux
6303   need_version=no
6304   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6305   soname_spec='${libname}${release}.so$major'
6306   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6307   shlibpath_var=LD_LIBRARY_PATH
6308   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6309   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6310   export_dynamic_flag_spec=-rdynamic
6311   # the default ld.so.conf also contains /usr/contrib/lib and
6312   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6313   # libtool to hard-code these into programs
6314   ;;
6315
6316 cygwin* | mingw* | pw32*)
6317   version_type=windows
6318   need_version=no
6319   need_lib_prefix=no
6320   case $GCC,$host_os in
6321   yes,cygwin*)
6322     library_names_spec='$libname.dll.a'
6323     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6324     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6325       dldir=$destdir/`dirname \$dlpath`~
6326       test -d \$dldir || mkdir -p \$dldir~
6327       $install_prog .libs/$dlname \$dldir/$dlname'
6328     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6329       dlpath=$dir/\$dldll~
6330        $rm \$dlpath'
6331     ;;
6332   yes,mingw*)
6333     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6334     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6335     ;;
6336   yes,pw32*)
6337     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6338     ;;
6339   *)
6340     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6341     ;;
6342   esac
6343   dynamic_linker='Win32 ld.exe'
6344   # FIXME: first we should search . and the directory the executable is in
6345   shlibpath_var=PATH
6346   ;;
6347
6348 darwin* | rhapsody*)
6349   dynamic_linker="$host_os dyld"
6350   version_type=darwin
6351   need_lib_prefix=no
6352   need_version=no
6353   # FIXME: Relying on posixy $() will cause problems for
6354   #        cross-compilation, but unfortunately the echo tests do not
6355   #        yet detect zsh echo's removal of \ escapes.
6356   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)'
6357   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6358   shlibpath_overrides_runpath=yes
6359   shlibpath_var=DYLD_LIBRARY_PATH
6360   ;;
6361
6362 freebsd1*)
6363   dynamic_linker=no
6364   ;;
6365
6366 freebsd*)
6367   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6368   version_type=freebsd-$objformat
6369   case $version_type in
6370     freebsd-elf*)
6371       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6372       need_version=no
6373       need_lib_prefix=no
6374       ;;
6375     freebsd-*)
6376       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6377       need_version=yes
6378       ;;
6379   esac
6380   shlibpath_var=LD_LIBRARY_PATH
6381   case $host_os in
6382   freebsd2*)
6383     shlibpath_overrides_runpath=yes
6384     ;;
6385   *)
6386     shlibpath_overrides_runpath=no
6387     hardcode_into_libs=yes
6388     ;;
6389   esac
6390   ;;
6391
6392 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   shlibpath_var=LD_LIBRARY_PATH
6399   hardcode_into_libs=yes
6400   ;;
6401
6402 hpux9* | hpux10* | hpux11*)
6403   # Give a soname corresponding to the major version so that dld.sl refuses to
6404   # link against other versions.
6405   dynamic_linker="$host_os dld.sl"
6406   version_type=sunos
6407   need_lib_prefix=no
6408   need_version=no
6409   shlibpath_var=SHLIB_PATH
6410   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6411   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6412   soname_spec='${libname}${release}.sl$major'
6413   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6414   postinstall_cmds='chmod 555 $lib'
6415   ;;
6416
6417 irix5* | irix6* | nonstopux*)
6418   case $host_os in
6419     nonstopux*) version_type=nonstopux ;;
6420     *)          version_type=irix ;;
6421   esac
6422   need_lib_prefix=no
6423   need_version=no
6424   soname_spec='${libname}${release}.so$major'
6425   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6426   case $host_os in
6427   irix5* | nonstopux*)
6428     libsuff= shlibsuff=
6429     ;;
6430   *)
6431     case $LD in # libtool.m4 will add one of these switches to LD
6432     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6433     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6434     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6435     *) libsuff= shlibsuff= libmagic=never-match;;
6436     esac
6437     ;;
6438   esac
6439   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6440   shlibpath_overrides_runpath=no
6441   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6442   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6443   ;;
6444
6445 # No shared lib support for Linux oldld, aout, or coff.
6446 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6447   dynamic_linker=no
6448   ;;
6449
6450 # This must be Linux ELF.
6451 linux-gnu*)
6452   version_type=linux
6453   need_lib_prefix=no
6454   need_version=no
6455   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6456   soname_spec='${libname}${release}.so$major'
6457   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6458   shlibpath_var=LD_LIBRARY_PATH
6459   shlibpath_overrides_runpath=no
6460   # This implies no fast_install, which is unacceptable.
6461   # Some rework will be needed to allow for fast_install
6462   # before this can be enabled.
6463   hardcode_into_libs=yes
6464
6465   # We used to test for /lib/ld.so.1 and disable shared libraries on
6466   # powerpc, because MkLinux only supported shared libraries with the
6467   # GNU dynamic linker.  Since this was broken with cross compilers,
6468   # most powerpc-linux boxes support dynamic linking these days and
6469   # people can always --disable-shared, the test was removed, and we
6470   # assume the GNU/Linux dynamic linker is in use.
6471   dynamic_linker='GNU/Linux ld.so'
6472   ;;
6473
6474 netbsd*)
6475   version_type=sunos
6476   need_lib_prefix=no
6477   need_version=no
6478   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6479     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6480     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6481     dynamic_linker='NetBSD (a.out) ld.so'
6482   else
6483     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6484     soname_spec='${libname}${release}.so$major'
6485     dynamic_linker='NetBSD ld.elf_so'
6486   fi
6487   shlibpath_var=LD_LIBRARY_PATH
6488   shlibpath_overrides_runpath=yes
6489   hardcode_into_libs=yes
6490   ;;
6491
6492 newsos6)
6493   version_type=linux
6494   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6495   shlibpath_var=LD_LIBRARY_PATH
6496   shlibpath_overrides_runpath=yes
6497   ;;
6498
6499 openbsd*)
6500   version_type=sunos
6501   need_lib_prefix=no
6502   need_version=no
6503   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6504     case "$host_os" in
6505     openbsd2.[89] | openbsd2.[89].*)
6506       shlibpath_overrides_runpath=no
6507       ;;
6508     *)
6509       shlibpath_overrides_runpath=yes
6510       ;;
6511     esac
6512   else
6513     shlibpath_overrides_runpath=yes
6514   fi
6515   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6516   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6517   shlibpath_var=LD_LIBRARY_PATH
6518   ;;
6519
6520 os2*)
6521   libname_spec='$name'
6522   need_lib_prefix=no
6523   library_names_spec='$libname.dll $libname.a'
6524   dynamic_linker='OS/2 ld.exe'
6525   shlibpath_var=LIBPATH
6526   ;;
6527
6528 osf3* | osf4* | osf5*)
6529   version_type=osf
6530   need_version=no
6531   soname_spec='${libname}${release}.so$major'
6532   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6533   shlibpath_var=LD_LIBRARY_PATH
6534   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6535   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6536   hardcode_into_libs=yes
6537   ;;
6538
6539 sco3.2v5*)
6540   version_type=osf
6541   soname_spec='${libname}${release}.so$major'
6542   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6543   shlibpath_var=LD_LIBRARY_PATH
6544   ;;
6545
6546 solaris*)
6547   version_type=linux
6548   need_lib_prefix=no
6549   need_version=no
6550   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6551   soname_spec='${libname}${release}.so$major'
6552   shlibpath_var=LD_LIBRARY_PATH
6553   shlibpath_overrides_runpath=yes
6554   hardcode_into_libs=yes
6555   # ldd complains unless libraries are executable
6556   postinstall_cmds='chmod +x $lib'
6557   ;;
6558
6559 sunos4*)
6560   version_type=sunos
6561   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6562   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6563   shlibpath_var=LD_LIBRARY_PATH
6564   shlibpath_overrides_runpath=yes
6565   if test "$with_gnu_ld" = yes; then
6566     need_lib_prefix=no
6567   fi
6568   need_version=yes
6569   ;;
6570
6571 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6572   version_type=linux
6573   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6574   soname_spec='${libname}${release}.so$major'
6575   shlibpath_var=LD_LIBRARY_PATH
6576   case $host_vendor in
6577     sni)
6578       shlibpath_overrides_runpath=no
6579       need_lib_prefix=no
6580       export_dynamic_flag_spec='${wl}-Blargedynsym'
6581       runpath_var=LD_RUN_PATH
6582       ;;
6583     siemens)
6584       need_lib_prefix=no
6585       ;;
6586     motorola)
6587       need_lib_prefix=no
6588       need_version=no
6589       shlibpath_overrides_runpath=no
6590       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6591       ;;
6592   esac
6593   ;;
6594
6595 uts4*)
6596   version_type=linux
6597   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6598   soname_spec='${libname}${release}.so$major'
6599   shlibpath_var=LD_LIBRARY_PATH
6600   ;;
6601
6602 dgux*)
6603   version_type=linux
6604   need_lib_prefix=no
6605   need_version=no
6606   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6607   soname_spec='${libname}${release}.so$major'
6608   shlibpath_var=LD_LIBRARY_PATH
6609   ;;
6610
6611 sysv4*MP*)
6612   if test -d /usr/nec ;then
6613     version_type=linux
6614     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6615     soname_spec='$libname.so.$major'
6616     shlibpath_var=LD_LIBRARY_PATH
6617   fi
6618   ;;
6619
6620 *)
6621   dynamic_linker=no
6622   ;;
6623 esac
6624 echo "$ac_t""$dynamic_linker" 1>&6
6625 test "$dynamic_linker" = no && can_build_shared=no
6626
6627 # Report the final consequences.
6628 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6629 echo "configure:6629: checking if libtool supports shared libraries" >&5
6630 echo "$ac_t""$can_build_shared" 1>&6
6631
6632 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6633 echo "configure:6633: checking whether to build shared libraries" >&5
6634 test "$can_build_shared" = "no" && enable_shared=no
6635
6636 # On AIX, shared libraries and static libraries use the same namespace, and
6637 # are all built from PIC.
6638 case "$host_os" in
6639 aix3*)
6640   test "$enable_shared" = yes && enable_static=no
6641   if test -n "$RANLIB"; then
6642     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6643     postinstall_cmds='$RANLIB $lib'
6644   fi
6645   ;;
6646
6647 aix4*)
6648   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6649     test "$enable_shared" = yes && enable_static=no
6650   fi
6651   ;;
6652 esac
6653 echo "$ac_t""$enable_shared" 1>&6
6654
6655 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6656 echo "configure:6656: checking whether to build static libraries" >&5
6657 # Make sure either enable_shared or enable_static is yes.
6658 test "$enable_shared" = yes || enable_static=yes
6659 echo "$ac_t""$enable_static" 1>&6
6660
6661 if test "$hardcode_action" = relink; then
6662   # Fast installation is not supported
6663   enable_fast_install=no
6664 elif test "$shlibpath_overrides_runpath" = yes ||
6665      test "$enable_shared" = no; then
6666   # Fast installation is not necessary
6667   enable_fast_install=needless
6668 fi
6669
6670 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6671 if test "$GCC" = yes; then
6672   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6673 fi
6674
6675 if test "x$enable_dlopen" != xyes; then
6676   enable_dlopen=unknown
6677   enable_dlopen_self=unknown
6678   enable_dlopen_self_static=unknown
6679 else
6680   lt_cv_dlopen=no
6681   lt_cv_dlopen_libs=
6682
6683   case $host_os in
6684   beos*)
6685     lt_cv_dlopen="load_add_on"
6686     lt_cv_dlopen_libs=
6687     lt_cv_dlopen_self=yes
6688     ;;
6689
6690   cygwin* | mingw* | pw32*)
6691     lt_cv_dlopen="LoadLibrary"
6692     lt_cv_dlopen_libs=
6693    ;;
6694
6695   *)
6696     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6697 echo "configure:6697: checking for shl_load" >&5
6698 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6699   echo $ac_n "(cached) $ac_c" 1>&6
6700 else
6701   cat > conftest.$ac_ext <<EOF
6702 #line 6702 "configure"
6703 #include "confdefs.h"
6704 /* System header to define __stub macros and hopefully few prototypes,
6705     which can conflict with char shl_load(); below.  */
6706 #include <assert.h>
6707 /* Override any gcc2 internal prototype to avoid an error.  */
6708 /* We use char because int might match the return type of a gcc2
6709     builtin and then its argument prototype would still apply.  */
6710 char shl_load();
6711 char (*f)();
6712
6713 int main() {
6714
6715 /* The GNU C library defines this for functions which it implements
6716     to always fail with ENOSYS.  Some functions are actually named
6717     something starting with __ and the normal name is an alias.  */
6718 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6719 choke me
6720 #else
6721 f = shl_load;
6722 #endif
6723
6724 ; return 0; }
6725 EOF
6726 if { (eval echo configure:6726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6727   rm -rf conftest*
6728   eval "ac_cv_func_shl_load=yes"
6729 else
6730   echo "configure: failed program was:" >&5
6731   cat conftest.$ac_ext >&5
6732   rm -rf conftest*
6733   eval "ac_cv_func_shl_load=no"
6734 fi
6735 rm -f conftest*
6736 fi
6737
6738 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6739   echo "$ac_t""yes" 1>&6
6740   lt_cv_dlopen="shl_load"
6741 else
6742   echo "$ac_t""no" 1>&6
6743 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6744 echo "configure:6744: checking for shl_load in -ldld" >&5
6745 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6746 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6747   echo $ac_n "(cached) $ac_c" 1>&6
6748 else
6749   ac_save_LIBS="$LIBS"
6750 LIBS="-ldld  $LIBS"
6751 cat > conftest.$ac_ext <<EOF
6752 #line 6752 "configure"
6753 #include "confdefs.h"
6754 /* Override any gcc2 internal prototype to avoid an error.  */
6755 /* We use char because int might match the return type of a gcc2
6756     builtin and then its argument prototype would still apply.  */
6757 char shl_load();
6758
6759 int main() {
6760 shl_load()
6761 ; return 0; }
6762 EOF
6763 if { (eval echo configure:6763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6764   rm -rf conftest*
6765   eval "ac_cv_lib_$ac_lib_var=yes"
6766 else
6767   echo "configure: failed program was:" >&5
6768   cat conftest.$ac_ext >&5
6769   rm -rf conftest*
6770   eval "ac_cv_lib_$ac_lib_var=no"
6771 fi
6772 rm -f conftest*
6773 LIBS="$ac_save_LIBS"
6774
6775 fi
6776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6777   echo "$ac_t""yes" 1>&6
6778   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6779 else
6780   echo "$ac_t""no" 1>&6
6781 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6782 echo "configure:6782: checking for dlopen" >&5
6783 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6784   echo $ac_n "(cached) $ac_c" 1>&6
6785 else
6786   cat > conftest.$ac_ext <<EOF
6787 #line 6787 "configure"
6788 #include "confdefs.h"
6789 /* System header to define __stub macros and hopefully few prototypes,
6790     which can conflict with char dlopen(); below.  */
6791 #include <assert.h>
6792 /* Override any gcc2 internal prototype to avoid an error.  */
6793 /* We use char because int might match the return type of a gcc2
6794     builtin and then its argument prototype would still apply.  */
6795 char dlopen();
6796 char (*f)();
6797
6798 int main() {
6799
6800 /* The GNU C library defines this for functions which it implements
6801     to always fail with ENOSYS.  Some functions are actually named
6802     something starting with __ and the normal name is an alias.  */
6803 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6804 choke me
6805 #else
6806 f = dlopen;
6807 #endif
6808
6809 ; return 0; }
6810 EOF
6811 if { (eval echo configure:6811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6812   rm -rf conftest*
6813   eval "ac_cv_func_dlopen=yes"
6814 else
6815   echo "configure: failed program was:" >&5
6816   cat conftest.$ac_ext >&5
6817   rm -rf conftest*
6818   eval "ac_cv_func_dlopen=no"
6819 fi
6820 rm -f conftest*
6821 fi
6822
6823 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6824   echo "$ac_t""yes" 1>&6
6825   lt_cv_dlopen="dlopen"
6826 else
6827   echo "$ac_t""no" 1>&6
6828 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6829 echo "configure:6829: checking for dlopen in -ldl" >&5
6830 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6831 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6832   echo $ac_n "(cached) $ac_c" 1>&6
6833 else
6834   ac_save_LIBS="$LIBS"
6835 LIBS="-ldl  $LIBS"
6836 cat > conftest.$ac_ext <<EOF
6837 #line 6837 "configure"
6838 #include "confdefs.h"
6839 /* Override any gcc2 internal prototype to avoid an error.  */
6840 /* We use char because int might match the return type of a gcc2
6841     builtin and then its argument prototype would still apply.  */
6842 char dlopen();
6843
6844 int main() {
6845 dlopen()
6846 ; return 0; }
6847 EOF
6848 if { (eval echo configure:6848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6849   rm -rf conftest*
6850   eval "ac_cv_lib_$ac_lib_var=yes"
6851 else
6852   echo "configure: failed program was:" >&5
6853   cat conftest.$ac_ext >&5
6854   rm -rf conftest*
6855   eval "ac_cv_lib_$ac_lib_var=no"
6856 fi
6857 rm -f conftest*
6858 LIBS="$ac_save_LIBS"
6859
6860 fi
6861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6862   echo "$ac_t""yes" 1>&6
6863   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6864 else
6865   echo "$ac_t""no" 1>&6
6866 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6867 echo "configure:6867: checking for dlopen in -lsvld" >&5
6868 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6869 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6870   echo $ac_n "(cached) $ac_c" 1>&6
6871 else
6872   ac_save_LIBS="$LIBS"
6873 LIBS="-lsvld  $LIBS"
6874 cat > conftest.$ac_ext <<EOF
6875 #line 6875 "configure"
6876 #include "confdefs.h"
6877 /* Override any gcc2 internal prototype to avoid an error.  */
6878 /* We use char because int might match the return type of a gcc2
6879     builtin and then its argument prototype would still apply.  */
6880 char dlopen();
6881
6882 int main() {
6883 dlopen()
6884 ; return 0; }
6885 EOF
6886 if { (eval echo configure:6886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6887   rm -rf conftest*
6888   eval "ac_cv_lib_$ac_lib_var=yes"
6889 else
6890   echo "configure: failed program was:" >&5
6891   cat conftest.$ac_ext >&5
6892   rm -rf conftest*
6893   eval "ac_cv_lib_$ac_lib_var=no"
6894 fi
6895 rm -f conftest*
6896 LIBS="$ac_save_LIBS"
6897
6898 fi
6899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6900   echo "$ac_t""yes" 1>&6
6901   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6902 else
6903   echo "$ac_t""no" 1>&6
6904 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6905 echo "configure:6905: checking for dld_link in -ldld" >&5
6906 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6907 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6908   echo $ac_n "(cached) $ac_c" 1>&6
6909 else
6910   ac_save_LIBS="$LIBS"
6911 LIBS="-ldld  $LIBS"
6912 cat > conftest.$ac_ext <<EOF
6913 #line 6913 "configure"
6914 #include "confdefs.h"
6915 /* Override any gcc2 internal prototype to avoid an error.  */
6916 /* We use char because int might match the return type of a gcc2
6917     builtin and then its argument prototype would still apply.  */
6918 char dld_link();
6919
6920 int main() {
6921 dld_link()
6922 ; return 0; }
6923 EOF
6924 if { (eval echo configure:6924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6925   rm -rf conftest*
6926   eval "ac_cv_lib_$ac_lib_var=yes"
6927 else
6928   echo "configure: failed program was:" >&5
6929   cat conftest.$ac_ext >&5
6930   rm -rf conftest*
6931   eval "ac_cv_lib_$ac_lib_var=no"
6932 fi
6933 rm -f conftest*
6934 LIBS="$ac_save_LIBS"
6935
6936 fi
6937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6938   echo "$ac_t""yes" 1>&6
6939   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6940 else
6941   echo "$ac_t""no" 1>&6
6942 fi
6943
6944               
6945 fi
6946
6947             
6948 fi
6949
6950           
6951 fi
6952
6953         
6954 fi
6955
6956       
6957 fi
6958
6959     ;;
6960   esac
6961
6962   if test "x$lt_cv_dlopen" != xno; then
6963     enable_dlopen=yes
6964   else
6965     enable_dlopen=no
6966   fi
6967
6968   case $lt_cv_dlopen in
6969   dlopen)
6970     save_CPPFLAGS="$CPPFLAGS"
6971         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6972
6973     save_LDFLAGS="$LDFLAGS"
6974     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6975
6976     save_LIBS="$LIBS"
6977     LIBS="$lt_cv_dlopen_libs $LIBS"
6978
6979     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6980 echo "configure:6980: checking whether a program can dlopen itself" >&5
6981 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6982   echo $ac_n "(cached) $ac_c" 1>&6
6983 else
6984           if test "$cross_compiling" = yes; then :
6985   lt_cv_dlopen_self=cross
6986 else
6987     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6988   lt_status=$lt_dlunknown
6989   cat > conftest.$ac_ext <<EOF
6990 #line 6990 "configure"
6991 #include "confdefs.h"
6992
6993 #if HAVE_DLFCN_H
6994 #include <dlfcn.h>
6995 #endif
6996
6997 #include <stdio.h>
6998
6999 #ifdef RTLD_GLOBAL
7000 #  define LT_DLGLOBAL           RTLD_GLOBAL
7001 #else
7002 #  ifdef DL_GLOBAL
7003 #    define LT_DLGLOBAL         DL_GLOBAL
7004 #  else
7005 #    define LT_DLGLOBAL         0
7006 #  endif
7007 #endif
7008
7009 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7010    find out it does not work in some platform. */
7011 #ifndef LT_DLLAZY_OR_NOW
7012 #  ifdef RTLD_LAZY
7013 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7014 #  else
7015 #    ifdef DL_LAZY
7016 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7017 #    else
7018 #      ifdef RTLD_NOW
7019 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7020 #      else
7021 #        ifdef DL_NOW
7022 #          define LT_DLLAZY_OR_NOW      DL_NOW
7023 #        else
7024 #          define LT_DLLAZY_OR_NOW      0
7025 #        endif
7026 #      endif
7027 #    endif
7028 #  endif
7029 #endif
7030
7031 #ifdef __cplusplus
7032 extern "C" void exit (int);
7033 #endif
7034
7035 void fnord() { int i=42;}
7036 int main ()
7037 {
7038   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7039   int status = $lt_dlunknown;
7040
7041   if (self)
7042     {
7043       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7044       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7045       /* dlclose (self); */
7046     }
7047
7048     exit (status);
7049 }
7050 EOF
7051   if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7052     (./conftest; exit; ) 2>/dev/null
7053     lt_status=$?
7054     case x$lt_status in
7055       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7056       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7057       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7058     esac
7059   else :
7060     # compilation failed
7061     lt_cv_dlopen_self=no
7062   fi
7063 fi
7064 rm -fr conftest*
7065
7066     
7067 fi
7068
7069 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7070
7071     if test "x$lt_cv_dlopen_self" = xyes; then
7072       LDFLAGS="$LDFLAGS $link_static_flag"
7073       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7074 echo "configure:7074: checking whether a statically linked program can dlopen itself" >&5
7075 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7076   echo $ac_n "(cached) $ac_c" 1>&6
7077 else
7078           if test "$cross_compiling" = yes; then :
7079   lt_cv_dlopen_self_static=cross
7080 else
7081     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7082   lt_status=$lt_dlunknown
7083   cat > conftest.$ac_ext <<EOF
7084 #line 7084 "configure"
7085 #include "confdefs.h"
7086
7087 #if HAVE_DLFCN_H
7088 #include <dlfcn.h>
7089 #endif
7090
7091 #include <stdio.h>
7092
7093 #ifdef RTLD_GLOBAL
7094 #  define LT_DLGLOBAL           RTLD_GLOBAL
7095 #else
7096 #  ifdef DL_GLOBAL
7097 #    define LT_DLGLOBAL         DL_GLOBAL
7098 #  else
7099 #    define LT_DLGLOBAL         0
7100 #  endif
7101 #endif
7102
7103 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7104    find out it does not work in some platform. */
7105 #ifndef LT_DLLAZY_OR_NOW
7106 #  ifdef RTLD_LAZY
7107 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7108 #  else
7109 #    ifdef DL_LAZY
7110 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7111 #    else
7112 #      ifdef RTLD_NOW
7113 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7114 #      else
7115 #        ifdef DL_NOW
7116 #          define LT_DLLAZY_OR_NOW      DL_NOW
7117 #        else
7118 #          define LT_DLLAZY_OR_NOW      0
7119 #        endif
7120 #      endif
7121 #    endif
7122 #  endif
7123 #endif
7124
7125 #ifdef __cplusplus
7126 extern "C" void exit (int);
7127 #endif
7128
7129 void fnord() { int i=42;}
7130 int main ()
7131 {
7132   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7133   int status = $lt_dlunknown;
7134
7135   if (self)
7136     {
7137       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7138       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7139       /* dlclose (self); */
7140     }
7141
7142     exit (status);
7143 }
7144 EOF
7145   if { (eval echo configure:7145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7146     (./conftest; exit; ) 2>/dev/null
7147     lt_status=$?
7148     case x$lt_status in
7149       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7150       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7151       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7152     esac
7153   else :
7154     # compilation failed
7155     lt_cv_dlopen_self_static=no
7156   fi
7157 fi
7158 rm -fr conftest*
7159
7160       
7161 fi
7162
7163 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7164     fi
7165
7166     CPPFLAGS="$save_CPPFLAGS"
7167     LDFLAGS="$save_LDFLAGS"
7168     LIBS="$save_LIBS"
7169     ;;
7170   esac
7171
7172   case $lt_cv_dlopen_self in
7173   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7174   *) enable_dlopen_self=unknown ;;
7175   esac
7176
7177   case $lt_cv_dlopen_self_static in
7178   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7179   *) enable_dlopen_self_static=unknown ;;
7180   esac
7181 fi
7182
7183
7184 if test "$enable_shared" = yes && test "$GCC" = yes; then
7185   case $archive_cmds in
7186   *'~'*)
7187     # FIXME: we may have to deal with multi-command sequences.
7188     ;;
7189   '$CC '*)
7190     # Test whether the compiler implicitly links with -lc since on some
7191     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7192     # to ld, don't add -lc before -lgcc.
7193     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7194 echo "configure:7194: checking whether -lc should be explicitly linked in" >&5
7195     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7196   echo $ac_n "(cached) $ac_c" 1>&6
7197 else
7198   $rm conftest*
7199     echo 'static int dummy;' > conftest.$ac_ext
7200
7201     if { (eval echo configure:7201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7202       soname=conftest
7203       lib=conftest
7204       libobjs=conftest.$ac_objext
7205       deplibs=
7206       wl=$lt_cv_prog_cc_wl
7207       compiler_flags=-v
7208       linker_flags=-v
7209       verstring=
7210       output_objdir=.
7211       libname=conftest
7212       save_allow_undefined_flag=$allow_undefined_flag
7213       allow_undefined_flag=
7214       if { (eval echo configure:7214: \"$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; }
7215       then
7216         lt_cv_archive_cmds_need_lc=no
7217       else
7218         lt_cv_archive_cmds_need_lc=yes
7219       fi
7220       allow_undefined_flag=$save_allow_undefined_flag
7221     else
7222       cat conftest.err 1>&5
7223     fi
7224 fi
7225
7226     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7227     ;;
7228   esac
7229 fi
7230 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7231
7232 # The second clause should only fire when bootstrapping the
7233 # libtool distribution, otherwise you forgot to ship ltmain.sh
7234 # with your package, and you will get complaints that there are
7235 # no rules to generate ltmain.sh.
7236 if test -f "$ltmain"; then
7237   :
7238 else
7239   # If there is no Makefile yet, we rely on a make rule to execute
7240   # `config.status --recheck' to rerun these tests and create the
7241   # libtool script then.
7242   test -f Makefile && make "$ltmain"
7243 fi
7244
7245 if test -f "$ltmain"; then
7246   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7247   $rm -f "${ofile}T"
7248
7249   echo creating $ofile
7250
7251   # Now quote all the things that may contain metacharacters while being
7252   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7253   # variables and quote the copies for generation of the libtool script.
7254   for var in echo old_CC old_CFLAGS SED \
7255     AR AR_FLAGS CC LD LN_S NM SHELL \
7256     reload_flag reload_cmds wl \
7257     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7258     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7259     library_names_spec soname_spec \
7260     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7261     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7262     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7263     old_striplib striplib file_magic_cmd export_symbols_cmds \
7264     deplibs_check_method allow_undefined_flag no_undefined_flag \
7265     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7266     global_symbol_to_c_name_address \
7267     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7268     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7269     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7270
7271     case $var in
7272     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7273     old_postinstall_cmds | old_postuninstall_cmds | \
7274     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7275     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7276     postinstall_cmds | postuninstall_cmds | \
7277     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7278       # Double-quote double-evaled strings.
7279       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7280       ;;
7281     *)
7282       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7283       ;;
7284     esac
7285   done
7286
7287   cat <<__EOF__ > "${ofile}T"
7288 #! $SHELL
7289
7290 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7291 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7292 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7293 #
7294 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7295 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7296 #
7297 # This program is free software; you can redistribute it and/or modify
7298 # it under the terms of the GNU General Public License as published by
7299 # the Free Software Foundation; either version 2 of the License, or
7300 # (at your option) any later version.
7301 #
7302 # This program is distributed in the hope that it will be useful, but
7303 # WITHOUT ANY WARRANTY; without even the implied warranty of
7304 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7305 # General Public License for more details.
7306 #
7307 # You should have received a copy of the GNU General Public License
7308 # along with this program; if not, write to the Free Software
7309 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7310 #
7311 # As a special exception to the GNU General Public License, if you
7312 # distribute this file as part of a program that contains a
7313 # configuration script generated by Autoconf, you may include it under
7314 # the same distribution terms that you use for the rest of that program.
7315
7316 # A sed that does not truncate output.
7317 SED=$lt_SED
7318
7319 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7320 Xsed="${SED} -e s/^X//"
7321
7322 # The HP-UX ksh and POSIX shell print the target directory to stdout
7323 # if CDPATH is set.
7324 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7325
7326 # ### BEGIN LIBTOOL CONFIG
7327
7328 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7329
7330 # Shell to use when invoking shell scripts.
7331 SHELL=$lt_SHELL
7332
7333 # Whether or not to build shared libraries.
7334 build_libtool_libs=$enable_shared
7335
7336 # Whether or not to build static libraries.
7337 build_old_libs=$enable_static
7338
7339 # Whether or not to add -lc for building shared libraries.
7340 build_libtool_need_lc=$need_lc
7341
7342 # Whether or not to optimize for fast installation.
7343 fast_install=$enable_fast_install
7344
7345 # The host system.
7346 host_alias=$host_alias
7347 host=$host
7348
7349 # An echo program that does not interpret backslashes.
7350 echo=$lt_echo
7351
7352 # The archiver.
7353 AR=$lt_AR
7354 AR_FLAGS=$lt_AR_FLAGS
7355
7356 # The default C compiler.
7357 CC=$lt_CC
7358
7359 # Is the compiler the GNU C compiler?
7360 with_gcc=$GCC
7361
7362 # The linker used to build libraries.
7363 LD=$lt_LD
7364
7365 # Whether we need hard or soft links.
7366 LN_S=$lt_LN_S
7367
7368 # A BSD-compatible nm program.
7369 NM=$lt_NM
7370
7371 # A symbol stripping program
7372 STRIP=$STRIP
7373
7374 # Used to examine libraries when file_magic_cmd begins "file"
7375 MAGIC_CMD=$MAGIC_CMD
7376
7377 # Used on cygwin: DLL creation program.
7378 DLLTOOL="$DLLTOOL"
7379
7380 # Used on cygwin: object dumper.
7381 OBJDUMP="$OBJDUMP"
7382
7383 # Used on cygwin: assembler.
7384 AS="$AS"
7385
7386 # The name of the directory that contains temporary libtool files.
7387 objdir=$objdir
7388
7389 # How to create reloadable object files.
7390 reload_flag=$lt_reload_flag
7391 reload_cmds=$lt_reload_cmds
7392
7393 # How to pass a linker flag through the compiler.
7394 wl=$lt_wl
7395
7396 # Object file suffix (normally "o").
7397 objext="$ac_objext"
7398
7399 # Old archive suffix (normally "a").
7400 libext="$libext"
7401
7402 # Executable file suffix (normally "").
7403 exeext="$exeext"
7404
7405 # Additional compiler flags for building library objects.
7406 pic_flag=$lt_pic_flag
7407 pic_mode=$pic_mode
7408
7409 # Does compiler simultaneously support -c and -o options?
7410 compiler_c_o=$lt_compiler_c_o
7411
7412 # Can we write directly to a .lo ?
7413 compiler_o_lo=$lt_compiler_o_lo
7414
7415 # Must we lock files when doing compilation ?
7416 need_locks=$lt_need_locks
7417
7418 # Do we need the lib prefix for modules?
7419 need_lib_prefix=$need_lib_prefix
7420
7421 # Do we need a version for libraries?
7422 need_version=$need_version
7423
7424 # Whether dlopen is supported.
7425 dlopen_support=$enable_dlopen
7426
7427 # Whether dlopen of programs is supported.
7428 dlopen_self=$enable_dlopen_self
7429
7430 # Whether dlopen of statically linked programs is supported.
7431 dlopen_self_static=$enable_dlopen_self_static
7432
7433 # Compiler flag to prevent dynamic linking.
7434 link_static_flag=$lt_link_static_flag
7435
7436 # Compiler flag to turn off builtin functions.
7437 no_builtin_flag=$lt_no_builtin_flag
7438
7439 # Compiler flag to allow reflexive dlopens.
7440 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7441
7442 # Compiler flag to generate shared objects directly from archives.
7443 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7444
7445 # Compiler flag to generate thread-safe objects.
7446 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7447
7448 # Library versioning type.
7449 version_type=$version_type
7450
7451 # Format of library name prefix.
7452 libname_spec=$lt_libname_spec
7453
7454 # List of archive names.  First name is the real one, the rest are links.
7455 # The last name is the one that the linker finds with -lNAME.
7456 library_names_spec=$lt_library_names_spec
7457
7458 # The coded name of the library, if different from the real name.
7459 soname_spec=$lt_soname_spec
7460
7461 # Commands used to build and install an old-style archive.
7462 RANLIB=$lt_RANLIB
7463 old_archive_cmds=$lt_old_archive_cmds
7464 old_postinstall_cmds=$lt_old_postinstall_cmds
7465 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7466
7467 # Create an old-style archive from a shared archive.
7468 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7469
7470 # Create a temporary old-style archive to link instead of a shared archive.
7471 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7472
7473 # Commands used to build and install a shared archive.
7474 archive_cmds=$lt_archive_cmds
7475 archive_expsym_cmds=$lt_archive_expsym_cmds
7476 postinstall_cmds=$lt_postinstall_cmds
7477 postuninstall_cmds=$lt_postuninstall_cmds
7478
7479 # Commands to strip libraries.
7480 old_striplib=$lt_old_striplib
7481 striplib=$lt_striplib
7482
7483 # Method to check whether dependent libraries are shared objects.
7484 deplibs_check_method=$lt_deplibs_check_method
7485
7486 # Command to use when deplibs_check_method == file_magic.
7487 file_magic_cmd=$lt_file_magic_cmd
7488
7489 # Flag that allows shared libraries with undefined symbols to be built.
7490 allow_undefined_flag=$lt_allow_undefined_flag
7491
7492 # Flag that forces no undefined symbols.
7493 no_undefined_flag=$lt_no_undefined_flag
7494
7495 # Commands used to finish a libtool library installation in a directory.
7496 finish_cmds=$lt_finish_cmds
7497
7498 # Same as above, but a single script fragment to be evaled but not shown.
7499 finish_eval=$lt_finish_eval
7500
7501 # Take the output of nm and produce a listing of raw symbols and C names.
7502 global_symbol_pipe=$lt_global_symbol_pipe
7503
7504 # Transform the output of nm in a proper C declaration
7505 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7506
7507 # Transform the output of nm in a C name address pair
7508 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7509
7510 # This is the shared library runtime path variable.
7511 runpath_var=$runpath_var
7512
7513 # This is the shared library path variable.
7514 shlibpath_var=$shlibpath_var
7515
7516 # Is shlibpath searched before the hard-coded library search path?
7517 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7518
7519 # How to hardcode a shared library path into an executable.
7520 hardcode_action=$hardcode_action
7521
7522 # Whether we should hardcode library paths into libraries.
7523 hardcode_into_libs=$hardcode_into_libs
7524
7525 # Flag to hardcode \$libdir into a binary during linking.
7526 # This must work even if \$libdir does not exist.
7527 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7528
7529 # Whether we need a single -rpath flag with a separated argument.
7530 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7531
7532 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7533 # resulting binary.
7534 hardcode_direct=$hardcode_direct
7535
7536 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7537 # resulting binary.
7538 hardcode_minus_L=$hardcode_minus_L
7539
7540 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7541 # the resulting binary.
7542 hardcode_shlibpath_var=$hardcode_shlibpath_var
7543
7544 # Variables whose values should be saved in libtool wrapper scripts and
7545 # restored at relink time.
7546 variables_saved_for_relink="$variables_saved_for_relink"
7547
7548 # Whether libtool must link a program against all its dependency libraries.
7549 link_all_deplibs=$link_all_deplibs
7550
7551 # Compile-time system search path for libraries
7552 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7553
7554 # Run-time system search path for libraries
7555 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7556
7557 # Fix the shell variable \$srcfile for the compiler.
7558 fix_srcfile_path="$fix_srcfile_path"
7559
7560 # Set to yes if exported symbols are required.
7561 always_export_symbols=$always_export_symbols
7562
7563 # The commands to list exported symbols.
7564 export_symbols_cmds=$lt_export_symbols_cmds
7565
7566 # The commands to extract the exported symbol list from a shared archive.
7567 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7568
7569 # Symbols that should not be listed in the preloaded symbols.
7570 exclude_expsyms=$lt_exclude_expsyms
7571
7572 # Symbols that must always be exported.
7573 include_expsyms=$lt_include_expsyms
7574
7575 # ### END LIBTOOL CONFIG
7576
7577 __EOF__
7578
7579   case $host_os in
7580   aix3*)
7581     cat <<\EOF >> "${ofile}T"
7582
7583 # AIX sometimes has problems with the GCC collect2 program.  For some
7584 # reason, if we set the COLLECT_NAMES environment variable, the problems
7585 # vanish in a puff of smoke.
7586 if test "X${COLLECT_NAMES+set}" != Xset; then
7587   COLLECT_NAMES=
7588   export COLLECT_NAMES
7589 fi
7590 EOF
7591     ;;
7592   esac
7593
7594   case $host_os in
7595   cygwin* | mingw* | pw32* | os2*)
7596     cat <<'EOF' >> "${ofile}T"
7597       # This is a source program that is used to create dlls on Windows
7598       # Don't remove nor modify the starting and closing comments
7599 # /* ltdll.c starts here */
7600 # #define WIN32_LEAN_AND_MEAN
7601 # #include <windows.h>
7602 # #undef WIN32_LEAN_AND_MEAN
7603 # #include <stdio.h>
7604 #
7605 # #ifndef __CYGWIN__
7606 # #  ifdef __CYGWIN32__
7607 # #    define __CYGWIN__ __CYGWIN32__
7608 # #  endif
7609 # #endif
7610 #
7611 # #ifdef __cplusplus
7612 # extern "C" {
7613 # #endif
7614 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7615 # #ifdef __cplusplus
7616 # }
7617 # #endif
7618 #
7619 # #ifdef __CYGWIN__
7620 # #include <cygwin/cygwin_dll.h>
7621 # DECLARE_CYGWIN_DLL( DllMain );
7622 # #endif
7623 # HINSTANCE __hDllInstance_base;
7624 #
7625 # BOOL APIENTRY
7626 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7627 # {
7628 #   __hDllInstance_base = hInst;
7629 #   return TRUE;
7630 # }
7631 # /* ltdll.c ends here */
7632         # This is a source program that is used to create import libraries
7633         # on Windows for dlls which lack them. Don't remove nor modify the
7634         # starting and closing comments
7635 # /* impgen.c starts here */
7636 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7637 #
7638 #  This file is part of GNU libtool.
7639 #
7640 #  This program is free software; you can redistribute it and/or modify
7641 #  it under the terms of the GNU General Public License as published by
7642 #  the Free Software Foundation; either version 2 of the License, or
7643 #  (at your option) any later version.
7644 #
7645 #  This program is distributed in the hope that it will be useful,
7646 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7647 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7648 #  GNU General Public License for more details.
7649 #
7650 #  You should have received a copy of the GNU General Public License
7651 #  along with this program; if not, write to the Free Software
7652 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7653 #  */
7654 #
7655 # #include <stdio.h>            /* for printf() */
7656 # #include <unistd.h>           /* for open(), lseek(), read() */
7657 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7658 # #include <string.h>           /* for strdup() */
7659 #
7660 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7661 # #ifndef O_BINARY
7662 # #define O_BINARY 0
7663 # #endif
7664 #
7665 # static unsigned int
7666 # pe_get16 (fd, offset)
7667 #      int fd;
7668 #      int offset;
7669 # {
7670 #   unsigned char b[2];
7671 #   lseek (fd, offset, SEEK_SET);
7672 #   read (fd, b, 2);
7673 #   return b[0] + (b[1]<<8);
7674 # }
7675 #
7676 # static unsigned int
7677 # pe_get32 (fd, offset)
7678 #     int fd;
7679 #     int offset;
7680 # {
7681 #   unsigned char b[4];
7682 #   lseek (fd, offset, SEEK_SET);
7683 #   read (fd, b, 4);
7684 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7685 # }
7686 #
7687 # static unsigned int
7688 # pe_as32 (ptr)
7689 #      void *ptr;
7690 # {
7691 #   unsigned char *b = ptr;
7692 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7693 # }
7694 #
7695 # int
7696 # main (argc, argv)
7697 #     int argc;
7698 #     char *argv[];
7699 # {
7700 #     int dll;
7701 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7702 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7703 #     unsigned long name_rvas, nexp;
7704 #     unsigned char *expdata, *erva;
7705 #     char *filename, *dll_name;
7706 #
7707 #     filename = argv[1];
7708 #
7709 #     dll = open(filename, O_RDONLY|O_BINARY);
7710 #     if (dll < 1)
7711 #       return 1;
7712 #
7713 #     dll_name = filename;
7714 #
7715 #     for (i=0; filename[i]; i++)
7716 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7717 #           dll_name = filename + i +1;
7718 #
7719 #     pe_header_offset = pe_get32 (dll, 0x3c);
7720 #     opthdr_ofs = pe_header_offset + 4 + 20;
7721 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7722 #
7723 #     if (num_entries < 1) /* no exports */
7724 #       return 1;
7725 #
7726 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7727 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7728 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7729 #     secptr = (pe_header_offset + 4 + 20 +
7730 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7731 #
7732 #     expptr = 0;
7733 #     for (i = 0; i < nsections; i++)
7734 #     {
7735 #       char sname[8];
7736 #       unsigned long secptr1 = secptr + 40 * i;
7737 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7738 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7739 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7740 #       lseek(dll, secptr1, SEEK_SET);
7741 #       read(dll, sname, 8);
7742 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7743 #       {
7744 #           expptr = fptr + (export_rva - vaddr);
7745 #           if (export_rva + export_size > vaddr + vsize)
7746 #               export_size = vsize - (export_rva - vaddr);
7747 #           break;
7748 #       }
7749 #     }
7750 #
7751 #     expdata = (unsigned char*)malloc(export_size);
7752 #     lseek (dll, expptr, SEEK_SET);
7753 #     read (dll, expdata, export_size);
7754 #     erva = expdata - export_rva;
7755 #
7756 #     nexp = pe_as32 (expdata+24);
7757 #     name_rvas = pe_as32 (expdata+32);
7758 #
7759 #     printf ("EXPORTS\n");
7760 #     for (i = 0; i<nexp; i++)
7761 #     {
7762 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7763 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7764 #     }
7765 #
7766 #     return 0;
7767 # }
7768 # /* impgen.c ends here */
7769
7770 EOF
7771     ;;
7772   esac
7773
7774   # We use sed instead of cat because bash on DJGPP gets confused if
7775   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7776   # text mode, it properly converts lines to CR/LF.  This bash problem
7777   # is reportedly fixed, but why not run on old versions too?
7778   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7779
7780   mv -f "${ofile}T" "$ofile" || \
7781     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7782   chmod +x "$ofile"
7783 fi
7784
7785
7786
7787
7788
7789 # This can be used to rebuild libtool when needed
7790 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7791
7792 # Always use our own libtool.
7793 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7794
7795 # Prevent multiple expansion
7796
7797
7798
7799 # test for ln hardlink support
7800 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7801 echo "configure:7801: checking whether ln works" >&5
7802 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7803   echo $ac_n "(cached) $ac_c" 1>&6
7804 else
7805   rm -f conftest.src conftest.dst
7806 echo "conftest" > conftest.src
7807 if ln conftest.src conftest.dst 2>/dev/null
7808 then
7809   ol_cv_prog_LN_H="ln"
7810 else
7811   ol_cv_prog_LN_H="cp"
7812 fi
7813 rm -f conftest.src conftest.dst
7814
7815 fi
7816 LN_H="$ol_cv_prog_LN_H"
7817 if test "$ol_cv_prog_LN_H" = "ln"; then
7818         echo "$ac_t""yes" 1>&6
7819 else
7820         echo "$ac_t""no" 1>&6
7821 fi
7822
7823 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7824 echo "configure:7824: checking whether ln -s works" >&5
7825 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7826   echo $ac_n "(cached) $ac_c" 1>&6
7827 else
7828   rm -f conftestdata
7829 if ln -s X conftestdata 2>/dev/null
7830 then
7831   rm -f conftestdata
7832   ac_cv_prog_LN_S="ln -s"
7833 else
7834   ac_cv_prog_LN_S=ln
7835 fi
7836 fi
7837 LN_S="$ac_cv_prog_LN_S"
7838 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7839   echo "$ac_t""yes" 1>&6
7840 else
7841   echo "$ac_t""no" 1>&6
7842 fi
7843
7844
7845 ol_link_perl=no
7846 if test $ol_enable_perl != no ; then
7847         # Extract the first word of "perl", so it can be a program name with args.
7848 set dummy perl; ac_word=$2
7849 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7850 echo "configure:7850: checking for $ac_word" >&5
7851 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7852   echo $ac_n "(cached) $ac_c" 1>&6
7853 else
7854   case "$PERLBIN" in
7855   /*)
7856   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7857   ;;
7858   ?:/*)
7859   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7860   ;;
7861   *)
7862   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7863   ac_dummy="$PATH"
7864   for ac_dir in $ac_dummy; do 
7865     test -z "$ac_dir" && ac_dir=.
7866     if test -f $ac_dir/$ac_word; then
7867       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7868       break
7869     fi
7870   done
7871   IFS="$ac_save_ifs"
7872   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7873   ;;
7874 esac
7875 fi
7876 PERLBIN="$ac_cv_path_PERLBIN"
7877 if test -n "$PERLBIN"; then
7878   echo "$ac_t""$PERLBIN" 1>&6
7879 else
7880   echo "$ac_t""no" 1>&6
7881 fi
7882
7883
7884         if test "no$PERLBIN" = "no" ; then
7885                 if test $ol_enable_perl = yes ; then
7886                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7887                 fi
7888
7889         else
7890                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7891                 if test x"$ol_with_perl_module" = "xstatic" ; then
7892                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7893                 else
7894                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7895                 fi
7896                                 ol_link_perl=yes
7897         fi
7898 fi
7899
7900 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7901 echo "configure:7901: checking how to run the C preprocessor" >&5
7902 # On Suns, sometimes $CPP names a directory.
7903 if test -n "$CPP" && test -d "$CPP"; then
7904   CPP=
7905 fi
7906 if test -z "$CPP"; then
7907 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7908   echo $ac_n "(cached) $ac_c" 1>&6
7909 else
7910     # This must be in double quotes, not single quotes, because CPP may get
7911   # substituted into the Makefile and "${CC-cc}" will confuse make.
7912   CPP="${CC-cc} -E"
7913   # On the NeXT, cc -E runs the code through the compiler's parser,
7914   # not just through cpp.
7915   cat > conftest.$ac_ext <<EOF
7916 #line 7916 "configure"
7917 #include "confdefs.h"
7918 #include <assert.h>
7919 Syntax Error
7920 EOF
7921 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7922 { (eval echo configure:7922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7923 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7924 if test -z "$ac_err"; then
7925   :
7926 else
7927   echo "$ac_err" >&5
7928   echo "configure: failed program was:" >&5
7929   cat conftest.$ac_ext >&5
7930   rm -rf conftest*
7931   CPP="${CC-cc} -E -traditional-cpp"
7932   cat > conftest.$ac_ext <<EOF
7933 #line 7933 "configure"
7934 #include "confdefs.h"
7935 #include <assert.h>
7936 Syntax Error
7937 EOF
7938 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7939 { (eval echo configure:7939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7940 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7941 if test -z "$ac_err"; then
7942   :
7943 else
7944   echo "$ac_err" >&5
7945   echo "configure: failed program was:" >&5
7946   cat conftest.$ac_ext >&5
7947   rm -rf conftest*
7948   CPP="${CC-cc} -nologo -E"
7949   cat > conftest.$ac_ext <<EOF
7950 #line 7950 "configure"
7951 #include "confdefs.h"
7952 #include <assert.h>
7953 Syntax Error
7954 EOF
7955 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7956 { (eval echo configure:7956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7957 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7958 if test -z "$ac_err"; then
7959   :
7960 else
7961   echo "$ac_err" >&5
7962   echo "configure: failed program was:" >&5
7963   cat conftest.$ac_ext >&5
7964   rm -rf conftest*
7965   CPP=/lib/cpp
7966 fi
7967 rm -f conftest*
7968 fi
7969 rm -f conftest*
7970 fi
7971 rm -f conftest*
7972   ac_cv_prog_CPP="$CPP"
7973 fi
7974   CPP="$ac_cv_prog_CPP"
7975 else
7976   ac_cv_prog_CPP="$CPP"
7977 fi
7978 echo "$ac_t""$CPP" 1>&6
7979
7980
7981 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7982         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7983
7984 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7985         echo "configure: warning: programs compiled here do run here..." 1>&2
7986         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7987
7988 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7989         echo "configure: warning: programs compiled here do not run here..." 1>&2
7990         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7991 fi
7992
7993
7994 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7995 echo "configure:7995: checking for Cygwin environment" >&5
7996 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7997   echo $ac_n "(cached) $ac_c" 1>&6
7998 else
7999   cat > conftest.$ac_ext <<EOF
8000 #line 8000 "configure"
8001 #include "confdefs.h"
8002
8003 int main() {
8004
8005 #ifndef __CYGWIN__
8006 #define __CYGWIN__ __CYGWIN32__
8007 #endif
8008 return __CYGWIN__;
8009 ; return 0; }
8010 EOF
8011 if { (eval echo configure:8011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8012   rm -rf conftest*
8013   ac_cv_cygwin=yes
8014 else
8015   echo "configure: failed program was:" >&5
8016   cat conftest.$ac_ext >&5
8017   rm -rf conftest*
8018   ac_cv_cygwin=no
8019 fi
8020 rm -f conftest*
8021 fi
8022
8023 echo "$ac_t""$ac_cv_cygwin" 1>&6
8024 CYGWIN=
8025 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8026 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8027 echo "configure:8027: checking for mingw32 environment" >&5
8028 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8029   echo $ac_n "(cached) $ac_c" 1>&6
8030 else
8031   cat > conftest.$ac_ext <<EOF
8032 #line 8032 "configure"
8033 #include "confdefs.h"
8034
8035 int main() {
8036 return __MINGW32__;
8037 ; return 0; }
8038 EOF
8039 if { (eval echo configure:8039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8040   rm -rf conftest*
8041   ac_cv_mingw32=yes
8042 else
8043   echo "configure: failed program was:" >&5
8044   cat conftest.$ac_ext >&5
8045   rm -rf conftest*
8046   ac_cv_mingw32=no
8047 fi
8048 rm -f conftest*
8049 fi
8050
8051 echo "$ac_t""$ac_cv_mingw32" 1>&6
8052 MINGW32=
8053 test "$ac_cv_mingw32" = yes && MINGW32=yes
8054
8055
8056
8057 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8058 echo "configure:8058: checking for executable suffix" >&5
8059 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8060   echo $ac_n "(cached) $ac_c" 1>&6
8061 else
8062   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8063   ac_cv_exeext=.exe
8064 else
8065   rm -f conftest*
8066   echo 'int main () { return 0; }' > conftest.$ac_ext
8067   ac_cv_exeext=
8068   if { (eval echo configure:8068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8069     for file in conftest.*; do
8070       case $file in
8071       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8072       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8073       esac
8074     done
8075   else
8076     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8077   fi
8078   rm -f conftest*
8079   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8080 fi
8081 fi
8082
8083 EXEEXT=""
8084 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8085 echo "$ac_t""${ac_cv_exeext}" 1>&6
8086 ac_exeext=$EXEEXT
8087
8088 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8089 echo "configure:8089: checking for object suffix" >&5
8090 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8091   echo $ac_n "(cached) $ac_c" 1>&6
8092 else
8093   rm -f conftest*
8094 echo 'int i = 1;' > conftest.$ac_ext
8095 if { (eval echo configure:8095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8096   for ac_file in conftest.*; do
8097     case $ac_file in
8098     *.c) ;;
8099     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8100     esac
8101   done
8102 else
8103   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8104 fi
8105 rm -f conftest*
8106 fi
8107
8108 echo "$ac_t""$ac_cv_objext" 1>&6
8109 OBJEXT=$ac_cv_objext
8110 ac_objext=$ac_cv_objext
8111
8112
8113 cat >> confdefs.h <<EOF
8114 #define EXEEXT "${EXEEXT}"
8115 EOF
8116
8117
8118 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8119 echo "configure:8119: checking for be_app in -lbe" >&5
8120 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8121 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8122   echo $ac_n "(cached) $ac_c" 1>&6
8123 else
8124   ac_save_LIBS="$LIBS"
8125 LIBS="-lbe -lroot -lnet $LIBS"
8126 cat > conftest.$ac_ext <<EOF
8127 #line 8127 "configure"
8128 #include "confdefs.h"
8129 /* Override any gcc2 internal prototype to avoid an error.  */
8130 /* We use char because int might match the return type of a gcc2
8131     builtin and then its argument prototype would still apply.  */
8132 char be_app();
8133
8134 int main() {
8135 be_app()
8136 ; return 0; }
8137 EOF
8138 if { (eval echo configure:8138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8139   rm -rf conftest*
8140   eval "ac_cv_lib_$ac_lib_var=yes"
8141 else
8142   echo "configure: failed program was:" >&5
8143   cat conftest.$ac_ext >&5
8144   rm -rf conftest*
8145   eval "ac_cv_lib_$ac_lib_var=no"
8146 fi
8147 rm -f conftest*
8148 LIBS="$ac_save_LIBS"
8149
8150 fi
8151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8152   echo "$ac_t""yes" 1>&6
8153   LIBS="$LIBS -lbe -lroot -lnet"
8154 else
8155   echo "$ac_t""no" 1>&6
8156 :
8157 fi
8158
8159
8160
8161
8162
8163 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8164 echo "configure:8164: checking for ${CC-cc} option to accept ANSI C" >&5
8165 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8166   echo $ac_n "(cached) $ac_c" 1>&6
8167 else
8168   am_cv_prog_cc_stdc=no
8169 ac_save_CC="$CC"
8170 # Don't try gcc -ansi; that turns off useful extensions and
8171 # breaks some systems' header files.
8172 # AIX                   -qlanglvl=ansi
8173 # Ultrix and OSF/1      -std1
8174 # HP-UX 10.20 and later -Ae
8175 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8176 # SVR4                  -Xc -D__EXTENSIONS__
8177 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8178 do
8179   CC="$ac_save_CC $ac_arg"
8180   cat > conftest.$ac_ext <<EOF
8181 #line 8181 "configure"
8182 #include "confdefs.h"
8183 #include <stdarg.h>
8184 #include <stdio.h>
8185 #include <sys/types.h>
8186 #include <sys/stat.h>
8187 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8188 struct buf { int x; };
8189 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8190 static char *e (p, i)
8191      char **p;
8192      int i;
8193 {
8194   return p[i];
8195 }
8196 static char *f (char * (*g) (char **, int), char **p, ...)
8197 {
8198   char *s;
8199   va_list v;
8200   va_start (v,p);
8201   s = g (p, va_arg (v,int));
8202   va_end (v);
8203   return s;
8204 }
8205 int test (int i, double x);
8206 struct s1 {int (*f) (int a);};
8207 struct s2 {int (*f) (double a);};
8208 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8209 int argc;
8210 char **argv;
8211
8212 int main() {
8213
8214 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8215
8216 ; return 0; }
8217 EOF
8218 if { (eval echo configure:8218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8219   rm -rf conftest*
8220   am_cv_prog_cc_stdc="$ac_arg"; break
8221 else
8222   echo "configure: failed program was:" >&5
8223   cat conftest.$ac_ext >&5
8224 fi
8225 rm -f conftest*
8226 done
8227 CC="$ac_save_CC"
8228
8229 fi
8230
8231 if test -z "$am_cv_prog_cc_stdc"; then
8232   echo "$ac_t""none needed" 1>&6
8233 else
8234   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8235 fi
8236 case "x$am_cv_prog_cc_stdc" in
8237   x|xno) ;;
8238   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8239 esac
8240
8241 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8242         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8243 fi
8244
8245 # test for make depend flag
8246 OL_MKDEP=
8247 OL_MKDEP_FLAGS=
8248 if test -z "${MKDEP}"; then
8249         OL_MKDEP="${CC-cc}"
8250         if test -z "${MKDEP_FLAGS}"; then
8251                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8252 echo "configure:8252: checking for ${OL_MKDEP} depend flag" >&5
8253 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8254   echo $ac_n "(cached) $ac_c" 1>&6
8255 else
8256   
8257                         ol_cv_mkdep=no
8258                         for flag in "-M" "-xM"; do
8259                                 cat > conftest.c <<EOF
8260  noCode;
8261 EOF
8262                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8263                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8264                                 then
8265                                         if test ! -f conftest."${ac_object}" ; then
8266                                                 ol_cv_mkdep=$flag
8267                                                 OL_MKDEP_FLAGS="$flag"
8268                                                 break
8269                                         fi
8270                                 fi
8271                         done
8272                         rm -f conftest*
8273                 
8274 fi
8275
8276 echo "$ac_t""$ol_cv_mkdep" 1>&6
8277         else
8278                 cc_cv_mkdep=yes
8279                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8280         fi
8281 else
8282         cc_cv_mkdep=yes
8283         OL_MKDEP="${MKDEP}"
8284         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8285 fi
8286
8287
8288
8289 if test "${ol_cv_mkdep}" = no ; then
8290         # this will soon become an error
8291         echo "configure: warning: do not know how to generate dependencies" 1>&2
8292 fi
8293
8294 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8295 echo "configure:8295: checking for afopen in -ls" >&5
8296 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8297 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8298   echo $ac_n "(cached) $ac_c" 1>&6
8299 else
8300   ac_save_LIBS="$LIBS"
8301 LIBS="-ls  $LIBS"
8302 cat > conftest.$ac_ext <<EOF
8303 #line 8303 "configure"
8304 #include "confdefs.h"
8305 /* Override any gcc2 internal prototype to avoid an error.  */
8306 /* We use char because int might match the return type of a gcc2
8307     builtin and then its argument prototype would still apply.  */
8308 char afopen();
8309
8310 int main() {
8311 afopen()
8312 ; return 0; }
8313 EOF
8314 if { (eval echo configure:8314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8315   rm -rf conftest*
8316   eval "ac_cv_lib_$ac_lib_var=yes"
8317 else
8318   echo "configure: failed program was:" >&5
8319   cat conftest.$ac_ext >&5
8320   rm -rf conftest*
8321   eval "ac_cv_lib_$ac_lib_var=no"
8322 fi
8323 rm -f conftest*
8324 LIBS="$ac_save_LIBS"
8325
8326 fi
8327 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8328   echo "$ac_t""yes" 1>&6
8329   
8330         AUTH_LIBS=-ls
8331         cat >> confdefs.h <<\EOF
8332 #define HAVE_AIX_SECURITY 1
8333 EOF
8334
8335
8336 else
8337   echo "$ac_t""no" 1>&6
8338 fi
8339
8340
8341 case "$target" in
8342 *-ibm-openedition)
8343         ac_cv_func_getopt=no
8344         cat >> confdefs.h <<\EOF
8345 #define BOTH_STRINGS_H 1
8346 EOF
8347
8348         ;;
8349 esac
8350
8351 ol_link_modules=no
8352 if test $ol_enable_modules != no ; then
8353         for ac_hdr in ltdl.h
8354 do
8355 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8356 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8357 echo "configure:8357: checking for $ac_hdr" >&5
8358 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8359   echo $ac_n "(cached) $ac_c" 1>&6
8360 else
8361   cat > conftest.$ac_ext <<EOF
8362 #line 8362 "configure"
8363 #include "confdefs.h"
8364 #include <$ac_hdr>
8365 EOF
8366 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8367 { (eval echo configure:8367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8368 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8369 if test -z "$ac_err"; then
8370   rm -rf conftest*
8371   eval "ac_cv_header_$ac_safe=yes"
8372 else
8373   echo "$ac_err" >&5
8374   echo "configure: failed program was:" >&5
8375   cat conftest.$ac_ext >&5
8376   rm -rf conftest*
8377   eval "ac_cv_header_$ac_safe=no"
8378 fi
8379 rm -f conftest*
8380 fi
8381 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8382   echo "$ac_t""yes" 1>&6
8383     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8384   cat >> confdefs.h <<EOF
8385 #define $ac_tr_hdr 1
8386 EOF
8387  
8388 else
8389   echo "$ac_t""no" 1>&6
8390 fi
8391 done
8392
8393
8394         if test $ac_cv_header_ltdl_h = no ; then
8395                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8396         fi
8397
8398         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8399 echo "configure:8399: checking for lt_dlinit in -lltdl" >&5
8400 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8401 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8402   echo $ac_n "(cached) $ac_c" 1>&6
8403 else
8404   ac_save_LIBS="$LIBS"
8405 LIBS="-lltdl  $LIBS"
8406 cat > conftest.$ac_ext <<EOF
8407 #line 8407 "configure"
8408 #include "confdefs.h"
8409 /* Override any gcc2 internal prototype to avoid an error.  */
8410 /* We use char because int might match the return type of a gcc2
8411     builtin and then its argument prototype would still apply.  */
8412 char lt_dlinit();
8413
8414 int main() {
8415 lt_dlinit()
8416 ; return 0; }
8417 EOF
8418 if { (eval echo configure:8418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8419   rm -rf conftest*
8420   eval "ac_cv_lib_$ac_lib_var=yes"
8421 else
8422   echo "configure: failed program was:" >&5
8423   cat conftest.$ac_ext >&5
8424   rm -rf conftest*
8425   eval "ac_cv_lib_$ac_lib_var=no"
8426 fi
8427 rm -f conftest*
8428 LIBS="$ac_save_LIBS"
8429
8430 fi
8431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8432   echo "$ac_t""yes" 1>&6
8433   
8434                 MODULES_LIBS=-lltdl
8435                 cat >> confdefs.h <<\EOF
8436 #define HAVE_LIBLTDL 1
8437 EOF
8438
8439         
8440 else
8441   echo "$ac_t""no" 1>&6
8442 fi
8443
8444
8445         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8446                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8447         fi
8448         ol_link_modules=yes
8449 else
8450         ol_with_bdb_module=static
8451         ol_with_dnssrv_module=static
8452         ol_with_hdb_module=static
8453         ol_with_ldap_module=static
8454         ol_with_ldbm_module=static
8455         ol_with_meta_module=static
8456         ol_with_monitor_module=static
8457         ol_with_null_module=static
8458         ol_with_passwd_module=static
8459         ol_with_perl_module=static
8460         ol_with_shell_module=static
8461         ol_with_tcl_module=static
8462         ol_with_sql_module=static
8463 fi
8464
8465 # test for EBCDIC
8466 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8467 echo "configure:8467: checking for EBCDIC" >&5
8468 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8469   echo $ac_n "(cached) $ac_c" 1>&6
8470 else
8471   
8472         cat > conftest.$ac_ext <<EOF
8473 #line 8473 "configure"
8474 #include "confdefs.h"
8475
8476 #if !('M' == 0xd4)
8477 #include <__ASCII__/generate_error.h>
8478 #endif
8479
8480 EOF
8481 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8482 { (eval echo configure:8482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8483 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8484 if test -z "$ac_err"; then
8485   rm -rf conftest*
8486   ol_cv_cpp_ebcdic=yes
8487 else
8488   echo "$ac_err" >&5
8489   echo "configure: failed program was:" >&5
8490   cat conftest.$ac_ext >&5
8491   rm -rf conftest*
8492   ol_cv_cpp_ebcdic=no
8493 fi
8494 rm -f conftest*
8495 fi
8496
8497 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8498 if test $ol_cv_cpp_ebcdic = yes ; then
8499         cat >> confdefs.h <<\EOF
8500 #define HAVE_EBCDIC 1
8501 EOF
8502
8503 fi
8504
8505 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8506 echo "configure:8506: checking for ANSI C header files" >&5
8507 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8508   echo $ac_n "(cached) $ac_c" 1>&6
8509 else
8510   cat > conftest.$ac_ext <<EOF
8511 #line 8511 "configure"
8512 #include "confdefs.h"
8513 #include <stdlib.h>
8514 #include <stdarg.h>
8515 #include <string.h>
8516 #include <float.h>
8517 EOF
8518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8519 { (eval echo configure:8519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8521 if test -z "$ac_err"; then
8522   rm -rf conftest*
8523   ol_cv_header_stdc=yes
8524 else
8525   echo "$ac_err" >&5
8526   echo "configure: failed program was:" >&5
8527   cat conftest.$ac_ext >&5
8528   rm -rf conftest*
8529   ol_cv_header_stdc=no
8530 fi
8531 rm -f conftest*
8532
8533 if test $ol_cv_header_stdc = yes; then
8534   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8535 cat > conftest.$ac_ext <<EOF
8536 #line 8536 "configure"
8537 #include "confdefs.h"
8538 #include <string.h>
8539 EOF
8540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8541   egrep "memchr" >/dev/null 2>&1; then
8542   :
8543 else
8544   rm -rf conftest*
8545   ol_cv_header_stdc=no
8546 fi
8547 rm -f conftest*
8548
8549 fi
8550
8551 if test $ol_cv_header_stdc = yes; then
8552   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8553 cat > conftest.$ac_ext <<EOF
8554 #line 8554 "configure"
8555 #include "confdefs.h"
8556 #include <stdlib.h>
8557 EOF
8558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8559   egrep "free" >/dev/null 2>&1; then
8560   :
8561 else
8562   rm -rf conftest*
8563   ol_cv_header_stdc=no
8564 fi
8565 rm -f conftest*
8566
8567 fi
8568
8569 if test $ol_cv_header_stdc = yes; then
8570   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8571 if test "$cross_compiling" = yes; then
8572   :
8573 else
8574   cat > conftest.$ac_ext <<EOF
8575 #line 8575 "configure"
8576 #include "confdefs.h"
8577 #include <ctype.h>
8578 #ifndef HAVE_EBCDIC
8579 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8580 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8581 #else
8582 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8583                 || ('j' <= (c) && (c) <= 'r') \
8584                 || ('s' <= (c) && (c) <= 'z'))
8585 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8586 #endif
8587 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8588 int main () { int i; for (i = 0; i < 256; i++)
8589 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8590 exit (0); }
8591
8592 EOF
8593 if { (eval echo configure:8593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8594 then
8595   :
8596 else
8597   echo "configure: failed program was:" >&5
8598   cat conftest.$ac_ext >&5
8599   rm -fr conftest*
8600   ol_cv_header_stdc=no
8601 fi
8602 rm -fr conftest*
8603 fi
8604
8605 fi
8606 fi
8607
8608 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8609 if test $ol_cv_header_stdc = yes; then
8610   cat >> confdefs.h <<\EOF
8611 #define STDC_HEADERS 1
8612 EOF
8613
8614 fi
8615 ac_cv_header_stdc=disable
8616
8617
8618 if test $ol_cv_header_stdc != yes; then
8619         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8620 fi
8621
8622 ac_header_dirent=no
8623 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8624 do
8625 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8626 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8627 echo "configure:8627: checking for $ac_hdr that defines DIR" >&5
8628 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8629   echo $ac_n "(cached) $ac_c" 1>&6
8630 else
8631   cat > conftest.$ac_ext <<EOF
8632 #line 8632 "configure"
8633 #include "confdefs.h"
8634 #include <sys/types.h>
8635 #include <$ac_hdr>
8636 int main() {
8637 DIR *dirp = 0;
8638 ; return 0; }
8639 EOF
8640 if { (eval echo configure:8640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8641   rm -rf conftest*
8642   eval "ac_cv_header_dirent_$ac_safe=yes"
8643 else
8644   echo "configure: failed program was:" >&5
8645   cat conftest.$ac_ext >&5
8646   rm -rf conftest*
8647   eval "ac_cv_header_dirent_$ac_safe=no"
8648 fi
8649 rm -f conftest*
8650 fi
8651 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8652   echo "$ac_t""yes" 1>&6
8653     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8654   cat >> confdefs.h <<EOF
8655 #define $ac_tr_hdr 1
8656 EOF
8657  ac_header_dirent=$ac_hdr; break
8658 else
8659   echo "$ac_t""no" 1>&6
8660 fi
8661 done
8662 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8663 if test $ac_header_dirent = dirent.h; then
8664 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8665 echo "configure:8665: checking for opendir in -ldir" >&5
8666 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8667 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8668   echo $ac_n "(cached) $ac_c" 1>&6
8669 else
8670   ac_save_LIBS="$LIBS"
8671 LIBS="-ldir  $LIBS"
8672 cat > conftest.$ac_ext <<EOF
8673 #line 8673 "configure"
8674 #include "confdefs.h"
8675 /* Override any gcc2 internal prototype to avoid an error.  */
8676 /* We use char because int might match the return type of a gcc2
8677     builtin and then its argument prototype would still apply.  */
8678 char opendir();
8679
8680 int main() {
8681 opendir()
8682 ; return 0; }
8683 EOF
8684 if { (eval echo configure:8684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8685   rm -rf conftest*
8686   eval "ac_cv_lib_$ac_lib_var=yes"
8687 else
8688   echo "configure: failed program was:" >&5
8689   cat conftest.$ac_ext >&5
8690   rm -rf conftest*
8691   eval "ac_cv_lib_$ac_lib_var=no"
8692 fi
8693 rm -f conftest*
8694 LIBS="$ac_save_LIBS"
8695
8696 fi
8697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8698   echo "$ac_t""yes" 1>&6
8699   LIBS="$LIBS -ldir"
8700 else
8701   echo "$ac_t""no" 1>&6
8702 fi
8703
8704 else
8705 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8706 echo "configure:8706: checking for opendir in -lx" >&5
8707 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8708 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8709   echo $ac_n "(cached) $ac_c" 1>&6
8710 else
8711   ac_save_LIBS="$LIBS"
8712 LIBS="-lx  $LIBS"
8713 cat > conftest.$ac_ext <<EOF
8714 #line 8714 "configure"
8715 #include "confdefs.h"
8716 /* Override any gcc2 internal prototype to avoid an error.  */
8717 /* We use char because int might match the return type of a gcc2
8718     builtin and then its argument prototype would still apply.  */
8719 char opendir();
8720
8721 int main() {
8722 opendir()
8723 ; return 0; }
8724 EOF
8725 if { (eval echo configure:8725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8726   rm -rf conftest*
8727   eval "ac_cv_lib_$ac_lib_var=yes"
8728 else
8729   echo "configure: failed program was:" >&5
8730   cat conftest.$ac_ext >&5
8731   rm -rf conftest*
8732   eval "ac_cv_lib_$ac_lib_var=no"
8733 fi
8734 rm -f conftest*
8735 LIBS="$ac_save_LIBS"
8736
8737 fi
8738 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8739   echo "$ac_t""yes" 1>&6
8740   LIBS="$LIBS -lx"
8741 else
8742   echo "$ac_t""no" 1>&6
8743 fi
8744
8745 fi
8746
8747 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8748 echo "configure:8748: checking for sys/wait.h that is POSIX.1 compatible" >&5
8749 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8750   echo $ac_n "(cached) $ac_c" 1>&6
8751 else
8752   cat > conftest.$ac_ext <<EOF
8753 #line 8753 "configure"
8754 #include "confdefs.h"
8755 #include <sys/types.h>
8756 #include <sys/wait.h>
8757 #ifndef WEXITSTATUS
8758 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8759 #endif
8760 #ifndef WIFEXITED
8761 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8762 #endif
8763 int main() {
8764 int s;
8765 wait (&s);
8766 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8767 ; return 0; }
8768 EOF
8769 if { (eval echo configure:8769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8770   rm -rf conftest*
8771   ac_cv_header_sys_wait_h=yes
8772 else
8773   echo "configure: failed program was:" >&5
8774   cat conftest.$ac_ext >&5
8775   rm -rf conftest*
8776   ac_cv_header_sys_wait_h=no
8777 fi
8778 rm -f conftest*
8779 fi
8780
8781 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8782 if test $ac_cv_header_sys_wait_h = yes; then
8783   cat >> confdefs.h <<\EOF
8784 #define HAVE_SYS_WAIT_H 1
8785 EOF
8786
8787 fi
8788
8789 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8790 echo "configure:8790: checking POSIX termios" >&5
8791 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8792   echo $ac_n "(cached) $ac_c" 1>&6
8793 else
8794   cat > conftest.$ac_ext <<EOF
8795 #line 8795 "configure"
8796 #include "confdefs.h"
8797 #include <sys/types.h>
8798 #include <unistd.h>
8799 #include <termios.h>
8800 int main() {
8801 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8802    tcgetattr(0, 0);
8803 ; return 0; }
8804 EOF
8805 if { (eval echo configure:8805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8806   rm -rf conftest*
8807   am_cv_sys_posix_termios=yes
8808 else
8809   echo "configure: failed program was:" >&5
8810   cat conftest.$ac_ext >&5
8811   rm -rf conftest*
8812   am_cv_sys_posix_termios=no
8813 fi
8814 rm -f conftest*
8815 fi
8816
8817 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8818
8819
8820  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8821 echo "configure:8821: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8822 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8823   echo $ac_n "(cached) $ac_c" 1>&6
8824 else
8825   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8826
8827   gwinsz_in_termios_h=no
8828   if test $am_cv_sys_posix_termios = yes; then
8829     cat > conftest.$ac_ext <<EOF
8830 #line 8830 "configure"
8831 #include "confdefs.h"
8832 #include <sys/types.h>
8833 #     include <termios.h>
8834 #     ifdef TIOCGWINSZ
8835         yes
8836 #     endif
8837     
8838 EOF
8839 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8840   egrep "yes" >/dev/null 2>&1; then
8841   rm -rf conftest*
8842   gwinsz_in_termios_h=yes
8843 fi
8844 rm -f conftest*
8845
8846   fi
8847
8848   if test $gwinsz_in_termios_h = no; then
8849     cat > conftest.$ac_ext <<EOF
8850 #line 8850 "configure"
8851 #include "confdefs.h"
8852 #include <sys/types.h>
8853 #     include <sys/ioctl.h>
8854 #     ifdef TIOCGWINSZ
8855         yes
8856 #     endif
8857     
8858 EOF
8859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8860   egrep "yes" >/dev/null 2>&1; then
8861   rm -rf conftest*
8862   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8863 fi
8864 rm -f conftest*
8865
8866   fi
8867   
8868 fi
8869
8870 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8871   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8872     cat >> confdefs.h <<\EOF
8873 #define GWINSZ_IN_SYS_IOCTL 1
8874 EOF
8875
8876   fi
8877
8878 if test $am_cv_sys_posix_termios = yes ; then
8879         cat >> confdefs.h <<\EOF
8880 #define HAVE_POSIX_TERMIOS 1
8881 EOF
8882
8883 fi
8884
8885 for ac_hdr in \
8886         arpa/inet.h             \
8887         arpa/nameser.h  \
8888         assert.h                \
8889         conio.h                 \
8890         crypt.h                 \
8891         direct.h                \
8892         errno.h                 \
8893         fcntl.h                 \
8894         filio.h                 \
8895         getopt.h                \
8896         grp.h                   \
8897         io.h                    \
8898         libutil.h               \
8899         limits.h                \
8900         locale.h                \
8901         netinet/tcp.h   \
8902         malloc.h                \
8903         memory.h                \
8904         psap.h                  \
8905         pwd.h                   \
8906         process.h               \
8907         resolv.h                \
8908         sgtty.h                 \
8909         shadow.h                \
8910         stddef.h                \
8911         string.h                \
8912         strings.h               \
8913         sysexits.h              \
8914         sys/file.h              \
8915         sys/filio.h             \
8916         sys/errno.h             \
8917         sys/ioctl.h             \
8918         sys/param.h             \
8919         sys/resource.h  \
8920         sys/select.h    \
8921         sys/socket.h    \
8922         sys/stat.h              \
8923         sys/syslog.h    \
8924         sys/time.h              \
8925         sys/types.h             \
8926         sys/ucred.h             \
8927         sys/uio.h               \
8928         syslog.h                \
8929         termios.h               \
8930         unistd.h                \
8931         winsock.h               \
8932         winsock2.h              \
8933
8934 do
8935 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8936 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8937 echo "configure:8937: checking for $ac_hdr" >&5
8938 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8939   echo $ac_n "(cached) $ac_c" 1>&6
8940 else
8941   cat > conftest.$ac_ext <<EOF
8942 #line 8942 "configure"
8943 #include "confdefs.h"
8944 #include <$ac_hdr>
8945 EOF
8946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8947 { (eval echo configure:8947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8948 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8949 if test -z "$ac_err"; then
8950   rm -rf conftest*
8951   eval "ac_cv_header_$ac_safe=yes"
8952 else
8953   echo "$ac_err" >&5
8954   echo "configure: failed program was:" >&5
8955   cat conftest.$ac_ext >&5
8956   rm -rf conftest*
8957   eval "ac_cv_header_$ac_safe=no"
8958 fi
8959 rm -f conftest*
8960 fi
8961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8962   echo "$ac_t""yes" 1>&6
8963     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8964   cat >> confdefs.h <<EOF
8965 #define $ac_tr_hdr 1
8966 EOF
8967  
8968 else
8969   echo "$ac_t""no" 1>&6
8970 fi
8971 done
8972
8973
8974
8975
8976 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8977 echo "configure:8977: checking for dlopen" >&5
8978 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8979   echo $ac_n "(cached) $ac_c" 1>&6
8980 else
8981   cat > conftest.$ac_ext <<EOF
8982 #line 8982 "configure"
8983 #include "confdefs.h"
8984 /* System header to define __stub macros and hopefully few prototypes,
8985     which can conflict with char dlopen(); below.  */
8986 #include <assert.h>
8987 /* Override any gcc2 internal prototype to avoid an error.  */
8988 /* We use char because int might match the return type of a gcc2
8989     builtin and then its argument prototype would still apply.  */
8990 char dlopen();
8991 char (*f)();
8992
8993 int main() {
8994
8995 /* The GNU C library defines this for functions which it implements
8996     to always fail with ENOSYS.  Some functions are actually named
8997     something starting with __ and the normal name is an alias.  */
8998 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8999 choke me
9000 #else
9001 f = dlopen;
9002 #endif
9003
9004 ; return 0; }
9005 EOF
9006 if { (eval echo configure:9006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9007   rm -rf conftest*
9008   eval "ac_cv_func_dlopen=yes"
9009 else
9010   echo "configure: failed program was:" >&5
9011   cat conftest.$ac_ext >&5
9012   rm -rf conftest*
9013   eval "ac_cv_func_dlopen=no"
9014 fi
9015 rm -f conftest*
9016 fi
9017
9018 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
9019   echo "$ac_t""yes" 1>&6
9020   :
9021 else
9022   echo "$ac_t""no" 1>&6
9023 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9024 echo "configure:9024: checking for dlopen in -ldl" >&5
9025 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9026 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9027   echo $ac_n "(cached) $ac_c" 1>&6
9028 else
9029   ac_save_LIBS="$LIBS"
9030 LIBS="-ldl  $LIBS"
9031 cat > conftest.$ac_ext <<EOF
9032 #line 9032 "configure"
9033 #include "confdefs.h"
9034 /* Override any gcc2 internal prototype to avoid an error.  */
9035 /* We use char because int might match the return type of a gcc2
9036     builtin and then its argument prototype would still apply.  */
9037 char dlopen();
9038
9039 int main() {
9040 dlopen()
9041 ; return 0; }
9042 EOF
9043 if { (eval echo configure:9043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9044   rm -rf conftest*
9045   eval "ac_cv_lib_$ac_lib_var=yes"
9046 else
9047   echo "configure: failed program was:" >&5
9048   cat conftest.$ac_ext >&5
9049   rm -rf conftest*
9050   eval "ac_cv_lib_$ac_lib_var=no"
9051 fi
9052 rm -f conftest*
9053 LIBS="$ac_save_LIBS"
9054
9055 fi
9056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9057   echo "$ac_t""yes" 1>&6
9058     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9059     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9060   cat >> confdefs.h <<EOF
9061 #define $ac_tr_lib 1
9062 EOF
9063
9064   LIBS="-ldl $LIBS"
9065
9066 else
9067   echo "$ac_t""no" 1>&6
9068 fi
9069
9070 fi
9071
9072
9073 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9074 echo "configure:9074: checking for sigset in -lV3" >&5
9075 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9076 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9077   echo $ac_n "(cached) $ac_c" 1>&6
9078 else
9079   ac_save_LIBS="$LIBS"
9080 LIBS="-lV3  $LIBS"
9081 cat > conftest.$ac_ext <<EOF
9082 #line 9082 "configure"
9083 #include "confdefs.h"
9084 /* Override any gcc2 internal prototype to avoid an error.  */
9085 /* We use char because int might match the return type of a gcc2
9086     builtin and then its argument prototype would still apply.  */
9087 char sigset();
9088
9089 int main() {
9090 sigset()
9091 ; return 0; }
9092 EOF
9093 if { (eval echo configure:9093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9094   rm -rf conftest*
9095   eval "ac_cv_lib_$ac_lib_var=yes"
9096 else
9097   echo "configure: failed program was:" >&5
9098   cat conftest.$ac_ext >&5
9099   rm -rf conftest*
9100   eval "ac_cv_lib_$ac_lib_var=no"
9101 fi
9102 rm -f conftest*
9103 LIBS="$ac_save_LIBS"
9104
9105 fi
9106 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9107   echo "$ac_t""yes" 1>&6
9108     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9109     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9110   cat >> confdefs.h <<EOF
9111 #define $ac_tr_lib 1
9112 EOF
9113
9114   LIBS="-lV3 $LIBS"
9115
9116 else
9117   echo "$ac_t""no" 1>&6
9118 fi
9119
9120
9121 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9122 echo "configure:9122: checking for winsock" >&5
9123 save_LIBS="$LIBS"
9124 for curlib in ws2_32 wsock32; do
9125         LIBS="$LIBS -l$curlib"
9126         cat > conftest.$ac_ext <<EOF
9127 #line 9127 "configure"
9128 #include "confdefs.h"
9129
9130                         char socket@12();
9131                         char select@20();
9132                         char closesocket@4();
9133                         char gethostname@8();
9134                         
9135 int main() {
9136
9137                         socket@12();
9138                         select@20();
9139                         closesocket@4();
9140                         gethostname@8();
9141                         
9142 ; return 0; }
9143 EOF
9144 if { (eval echo configure:9144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9145   rm -rf conftest*
9146   have_winsock=yes
9147 else
9148   echo "configure: failed program was:" >&5
9149   cat conftest.$ac_ext >&5
9150   rm -rf conftest*
9151   have_winsock=no
9152 fi
9153 rm -f conftest*
9154
9155         if test $have_winsock = yes; then
9156                 cat >> confdefs.h <<\EOF
9157 #define HAVE_WINSOCK 1
9158 EOF
9159
9160                 ac_cv_func_socket=yes
9161                 ac_cv_func_select=yes
9162                 ac_cv_func_closesocket=yes
9163                 ac_cv_func_gethostname=yes
9164                 if test $curlib = ws2_32; then
9165                         have_winsock=winsock2
9166                         cat >> confdefs.h <<\EOF
9167 #define HAVE_WINSOCK2 1
9168 EOF
9169
9170                 fi
9171                 break
9172         fi
9173         LIBS="$save_LIBS"
9174 done
9175 echo "$ac_t""$have_winsock" 1>&6
9176
9177
9178 echo $ac_n "checking for socket""... $ac_c" 1>&6
9179 echo "configure:9179: checking for socket" >&5
9180 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9181   echo $ac_n "(cached) $ac_c" 1>&6
9182 else
9183   cat > conftest.$ac_ext <<EOF
9184 #line 9184 "configure"
9185 #include "confdefs.h"
9186 /* System header to define __stub macros and hopefully few prototypes,
9187     which can conflict with char socket(); below.  */
9188 #include <assert.h>
9189 /* Override any gcc2 internal prototype to avoid an error.  */
9190 /* We use char because int might match the return type of a gcc2
9191     builtin and then its argument prototype would still apply.  */
9192 char socket();
9193 char (*f)();
9194
9195 int main() {
9196
9197 /* The GNU C library defines this for functions which it implements
9198     to always fail with ENOSYS.  Some functions are actually named
9199     something starting with __ and the normal name is an alias.  */
9200 #if defined (__stub_socket) || defined (__stub___socket)
9201 choke me
9202 #else
9203 f = socket;
9204 #endif
9205
9206 ; return 0; }
9207 EOF
9208 if { (eval echo configure:9208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9209   rm -rf conftest*
9210   eval "ac_cv_func_socket=yes"
9211 else
9212   echo "configure: failed program was:" >&5
9213   cat conftest.$ac_ext >&5
9214   rm -rf conftest*
9215   eval "ac_cv_func_socket=no"
9216 fi
9217 rm -f conftest*
9218 fi
9219
9220 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9221   echo "$ac_t""yes" 1>&6
9222   :
9223 else
9224   echo "$ac_t""no" 1>&6
9225         
9226         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9227 echo "configure:9227: checking for main in -lsocket" >&5
9228 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9229 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9230   echo $ac_n "(cached) $ac_c" 1>&6
9231 else
9232   ac_save_LIBS="$LIBS"
9233 LIBS="-lsocket  $LIBS"
9234 cat > conftest.$ac_ext <<EOF
9235 #line 9235 "configure"
9236 #include "confdefs.h"
9237
9238 int main() {
9239 main()
9240 ; return 0; }
9241 EOF
9242 if { (eval echo configure:9242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9243   rm -rf conftest*
9244   eval "ac_cv_lib_$ac_lib_var=yes"
9245 else
9246   echo "configure: failed program was:" >&5
9247   cat conftest.$ac_ext >&5
9248   rm -rf conftest*
9249   eval "ac_cv_lib_$ac_lib_var=no"
9250 fi
9251 rm -f conftest*
9252 LIBS="$ac_save_LIBS"
9253
9254 fi
9255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9256   echo "$ac_t""yes" 1>&6
9257     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9258     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9259   cat >> confdefs.h <<EOF
9260 #define $ac_tr_lib 1
9261 EOF
9262
9263   LIBS="-lsocket $LIBS"
9264
9265 else
9266   echo "$ac_t""no" 1>&6
9267 fi
9268
9269         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9270 echo "configure:9270: checking for main in -lnet" >&5
9271 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9272 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9273   echo $ac_n "(cached) $ac_c" 1>&6
9274 else
9275   ac_save_LIBS="$LIBS"
9276 LIBS="-lnet  $LIBS"
9277 cat > conftest.$ac_ext <<EOF
9278 #line 9278 "configure"
9279 #include "confdefs.h"
9280
9281 int main() {
9282 main()
9283 ; return 0; }
9284 EOF
9285 if { (eval echo configure:9285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9286   rm -rf conftest*
9287   eval "ac_cv_lib_$ac_lib_var=yes"
9288 else
9289   echo "configure: failed program was:" >&5
9290   cat conftest.$ac_ext >&5
9291   rm -rf conftest*
9292   eval "ac_cv_lib_$ac_lib_var=no"
9293 fi
9294 rm -f conftest*
9295 LIBS="$ac_save_LIBS"
9296
9297 fi
9298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9299   echo "$ac_t""yes" 1>&6
9300     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9301     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9302   cat >> confdefs.h <<EOF
9303 #define $ac_tr_lib 1
9304 EOF
9305
9306   LIBS="-lnet $LIBS"
9307
9308 else
9309   echo "$ac_t""no" 1>&6
9310 fi
9311
9312         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9313 echo "configure:9313: checking for main in -lnsl_s" >&5
9314 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9315 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9316   echo $ac_n "(cached) $ac_c" 1>&6
9317 else
9318   ac_save_LIBS="$LIBS"
9319 LIBS="-lnsl_s  $LIBS"
9320 cat > conftest.$ac_ext <<EOF
9321 #line 9321 "configure"
9322 #include "confdefs.h"
9323
9324 int main() {
9325 main()
9326 ; return 0; }
9327 EOF
9328 if { (eval echo configure:9328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9329   rm -rf conftest*
9330   eval "ac_cv_lib_$ac_lib_var=yes"
9331 else
9332   echo "configure: failed program was:" >&5
9333   cat conftest.$ac_ext >&5
9334   rm -rf conftest*
9335   eval "ac_cv_lib_$ac_lib_var=no"
9336 fi
9337 rm -f conftest*
9338 LIBS="$ac_save_LIBS"
9339
9340 fi
9341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9342   echo "$ac_t""yes" 1>&6
9343     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9344     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9345   cat >> confdefs.h <<EOF
9346 #define $ac_tr_lib 1
9347 EOF
9348
9349   LIBS="-lnsl_s $LIBS"
9350
9351 else
9352   echo "$ac_t""no" 1>&6
9353 fi
9354
9355         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9356 echo "configure:9356: checking for main in -lnsl" >&5
9357 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9358 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9359   echo $ac_n "(cached) $ac_c" 1>&6
9360 else
9361   ac_save_LIBS="$LIBS"
9362 LIBS="-lnsl  $LIBS"
9363 cat > conftest.$ac_ext <<EOF
9364 #line 9364 "configure"
9365 #include "confdefs.h"
9366
9367 int main() {
9368 main()
9369 ; return 0; }
9370 EOF
9371 if { (eval echo configure:9371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9372   rm -rf conftest*
9373   eval "ac_cv_lib_$ac_lib_var=yes"
9374 else
9375   echo "configure: failed program was:" >&5
9376   cat conftest.$ac_ext >&5
9377   rm -rf conftest*
9378   eval "ac_cv_lib_$ac_lib_var=no"
9379 fi
9380 rm -f conftest*
9381 LIBS="$ac_save_LIBS"
9382
9383 fi
9384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9385   echo "$ac_t""yes" 1>&6
9386     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9387     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9388   cat >> confdefs.h <<EOF
9389 #define $ac_tr_lib 1
9390 EOF
9391
9392   LIBS="-lnsl $LIBS"
9393
9394 else
9395   echo "$ac_t""no" 1>&6
9396 fi
9397
9398         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9399 echo "configure:9399: checking for socket in -linet" >&5
9400 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9401 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9402   echo $ac_n "(cached) $ac_c" 1>&6
9403 else
9404   ac_save_LIBS="$LIBS"
9405 LIBS="-linet  $LIBS"
9406 cat > conftest.$ac_ext <<EOF
9407 #line 9407 "configure"
9408 #include "confdefs.h"
9409 /* Override any gcc2 internal prototype to avoid an error.  */
9410 /* We use char because int might match the return type of a gcc2
9411     builtin and then its argument prototype would still apply.  */
9412 char socket();
9413
9414 int main() {
9415 socket()
9416 ; return 0; }
9417 EOF
9418 if { (eval echo configure:9418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9419   rm -rf conftest*
9420   eval "ac_cv_lib_$ac_lib_var=yes"
9421 else
9422   echo "configure: failed program was:" >&5
9423   cat conftest.$ac_ext >&5
9424   rm -rf conftest*
9425   eval "ac_cv_lib_$ac_lib_var=no"
9426 fi
9427 rm -f conftest*
9428 LIBS="$ac_save_LIBS"
9429
9430 fi
9431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9432   echo "$ac_t""yes" 1>&6
9433     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9434     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9435   cat >> confdefs.h <<EOF
9436 #define $ac_tr_lib 1
9437 EOF
9438
9439   LIBS="-linet $LIBS"
9440
9441 else
9442   echo "$ac_t""no" 1>&6
9443 fi
9444
9445         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9446 echo "configure:9446: checking for main in -lgen" >&5
9447 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9448 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9449   echo $ac_n "(cached) $ac_c" 1>&6
9450 else
9451   ac_save_LIBS="$LIBS"
9452 LIBS="-lgen  $LIBS"
9453 cat > conftest.$ac_ext <<EOF
9454 #line 9454 "configure"
9455 #include "confdefs.h"
9456
9457 int main() {
9458 main()
9459 ; return 0; }
9460 EOF
9461 if { (eval echo configure:9461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9462   rm -rf conftest*
9463   eval "ac_cv_lib_$ac_lib_var=yes"
9464 else
9465   echo "configure: failed program was:" >&5
9466   cat conftest.$ac_ext >&5
9467   rm -rf conftest*
9468   eval "ac_cv_lib_$ac_lib_var=no"
9469 fi
9470 rm -f conftest*
9471 LIBS="$ac_save_LIBS"
9472
9473 fi
9474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9475   echo "$ac_t""yes" 1>&6
9476     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9477     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9478   cat >> confdefs.h <<EOF
9479 #define $ac_tr_lib 1
9480 EOF
9481
9482   LIBS="-lgen $LIBS"
9483
9484 else
9485   echo "$ac_t""no" 1>&6
9486 fi
9487
9488
9489 fi
9490
9491
9492 echo $ac_n "checking for select""... $ac_c" 1>&6
9493 echo "configure:9493: checking for select" >&5
9494 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9495   echo $ac_n "(cached) $ac_c" 1>&6
9496 else
9497   cat > conftest.$ac_ext <<EOF
9498 #line 9498 "configure"
9499 #include "confdefs.h"
9500 /* System header to define __stub macros and hopefully few prototypes,
9501     which can conflict with char select(); below.  */
9502 #include <assert.h>
9503 /* Override any gcc2 internal prototype to avoid an error.  */
9504 /* We use char because int might match the return type of a gcc2
9505     builtin and then its argument prototype would still apply.  */
9506 char select();
9507 char (*f)();
9508
9509 int main() {
9510
9511 /* The GNU C library defines this for functions which it implements
9512     to always fail with ENOSYS.  Some functions are actually named
9513     something starting with __ and the normal name is an alias.  */
9514 #if defined (__stub_select) || defined (__stub___select)
9515 choke me
9516 #else
9517 f = select;
9518 #endif
9519
9520 ; return 0; }
9521 EOF
9522 if { (eval echo configure:9522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9523   rm -rf conftest*
9524   eval "ac_cv_func_select=yes"
9525 else
9526   echo "configure: failed program was:" >&5
9527   cat conftest.$ac_ext >&5
9528   rm -rf conftest*
9529   eval "ac_cv_func_select=no"
9530 fi
9531 rm -f conftest*
9532 fi
9533
9534 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9535   echo "$ac_t""yes" 1>&6
9536   :
9537 else
9538   echo "$ac_t""no" 1>&6
9539 { echo "configure: error: select() required." 1>&2; exit 1; }
9540 fi
9541
9542
9543 if test "${ac_cv_header_winsock_h}" != yes; then
9544                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9545 echo "configure:9545: checking types of arguments for select()" >&5
9546  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9547   echo $ac_n "(cached) $ac_c" 1>&6
9548 else
9549    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9550   echo $ac_n "(cached) $ac_c" 1>&6
9551 else
9552     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9553   echo $ac_n "(cached) $ac_c" 1>&6
9554 else
9555      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9556      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9557       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9558        cat > conftest.$ac_ext <<EOF
9559 #line 9559 "configure"
9560 #include "confdefs.h"
9561 #ifdef HAVE_SYS_TYPES_H
9562 #include <sys/types.h>
9563 #endif
9564 #ifdef HAVE_SYS_TIME_H
9565 #include <sys/time.h>
9566 #endif
9567 #ifdef HAVE_SYS_SELECT_H
9568 #include <sys/select.h>
9569 #endif
9570 #ifdef HAVE_SYS_SOCKET_H
9571 #include <sys/socket.h>
9572 #endif
9573 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);
9574 int main() {
9575
9576 ; return 0; }
9577 EOF
9578 if { (eval echo configure:9578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9579   rm -rf conftest*
9580           ac_not_found=no ; break 3
9581 else
9582   echo "configure: failed program was:" >&5
9583   cat conftest.$ac_ext >&5
9584   rm -rf conftest*
9585   ac_not_found=yes
9586 fi
9587 rm -f conftest*
9588       done
9589      done
9590     done
9591    
9592 fi
9593   
9594 fi
9595  
9596 fi
9597  if test "$ac_not_found" = yes; then
9598   ac_cv_func_select_arg1=int 
9599   ac_cv_func_select_arg234='int *' 
9600   ac_cv_func_select_arg5='struct timeval *'
9601  fi
9602  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9603  cat >> confdefs.h <<EOF
9604 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9605 EOF
9606
9607  cat >> confdefs.h <<EOF
9608 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9609 EOF
9610
9611  cat >> confdefs.h <<EOF
9612 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9613 EOF
9614
9615
9616 fi
9617
9618
9619 for ac_hdr in regex.h 
9620 do
9621 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9622 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9623 echo "configure:9623: checking for $ac_hdr" >&5
9624 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9625   echo $ac_n "(cached) $ac_c" 1>&6
9626 else
9627   cat > conftest.$ac_ext <<EOF
9628 #line 9628 "configure"
9629 #include "confdefs.h"
9630 #include <$ac_hdr>
9631 EOF
9632 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9633 { (eval echo configure:9633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9634 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9635 if test -z "$ac_err"; then
9636   rm -rf conftest*
9637   eval "ac_cv_header_$ac_safe=yes"
9638 else
9639   echo "$ac_err" >&5
9640   echo "configure: failed program was:" >&5
9641   cat conftest.$ac_ext >&5
9642   rm -rf conftest*
9643   eval "ac_cv_header_$ac_safe=no"
9644 fi
9645 rm -f conftest*
9646 fi
9647 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9648   echo "$ac_t""yes" 1>&6
9649     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9650   cat >> confdefs.h <<EOF
9651 #define $ac_tr_hdr 1
9652 EOF
9653  
9654 else
9655   echo "$ac_t""no" 1>&6
9656 fi
9657 done
9658
9659 if test "$ac_cv_header_regex_h" != yes ; then
9660         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9661 fi
9662
9663 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9664 echo "configure:9664: checking for library containing regfree" >&5
9665 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9666   echo $ac_n "(cached) $ac_c" 1>&6
9667 else
9668   ac_func_search_save_LIBS="$LIBS"
9669 ac_cv_search_regfree="no"
9670 cat > conftest.$ac_ext <<EOF
9671 #line 9671 "configure"
9672 #include "confdefs.h"
9673 /* Override any gcc2 internal prototype to avoid an error.  */
9674 /* We use char because int might match the return type of a gcc2
9675     builtin and then its argument prototype would still apply.  */
9676 char regfree();
9677
9678 int main() {
9679 regfree()
9680 ; return 0; }
9681 EOF
9682 if { (eval echo configure:9682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9683   rm -rf conftest*
9684   ac_cv_search_regfree="none required"
9685 else
9686   echo "configure: failed program was:" >&5
9687   cat conftest.$ac_ext >&5
9688 fi
9689 rm -f conftest*
9690 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9691 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9692 cat > conftest.$ac_ext <<EOF
9693 #line 9693 "configure"
9694 #include "confdefs.h"
9695 /* Override any gcc2 internal prototype to avoid an error.  */
9696 /* We use char because int might match the return type of a gcc2
9697     builtin and then its argument prototype would still apply.  */
9698 char regfree();
9699
9700 int main() {
9701 regfree()
9702 ; return 0; }
9703 EOF
9704 if { (eval echo configure:9704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9705   rm -rf conftest*
9706   ac_cv_search_regfree="-l$ac_lib"
9707 break
9708 else
9709   echo "configure: failed program was:" >&5
9710   cat conftest.$ac_ext >&5
9711 fi
9712 rm -f conftest*
9713 done
9714 LIBS="$ac_func_search_save_LIBS"
9715 fi
9716
9717 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9718 if test "$ac_cv_search_regfree" != "no"; then
9719   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9720   :
9721 else :
9722   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9723 fi
9724
9725
9726 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9727 echo "configure:9727: checking for compatible POSIX regex" >&5
9728 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9729   echo $ac_n "(cached) $ac_c" 1>&6
9730 else
9731   
9732         if test "$cross_compiling" = yes; then
9733   ol_cv_c_posix_regex=cross
9734 else
9735   cat > conftest.$ac_ext <<EOF
9736 #line 9736 "configure"
9737 #include "confdefs.h"
9738
9739 #include <sys/types.h>
9740 #include <regex.h>
9741 static char *pattern, *string;
9742 main()
9743 {
9744         int rc;
9745         regex_t re;
9746
9747         pattern = "^A";
9748
9749         if(regcomp(&re, pattern, 0)) {
9750                 return -1;
9751         }
9752         
9753         string = "ALL MATCH";
9754         
9755         rc = regexec(&re, string, 0, (void*)0, 0);
9756
9757         regfree(&re);
9758
9759         return rc;
9760 }
9761 EOF
9762 if { (eval echo configure:9762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9763 then
9764   ol_cv_c_posix_regex=yes
9765 else
9766   echo "configure: failed program was:" >&5
9767   cat conftest.$ac_ext >&5
9768   rm -fr conftest*
9769   ol_cv_c_posix_regex=no
9770 fi
9771 rm -fr conftest*
9772 fi
9773
9774 fi
9775
9776 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9777
9778 if test "$ol_cv_c_posix_regex" = no ; then
9779         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9780 fi
9781
9782
9783 have_uuid=no
9784 for ac_hdr in sys/uuid.h
9785 do
9786 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9787 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9788 echo "configure:9788: checking for $ac_hdr" >&5
9789 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9790   echo $ac_n "(cached) $ac_c" 1>&6
9791 else
9792   cat > conftest.$ac_ext <<EOF
9793 #line 9793 "configure"
9794 #include "confdefs.h"
9795 #include <$ac_hdr>
9796 EOF
9797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9798 { (eval echo configure:9798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9800 if test -z "$ac_err"; then
9801   rm -rf conftest*
9802   eval "ac_cv_header_$ac_safe=yes"
9803 else
9804   echo "$ac_err" >&5
9805   echo "configure: failed program was:" >&5
9806   cat conftest.$ac_ext >&5
9807   rm -rf conftest*
9808   eval "ac_cv_header_$ac_safe=no"
9809 fi
9810 rm -f conftest*
9811 fi
9812 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9813   echo "$ac_t""yes" 1>&6
9814     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9815   cat >> confdefs.h <<EOF
9816 #define $ac_tr_hdr 1
9817 EOF
9818  
9819 else
9820   echo "$ac_t""no" 1>&6
9821 fi
9822 done
9823
9824 if test $ac_cv_header_sys_uuid_h = yes ; then
9825         save_LIBS="$LIBS"
9826         
9827 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9828 echo "configure:9828: checking for library containing uuid_to_str" >&5
9829 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9830   echo $ac_n "(cached) $ac_c" 1>&6
9831 else
9832   ac_func_search_save_LIBS="$LIBS"
9833 ac_cv_search_uuid_to_str="no"
9834 cat > conftest.$ac_ext <<EOF
9835 #line 9835 "configure"
9836 #include "confdefs.h"
9837 /* Override any gcc2 internal prototype to avoid an error.  */
9838 /* We use char because int might match the return type of a gcc2
9839     builtin and then its argument prototype would still apply.  */
9840 char uuid_to_str();
9841
9842 int main() {
9843 uuid_to_str()
9844 ; return 0; }
9845 EOF
9846 if { (eval echo configure:9846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9847   rm -rf conftest*
9848   ac_cv_search_uuid_to_str="none required"
9849 else
9850   echo "configure: failed program was:" >&5
9851   cat conftest.$ac_ext >&5
9852 fi
9853 rm -f conftest*
9854 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9855 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9856 cat > conftest.$ac_ext <<EOF
9857 #line 9857 "configure"
9858 #include "confdefs.h"
9859 /* Override any gcc2 internal prototype to avoid an error.  */
9860 /* We use char because int might match the return type of a gcc2
9861     builtin and then its argument prototype would still apply.  */
9862 char uuid_to_str();
9863
9864 int main() {
9865 uuid_to_str()
9866 ; return 0; }
9867 EOF
9868 if { (eval echo configure:9868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9869   rm -rf conftest*
9870   ac_cv_search_uuid_to_str="-l$ac_lib"
9871 break
9872 else
9873   echo "configure: failed program was:" >&5
9874   cat conftest.$ac_ext >&5
9875 fi
9876 rm -f conftest*
9877 done
9878 LIBS="$ac_func_search_save_LIBS"
9879 fi
9880
9881 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9882 if test "$ac_cv_search_uuid_to_str" != "no"; then
9883   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9884   have_uuid=yes
9885 else :
9886   :
9887 fi
9888         LIBS="$save_LIBS"
9889
9890         if test have_uuid = yes ; then
9891                 cat >> confdefs.h <<\EOF
9892 #define HAVE_UUID_TO_STR 1
9893 EOF
9894
9895
9896                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9897                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9898         fi
9899 fi
9900
9901 if test $have_uuid = no ; then
9902         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9903 echo "configure:9903: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9904         save_LIBS="$LIBS"
9905         LIBS="$LIBS -lrpcrt4"
9906         cat > conftest.$ac_ext <<EOF
9907 #line 9907 "configure"
9908 #include "confdefs.h"
9909
9910                 char UuidCreate@4();
9911                 char UuidToStringA@8();
9912                 
9913 int main() {
9914
9915                 UuidCreate@4();
9916                 UuidToStringA@8();
9917                 
9918 ; return 0; }
9919 EOF
9920 if { (eval echo configure:9920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9921   rm -rf conftest*
9922   need_rpcrt=yes
9923 else
9924   echo "configure: failed program was:" >&5
9925   cat conftest.$ac_ext >&5
9926   rm -rf conftest*
9927   need_rpcrt=no
9928 fi
9929 rm -f conftest*
9930         if test $need_rpcrt = yes; then
9931                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9932         fi
9933         LIBS="$save_LIBS"
9934         echo "$ac_t""$need_rpcrt" 1>&6
9935 fi
9936
9937 ol_link_dnssrv=no
9938 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9939 echo "configure:9939: checking for res_query" >&5
9940 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9941   echo $ac_n "(cached) $ac_c" 1>&6
9942 else
9943   cat > conftest.$ac_ext <<EOF
9944 #line 9944 "configure"
9945 #include "confdefs.h"
9946 /* System header to define __stub macros and hopefully few prototypes,
9947     which can conflict with char res_query(); below.  */
9948 #include <assert.h>
9949 /* Override any gcc2 internal prototype to avoid an error.  */
9950 /* We use char because int might match the return type of a gcc2
9951     builtin and then its argument prototype would still apply.  */
9952 char res_query();
9953 char (*f)();
9954
9955 int main() {
9956
9957 /* The GNU C library defines this for functions which it implements
9958     to always fail with ENOSYS.  Some functions are actually named
9959     something starting with __ and the normal name is an alias.  */
9960 #if defined (__stub_res_query) || defined (__stub___res_query)
9961 choke me
9962 #else
9963 f = res_query;
9964 #endif
9965
9966 ; return 0; }
9967 EOF
9968 if { (eval echo configure:9968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9969   rm -rf conftest*
9970   eval "ac_cv_func_res_query=yes"
9971 else
9972   echo "configure: failed program was:" >&5
9973   cat conftest.$ac_ext >&5
9974   rm -rf conftest*
9975   eval "ac_cv_func_res_query=no"
9976 fi
9977 rm -f conftest*
9978 fi
9979
9980 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9981   echo "$ac_t""yes" 1>&6
9982   :
9983 else
9984   echo "$ac_t""no" 1>&6
9985 fi
9986
9987 if test $ac_cv_func_res_query = no ; then 
9988         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9989 echo "configure:9989: checking for __res_query" >&5
9990 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9991   echo $ac_n "(cached) $ac_c" 1>&6
9992 else
9993   cat > conftest.$ac_ext <<EOF
9994 #line 9994 "configure"
9995 #include "confdefs.h"
9996 /* System header to define __stub macros and hopefully few prototypes,
9997     which can conflict with char __res_query(); below.  */
9998 #include <assert.h>
9999 /* Override any gcc2 internal prototype to avoid an error.  */
10000 /* We use char because int might match the return type of a gcc2
10001     builtin and then its argument prototype would still apply.  */
10002 char __res_query();
10003 char (*f)();
10004
10005 int main() {
10006
10007 /* The GNU C library defines this for functions which it implements
10008     to always fail with ENOSYS.  Some functions are actually named
10009     something starting with __ and the normal name is an alias.  */
10010 #if defined (__stub___res_query) || defined (__stub_____res_query)
10011 choke me
10012 #else
10013 f = __res_query;
10014 #endif
10015
10016 ; return 0; }
10017 EOF
10018 if { (eval echo configure:10018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10019   rm -rf conftest*
10020   eval "ac_cv_func___res_query=yes"
10021 else
10022   echo "configure: failed program was:" >&5
10023   cat conftest.$ac_ext >&5
10024   rm -rf conftest*
10025   eval "ac_cv_func___res_query=no"
10026 fi
10027 rm -f conftest*
10028 fi
10029
10030 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10031   echo "$ac_t""yes" 1>&6
10032   :
10033 else
10034   echo "$ac_t""no" 1>&6
10035 fi
10036
10037         ac_cv_func_res_query=$ac_cv_func___res_query
10038 fi
10039
10040 if test $ac_cv_func_res_query = no ; then 
10041         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10042 echo "configure:10042: checking for res_query in -lbind" >&5
10043 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10044 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10045   echo $ac_n "(cached) $ac_c" 1>&6
10046 else
10047   ac_save_LIBS="$LIBS"
10048 LIBS="-lbind  $LIBS"
10049 cat > conftest.$ac_ext <<EOF
10050 #line 10050 "configure"
10051 #include "confdefs.h"
10052 /* Override any gcc2 internal prototype to avoid an error.  */
10053 /* We use char because int might match the return type of a gcc2
10054     builtin and then its argument prototype would still apply.  */
10055 char res_query();
10056
10057 int main() {
10058 res_query()
10059 ; return 0; }
10060 EOF
10061 if { (eval echo configure:10061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10062   rm -rf conftest*
10063   eval "ac_cv_lib_$ac_lib_var=yes"
10064 else
10065   echo "configure: failed program was:" >&5
10066   cat conftest.$ac_ext >&5
10067   rm -rf conftest*
10068   eval "ac_cv_lib_$ac_lib_var=no"
10069 fi
10070 rm -f conftest*
10071 LIBS="$ac_save_LIBS"
10072
10073 fi
10074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10075   echo "$ac_t""yes" 1>&6
10076     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10077     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10078   cat >> confdefs.h <<EOF
10079 #define $ac_tr_lib 1
10080 EOF
10081
10082   LIBS="-lbind $LIBS"
10083
10084 else
10085   echo "$ac_t""no" 1>&6
10086 fi
10087
10088         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10089 fi
10090
10091 if test $ac_cv_func_res_query = no ; then 
10092         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10093 echo "configure:10093: checking for __res_query in -lbind" >&5
10094 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10095 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10096   echo $ac_n "(cached) $ac_c" 1>&6
10097 else
10098   ac_save_LIBS="$LIBS"
10099 LIBS="-lbind  $LIBS"
10100 cat > conftest.$ac_ext <<EOF
10101 #line 10101 "configure"
10102 #include "confdefs.h"
10103 /* Override any gcc2 internal prototype to avoid an error.  */
10104 /* We use char because int might match the return type of a gcc2
10105     builtin and then its argument prototype would still apply.  */
10106 char __res_query();
10107
10108 int main() {
10109 __res_query()
10110 ; return 0; }
10111 EOF
10112 if { (eval echo configure:10112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10113   rm -rf conftest*
10114   eval "ac_cv_lib_$ac_lib_var=yes"
10115 else
10116   echo "configure: failed program was:" >&5
10117   cat conftest.$ac_ext >&5
10118   rm -rf conftest*
10119   eval "ac_cv_lib_$ac_lib_var=no"
10120 fi
10121 rm -f conftest*
10122 LIBS="$ac_save_LIBS"
10123
10124 fi
10125 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10126   echo "$ac_t""yes" 1>&6
10127     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10128     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10129   cat >> confdefs.h <<EOF
10130 #define $ac_tr_lib 1
10131 EOF
10132
10133   LIBS="-lbind $LIBS"
10134
10135 else
10136   echo "$ac_t""no" 1>&6
10137 fi
10138
10139         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10140 fi
10141
10142 if test $ac_cv_func_res_query = no ; then 
10143         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10144 echo "configure:10144: checking for res_query in -lresolv" >&5
10145 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10146 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10147   echo $ac_n "(cached) $ac_c" 1>&6
10148 else
10149   ac_save_LIBS="$LIBS"
10150 LIBS="-lresolv  $LIBS"
10151 cat > conftest.$ac_ext <<EOF
10152 #line 10152 "configure"
10153 #include "confdefs.h"
10154 /* Override any gcc2 internal prototype to avoid an error.  */
10155 /* We use char because int might match the return type of a gcc2
10156     builtin and then its argument prototype would still apply.  */
10157 char res_query();
10158
10159 int main() {
10160 res_query()
10161 ; return 0; }
10162 EOF
10163 if { (eval echo configure:10163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10164   rm -rf conftest*
10165   eval "ac_cv_lib_$ac_lib_var=yes"
10166 else
10167   echo "configure: failed program was:" >&5
10168   cat conftest.$ac_ext >&5
10169   rm -rf conftest*
10170   eval "ac_cv_lib_$ac_lib_var=no"
10171 fi
10172 rm -f conftest*
10173 LIBS="$ac_save_LIBS"
10174
10175 fi
10176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10177   echo "$ac_t""yes" 1>&6
10178     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10179     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10180   cat >> confdefs.h <<EOF
10181 #define $ac_tr_lib 1
10182 EOF
10183
10184   LIBS="-lresolv $LIBS"
10185
10186 else
10187   echo "$ac_t""no" 1>&6
10188 fi
10189
10190         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10191 fi
10192
10193 if test $ac_cv_func_res_query = no ; then 
10194         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10195 echo "configure:10195: checking for __res_query in -lresolv" >&5
10196 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10197 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10198   echo $ac_n "(cached) $ac_c" 1>&6
10199 else
10200   ac_save_LIBS="$LIBS"
10201 LIBS="-lresolv  $LIBS"
10202 cat > conftest.$ac_ext <<EOF
10203 #line 10203 "configure"
10204 #include "confdefs.h"
10205 /* Override any gcc2 internal prototype to avoid an error.  */
10206 /* We use char because int might match the return type of a gcc2
10207     builtin and then its argument prototype would still apply.  */
10208 char __res_query();
10209
10210 int main() {
10211 __res_query()
10212 ; return 0; }
10213 EOF
10214 if { (eval echo configure:10214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10215   rm -rf conftest*
10216   eval "ac_cv_lib_$ac_lib_var=yes"
10217 else
10218   echo "configure: failed program was:" >&5
10219   cat conftest.$ac_ext >&5
10220   rm -rf conftest*
10221   eval "ac_cv_lib_$ac_lib_var=no"
10222 fi
10223 rm -f conftest*
10224 LIBS="$ac_save_LIBS"
10225
10226 fi
10227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10228   echo "$ac_t""yes" 1>&6
10229     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10230     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10231   cat >> confdefs.h <<EOF
10232 #define $ac_tr_lib 1
10233 EOF
10234
10235   LIBS="-lresolv $LIBS"
10236
10237 else
10238   echo "$ac_t""no" 1>&6
10239 fi
10240
10241         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10242 fi
10243
10244 if test "$ac_cv_func_res_query" = yes ; then
10245         cat >> confdefs.h <<\EOF
10246 #define HAVE_RES_QUERY 1
10247 EOF
10248
10249
10250         if test $ol_enable_dnssrv != no ; then
10251                 ol_link_dnssrv=yes
10252         fi
10253 fi
10254
10255 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10256         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10257 fi
10258
10259 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10260 do
10261 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10262 echo "configure:10262: checking for $ac_func" >&5
10263 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10264   echo $ac_n "(cached) $ac_c" 1>&6
10265 else
10266   cat > conftest.$ac_ext <<EOF
10267 #line 10267 "configure"
10268 #include "confdefs.h"
10269 /* System header to define __stub macros and hopefully few prototypes,
10270     which can conflict with char $ac_func(); below.  */
10271 #include <assert.h>
10272 /* Override any gcc2 internal prototype to avoid an error.  */
10273 /* We use char because int might match the return type of a gcc2
10274     builtin and then its argument prototype would still apply.  */
10275 char $ac_func();
10276 char (*f)();
10277
10278 int main() {
10279
10280 /* The GNU C library defines this for functions which it implements
10281     to always fail with ENOSYS.  Some functions are actually named
10282     something starting with __ and the normal name is an alias.  */
10283 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10284 choke me
10285 #else
10286 f = $ac_func;
10287 #endif
10288
10289 ; return 0; }
10290 EOF
10291 if { (eval echo configure:10291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10292   rm -rf conftest*
10293   eval "ac_cv_func_$ac_func=yes"
10294 else
10295   echo "configure: failed program was:" >&5
10296   cat conftest.$ac_ext >&5
10297   rm -rf conftest*
10298   eval "ac_cv_func_$ac_func=no"
10299 fi
10300 rm -f conftest*
10301 fi
10302
10303 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10304   echo "$ac_t""yes" 1>&6
10305     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10306   cat >> confdefs.h <<EOF
10307 #define $ac_tr_func 1
10308 EOF
10309  
10310 else
10311   echo "$ac_t""no" 1>&6
10312 fi
10313 done
10314
10315
10316 ol_link_ipv6=no
10317 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10318         if test $ol_enable_ipv6 = yes ; then
10319                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10320         fi
10321 elif test $ol_enable_ipv6 != no ; then
10322         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10323 echo "configure:10323: checking INET6_ADDRSTRLEN" >&5
10324 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10325   echo $ac_n "(cached) $ac_c" 1>&6
10326 else
10327   
10328                 cat > conftest.$ac_ext <<EOF
10329 #line 10329 "configure"
10330 #include "confdefs.h"
10331
10332 #                       include <netinet/in.h>
10333 #                       ifdef INET6_ADDRSTRLEN
10334                                 __has_inet6_addrstrlen__;
10335 #                       endif
10336                 
10337 EOF
10338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10339   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10340   rm -rf conftest*
10341   ol_cv_inet6_addrstrlen=yes
10342 else
10343   rm -rf conftest*
10344   ol_cv_inet6_addrstrlen=no
10345 fi
10346 rm -f conftest*
10347
10348 fi
10349
10350 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10351
10352
10353         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10354 echo "configure:10354: checking struct sockaddr_storage" >&5
10355 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10356   echo $ac_n "(cached) $ac_c" 1>&6
10357 else
10358   
10359                 cat > conftest.$ac_ext <<EOF
10360 #line 10360 "configure"
10361 #include "confdefs.h"
10362
10363 #include <sys/types.h>
10364 #include <sys/socket.h>
10365
10366 int main() {
10367
10368                         struct sockaddr_storage ss;
10369
10370 ; return 0; }
10371 EOF
10372 if { (eval echo configure:10372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10373   rm -rf conftest*
10374   ol_cv_struct_sockaddr_storage=yes
10375 else
10376   echo "configure: failed program was:" >&5
10377   cat conftest.$ac_ext >&5
10378   rm -rf conftest*
10379   ol_cv_struct_sockaddr_storage=no
10380 fi
10381 rm -f conftest*
10382 fi
10383
10384 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10385
10386         if test $ol_cv_inet6_addrstrlen = yes \
10387                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10388                 ol_link_ipv6=yes
10389         elif test $ol_enable_ipv6 = yes \
10390                         -a $ol_cv_inet6_addrstrlen = no ; then
10391                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10392         elif test $ol_enable_ipv6 = yes \
10393                         -a $ol_cv_struct_sockaddr_storage = no ; then
10394                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10395         fi
10396 fi
10397
10398 if test $ol_enable_local != no ; then
10399         for ac_hdr in sys/un.h 
10400 do
10401 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10402 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10403 echo "configure:10403: checking for $ac_hdr" >&5
10404 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10405   echo $ac_n "(cached) $ac_c" 1>&6
10406 else
10407   cat > conftest.$ac_ext <<EOF
10408 #line 10408 "configure"
10409 #include "confdefs.h"
10410 #include <$ac_hdr>
10411 EOF
10412 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10413 { (eval echo configure:10413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10414 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10415 if test -z "$ac_err"; then
10416   rm -rf conftest*
10417   eval "ac_cv_header_$ac_safe=yes"
10418 else
10419   echo "$ac_err" >&5
10420   echo "configure: failed program was:" >&5
10421   cat conftest.$ac_ext >&5
10422   rm -rf conftest*
10423   eval "ac_cv_header_$ac_safe=no"
10424 fi
10425 rm -f conftest*
10426 fi
10427 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10428   echo "$ac_t""yes" 1>&6
10429     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10430   cat >> confdefs.h <<EOF
10431 #define $ac_tr_hdr 1
10432 EOF
10433  
10434 else
10435   echo "$ac_t""no" 1>&6
10436 fi
10437 done
10438
10439
10440         if test $ol_enable_local = auto ; then
10441                 ol_enable_local=$ac_cv_header_sys_un_h
10442         elif test $ac_cv_header_sys_un_h = no ; then
10443                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10444         fi
10445 fi
10446
10447 ol_link_kbind=no
10448 ol_link_kpasswd=no
10449 ol_link_krb5=no
10450 ol_link_krb4=no
10451
10452 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10453         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10454         -o $ol_with_kerberos = k425 ; then
10455
10456         for ac_hdr in krb5.h
10457 do
10458 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10459 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10460 echo "configure:10460: checking for $ac_hdr" >&5
10461 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10462   echo $ac_n "(cached) $ac_c" 1>&6
10463 else
10464   cat > conftest.$ac_ext <<EOF
10465 #line 10465 "configure"
10466 #include "confdefs.h"
10467 #include <$ac_hdr>
10468 EOF
10469 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10470 { (eval echo configure:10470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10471 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10472 if test -z "$ac_err"; then
10473   rm -rf conftest*
10474   eval "ac_cv_header_$ac_safe=yes"
10475 else
10476   echo "$ac_err" >&5
10477   echo "configure: failed program was:" >&5
10478   cat conftest.$ac_ext >&5
10479   rm -rf conftest*
10480   eval "ac_cv_header_$ac_safe=no"
10481 fi
10482 rm -f conftest*
10483 fi
10484 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10485   echo "$ac_t""yes" 1>&6
10486     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10487   cat >> confdefs.h <<EOF
10488 #define $ac_tr_hdr 1
10489 EOF
10490  
10491 else
10492   echo "$ac_t""no" 1>&6
10493 fi
10494 done
10495
10496
10497         if test $ac_cv_header_krb5_h = yes ; then
10498                                 for ac_hdr in heim_err.h
10499 do
10500 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10501 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10502 echo "configure:10502: checking for $ac_hdr" >&5
10503 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10504   echo $ac_n "(cached) $ac_c" 1>&6
10505 else
10506   cat > conftest.$ac_ext <<EOF
10507 #line 10507 "configure"
10508 #include "confdefs.h"
10509 #include <$ac_hdr>
10510 EOF
10511 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10512 { (eval echo configure:10512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10513 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10514 if test -z "$ac_err"; then
10515   rm -rf conftest*
10516   eval "ac_cv_header_$ac_safe=yes"
10517 else
10518   echo "$ac_err" >&5
10519   echo "configure: failed program was:" >&5
10520   cat conftest.$ac_ext >&5
10521   rm -rf conftest*
10522   eval "ac_cv_header_$ac_safe=no"
10523 fi
10524 rm -f conftest*
10525 fi
10526 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10527   echo "$ac_t""yes" 1>&6
10528     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10529   cat >> confdefs.h <<EOF
10530 #define $ac_tr_hdr 1
10531 EOF
10532  
10533 else
10534   echo "$ac_t""no" 1>&6
10535 fi
10536 done
10537
10538                 if test $ac_cv_header_heim_err_h = yes ; then
10539                         krb5_impl=heimdal
10540                 else
10541                         krb5_impl=mit
10542                 fi
10543
10544                 if test $krb5_impl = mit; then
10545                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10546 echo "configure:10546: checking for main in -lk5crypto" >&5
10547 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10548 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10549   echo $ac_n "(cached) $ac_c" 1>&6
10550 else
10551   ac_save_LIBS="$LIBS"
10552 LIBS="-lk5crypto  $LIBS"
10553 cat > conftest.$ac_ext <<EOF
10554 #line 10554 "configure"
10555 #include "confdefs.h"
10556
10557 int main() {
10558 main()
10559 ; return 0; }
10560 EOF
10561 if { (eval echo configure:10561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10562   rm -rf conftest*
10563   eval "ac_cv_lib_$ac_lib_var=yes"
10564 else
10565   echo "configure: failed program was:" >&5
10566   cat conftest.$ac_ext >&5
10567   rm -rf conftest*
10568   eval "ac_cv_lib_$ac_lib_var=no"
10569 fi
10570 rm -f conftest*
10571 LIBS="$ac_save_LIBS"
10572
10573 fi
10574 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10575   echo "$ac_t""yes" 1>&6
10576   krb5crypto=k5crypto
10577 else
10578   echo "$ac_t""no" 1>&6
10579 krb5crypto=crypto
10580 fi
10581
10582
10583                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10584 echo "configure:10584: checking for main in -lkrb5" >&5
10585 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10586 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10587   echo $ac_n "(cached) $ac_c" 1>&6
10588 else
10589   ac_save_LIBS="$LIBS"
10590 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10591 cat > conftest.$ac_ext <<EOF
10592 #line 10592 "configure"
10593 #include "confdefs.h"
10594
10595 int main() {
10596 main()
10597 ; return 0; }
10598 EOF
10599 if { (eval echo configure:10599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10600   rm -rf conftest*
10601   eval "ac_cv_lib_$ac_lib_var=yes"
10602 else
10603   echo "configure: failed program was:" >&5
10604   cat conftest.$ac_ext >&5
10605   rm -rf conftest*
10606   eval "ac_cv_lib_$ac_lib_var=no"
10607 fi
10608 rm -f conftest*
10609 LIBS="$ac_save_LIBS"
10610
10611 fi
10612 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10613   echo "$ac_t""yes" 1>&6
10614   have_krb5=yes
10615                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10616 else
10617   echo "$ac_t""no" 1>&6
10618 have_krb5=no
10619 fi
10620
10621
10622                 elif test $krb5_impl = heimdal; then
10623                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10624 echo "configure:10624: checking for main in -ldes" >&5
10625 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10626 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10627   echo $ac_n "(cached) $ac_c" 1>&6
10628 else
10629   ac_save_LIBS="$LIBS"
10630 LIBS="-ldes  $LIBS"
10631 cat > conftest.$ac_ext <<EOF
10632 #line 10632 "configure"
10633 #include "confdefs.h"
10634
10635 int main() {
10636 main()
10637 ; return 0; }
10638 EOF
10639 if { (eval echo configure:10639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10640   rm -rf conftest*
10641   eval "ac_cv_lib_$ac_lib_var=yes"
10642 else
10643   echo "configure: failed program was:" >&5
10644   cat conftest.$ac_ext >&5
10645   rm -rf conftest*
10646   eval "ac_cv_lib_$ac_lib_var=no"
10647 fi
10648 rm -f conftest*
10649 LIBS="$ac_save_LIBS"
10650
10651 fi
10652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10653   echo "$ac_t""yes" 1>&6
10654   krb5crypto=des
10655 else
10656   echo "$ac_t""no" 1>&6
10657 krb5crypto=crypto
10658 fi
10659
10660
10661                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10662 echo "configure:10662: checking for main in -lkrb5" >&5
10663 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10664 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10665   echo $ac_n "(cached) $ac_c" 1>&6
10666 else
10667   ac_save_LIBS="$LIBS"
10668 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10669 cat > conftest.$ac_ext <<EOF
10670 #line 10670 "configure"
10671 #include "confdefs.h"
10672
10673 int main() {
10674 main()
10675 ; return 0; }
10676 EOF
10677 if { (eval echo configure:10677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10678   rm -rf conftest*
10679   eval "ac_cv_lib_$ac_lib_var=yes"
10680 else
10681   echo "configure: failed program was:" >&5
10682   cat conftest.$ac_ext >&5
10683   rm -rf conftest*
10684   eval "ac_cv_lib_$ac_lib_var=no"
10685 fi
10686 rm -f conftest*
10687 LIBS="$ac_save_LIBS"
10688
10689 fi
10690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10691   echo "$ac_t""yes" 1>&6
10692   have_krb5=yes
10693                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10694 else
10695   echo "$ac_t""no" 1>&6
10696 have_krb5=no
10697 fi
10698
10699
10700                         cat >> confdefs.h <<\EOF
10701 #define HAVE_HEIMDAL_KERBEROS 1
10702 EOF
10703
10704
10705                 else
10706                         have_krb5=no
10707                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10708                 fi
10709
10710                 if test $have_krb5 = yes ; then
10711                         ol_link_krb5=yes
10712
10713                         cat >> confdefs.h <<\EOF
10714 #define HAVE_KRB5 1
10715 EOF
10716
10717
10718                         if test $ol_enable_kpasswd != no ; then
10719                                 ol_link_kpasswd=yes;
10720                         fi
10721
10722                         if test $ol_with_kerberos = k5only ; then
10723                                 ol_with_kerberos=found
10724                         fi
10725
10726                 elif test $ol_with_kerberos != auto ; then
10727                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10728                 fi
10729
10730         fi
10731 fi
10732
10733 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10734         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10735
10736         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10737 do
10738 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10739 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10740 echo "configure:10740: checking for $ac_hdr" >&5
10741 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10742   echo $ac_n "(cached) $ac_c" 1>&6
10743 else
10744   cat > conftest.$ac_ext <<EOF
10745 #line 10745 "configure"
10746 #include "confdefs.h"
10747 #include <$ac_hdr>
10748 EOF
10749 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10750 { (eval echo configure:10750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10751 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10752 if test -z "$ac_err"; then
10753   rm -rf conftest*
10754   eval "ac_cv_header_$ac_safe=yes"
10755 else
10756   echo "$ac_err" >&5
10757   echo "configure: failed program was:" >&5
10758   cat conftest.$ac_ext >&5
10759   rm -rf conftest*
10760   eval "ac_cv_header_$ac_safe=no"
10761 fi
10762 rm -f conftest*
10763 fi
10764 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10765   echo "$ac_t""yes" 1>&6
10766     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10767   cat >> confdefs.h <<EOF
10768 #define $ac_tr_hdr 1
10769 EOF
10770  
10771 else
10772   echo "$ac_t""no" 1>&6
10773 fi
10774 done
10775
10776
10777         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10778                 if test $krb5_impl = mit; then
10779                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10780 echo "configure:10780: checking for main in -lkrb4" >&5
10781 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10782 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10783   echo $ac_n "(cached) $ac_c" 1>&6
10784 else
10785   ac_save_LIBS="$LIBS"
10786 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10787 cat > conftest.$ac_ext <<EOF
10788 #line 10788 "configure"
10789 #include "confdefs.h"
10790
10791 int main() {
10792 main()
10793 ; return 0; }
10794 EOF
10795 if { (eval echo configure:10795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10796   rm -rf conftest*
10797   eval "ac_cv_lib_$ac_lib_var=yes"
10798 else
10799   echo "configure: failed program was:" >&5
10800   cat conftest.$ac_ext >&5
10801   rm -rf conftest*
10802   eval "ac_cv_lib_$ac_lib_var=no"
10803 fi
10804 rm -f conftest*
10805 LIBS="$ac_save_LIBS"
10806
10807 fi
10808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10809   echo "$ac_t""yes" 1>&6
10810   have_k425=yes
10811                                 KRB4_LIBS="-lkrb4 -ldes425"
10812 else
10813   echo "$ac_t""no" 1>&6
10814 have_k425=no
10815 fi
10816
10817
10818                 elif test $krb5_impl = heimdal; then
10819                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10820 echo "configure:10820: checking for main in -lkrb4" >&5
10821 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10822 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10823   echo $ac_n "(cached) $ac_c" 1>&6
10824 else
10825   ac_save_LIBS="$LIBS"
10826 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10827 cat > conftest.$ac_ext <<EOF
10828 #line 10828 "configure"
10829 #include "confdefs.h"
10830
10831 int main() {
10832 main()
10833 ; return 0; }
10834 EOF
10835 if { (eval echo configure:10835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10836   rm -rf conftest*
10837   eval "ac_cv_lib_$ac_lib_var=yes"
10838 else
10839   echo "configure: failed program was:" >&5
10840   cat conftest.$ac_ext >&5
10841   rm -rf conftest*
10842   eval "ac_cv_lib_$ac_lib_var=no"
10843 fi
10844 rm -f conftest*
10845 LIBS="$ac_save_LIBS"
10846
10847 fi
10848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10849   echo "$ac_t""yes" 1>&6
10850   have_k425=yes
10851                                 KRB4_LIBS="-lkrb4"
10852 else
10853   echo "$ac_t""no" 1>&6
10854 have_k425=no
10855 fi
10856
10857
10858                 else
10859                         have_425=no
10860                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10861                 fi
10862
10863                 if test $have_k425 = yes ; then
10864                         ol_with_kerberos=found
10865                         ol_link_krb4=yes
10866
10867                         cat >> confdefs.h <<\EOF
10868 #define HAVE_KRB425 1
10869 EOF
10870
10871                         cat >> confdefs.h <<\EOF
10872 #define HAVE_KRB4 1
10873 EOF
10874
10875
10876                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10877 echo "configure:10877: checking for des_debug in Kerberos libraries" >&5
10878 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10879   echo $ac_n "(cached) $ac_c" 1>&6
10880 else
10881   
10882                                                                 save_LIBS="$LIBS"
10883                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10884                                 cat > conftest.$ac_ext <<EOF
10885 #line 10885 "configure"
10886 #include "confdefs.h"
10887
10888 #include <kerberosIV/krb.h>
10889 #include <kerberosIV/des.h>
10890 extern int des_debug;
10891
10892 int main() {
10893
10894 des_debug = 1;
10895
10896 ; return 0; }
10897 EOF
10898 if { (eval echo configure:10898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10899   rm -rf conftest*
10900   ol_cv_var_des_debug=yes
10901 else
10902   echo "configure: failed program was:" >&5
10903   cat conftest.$ac_ext >&5
10904   rm -rf conftest*
10905   ol_cv_var_des_debug=no
10906 fi
10907 rm -f conftest*
10908                                                                 LIBS="$save_LIBS"
10909                         
10910 fi
10911
10912 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10913
10914                         if test $ol_cv_var_des_debug = yes ; then
10915                                 cat >> confdefs.h <<\EOF
10916 #define HAVE_DES_DEBUG 1
10917 EOF
10918
10919                         fi
10920
10921                         LIBS="$save_LIBS"
10922                 fi
10923         fi
10924 fi
10925
10926 if test $ol_link_krb5 = yes ; then
10927         ol_with_kerberos=found
10928 fi
10929
10930 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10931         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10932
10933         for ac_hdr in krb.h des.h krb-archaeology.h 
10934 do
10935 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10936 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10937 echo "configure:10937: checking for $ac_hdr" >&5
10938 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10939   echo $ac_n "(cached) $ac_c" 1>&6
10940 else
10941   cat > conftest.$ac_ext <<EOF
10942 #line 10942 "configure"
10943 #include "confdefs.h"
10944 #include <$ac_hdr>
10945 EOF
10946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10947 { (eval echo configure:10947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10948 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10949 if test -z "$ac_err"; then
10950   rm -rf conftest*
10951   eval "ac_cv_header_$ac_safe=yes"
10952 else
10953   echo "$ac_err" >&5
10954   echo "configure: failed program was:" >&5
10955   cat conftest.$ac_ext >&5
10956   rm -rf conftest*
10957   eval "ac_cv_header_$ac_safe=no"
10958 fi
10959 rm -f conftest*
10960 fi
10961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10962   echo "$ac_t""yes" 1>&6
10963     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10964   cat >> confdefs.h <<EOF
10965 #define $ac_tr_hdr 1
10966 EOF
10967  
10968 else
10969   echo "$ac_t""no" 1>&6
10970 fi
10971 done
10972
10973
10974         if test $ac_cv_header_krb_h = yes ; then
10975                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10976 echo "configure:10976: checking for main in -lkrb" >&5
10977 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10978 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10979   echo $ac_n "(cached) $ac_c" 1>&6
10980 else
10981   ac_save_LIBS="$LIBS"
10982 LIBS="-lkrb -ldes $LIBS"
10983 cat > conftest.$ac_ext <<EOF
10984 #line 10984 "configure"
10985 #include "confdefs.h"
10986
10987 int main() {
10988 main()
10989 ; return 0; }
10990 EOF
10991 if { (eval echo configure:10991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10992   rm -rf conftest*
10993   eval "ac_cv_lib_$ac_lib_var=yes"
10994 else
10995   echo "configure: failed program was:" >&5
10996   cat conftest.$ac_ext >&5
10997   rm -rf conftest*
10998   eval "ac_cv_lib_$ac_lib_var=no"
10999 fi
11000 rm -f conftest*
11001 LIBS="$ac_save_LIBS"
11002
11003 fi
11004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11005   echo "$ac_t""yes" 1>&6
11006   have_k4=yes
11007 else
11008   echo "$ac_t""no" 1>&6
11009 have_k4=no
11010 fi
11011
11012
11013                 if test $have_k4 = yes ; then
11014                         ol_with_kerberos=found
11015                         ol_link_krb4=yes
11016
11017                         cat >> confdefs.h <<\EOF
11018 #define HAVE_KRB4 1
11019 EOF
11020
11021
11022                         KRB4_LIBS="-lkrb -ldes"
11023
11024                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11025                                 cat >> confdefs.h <<\EOF
11026 #define HAVE_KTH_KERBEROS 1
11027 EOF
11028
11029                         fi
11030                 fi
11031         fi
11032 fi
11033
11034 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
11035         ol_link_kpasswd=yes
11036 fi
11037
11038 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11039         ol_link_kbind=yes
11040
11041 elif test $ol_enable_kbind = yes ; then
11042         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11043 fi
11044
11045 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11046         cat >> confdefs.h <<\EOF
11047 #define HAVE_KERBEROS 1
11048 EOF
11049
11050
11051 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11052         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11053 fi
11054
11055 ol_link_tls=no
11056 if test $ol_with_tls != no ; then
11057         for ac_hdr in openssl/ssl.h ssl.h
11058 do
11059 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11060 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11061 echo "configure:11061: checking for $ac_hdr" >&5
11062 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11063   echo $ac_n "(cached) $ac_c" 1>&6
11064 else
11065   cat > conftest.$ac_ext <<EOF
11066 #line 11066 "configure"
11067 #include "confdefs.h"
11068 #include <$ac_hdr>
11069 EOF
11070 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11071 { (eval echo configure:11071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11072 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11073 if test -z "$ac_err"; then
11074   rm -rf conftest*
11075   eval "ac_cv_header_$ac_safe=yes"
11076 else
11077   echo "$ac_err" >&5
11078   echo "configure: failed program was:" >&5
11079   cat conftest.$ac_ext >&5
11080   rm -rf conftest*
11081   eval "ac_cv_header_$ac_safe=no"
11082 fi
11083 rm -f conftest*
11084 fi
11085 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11086   echo "$ac_t""yes" 1>&6
11087     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11088   cat >> confdefs.h <<EOF
11089 #define $ac_tr_hdr 1
11090 EOF
11091  
11092 else
11093   echo "$ac_t""no" 1>&6
11094 fi
11095 done
11096
11097         
11098         if test $ac_cv_header_openssl_ssl_h = yes \
11099                 -o $ac_cv_header_ssl_h = yes ; then
11100                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11101 echo "configure:11101: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11102 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11103 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11104   echo $ac_n "(cached) $ac_c" 1>&6
11105 else
11106   ac_save_LIBS="$LIBS"
11107 LIBS="-lssl -lcrypto $LIBS"
11108 cat > conftest.$ac_ext <<EOF
11109 #line 11109 "configure"
11110 #include "confdefs.h"
11111 /* Override any gcc2 internal prototype to avoid an error.  */
11112 /* We use char because int might match the return type of a gcc2
11113     builtin and then its argument prototype would still apply.  */
11114 char SSLeay_add_ssl_algorithms();
11115
11116 int main() {
11117 SSLeay_add_ssl_algorithms()
11118 ; return 0; }
11119 EOF
11120 if { (eval echo configure:11120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11121   rm -rf conftest*
11122   eval "ac_cv_lib_$ac_lib_var=yes"
11123 else
11124   echo "configure: failed program was:" >&5
11125   cat conftest.$ac_ext >&5
11126   rm -rf conftest*
11127   eval "ac_cv_lib_$ac_lib_var=no"
11128 fi
11129 rm -f conftest*
11130 LIBS="$ac_save_LIBS"
11131
11132 fi
11133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11134   echo "$ac_t""yes" 1>&6
11135   have_ssleay=yes
11136                         need_rsaref=no
11137 else
11138   echo "$ac_t""no" 1>&6
11139 have_ssleay=no
11140 fi
11141
11142                         
11143                 if test $have_ssleay = no ; then
11144                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11145 echo "configure:11145: checking for SSL_library_init in -lssl" >&5
11146 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11147 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11148   echo $ac_n "(cached) $ac_c" 1>&6
11149 else
11150   ac_save_LIBS="$LIBS"
11151 LIBS="-lssl -lcrypto $LIBS"
11152 cat > conftest.$ac_ext <<EOF
11153 #line 11153 "configure"
11154 #include "confdefs.h"
11155 /* Override any gcc2 internal prototype to avoid an error.  */
11156 /* We use char because int might match the return type of a gcc2
11157     builtin and then its argument prototype would still apply.  */
11158 char SSL_library_init();
11159
11160 int main() {
11161 SSL_library_init()
11162 ; return 0; }
11163 EOF
11164 if { (eval echo configure:11164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11165   rm -rf conftest*
11166   eval "ac_cv_lib_$ac_lib_var=yes"
11167 else
11168   echo "configure: failed program was:" >&5
11169   cat conftest.$ac_ext >&5
11170   rm -rf conftest*
11171   eval "ac_cv_lib_$ac_lib_var=no"
11172 fi
11173 rm -f conftest*
11174 LIBS="$ac_save_LIBS"
11175
11176 fi
11177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11178   echo "$ac_t""yes" 1>&6
11179   have_ssleay=yes
11180                                 need_rsaref=no
11181 else
11182   echo "$ac_t""no" 1>&6
11183 have_ssleay=no
11184 fi
11185
11186                 fi
11187
11188                 if test $have_ssleay = no ; then
11189                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11190 echo "configure:11190: checking for ssl3_accept in -lssl" >&5
11191 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11192 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11193   echo $ac_n "(cached) $ac_c" 1>&6
11194 else
11195   ac_save_LIBS="$LIBS"
11196 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11197 cat > conftest.$ac_ext <<EOF
11198 #line 11198 "configure"
11199 #include "confdefs.h"
11200 /* Override any gcc2 internal prototype to avoid an error.  */
11201 /* We use char because int might match the return type of a gcc2
11202     builtin and then its argument prototype would still apply.  */
11203 char ssl3_accept();
11204
11205 int main() {
11206 ssl3_accept()
11207 ; return 0; }
11208 EOF
11209 if { (eval echo configure:11209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11210   rm -rf conftest*
11211   eval "ac_cv_lib_$ac_lib_var=yes"
11212 else
11213   echo "configure: failed program was:" >&5
11214   cat conftest.$ac_ext >&5
11215   rm -rf conftest*
11216   eval "ac_cv_lib_$ac_lib_var=no"
11217 fi
11218 rm -f conftest*
11219 LIBS="$ac_save_LIBS"
11220
11221 fi
11222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11223   echo "$ac_t""yes" 1>&6
11224   have_ssleay=yes
11225                                 need_rsaref=yes
11226 else
11227   echo "$ac_t""no" 1>&6
11228 have_ssleay=no
11229 fi
11230
11231                 fi
11232
11233                 if test $have_ssleay = yes ; then
11234                         ol_with_tls=found
11235                         ol_link_tls=yes
11236
11237                         cat >> confdefs.h <<\EOF
11238 #define HAVE_SSLEAY 1
11239 EOF
11240
11241
11242                         if test $need_rsaref = yes; then
11243                                 cat >> confdefs.h <<\EOF
11244 #define HAVE_RSAREF 1
11245 EOF
11246
11247
11248                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11249                         else
11250                                 TLS_LIBS="-lssl -lcrypto"
11251                         fi
11252                 fi
11253         fi
11254
11255 else
11256         echo "configure: warning: TLS data protection not supported!" 1>&2
11257 fi
11258
11259 if test $ol_link_tls = yes ; then
11260         cat >> confdefs.h <<\EOF
11261 #define HAVE_TLS 1
11262 EOF
11263
11264
11265 elif test $ol_with_tls = auto ; then
11266         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11267         echo "configure: warning: TLS data protection not supported!" 1>&2
11268
11269 elif test $ol_with_tls != no ; then
11270         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11271 fi
11272
11273 if test $ol_enable_lmpasswd != no; then
11274         if test $ol_link_tls != yes ; then
11275                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11276         fi
11277
11278         cat >> confdefs.h <<\EOF
11279 #define SLAPD_LMHASH 1
11280 EOF
11281
11282 fi
11283
11284 ol_link_threads=no
11285
11286 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11287         -o $ol_with_threads = nt ; then
11288
11289         
11290         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11291 echo "configure:11291: checking for _beginthread" >&5
11292 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11293   echo $ac_n "(cached) $ac_c" 1>&6
11294 else
11295   cat > conftest.$ac_ext <<EOF
11296 #line 11296 "configure"
11297 #include "confdefs.h"
11298 /* System header to define __stub macros and hopefully few prototypes,
11299     which can conflict with char _beginthread(); below.  */
11300 #include <assert.h>
11301 /* Override any gcc2 internal prototype to avoid an error.  */
11302 /* We use char because int might match the return type of a gcc2
11303     builtin and then its argument prototype would still apply.  */
11304 char _beginthread();
11305 char (*f)();
11306
11307 int main() {
11308
11309 /* The GNU C library defines this for functions which it implements
11310     to always fail with ENOSYS.  Some functions are actually named
11311     something starting with __ and the normal name is an alias.  */
11312 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11313 choke me
11314 #else
11315 f = _beginthread;
11316 #endif
11317
11318 ; return 0; }
11319 EOF
11320 if { (eval echo configure:11320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11321   rm -rf conftest*
11322   eval "ac_cv_func__beginthread=yes"
11323 else
11324   echo "configure: failed program was:" >&5
11325   cat conftest.$ac_ext >&5
11326   rm -rf conftest*
11327   eval "ac_cv_func__beginthread=no"
11328 fi
11329 rm -f conftest*
11330 fi
11331
11332 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11333   echo "$ac_t""yes" 1>&6
11334   :
11335 else
11336   echo "$ac_t""no" 1>&6
11337 fi
11338
11339
11340         if test $ac_cv_func__beginthread = yes ; then
11341                 cat >> confdefs.h <<\EOF
11342 #define HAVE_NT_THREADS 1
11343 EOF
11344
11345                 ol_cv_nt_threads=yes
11346         fi
11347
11348
11349         if test "$ol_cv_nt_threads" = yes ; then
11350                 ol_link_threads=nt
11351                 ol_with_threads=found
11352                 ol_with_yielding_select=yes
11353
11354                 cat >> confdefs.h <<\EOF
11355 #define HAVE_NT_SERVICE_MANAGER 1
11356 EOF
11357
11358                 cat >> confdefs.h <<\EOF
11359 #define HAVE_NT_EVENT_LOG 1
11360 EOF
11361
11362         fi
11363
11364         if test $ol_with_threads = nt ; then
11365                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11366         fi
11367 fi
11368
11369 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11370         -o $ol_with_threads = posix ; then
11371
11372         for ac_hdr in pthread.h
11373 do
11374 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11375 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11376 echo "configure:11376: checking for $ac_hdr" >&5
11377 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11378   echo $ac_n "(cached) $ac_c" 1>&6
11379 else
11380   cat > conftest.$ac_ext <<EOF
11381 #line 11381 "configure"
11382 #include "confdefs.h"
11383 #include <$ac_hdr>
11384 EOF
11385 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11386 { (eval echo configure:11386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11387 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11388 if test -z "$ac_err"; then
11389   rm -rf conftest*
11390   eval "ac_cv_header_$ac_safe=yes"
11391 else
11392   echo "$ac_err" >&5
11393   echo "configure: failed program was:" >&5
11394   cat conftest.$ac_ext >&5
11395   rm -rf conftest*
11396   eval "ac_cv_header_$ac_safe=no"
11397 fi
11398 rm -f conftest*
11399 fi
11400 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11401   echo "$ac_t""yes" 1>&6
11402     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11403   cat >> confdefs.h <<EOF
11404 #define $ac_tr_hdr 1
11405 EOF
11406  
11407 else
11408   echo "$ac_t""no" 1>&6
11409 fi
11410 done
11411
11412
11413         if test $ac_cv_header_pthread_h = yes ; then
11414                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11415 echo "configure:11415: checking POSIX thread version" >&5
11416 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11417   echo $ac_n "(cached) $ac_c" 1>&6
11418 else
11419   
11420         cat > conftest.$ac_ext <<EOF
11421 #line 11421 "configure"
11422 #include "confdefs.h"
11423
11424 #               include <pthread.h>
11425         
11426 int main() {
11427
11428                 int i = PTHREAD_CREATE_JOINABLE;
11429         
11430 ; return 0; }
11431 EOF
11432 if { (eval echo configure:11432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11433   rm -rf conftest*
11434   
11435         cat > conftest.$ac_ext <<EOF
11436 #line 11436 "configure"
11437 #include "confdefs.h"
11438 #include <pthread.h>
11439 EOF
11440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11441   egrep "pthread_detach" >/dev/null 2>&1; then
11442   rm -rf conftest*
11443   ol_cv_pthread_version=10
11444 else
11445   rm -rf conftest*
11446   ol_cv_pthread_version=8
11447 fi
11448 rm -f conftest*
11449
11450 else
11451   echo "configure: failed program was:" >&5
11452   cat conftest.$ac_ext >&5
11453   rm -rf conftest*
11454   
11455         cat > conftest.$ac_ext <<EOF
11456 #line 11456 "configure"
11457 #include "confdefs.h"
11458
11459 #               include <pthread.h>
11460 #               ifdef PTHREAD_CREATE_UNDETACHED
11461                 draft7
11462 #               endif
11463         
11464 EOF
11465 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11466   egrep "draft7" >/dev/null 2>&1; then
11467   rm -rf conftest*
11468   ol_cv_pthread_version=7
11469 else
11470   rm -rf conftest*
11471   
11472         cat > conftest.$ac_ext <<EOF
11473 #line 11473 "configure"
11474 #include "confdefs.h"
11475 #include <pthread.h>
11476 EOF
11477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11478   egrep "pthread_attr_init" >/dev/null 2>&1; then
11479   rm -rf conftest*
11480   ol_cv_pthread_version=6
11481 else
11482   rm -rf conftest*
11483   
11484         cat > conftest.$ac_ext <<EOF
11485 #line 11485 "configure"
11486 #include "confdefs.h"
11487
11488 #               include <pthread.h>
11489 #ifdef          PTHREAD_MUTEX_INITIALIZER
11490                 draft5
11491 #endif
11492         
11493 EOF
11494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11495   egrep "draft5" >/dev/null 2>&1; then
11496   rm -rf conftest*
11497   ol_cv_pthread_version=5
11498 else
11499   rm -rf conftest*
11500   ol_cv_pthread_version=4
11501 fi
11502 rm -f conftest*
11503  
11504 fi
11505 rm -f conftest*
11506  
11507 fi
11508 rm -f conftest*
11509  
11510 fi
11511 rm -f conftest*
11512
11513 fi
11514
11515 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11516
11517
11518                 if test $ol_cv_pthread_version != 0 ; then
11519                         cat >> confdefs.h <<EOF
11520 #define HAVE_PTHREADS $ol_cv_pthread_version
11521 EOF
11522
11523                 else
11524                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11525                 fi
11526
11527                 # consider threads found
11528                 ol_with_threads=found
11529
11530                 
11531         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11532 echo "configure:11532: checking for LinuxThreads pthread.h" >&5
11533 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11534   echo $ac_n "(cached) $ac_c" 1>&6
11535 else
11536   cat > conftest.$ac_ext <<EOF
11537 #line 11537 "configure"
11538 #include "confdefs.h"
11539 #include <pthread.h>
11540 EOF
11541 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11542   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11543   rm -rf conftest*
11544   ol_cv_header_linux_threads=yes
11545 else
11546   rm -rf conftest*
11547   ol_cv_header_linux_threads=no
11548 fi
11549 rm -f conftest*
11550
11551                 
11552 fi
11553
11554 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11555         if test $ol_cv_header_linux_threads = yes; then
11556                 cat >> confdefs.h <<\EOF
11557 #define HAVE_LINUX_THREADS 1
11558 EOF
11559
11560         fi
11561
11562                 
11563         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11564 echo "configure:11564: checking for GNU Pth pthread.h" >&5
11565 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11566   echo $ac_n "(cached) $ac_c" 1>&6
11567 else
11568   cat > conftest.$ac_ext <<EOF
11569 #line 11569 "configure"
11570 #include "confdefs.h"
11571 #include <pthread.h>
11572 #ifdef _POSIX_THREAD_IS_GNU_PTH
11573         __gnu_pth__;
11574 #endif
11575
11576 EOF
11577 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11578   egrep "__gnu_pth__" >/dev/null 2>&1; then
11579   rm -rf conftest*
11580   ol_cv_header_gnu_pth_pthread_h=yes
11581 else
11582   rm -rf conftest*
11583   ol_cv_header_gnu_pth_pthread_h=no
11584 fi
11585 rm -f conftest*
11586
11587                 
11588 fi
11589
11590 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11591
11592
11593                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11594                         for ac_hdr in sched.h
11595 do
11596 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11597 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11598 echo "configure:11598: checking for $ac_hdr" >&5
11599 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11600   echo $ac_n "(cached) $ac_c" 1>&6
11601 else
11602   cat > conftest.$ac_ext <<EOF
11603 #line 11603 "configure"
11604 #include "confdefs.h"
11605 #include <$ac_hdr>
11606 EOF
11607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11608 { (eval echo configure:11608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11610 if test -z "$ac_err"; then
11611   rm -rf conftest*
11612   eval "ac_cv_header_$ac_safe=yes"
11613 else
11614   echo "$ac_err" >&5
11615   echo "configure: failed program was:" >&5
11616   cat conftest.$ac_ext >&5
11617   rm -rf conftest*
11618   eval "ac_cv_header_$ac_safe=no"
11619 fi
11620 rm -f conftest*
11621 fi
11622 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11623   echo "$ac_t""yes" 1>&6
11624     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11625   cat >> confdefs.h <<EOF
11626 #define $ac_tr_hdr 1
11627 EOF
11628  
11629 else
11630   echo "$ac_t""no" 1>&6
11631 fi
11632 done
11633
11634                 fi
11635
11636                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11637                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11638 echo "configure:11638: checking for pthread_create in default libraries" >&5
11639 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11640   echo $ac_n "(cached) $ac_c" 1>&6
11641 else
11642   
11643                 if test "$cross_compiling" = yes; then
11644   cat > conftest.$ac_ext <<EOF
11645 #line 11645 "configure"
11646 #include "confdefs.h"
11647 /* pthread test headers */
11648 #include <pthread.h>
11649 #if HAVE_PTHREADS < 7
11650 #include <errno.h>
11651 #endif
11652 #ifndef NULL
11653 #define NULL (void*)0
11654 #endif
11655
11656 static void *task(p)
11657         void *p;
11658 {
11659         return (void *) (p == NULL);
11660 }
11661
11662 int main() {
11663
11664         /* pthread test function */
11665 #ifndef PTHREAD_CREATE_DETACHED
11666 #define PTHREAD_CREATE_DETACHED 1
11667 #endif
11668         pthread_t t;
11669         int status;
11670         int detach = PTHREAD_CREATE_DETACHED;
11671
11672 #if HAVE_PTHREADS > 4
11673         /* Final pthreads */
11674         pthread_attr_t attr;
11675
11676         status = pthread_attr_init(&attr);
11677         if( status ) return status;
11678
11679 #if HAVE_PTHREADS < 7
11680         status = pthread_attr_setdetachstate(&attr, &detach);
11681         if( status < 0 ) status = errno;
11682 #else
11683         status = pthread_attr_setdetachstate(&attr, detach);
11684 #endif
11685         if( status ) return status;
11686         status = pthread_create( &t, &attr, task, NULL );
11687 #if HAVE_PTHREADS < 7
11688         if( status < 0 ) status = errno;
11689 #endif
11690         if( status ) return status;
11691 #else
11692         /* Draft 4 pthreads */
11693         status = pthread_create( &t, pthread_attr_default, task, NULL );
11694         if( status ) return errno;
11695
11696         /* give thread a chance to complete */
11697         /* it should remain joinable and hence detachable */
11698         sleep( 1 );
11699
11700         status = pthread_detach( &t );
11701         if( status ) return errno;
11702 #endif
11703
11704 #ifdef HAVE_LINUX_THREADS
11705         pthread_kill_other_threads_np();
11706 #endif
11707
11708         return 0;
11709
11710 ; return 0; }
11711 EOF
11712 if { (eval echo configure:11712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11713   rm -rf conftest*
11714   ol_cv_pthread_create=yes
11715 else
11716   echo "configure: failed program was:" >&5
11717   cat conftest.$ac_ext >&5
11718   rm -rf conftest*
11719   ol_cv_pthread_create=no
11720 fi
11721 rm -f conftest*
11722 else
11723   cat > conftest.$ac_ext <<EOF
11724 #line 11724 "configure"
11725 #include "confdefs.h"
11726 /* pthread test headers */
11727 #include <pthread.h>
11728 #if HAVE_PTHREADS < 7
11729 #include <errno.h>
11730 #endif
11731 #ifndef NULL
11732 #define NULL (void*)0
11733 #endif
11734
11735 static void *task(p)
11736         void *p;
11737 {
11738         return (void *) (p == NULL);
11739 }
11740
11741
11742 int main(argc, argv)
11743         int argc;
11744         char **argv;
11745 {
11746
11747         /* pthread test function */
11748 #ifndef PTHREAD_CREATE_DETACHED
11749 #define PTHREAD_CREATE_DETACHED 1
11750 #endif
11751         pthread_t t;
11752         int status;
11753         int detach = PTHREAD_CREATE_DETACHED;
11754
11755 #if HAVE_PTHREADS > 4
11756         /* Final pthreads */
11757         pthread_attr_t attr;
11758
11759         status = pthread_attr_init(&attr);
11760         if( status ) return status;
11761
11762 #if HAVE_PTHREADS < 7
11763         status = pthread_attr_setdetachstate(&attr, &detach);
11764         if( status < 0 ) status = errno;
11765 #else
11766         status = pthread_attr_setdetachstate(&attr, detach);
11767 #endif
11768         if( status ) return status;
11769         status = pthread_create( &t, &attr, task, NULL );
11770 #if HAVE_PTHREADS < 7
11771         if( status < 0 ) status = errno;
11772 #endif
11773         if( status ) return status;
11774 #else
11775         /* Draft 4 pthreads */
11776         status = pthread_create( &t, pthread_attr_default, task, NULL );
11777         if( status ) return errno;
11778
11779         /* give thread a chance to complete */
11780         /* it should remain joinable and hence detachable */
11781         sleep( 1 );
11782
11783         status = pthread_detach( &t );
11784         if( status ) return errno;
11785 #endif
11786
11787 #ifdef HAVE_LINUX_THREADS
11788         pthread_kill_other_threads_np();
11789 #endif
11790
11791         return 0;
11792
11793 }
11794
11795 EOF
11796 if { (eval echo configure:11796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11797 then
11798   ol_cv_pthread_create=yes
11799 else
11800   echo "configure: failed program was:" >&5
11801   cat conftest.$ac_ext >&5
11802   rm -fr conftest*
11803   ol_cv_pthread_create=no
11804 fi
11805 rm -fr conftest*
11806 fi
11807
11808 fi
11809
11810 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11811
11812                 if test $ol_cv_pthread_create != no ; then
11813                         ol_link_threads=posix
11814                         ol_link_pthreads=""
11815                 fi
11816                 
11817                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11818 if test "$ol_link_threads" = no ; then
11819         # try -kthread
11820         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11821 echo "configure:11821: checking for pthread link with -kthread" >&5
11822 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11823   echo $ac_n "(cached) $ac_c" 1>&6
11824 else
11825   
11826                 # save the flags
11827                 ol_LIBS="$LIBS"
11828                 LIBS="-kthread $LIBS"
11829
11830                 if test "$cross_compiling" = yes; then
11831   cat > conftest.$ac_ext <<EOF
11832 #line 11832 "configure"
11833 #include "confdefs.h"
11834 /* pthread test headers */
11835 #include <pthread.h>
11836 #if HAVE_PTHREADS < 7
11837 #include <errno.h>
11838 #endif
11839 #ifndef NULL
11840 #define NULL (void*)0
11841 #endif
11842
11843 static void *task(p)
11844         void *p;
11845 {
11846         return (void *) (p == NULL);
11847 }
11848
11849 int main() {
11850
11851         /* pthread test function */
11852 #ifndef PTHREAD_CREATE_DETACHED
11853 #define PTHREAD_CREATE_DETACHED 1
11854 #endif
11855         pthread_t t;
11856         int status;
11857         int detach = PTHREAD_CREATE_DETACHED;
11858
11859 #if HAVE_PTHREADS > 4
11860         /* Final pthreads */
11861         pthread_attr_t attr;
11862
11863         status = pthread_attr_init(&attr);
11864         if( status ) return status;
11865
11866 #if HAVE_PTHREADS < 7
11867         status = pthread_attr_setdetachstate(&attr, &detach);
11868         if( status < 0 ) status = errno;
11869 #else
11870         status = pthread_attr_setdetachstate(&attr, detach);
11871 #endif
11872         if( status ) return status;
11873         status = pthread_create( &t, &attr, task, NULL );
11874 #if HAVE_PTHREADS < 7
11875         if( status < 0 ) status = errno;
11876 #endif
11877         if( status ) return status;
11878 #else
11879         /* Draft 4 pthreads */
11880         status = pthread_create( &t, pthread_attr_default, task, NULL );
11881         if( status ) return errno;
11882
11883         /* give thread a chance to complete */
11884         /* it should remain joinable and hence detachable */
11885         sleep( 1 );
11886
11887         status = pthread_detach( &t );
11888         if( status ) return errno;
11889 #endif
11890
11891 #ifdef HAVE_LINUX_THREADS
11892         pthread_kill_other_threads_np();
11893 #endif
11894
11895         return 0;
11896
11897 ; return 0; }
11898 EOF
11899 if { (eval echo configure:11899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11900   rm -rf conftest*
11901   ol_cv_pthread_kthread=yes
11902 else
11903   echo "configure: failed program was:" >&5
11904   cat conftest.$ac_ext >&5
11905   rm -rf conftest*
11906   ol_cv_pthread_kthread=no
11907 fi
11908 rm -f conftest*
11909 else
11910   cat > conftest.$ac_ext <<EOF
11911 #line 11911 "configure"
11912 #include "confdefs.h"
11913 /* pthread test headers */
11914 #include <pthread.h>
11915 #if HAVE_PTHREADS < 7
11916 #include <errno.h>
11917 #endif
11918 #ifndef NULL
11919 #define NULL (void*)0
11920 #endif
11921
11922 static void *task(p)
11923         void *p;
11924 {
11925         return (void *) (p == NULL);
11926 }
11927
11928
11929 int main(argc, argv)
11930         int argc;
11931         char **argv;
11932 {
11933
11934         /* pthread test function */
11935 #ifndef PTHREAD_CREATE_DETACHED
11936 #define PTHREAD_CREATE_DETACHED 1
11937 #endif
11938         pthread_t t;
11939         int status;
11940         int detach = PTHREAD_CREATE_DETACHED;
11941
11942 #if HAVE_PTHREADS > 4
11943         /* Final pthreads */
11944         pthread_attr_t attr;
11945
11946         status = pthread_attr_init(&attr);
11947         if( status ) return status;
11948
11949 #if HAVE_PTHREADS < 7
11950         status = pthread_attr_setdetachstate(&attr, &detach);
11951         if( status < 0 ) status = errno;
11952 #else
11953         status = pthread_attr_setdetachstate(&attr, detach);
11954 #endif
11955         if( status ) return status;
11956         status = pthread_create( &t, &attr, task, NULL );
11957 #if HAVE_PTHREADS < 7
11958         if( status < 0 ) status = errno;
11959 #endif
11960         if( status ) return status;
11961 #else
11962         /* Draft 4 pthreads */
11963         status = pthread_create( &t, pthread_attr_default, task, NULL );
11964         if( status ) return errno;
11965
11966         /* give thread a chance to complete */
11967         /* it should remain joinable and hence detachable */
11968         sleep( 1 );
11969
11970         status = pthread_detach( &t );
11971         if( status ) return errno;
11972 #endif
11973
11974 #ifdef HAVE_LINUX_THREADS
11975         pthread_kill_other_threads_np();
11976 #endif
11977
11978         return 0;
11979
11980 }
11981
11982 EOF
11983 if { (eval echo configure:11983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11984 then
11985   ol_cv_pthread_kthread=yes
11986 else
11987   echo "configure: failed program was:" >&5
11988   cat conftest.$ac_ext >&5
11989   rm -fr conftest*
11990   ol_cv_pthread_kthread=no
11991 fi
11992 rm -fr conftest*
11993 fi
11994
11995
11996                 # restore the LIBS
11997                 LIBS="$ol_LIBS"
11998         
11999 fi
12000
12001 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12002
12003         if test $ol_cv_pthread_kthread = yes ; then
12004                 ol_link_pthreads="-kthread"
12005                 ol_link_threads=posix
12006         fi
12007 fi
12008
12009                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12010 if test "$ol_link_threads" = no ; then
12011         # try -pthread
12012         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12013 echo "configure:12013: checking for pthread link with -pthread" >&5
12014 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12015   echo $ac_n "(cached) $ac_c" 1>&6
12016 else
12017   
12018                 # save the flags
12019                 ol_LIBS="$LIBS"
12020                 LIBS="-pthread $LIBS"
12021
12022                 if test "$cross_compiling" = yes; then
12023   cat > conftest.$ac_ext <<EOF
12024 #line 12024 "configure"
12025 #include "confdefs.h"
12026 /* pthread test headers */
12027 #include <pthread.h>
12028 #if HAVE_PTHREADS < 7
12029 #include <errno.h>
12030 #endif
12031 #ifndef NULL
12032 #define NULL (void*)0
12033 #endif
12034
12035 static void *task(p)
12036         void *p;
12037 {
12038         return (void *) (p == NULL);
12039 }
12040
12041 int main() {
12042
12043         /* pthread test function */
12044 #ifndef PTHREAD_CREATE_DETACHED
12045 #define PTHREAD_CREATE_DETACHED 1
12046 #endif
12047         pthread_t t;
12048         int status;
12049         int detach = PTHREAD_CREATE_DETACHED;
12050
12051 #if HAVE_PTHREADS > 4
12052         /* Final pthreads */
12053         pthread_attr_t attr;
12054
12055         status = pthread_attr_init(&attr);
12056         if( status ) return status;
12057
12058 #if HAVE_PTHREADS < 7
12059         status = pthread_attr_setdetachstate(&attr, &detach);
12060         if( status < 0 ) status = errno;
12061 #else
12062         status = pthread_attr_setdetachstate(&attr, detach);
12063 #endif
12064         if( status ) return status;
12065         status = pthread_create( &t, &attr, task, NULL );
12066 #if HAVE_PTHREADS < 7
12067         if( status < 0 ) status = errno;
12068 #endif
12069         if( status ) return status;
12070 #else
12071         /* Draft 4 pthreads */
12072         status = pthread_create( &t, pthread_attr_default, task, NULL );
12073         if( status ) return errno;
12074
12075         /* give thread a chance to complete */
12076         /* it should remain joinable and hence detachable */
12077         sleep( 1 );
12078
12079         status = pthread_detach( &t );
12080         if( status ) return errno;
12081 #endif
12082
12083 #ifdef HAVE_LINUX_THREADS
12084         pthread_kill_other_threads_np();
12085 #endif
12086
12087         return 0;
12088
12089 ; return 0; }
12090 EOF
12091 if { (eval echo configure:12091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12092   rm -rf conftest*
12093   ol_cv_pthread_pthread=yes
12094 else
12095   echo "configure: failed program was:" >&5
12096   cat conftest.$ac_ext >&5
12097   rm -rf conftest*
12098   ol_cv_pthread_pthread=no
12099 fi
12100 rm -f conftest*
12101 else
12102   cat > conftest.$ac_ext <<EOF
12103 #line 12103 "configure"
12104 #include "confdefs.h"
12105 /* pthread test headers */
12106 #include <pthread.h>
12107 #if HAVE_PTHREADS < 7
12108 #include <errno.h>
12109 #endif
12110 #ifndef NULL
12111 #define NULL (void*)0
12112 #endif
12113
12114 static void *task(p)
12115         void *p;
12116 {
12117         return (void *) (p == NULL);
12118 }
12119
12120
12121 int main(argc, argv)
12122         int argc;
12123         char **argv;
12124 {
12125
12126         /* pthread test function */
12127 #ifndef PTHREAD_CREATE_DETACHED
12128 #define PTHREAD_CREATE_DETACHED 1
12129 #endif
12130         pthread_t t;
12131         int status;
12132         int detach = PTHREAD_CREATE_DETACHED;
12133
12134 #if HAVE_PTHREADS > 4
12135         /* Final pthreads */
12136         pthread_attr_t attr;
12137
12138         status = pthread_attr_init(&attr);
12139         if( status ) return status;
12140
12141 #if HAVE_PTHREADS < 7
12142         status = pthread_attr_setdetachstate(&attr, &detach);
12143         if( status < 0 ) status = errno;
12144 #else
12145         status = pthread_attr_setdetachstate(&attr, detach);
12146 #endif
12147         if( status ) return status;
12148         status = pthread_create( &t, &attr, task, NULL );
12149 #if HAVE_PTHREADS < 7
12150         if( status < 0 ) status = errno;
12151 #endif
12152         if( status ) return status;
12153 #else
12154         /* Draft 4 pthreads */
12155         status = pthread_create( &t, pthread_attr_default, task, NULL );
12156         if( status ) return errno;
12157
12158         /* give thread a chance to complete */
12159         /* it should remain joinable and hence detachable */
12160         sleep( 1 );
12161
12162         status = pthread_detach( &t );
12163         if( status ) return errno;
12164 #endif
12165
12166 #ifdef HAVE_LINUX_THREADS
12167         pthread_kill_other_threads_np();
12168 #endif
12169
12170         return 0;
12171
12172 }
12173
12174 EOF
12175 if { (eval echo configure:12175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12176 then
12177   ol_cv_pthread_pthread=yes
12178 else
12179   echo "configure: failed program was:" >&5
12180   cat conftest.$ac_ext >&5
12181   rm -fr conftest*
12182   ol_cv_pthread_pthread=no
12183 fi
12184 rm -fr conftest*
12185 fi
12186
12187
12188                 # restore the LIBS
12189                 LIBS="$ol_LIBS"
12190         
12191 fi
12192
12193 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12194
12195         if test $ol_cv_pthread_pthread = yes ; then
12196                 ol_link_pthreads="-pthread"
12197                 ol_link_threads=posix
12198         fi
12199 fi
12200
12201                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12202 if test "$ol_link_threads" = no ; then
12203         # try -pthreads
12204         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12205 echo "configure:12205: checking for pthread link with -pthreads" >&5
12206 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12207   echo $ac_n "(cached) $ac_c" 1>&6
12208 else
12209   
12210                 # save the flags
12211                 ol_LIBS="$LIBS"
12212                 LIBS="-pthreads $LIBS"
12213
12214                 if test "$cross_compiling" = yes; then
12215   cat > conftest.$ac_ext <<EOF
12216 #line 12216 "configure"
12217 #include "confdefs.h"
12218 /* pthread test headers */
12219 #include <pthread.h>
12220 #if HAVE_PTHREADS < 7
12221 #include <errno.h>
12222 #endif
12223 #ifndef NULL
12224 #define NULL (void*)0
12225 #endif
12226
12227 static void *task(p)
12228         void *p;
12229 {
12230         return (void *) (p == NULL);
12231 }
12232
12233 int main() {
12234
12235         /* pthread test function */
12236 #ifndef PTHREAD_CREATE_DETACHED
12237 #define PTHREAD_CREATE_DETACHED 1
12238 #endif
12239         pthread_t t;
12240         int status;
12241         int detach = PTHREAD_CREATE_DETACHED;
12242
12243 #if HAVE_PTHREADS > 4
12244         /* Final pthreads */
12245         pthread_attr_t attr;
12246
12247         status = pthread_attr_init(&attr);
12248         if( status ) return status;
12249
12250 #if HAVE_PTHREADS < 7
12251         status = pthread_attr_setdetachstate(&attr, &detach);
12252         if( status < 0 ) status = errno;
12253 #else
12254         status = pthread_attr_setdetachstate(&attr, detach);
12255 #endif
12256         if( status ) return status;
12257         status = pthread_create( &t, &attr, task, NULL );
12258 #if HAVE_PTHREADS < 7
12259         if( status < 0 ) status = errno;
12260 #endif
12261         if( status ) return status;
12262 #else
12263         /* Draft 4 pthreads */
12264         status = pthread_create( &t, pthread_attr_default, task, NULL );
12265         if( status ) return errno;
12266
12267         /* give thread a chance to complete */
12268         /* it should remain joinable and hence detachable */
12269         sleep( 1 );
12270
12271         status = pthread_detach( &t );
12272         if( status ) return errno;
12273 #endif
12274
12275 #ifdef HAVE_LINUX_THREADS
12276         pthread_kill_other_threads_np();
12277 #endif
12278
12279         return 0;
12280
12281 ; return 0; }
12282 EOF
12283 if { (eval echo configure:12283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12284   rm -rf conftest*
12285   ol_cv_pthread_pthreads=yes
12286 else
12287   echo "configure: failed program was:" >&5
12288   cat conftest.$ac_ext >&5
12289   rm -rf conftest*
12290   ol_cv_pthread_pthreads=no
12291 fi
12292 rm -f conftest*
12293 else
12294   cat > conftest.$ac_ext <<EOF
12295 #line 12295 "configure"
12296 #include "confdefs.h"
12297 /* pthread test headers */
12298 #include <pthread.h>
12299 #if HAVE_PTHREADS < 7
12300 #include <errno.h>
12301 #endif
12302 #ifndef NULL
12303 #define NULL (void*)0
12304 #endif
12305
12306 static void *task(p)
12307         void *p;
12308 {
12309         return (void *) (p == NULL);
12310 }
12311
12312
12313 int main(argc, argv)
12314         int argc;
12315         char **argv;
12316 {
12317
12318         /* pthread test function */
12319 #ifndef PTHREAD_CREATE_DETACHED
12320 #define PTHREAD_CREATE_DETACHED 1
12321 #endif
12322         pthread_t t;
12323         int status;
12324         int detach = PTHREAD_CREATE_DETACHED;
12325
12326 #if HAVE_PTHREADS > 4
12327         /* Final pthreads */
12328         pthread_attr_t attr;
12329
12330         status = pthread_attr_init(&attr);
12331         if( status ) return status;
12332
12333 #if HAVE_PTHREADS < 7
12334         status = pthread_attr_setdetachstate(&attr, &detach);
12335         if( status < 0 ) status = errno;
12336 #else
12337         status = pthread_attr_setdetachstate(&attr, detach);
12338 #endif
12339         if( status ) return status;
12340         status = pthread_create( &t, &attr, task, NULL );
12341 #if HAVE_PTHREADS < 7
12342         if( status < 0 ) status = errno;
12343 #endif
12344         if( status ) return status;
12345 #else
12346         /* Draft 4 pthreads */
12347         status = pthread_create( &t, pthread_attr_default, task, NULL );
12348         if( status ) return errno;
12349
12350         /* give thread a chance to complete */
12351         /* it should remain joinable and hence detachable */
12352         sleep( 1 );
12353
12354         status = pthread_detach( &t );
12355         if( status ) return errno;
12356 #endif
12357
12358 #ifdef HAVE_LINUX_THREADS
12359         pthread_kill_other_threads_np();
12360 #endif
12361
12362         return 0;
12363
12364 }
12365
12366 EOF
12367 if { (eval echo configure:12367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12368 then
12369   ol_cv_pthread_pthreads=yes
12370 else
12371   echo "configure: failed program was:" >&5
12372   cat conftest.$ac_ext >&5
12373   rm -fr conftest*
12374   ol_cv_pthread_pthreads=no
12375 fi
12376 rm -fr conftest*
12377 fi
12378
12379
12380                 # restore the LIBS
12381                 LIBS="$ol_LIBS"
12382         
12383 fi
12384
12385 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12386
12387         if test $ol_cv_pthread_pthreads = yes ; then
12388                 ol_link_pthreads="-pthreads"
12389                 ol_link_threads=posix
12390         fi
12391 fi
12392
12393                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12394 if test "$ol_link_threads" = no ; then
12395         # try -mthreads
12396         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12397 echo "configure:12397: checking for pthread link with -mthreads" >&5
12398 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12399   echo $ac_n "(cached) $ac_c" 1>&6
12400 else
12401   
12402                 # save the flags
12403                 ol_LIBS="$LIBS"
12404                 LIBS="-mthreads $LIBS"
12405
12406                 if test "$cross_compiling" = yes; then
12407   cat > conftest.$ac_ext <<EOF
12408 #line 12408 "configure"
12409 #include "confdefs.h"
12410 /* pthread test headers */
12411 #include <pthread.h>
12412 #if HAVE_PTHREADS < 7
12413 #include <errno.h>
12414 #endif
12415 #ifndef NULL
12416 #define NULL (void*)0
12417 #endif
12418
12419 static void *task(p)
12420         void *p;
12421 {
12422         return (void *) (p == NULL);
12423 }
12424
12425 int main() {
12426
12427         /* pthread test function */
12428 #ifndef PTHREAD_CREATE_DETACHED
12429 #define PTHREAD_CREATE_DETACHED 1
12430 #endif
12431         pthread_t t;
12432         int status;
12433         int detach = PTHREAD_CREATE_DETACHED;
12434
12435 #if HAVE_PTHREADS > 4
12436         /* Final pthreads */
12437         pthread_attr_t attr;
12438
12439         status = pthread_attr_init(&attr);
12440         if( status ) return status;
12441
12442 #if HAVE_PTHREADS < 7
12443         status = pthread_attr_setdetachstate(&attr, &detach);
12444         if( status < 0 ) status = errno;
12445 #else
12446         status = pthread_attr_setdetachstate(&attr, detach);
12447 #endif
12448         if( status ) return status;
12449         status = pthread_create( &t, &attr, task, NULL );
12450 #if HAVE_PTHREADS < 7
12451         if( status < 0 ) status = errno;
12452 #endif
12453         if( status ) return status;
12454 #else
12455         /* Draft 4 pthreads */
12456         status = pthread_create( &t, pthread_attr_default, task, NULL );
12457         if( status ) return errno;
12458
12459         /* give thread a chance to complete */
12460         /* it should remain joinable and hence detachable */
12461         sleep( 1 );
12462
12463         status = pthread_detach( &t );
12464         if( status ) return errno;
12465 #endif
12466
12467 #ifdef HAVE_LINUX_THREADS
12468         pthread_kill_other_threads_np();
12469 #endif
12470
12471         return 0;
12472
12473 ; return 0; }
12474 EOF
12475 if { (eval echo configure:12475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12476   rm -rf conftest*
12477   ol_cv_pthread_mthreads=yes
12478 else
12479   echo "configure: failed program was:" >&5
12480   cat conftest.$ac_ext >&5
12481   rm -rf conftest*
12482   ol_cv_pthread_mthreads=no
12483 fi
12484 rm -f conftest*
12485 else
12486   cat > conftest.$ac_ext <<EOF
12487 #line 12487 "configure"
12488 #include "confdefs.h"
12489 /* pthread test headers */
12490 #include <pthread.h>
12491 #if HAVE_PTHREADS < 7
12492 #include <errno.h>
12493 #endif
12494 #ifndef NULL
12495 #define NULL (void*)0
12496 #endif
12497
12498 static void *task(p)
12499         void *p;
12500 {
12501         return (void *) (p == NULL);
12502 }
12503
12504
12505 int main(argc, argv)
12506         int argc;
12507         char **argv;
12508 {
12509
12510         /* pthread test function */
12511 #ifndef PTHREAD_CREATE_DETACHED
12512 #define PTHREAD_CREATE_DETACHED 1
12513 #endif
12514         pthread_t t;
12515         int status;
12516         int detach = PTHREAD_CREATE_DETACHED;
12517
12518 #if HAVE_PTHREADS > 4
12519         /* Final pthreads */
12520         pthread_attr_t attr;
12521
12522         status = pthread_attr_init(&attr);
12523         if( status ) return status;
12524
12525 #if HAVE_PTHREADS < 7
12526         status = pthread_attr_setdetachstate(&attr, &detach);
12527         if( status < 0 ) status = errno;
12528 #else
12529         status = pthread_attr_setdetachstate(&attr, detach);
12530 #endif
12531         if( status ) return status;
12532         status = pthread_create( &t, &attr, task, NULL );
12533 #if HAVE_PTHREADS < 7
12534         if( status < 0 ) status = errno;
12535 #endif
12536         if( status ) return status;
12537 #else
12538         /* Draft 4 pthreads */
12539         status = pthread_create( &t, pthread_attr_default, task, NULL );
12540         if( status ) return errno;
12541
12542         /* give thread a chance to complete */
12543         /* it should remain joinable and hence detachable */
12544         sleep( 1 );
12545
12546         status = pthread_detach( &t );
12547         if( status ) return errno;
12548 #endif
12549
12550 #ifdef HAVE_LINUX_THREADS
12551         pthread_kill_other_threads_np();
12552 #endif
12553
12554         return 0;
12555
12556 }
12557
12558 EOF
12559 if { (eval echo configure:12559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12560 then
12561   ol_cv_pthread_mthreads=yes
12562 else
12563   echo "configure: failed program was:" >&5
12564   cat conftest.$ac_ext >&5
12565   rm -fr conftest*
12566   ol_cv_pthread_mthreads=no
12567 fi
12568 rm -fr conftest*
12569 fi
12570
12571
12572                 # restore the LIBS
12573                 LIBS="$ol_LIBS"
12574         
12575 fi
12576
12577 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12578
12579         if test $ol_cv_pthread_mthreads = yes ; then
12580                 ol_link_pthreads="-mthreads"
12581                 ol_link_threads=posix
12582         fi
12583 fi
12584
12585                 # Pthread try link: -thread (ol_cv_pthread_thread)
12586 if test "$ol_link_threads" = no ; then
12587         # try -thread
12588         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12589 echo "configure:12589: checking for pthread link with -thread" >&5
12590 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12591   echo $ac_n "(cached) $ac_c" 1>&6
12592 else
12593   
12594                 # save the flags
12595                 ol_LIBS="$LIBS"
12596                 LIBS="-thread $LIBS"
12597
12598                 if test "$cross_compiling" = yes; then
12599   cat > conftest.$ac_ext <<EOF
12600 #line 12600 "configure"
12601 #include "confdefs.h"
12602 /* pthread test headers */
12603 #include <pthread.h>
12604 #if HAVE_PTHREADS < 7
12605 #include <errno.h>
12606 #endif
12607 #ifndef NULL
12608 #define NULL (void*)0
12609 #endif
12610
12611 static void *task(p)
12612         void *p;
12613 {
12614         return (void *) (p == NULL);
12615 }
12616
12617 int main() {
12618
12619         /* pthread test function */
12620 #ifndef PTHREAD_CREATE_DETACHED
12621 #define PTHREAD_CREATE_DETACHED 1
12622 #endif
12623         pthread_t t;
12624         int status;
12625         int detach = PTHREAD_CREATE_DETACHED;
12626
12627 #if HAVE_PTHREADS > 4
12628         /* Final pthreads */
12629         pthread_attr_t attr;
12630
12631         status = pthread_attr_init(&attr);
12632         if( status ) return status;
12633
12634 #if HAVE_PTHREADS < 7
12635         status = pthread_attr_setdetachstate(&attr, &detach);
12636         if( status < 0 ) status = errno;
12637 #else
12638         status = pthread_attr_setdetachstate(&attr, detach);
12639 #endif
12640         if( status ) return status;
12641         status = pthread_create( &t, &attr, task, NULL );
12642 #if HAVE_PTHREADS < 7
12643         if( status < 0 ) status = errno;
12644 #endif
12645         if( status ) return status;
12646 #else
12647         /* Draft 4 pthreads */
12648         status = pthread_create( &t, pthread_attr_default, task, NULL );
12649         if( status ) return errno;
12650
12651         /* give thread a chance to complete */
12652         /* it should remain joinable and hence detachable */
12653         sleep( 1 );
12654
12655         status = pthread_detach( &t );
12656         if( status ) return errno;
12657 #endif
12658
12659 #ifdef HAVE_LINUX_THREADS
12660         pthread_kill_other_threads_np();
12661 #endif
12662
12663         return 0;
12664
12665 ; return 0; }
12666 EOF
12667 if { (eval echo configure:12667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12668   rm -rf conftest*
12669   ol_cv_pthread_thread=yes
12670 else
12671   echo "configure: failed program was:" >&5
12672   cat conftest.$ac_ext >&5
12673   rm -rf conftest*
12674   ol_cv_pthread_thread=no
12675 fi
12676 rm -f conftest*
12677 else
12678   cat > conftest.$ac_ext <<EOF
12679 #line 12679 "configure"
12680 #include "confdefs.h"
12681 /* pthread test headers */
12682 #include <pthread.h>
12683 #if HAVE_PTHREADS < 7
12684 #include <errno.h>
12685 #endif
12686 #ifndef NULL
12687 #define NULL (void*)0
12688 #endif
12689
12690 static void *task(p)
12691         void *p;
12692 {
12693         return (void *) (p == NULL);
12694 }
12695
12696
12697 int main(argc, argv)
12698         int argc;
12699         char **argv;
12700 {
12701
12702         /* pthread test function */
12703 #ifndef PTHREAD_CREATE_DETACHED
12704 #define PTHREAD_CREATE_DETACHED 1
12705 #endif
12706         pthread_t t;
12707         int status;
12708         int detach = PTHREAD_CREATE_DETACHED;
12709
12710 #if HAVE_PTHREADS > 4
12711         /* Final pthreads */
12712         pthread_attr_t attr;
12713
12714         status = pthread_attr_init(&attr);
12715         if( status ) return status;
12716
12717 #if HAVE_PTHREADS < 7
12718         status = pthread_attr_setdetachstate(&attr, &detach);
12719         if( status < 0 ) status = errno;
12720 #else
12721         status = pthread_attr_setdetachstate(&attr, detach);
12722 #endif
12723         if( status ) return status;
12724         status = pthread_create( &t, &attr, task, NULL );
12725 #if HAVE_PTHREADS < 7
12726         if( status < 0 ) status = errno;
12727 #endif
12728         if( status ) return status;
12729 #else
12730         /* Draft 4 pthreads */
12731         status = pthread_create( &t, pthread_attr_default, task, NULL );
12732         if( status ) return errno;
12733
12734         /* give thread a chance to complete */
12735         /* it should remain joinable and hence detachable */
12736         sleep( 1 );
12737
12738         status = pthread_detach( &t );
12739         if( status ) return errno;
12740 #endif
12741
12742 #ifdef HAVE_LINUX_THREADS
12743         pthread_kill_other_threads_np();
12744 #endif
12745
12746         return 0;
12747
12748 }
12749
12750 EOF
12751 if { (eval echo configure:12751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12752 then
12753   ol_cv_pthread_thread=yes
12754 else
12755   echo "configure: failed program was:" >&5
12756   cat conftest.$ac_ext >&5
12757   rm -fr conftest*
12758   ol_cv_pthread_thread=no
12759 fi
12760 rm -fr conftest*
12761 fi
12762
12763
12764                 # restore the LIBS
12765                 LIBS="$ol_LIBS"
12766         
12767 fi
12768
12769 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12770
12771         if test $ol_cv_pthread_thread = yes ; then
12772                 ol_link_pthreads="-thread"
12773                 ol_link_threads=posix
12774         fi
12775 fi
12776
12777
12778                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12779 if test "$ol_link_threads" = no ; then
12780         # try -lpthread -lmach -lexc -lc_r
12781         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12782 echo "configure:12782: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12783 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12784   echo $ac_n "(cached) $ac_c" 1>&6
12785 else
12786   
12787                 # save the flags
12788                 ol_LIBS="$LIBS"
12789                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12790
12791                 if test "$cross_compiling" = yes; then
12792   cat > conftest.$ac_ext <<EOF
12793 #line 12793 "configure"
12794 #include "confdefs.h"
12795 /* pthread test headers */
12796 #include <pthread.h>
12797 #if HAVE_PTHREADS < 7
12798 #include <errno.h>
12799 #endif
12800 #ifndef NULL
12801 #define NULL (void*)0
12802 #endif
12803
12804 static void *task(p)
12805         void *p;
12806 {
12807         return (void *) (p == NULL);
12808 }
12809
12810 int main() {
12811
12812         /* pthread test function */
12813 #ifndef PTHREAD_CREATE_DETACHED
12814 #define PTHREAD_CREATE_DETACHED 1
12815 #endif
12816         pthread_t t;
12817         int status;
12818         int detach = PTHREAD_CREATE_DETACHED;
12819
12820 #if HAVE_PTHREADS > 4
12821         /* Final pthreads */
12822         pthread_attr_t attr;
12823
12824         status = pthread_attr_init(&attr);
12825         if( status ) return status;
12826
12827 #if HAVE_PTHREADS < 7
12828         status = pthread_attr_setdetachstate(&attr, &detach);
12829         if( status < 0 ) status = errno;
12830 #else
12831         status = pthread_attr_setdetachstate(&attr, detach);
12832 #endif
12833         if( status ) return status;
12834         status = pthread_create( &t, &attr, task, NULL );
12835 #if HAVE_PTHREADS < 7
12836         if( status < 0 ) status = errno;
12837 #endif
12838         if( status ) return status;
12839 #else
12840         /* Draft 4 pthreads */
12841         status = pthread_create( &t, pthread_attr_default, task, NULL );
12842         if( status ) return errno;
12843
12844         /* give thread a chance to complete */
12845         /* it should remain joinable and hence detachable */
12846         sleep( 1 );
12847
12848         status = pthread_detach( &t );
12849         if( status ) return errno;
12850 #endif
12851
12852 #ifdef HAVE_LINUX_THREADS
12853         pthread_kill_other_threads_np();
12854 #endif
12855
12856         return 0;
12857
12858 ; return 0; }
12859 EOF
12860 if { (eval echo configure:12860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12861   rm -rf conftest*
12862   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12863 else
12864   echo "configure: failed program was:" >&5
12865   cat conftest.$ac_ext >&5
12866   rm -rf conftest*
12867   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12868 fi
12869 rm -f conftest*
12870 else
12871   cat > conftest.$ac_ext <<EOF
12872 #line 12872 "configure"
12873 #include "confdefs.h"
12874 /* pthread test headers */
12875 #include <pthread.h>
12876 #if HAVE_PTHREADS < 7
12877 #include <errno.h>
12878 #endif
12879 #ifndef NULL
12880 #define NULL (void*)0
12881 #endif
12882
12883 static void *task(p)
12884         void *p;
12885 {
12886         return (void *) (p == NULL);
12887 }
12888
12889
12890 int main(argc, argv)
12891         int argc;
12892         char **argv;
12893 {
12894
12895         /* pthread test function */
12896 #ifndef PTHREAD_CREATE_DETACHED
12897 #define PTHREAD_CREATE_DETACHED 1
12898 #endif
12899         pthread_t t;
12900         int status;
12901         int detach = PTHREAD_CREATE_DETACHED;
12902
12903 #if HAVE_PTHREADS > 4
12904         /* Final pthreads */
12905         pthread_attr_t attr;
12906
12907         status = pthread_attr_init(&attr);
12908         if( status ) return status;
12909
12910 #if HAVE_PTHREADS < 7
12911         status = pthread_attr_setdetachstate(&attr, &detach);
12912         if( status < 0 ) status = errno;
12913 #else
12914         status = pthread_attr_setdetachstate(&attr, detach);
12915 #endif
12916         if( status ) return status;
12917         status = pthread_create( &t, &attr, task, NULL );
12918 #if HAVE_PTHREADS < 7
12919         if( status < 0 ) status = errno;
12920 #endif
12921         if( status ) return status;
12922 #else
12923         /* Draft 4 pthreads */
12924         status = pthread_create( &t, pthread_attr_default, task, NULL );
12925         if( status ) return errno;
12926
12927         /* give thread a chance to complete */
12928         /* it should remain joinable and hence detachable */
12929         sleep( 1 );
12930
12931         status = pthread_detach( &t );
12932         if( status ) return errno;
12933 #endif
12934
12935 #ifdef HAVE_LINUX_THREADS
12936         pthread_kill_other_threads_np();
12937 #endif
12938
12939         return 0;
12940
12941 }
12942
12943 EOF
12944 if { (eval echo configure:12944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12945 then
12946   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12947 else
12948   echo "configure: failed program was:" >&5
12949   cat conftest.$ac_ext >&5
12950   rm -fr conftest*
12951   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12952 fi
12953 rm -fr conftest*
12954 fi
12955
12956
12957                 # restore the LIBS
12958                 LIBS="$ol_LIBS"
12959         
12960 fi
12961
12962 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12963
12964         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12965                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12966                 ol_link_threads=posix
12967         fi
12968 fi
12969
12970                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12971 if test "$ol_link_threads" = no ; then
12972         # try -lpthread -lmach -lexc
12973         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12974 echo "configure:12974: checking for pthread link with -lpthread -lmach -lexc" >&5
12975 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12976   echo $ac_n "(cached) $ac_c" 1>&6
12977 else
12978   
12979                 # save the flags
12980                 ol_LIBS="$LIBS"
12981                 LIBS="-lpthread -lmach -lexc $LIBS"
12982
12983                 if test "$cross_compiling" = yes; then
12984   cat > conftest.$ac_ext <<EOF
12985 #line 12985 "configure"
12986 #include "confdefs.h"
12987 /* pthread test headers */
12988 #include <pthread.h>
12989 #if HAVE_PTHREADS < 7
12990 #include <errno.h>
12991 #endif
12992 #ifndef NULL
12993 #define NULL (void*)0
12994 #endif
12995
12996 static void *task(p)
12997         void *p;
12998 {
12999         return (void *) (p == NULL);
13000 }
13001
13002 int main() {
13003
13004         /* pthread test function */
13005 #ifndef PTHREAD_CREATE_DETACHED
13006 #define PTHREAD_CREATE_DETACHED 1
13007 #endif
13008         pthread_t t;
13009         int status;
13010         int detach = PTHREAD_CREATE_DETACHED;
13011
13012 #if HAVE_PTHREADS > 4
13013         /* Final pthreads */
13014         pthread_attr_t attr;
13015
13016         status = pthread_attr_init(&attr);
13017         if( status ) return status;
13018
13019 #if HAVE_PTHREADS < 7
13020         status = pthread_attr_setdetachstate(&attr, &detach);
13021         if( status < 0 ) status = errno;
13022 #else
13023         status = pthread_attr_setdetachstate(&attr, detach);
13024 #endif
13025         if( status ) return status;
13026         status = pthread_create( &t, &attr, task, NULL );
13027 #if HAVE_PTHREADS < 7
13028         if( status < 0 ) status = errno;
13029 #endif
13030         if( status ) return status;
13031 #else
13032         /* Draft 4 pthreads */
13033         status = pthread_create( &t, pthread_attr_default, task, NULL );
13034         if( status ) return errno;
13035
13036         /* give thread a chance to complete */
13037         /* it should remain joinable and hence detachable */
13038         sleep( 1 );
13039
13040         status = pthread_detach( &t );
13041         if( status ) return errno;
13042 #endif
13043
13044 #ifdef HAVE_LINUX_THREADS
13045         pthread_kill_other_threads_np();
13046 #endif
13047
13048         return 0;
13049
13050 ; return 0; }
13051 EOF
13052 if { (eval echo configure:13052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13053   rm -rf conftest*
13054   ol_cv_pthread_lpthread_lmach_lexc=yes
13055 else
13056   echo "configure: failed program was:" >&5
13057   cat conftest.$ac_ext >&5
13058   rm -rf conftest*
13059   ol_cv_pthread_lpthread_lmach_lexc=no
13060 fi
13061 rm -f conftest*
13062 else
13063   cat > conftest.$ac_ext <<EOF
13064 #line 13064 "configure"
13065 #include "confdefs.h"
13066 /* pthread test headers */
13067 #include <pthread.h>
13068 #if HAVE_PTHREADS < 7
13069 #include <errno.h>
13070 #endif
13071 #ifndef NULL
13072 #define NULL (void*)0
13073 #endif
13074
13075 static void *task(p)
13076         void *p;
13077 {
13078         return (void *) (p == NULL);
13079 }
13080
13081
13082 int main(argc, argv)
13083         int argc;
13084         char **argv;
13085 {
13086
13087         /* pthread test function */
13088 #ifndef PTHREAD_CREATE_DETACHED
13089 #define PTHREAD_CREATE_DETACHED 1
13090 #endif
13091         pthread_t t;
13092         int status;
13093         int detach = PTHREAD_CREATE_DETACHED;
13094
13095 #if HAVE_PTHREADS > 4
13096         /* Final pthreads */
13097         pthread_attr_t attr;
13098
13099         status = pthread_attr_init(&attr);
13100         if( status ) return status;
13101
13102 #if HAVE_PTHREADS < 7
13103         status = pthread_attr_setdetachstate(&attr, &detach);
13104         if( status < 0 ) status = errno;
13105 #else
13106         status = pthread_attr_setdetachstate(&attr, detach);
13107 #endif
13108         if( status ) return status;
13109         status = pthread_create( &t, &attr, task, NULL );
13110 #if HAVE_PTHREADS < 7
13111         if( status < 0 ) status = errno;
13112 #endif
13113         if( status ) return status;
13114 #else
13115         /* Draft 4 pthreads */
13116         status = pthread_create( &t, pthread_attr_default, task, NULL );
13117         if( status ) return errno;
13118
13119         /* give thread a chance to complete */
13120         /* it should remain joinable and hence detachable */
13121         sleep( 1 );
13122
13123         status = pthread_detach( &t );
13124         if( status ) return errno;
13125 #endif
13126
13127 #ifdef HAVE_LINUX_THREADS
13128         pthread_kill_other_threads_np();
13129 #endif
13130
13131         return 0;
13132
13133 }
13134
13135 EOF
13136 if { (eval echo configure:13136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13137 then
13138   ol_cv_pthread_lpthread_lmach_lexc=yes
13139 else
13140   echo "configure: failed program was:" >&5
13141   cat conftest.$ac_ext >&5
13142   rm -fr conftest*
13143   ol_cv_pthread_lpthread_lmach_lexc=no
13144 fi
13145 rm -fr conftest*
13146 fi
13147
13148
13149                 # restore the LIBS
13150                 LIBS="$ol_LIBS"
13151         
13152 fi
13153
13154 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13155
13156         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13157                 ol_link_pthreads="-lpthread -lmach -lexc"
13158                 ol_link_threads=posix
13159         fi
13160 fi
13161
13162
13163                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13164 if test "$ol_link_threads" = no ; then
13165         # try -lpthread -Wl,-woff,85
13166         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13167 echo "configure:13167: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13168 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13169   echo $ac_n "(cached) $ac_c" 1>&6
13170 else
13171   
13172                 # save the flags
13173                 ol_LIBS="$LIBS"
13174                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13175
13176                 if test "$cross_compiling" = yes; then
13177   cat > conftest.$ac_ext <<EOF
13178 #line 13178 "configure"
13179 #include "confdefs.h"
13180 /* pthread test headers */
13181 #include <pthread.h>
13182 #if HAVE_PTHREADS < 7
13183 #include <errno.h>
13184 #endif
13185 #ifndef NULL
13186 #define NULL (void*)0
13187 #endif
13188
13189 static void *task(p)
13190         void *p;
13191 {
13192         return (void *) (p == NULL);
13193 }
13194
13195 int main() {
13196
13197         /* pthread test function */
13198 #ifndef PTHREAD_CREATE_DETACHED
13199 #define PTHREAD_CREATE_DETACHED 1
13200 #endif
13201         pthread_t t;
13202         int status;
13203         int detach = PTHREAD_CREATE_DETACHED;
13204
13205 #if HAVE_PTHREADS > 4
13206         /* Final pthreads */
13207         pthread_attr_t attr;
13208
13209         status = pthread_attr_init(&attr);
13210         if( status ) return status;
13211
13212 #if HAVE_PTHREADS < 7
13213         status = pthread_attr_setdetachstate(&attr, &detach);
13214         if( status < 0 ) status = errno;
13215 #else
13216         status = pthread_attr_setdetachstate(&attr, detach);
13217 #endif
13218         if( status ) return status;
13219         status = pthread_create( &t, &attr, task, NULL );
13220 #if HAVE_PTHREADS < 7
13221         if( status < 0 ) status = errno;
13222 #endif
13223         if( status ) return status;
13224 #else
13225         /* Draft 4 pthreads */
13226         status = pthread_create( &t, pthread_attr_default, task, NULL );
13227         if( status ) return errno;
13228
13229         /* give thread a chance to complete */
13230         /* it should remain joinable and hence detachable */
13231         sleep( 1 );
13232
13233         status = pthread_detach( &t );
13234         if( status ) return errno;
13235 #endif
13236
13237 #ifdef HAVE_LINUX_THREADS
13238         pthread_kill_other_threads_np();
13239 #endif
13240
13241         return 0;
13242
13243 ; return 0; }
13244 EOF
13245 if { (eval echo configure:13245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13246   rm -rf conftest*
13247   ol_cv_pthread_lib_lpthread_woff=yes
13248 else
13249   echo "configure: failed program was:" >&5
13250   cat conftest.$ac_ext >&5
13251   rm -rf conftest*
13252   ol_cv_pthread_lib_lpthread_woff=no
13253 fi
13254 rm -f conftest*
13255 else
13256   cat > conftest.$ac_ext <<EOF
13257 #line 13257 "configure"
13258 #include "confdefs.h"
13259 /* pthread test headers */
13260 #include <pthread.h>
13261 #if HAVE_PTHREADS < 7
13262 #include <errno.h>
13263 #endif
13264 #ifndef NULL
13265 #define NULL (void*)0
13266 #endif
13267
13268 static void *task(p)
13269         void *p;
13270 {
13271         return (void *) (p == NULL);
13272 }
13273
13274
13275 int main(argc, argv)
13276         int argc;
13277         char **argv;
13278 {
13279
13280         /* pthread test function */
13281 #ifndef PTHREAD_CREATE_DETACHED
13282 #define PTHREAD_CREATE_DETACHED 1
13283 #endif
13284         pthread_t t;
13285         int status;
13286         int detach = PTHREAD_CREATE_DETACHED;
13287
13288 #if HAVE_PTHREADS > 4
13289         /* Final pthreads */
13290         pthread_attr_t attr;
13291
13292         status = pthread_attr_init(&attr);
13293         if( status ) return status;
13294
13295 #if HAVE_PTHREADS < 7
13296         status = pthread_attr_setdetachstate(&attr, &detach);
13297         if( status < 0 ) status = errno;
13298 #else
13299         status = pthread_attr_setdetachstate(&attr, detach);
13300 #endif
13301         if( status ) return status;
13302         status = pthread_create( &t, &attr, task, NULL );
13303 #if HAVE_PTHREADS < 7
13304         if( status < 0 ) status = errno;
13305 #endif
13306         if( status ) return status;
13307 #else
13308         /* Draft 4 pthreads */
13309         status = pthread_create( &t, pthread_attr_default, task, NULL );
13310         if( status ) return errno;
13311
13312         /* give thread a chance to complete */
13313         /* it should remain joinable and hence detachable */
13314         sleep( 1 );
13315
13316         status = pthread_detach( &t );
13317         if( status ) return errno;
13318 #endif
13319
13320 #ifdef HAVE_LINUX_THREADS
13321         pthread_kill_other_threads_np();
13322 #endif
13323
13324         return 0;
13325
13326 }
13327
13328 EOF
13329 if { (eval echo configure:13329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13330 then
13331   ol_cv_pthread_lib_lpthread_woff=yes
13332 else
13333   echo "configure: failed program was:" >&5
13334   cat conftest.$ac_ext >&5
13335   rm -fr conftest*
13336   ol_cv_pthread_lib_lpthread_woff=no
13337 fi
13338 rm -fr conftest*
13339 fi
13340
13341
13342                 # restore the LIBS
13343                 LIBS="$ol_LIBS"
13344         
13345 fi
13346
13347 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13348
13349         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13350                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13351                 ol_link_threads=posix
13352         fi
13353 fi
13354
13355
13356                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13357 if test "$ol_link_threads" = no ; then
13358         # try -lpthread
13359         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13360 echo "configure:13360: checking for pthread link with -lpthread" >&5
13361 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13362   echo $ac_n "(cached) $ac_c" 1>&6
13363 else
13364   
13365                 # save the flags
13366                 ol_LIBS="$LIBS"
13367                 LIBS="-lpthread $LIBS"
13368
13369                 if test "$cross_compiling" = yes; then
13370   cat > conftest.$ac_ext <<EOF
13371 #line 13371 "configure"
13372 #include "confdefs.h"
13373 /* pthread test headers */
13374 #include <pthread.h>
13375 #if HAVE_PTHREADS < 7
13376 #include <errno.h>
13377 #endif
13378 #ifndef NULL
13379 #define NULL (void*)0
13380 #endif
13381
13382 static void *task(p)
13383         void *p;
13384 {
13385         return (void *) (p == NULL);
13386 }
13387
13388 int main() {
13389
13390         /* pthread test function */
13391 #ifndef PTHREAD_CREATE_DETACHED
13392 #define PTHREAD_CREATE_DETACHED 1
13393 #endif
13394         pthread_t t;
13395         int status;
13396         int detach = PTHREAD_CREATE_DETACHED;
13397
13398 #if HAVE_PTHREADS > 4
13399         /* Final pthreads */
13400         pthread_attr_t attr;
13401
13402         status = pthread_attr_init(&attr);
13403         if( status ) return status;
13404
13405 #if HAVE_PTHREADS < 7
13406         status = pthread_attr_setdetachstate(&attr, &detach);
13407         if( status < 0 ) status = errno;
13408 #else
13409         status = pthread_attr_setdetachstate(&attr, detach);
13410 #endif
13411         if( status ) return status;
13412         status = pthread_create( &t, &attr, task, NULL );
13413 #if HAVE_PTHREADS < 7
13414         if( status < 0 ) status = errno;
13415 #endif
13416         if( status ) return status;
13417 #else
13418         /* Draft 4 pthreads */
13419         status = pthread_create( &t, pthread_attr_default, task, NULL );
13420         if( status ) return errno;
13421
13422         /* give thread a chance to complete */
13423         /* it should remain joinable and hence detachable */
13424         sleep( 1 );
13425
13426         status = pthread_detach( &t );
13427         if( status ) return errno;
13428 #endif
13429
13430 #ifdef HAVE_LINUX_THREADS
13431         pthread_kill_other_threads_np();
13432 #endif
13433
13434         return 0;
13435
13436 ; return 0; }
13437 EOF
13438 if { (eval echo configure:13438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13439   rm -rf conftest*
13440   ol_cv_pthread_lpthread=yes
13441 else
13442   echo "configure: failed program was:" >&5
13443   cat conftest.$ac_ext >&5
13444   rm -rf conftest*
13445   ol_cv_pthread_lpthread=no
13446 fi
13447 rm -f conftest*
13448 else
13449   cat > conftest.$ac_ext <<EOF
13450 #line 13450 "configure"
13451 #include "confdefs.h"
13452 /* pthread test headers */
13453 #include <pthread.h>
13454 #if HAVE_PTHREADS < 7
13455 #include <errno.h>
13456 #endif
13457 #ifndef NULL
13458 #define NULL (void*)0
13459 #endif
13460
13461 static void *task(p)
13462         void *p;
13463 {
13464         return (void *) (p == NULL);
13465 }
13466
13467
13468 int main(argc, argv)
13469         int argc;
13470         char **argv;
13471 {
13472
13473         /* pthread test function */
13474 #ifndef PTHREAD_CREATE_DETACHED
13475 #define PTHREAD_CREATE_DETACHED 1
13476 #endif
13477         pthread_t t;
13478         int status;
13479         int detach = PTHREAD_CREATE_DETACHED;
13480
13481 #if HAVE_PTHREADS > 4
13482         /* Final pthreads */
13483         pthread_attr_t attr;
13484
13485         status = pthread_attr_init(&attr);
13486         if( status ) return status;
13487
13488 #if HAVE_PTHREADS < 7
13489         status = pthread_attr_setdetachstate(&attr, &detach);
13490         if( status < 0 ) status = errno;
13491 #else
13492         status = pthread_attr_setdetachstate(&attr, detach);
13493 #endif
13494         if( status ) return status;
13495         status = pthread_create( &t, &attr, task, NULL );
13496 #if HAVE_PTHREADS < 7
13497         if( status < 0 ) status = errno;
13498 #endif
13499         if( status ) return status;
13500 #else
13501         /* Draft 4 pthreads */
13502         status = pthread_create( &t, pthread_attr_default, task, NULL );
13503         if( status ) return errno;
13504
13505         /* give thread a chance to complete */
13506         /* it should remain joinable and hence detachable */
13507         sleep( 1 );
13508
13509         status = pthread_detach( &t );
13510         if( status ) return errno;
13511 #endif
13512
13513 #ifdef HAVE_LINUX_THREADS
13514         pthread_kill_other_threads_np();
13515 #endif
13516
13517         return 0;
13518
13519 }
13520
13521 EOF
13522 if { (eval echo configure:13522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13523 then
13524   ol_cv_pthread_lpthread=yes
13525 else
13526   echo "configure: failed program was:" >&5
13527   cat conftest.$ac_ext >&5
13528   rm -fr conftest*
13529   ol_cv_pthread_lpthread=no
13530 fi
13531 rm -fr conftest*
13532 fi
13533
13534
13535                 # restore the LIBS
13536                 LIBS="$ol_LIBS"
13537         
13538 fi
13539
13540 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13541
13542         if test $ol_cv_pthread_lpthread = yes ; then
13543                 ol_link_pthreads="-lpthread"
13544                 ol_link_threads=posix
13545         fi
13546 fi
13547
13548                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13549 if test "$ol_link_threads" = no ; then
13550         # try -lc_r
13551         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13552 echo "configure:13552: checking for pthread link with -lc_r" >&5
13553 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13554   echo $ac_n "(cached) $ac_c" 1>&6
13555 else
13556   
13557                 # save the flags
13558                 ol_LIBS="$LIBS"
13559                 LIBS="-lc_r $LIBS"
13560
13561                 if test "$cross_compiling" = yes; then
13562   cat > conftest.$ac_ext <<EOF
13563 #line 13563 "configure"
13564 #include "confdefs.h"
13565 /* pthread test headers */
13566 #include <pthread.h>
13567 #if HAVE_PTHREADS < 7
13568 #include <errno.h>
13569 #endif
13570 #ifndef NULL
13571 #define NULL (void*)0
13572 #endif
13573
13574 static void *task(p)
13575         void *p;
13576 {
13577         return (void *) (p == NULL);
13578 }
13579
13580 int main() {
13581
13582         /* pthread test function */
13583 #ifndef PTHREAD_CREATE_DETACHED
13584 #define PTHREAD_CREATE_DETACHED 1
13585 #endif
13586         pthread_t t;
13587         int status;
13588         int detach = PTHREAD_CREATE_DETACHED;
13589
13590 #if HAVE_PTHREADS > 4
13591         /* Final pthreads */
13592         pthread_attr_t attr;
13593
13594         status = pthread_attr_init(&attr);
13595         if( status ) return status;
13596
13597 #if HAVE_PTHREADS < 7
13598         status = pthread_attr_setdetachstate(&attr, &detach);
13599         if( status < 0 ) status = errno;
13600 #else
13601         status = pthread_attr_setdetachstate(&attr, detach);
13602 #endif
13603         if( status ) return status;
13604         status = pthread_create( &t, &attr, task, NULL );
13605 #if HAVE_PTHREADS < 7
13606         if( status < 0 ) status = errno;
13607 #endif
13608         if( status ) return status;
13609 #else
13610         /* Draft 4 pthreads */
13611         status = pthread_create( &t, pthread_attr_default, task, NULL );
13612         if( status ) return errno;
13613
13614         /* give thread a chance to complete */
13615         /* it should remain joinable and hence detachable */
13616         sleep( 1 );
13617
13618         status = pthread_detach( &t );
13619         if( status ) return errno;
13620 #endif
13621
13622 #ifdef HAVE_LINUX_THREADS
13623         pthread_kill_other_threads_np();
13624 #endif
13625
13626         return 0;
13627
13628 ; return 0; }
13629 EOF
13630 if { (eval echo configure:13630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13631   rm -rf conftest*
13632   ol_cv_pthread_lc_r=yes
13633 else
13634   echo "configure: failed program was:" >&5
13635   cat conftest.$ac_ext >&5
13636   rm -rf conftest*
13637   ol_cv_pthread_lc_r=no
13638 fi
13639 rm -f conftest*
13640 else
13641   cat > conftest.$ac_ext <<EOF
13642 #line 13642 "configure"
13643 #include "confdefs.h"
13644 /* pthread test headers */
13645 #include <pthread.h>
13646 #if HAVE_PTHREADS < 7
13647 #include <errno.h>
13648 #endif
13649 #ifndef NULL
13650 #define NULL (void*)0
13651 #endif
13652
13653 static void *task(p)
13654         void *p;
13655 {
13656         return (void *) (p == NULL);
13657 }
13658
13659
13660 int main(argc, argv)
13661         int argc;
13662         char **argv;
13663 {
13664
13665         /* pthread test function */
13666 #ifndef PTHREAD_CREATE_DETACHED
13667 #define PTHREAD_CREATE_DETACHED 1
13668 #endif
13669         pthread_t t;
13670         int status;
13671         int detach = PTHREAD_CREATE_DETACHED;
13672
13673 #if HAVE_PTHREADS > 4
13674         /* Final pthreads */
13675         pthread_attr_t attr;
13676
13677         status = pthread_attr_init(&attr);
13678         if( status ) return status;
13679
13680 #if HAVE_PTHREADS < 7
13681         status = pthread_attr_setdetachstate(&attr, &detach);
13682         if( status < 0 ) status = errno;
13683 #else
13684         status = pthread_attr_setdetachstate(&attr, detach);
13685 #endif
13686         if( status ) return status;
13687         status = pthread_create( &t, &attr, task, NULL );
13688 #if HAVE_PTHREADS < 7
13689         if( status < 0 ) status = errno;
13690 #endif
13691         if( status ) return status;
13692 #else
13693         /* Draft 4 pthreads */
13694         status = pthread_create( &t, pthread_attr_default, task, NULL );
13695         if( status ) return errno;
13696
13697         /* give thread a chance to complete */
13698         /* it should remain joinable and hence detachable */
13699         sleep( 1 );
13700
13701         status = pthread_detach( &t );
13702         if( status ) return errno;
13703 #endif
13704
13705 #ifdef HAVE_LINUX_THREADS
13706         pthread_kill_other_threads_np();
13707 #endif
13708
13709         return 0;
13710
13711 }
13712
13713 EOF
13714 if { (eval echo configure:13714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13715 then
13716   ol_cv_pthread_lc_r=yes
13717 else
13718   echo "configure: failed program was:" >&5
13719   cat conftest.$ac_ext >&5
13720   rm -fr conftest*
13721   ol_cv_pthread_lc_r=no
13722 fi
13723 rm -fr conftest*
13724 fi
13725
13726
13727                 # restore the LIBS
13728                 LIBS="$ol_LIBS"
13729         
13730 fi
13731
13732 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13733
13734         if test $ol_cv_pthread_lc_r = yes ; then
13735                 ol_link_pthreads="-lc_r"
13736                 ol_link_threads=posix
13737         fi
13738 fi
13739
13740
13741                 # Pthread try link: -threads (ol_cv_pthread_threads)
13742 if test "$ol_link_threads" = no ; then
13743         # try -threads
13744         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13745 echo "configure:13745: checking for pthread link with -threads" >&5
13746 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13747   echo $ac_n "(cached) $ac_c" 1>&6
13748 else
13749   
13750                 # save the flags
13751                 ol_LIBS="$LIBS"
13752                 LIBS="-threads $LIBS"
13753
13754                 if test "$cross_compiling" = yes; then
13755   cat > conftest.$ac_ext <<EOF
13756 #line 13756 "configure"
13757 #include "confdefs.h"
13758 /* pthread test headers */
13759 #include <pthread.h>
13760 #if HAVE_PTHREADS < 7
13761 #include <errno.h>
13762 #endif
13763 #ifndef NULL
13764 #define NULL (void*)0
13765 #endif
13766
13767 static void *task(p)
13768         void *p;
13769 {
13770         return (void *) (p == NULL);
13771 }
13772
13773 int main() {
13774
13775         /* pthread test function */
13776 #ifndef PTHREAD_CREATE_DETACHED
13777 #define PTHREAD_CREATE_DETACHED 1
13778 #endif
13779         pthread_t t;
13780         int status;
13781         int detach = PTHREAD_CREATE_DETACHED;
13782
13783 #if HAVE_PTHREADS > 4
13784         /* Final pthreads */
13785         pthread_attr_t attr;
13786
13787         status = pthread_attr_init(&attr);
13788         if( status ) return status;
13789
13790 #if HAVE_PTHREADS < 7
13791         status = pthread_attr_setdetachstate(&attr, &detach);
13792         if( status < 0 ) status = errno;
13793 #else
13794         status = pthread_attr_setdetachstate(&attr, detach);
13795 #endif
13796         if( status ) return status;
13797         status = pthread_create( &t, &attr, task, NULL );
13798 #if HAVE_PTHREADS < 7
13799         if( status < 0 ) status = errno;
13800 #endif
13801         if( status ) return status;
13802 #else
13803         /* Draft 4 pthreads */
13804         status = pthread_create( &t, pthread_attr_default, task, NULL );
13805         if( status ) return errno;
13806
13807         /* give thread a chance to complete */
13808         /* it should remain joinable and hence detachable */
13809         sleep( 1 );
13810
13811         status = pthread_detach( &t );
13812         if( status ) return errno;
13813 #endif
13814
13815 #ifdef HAVE_LINUX_THREADS
13816         pthread_kill_other_threads_np();
13817 #endif
13818
13819         return 0;
13820
13821 ; return 0; }
13822 EOF
13823 if { (eval echo configure:13823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13824   rm -rf conftest*
13825   ol_cv_pthread_threads=yes
13826 else
13827   echo "configure: failed program was:" >&5
13828   cat conftest.$ac_ext >&5
13829   rm -rf conftest*
13830   ol_cv_pthread_threads=no
13831 fi
13832 rm -f conftest*
13833 else
13834   cat > conftest.$ac_ext <<EOF
13835 #line 13835 "configure"
13836 #include "confdefs.h"
13837 /* pthread test headers */
13838 #include <pthread.h>
13839 #if HAVE_PTHREADS < 7
13840 #include <errno.h>
13841 #endif
13842 #ifndef NULL
13843 #define NULL (void*)0
13844 #endif
13845
13846 static void *task(p)
13847         void *p;
13848 {
13849         return (void *) (p == NULL);
13850 }
13851
13852
13853 int main(argc, argv)
13854         int argc;
13855         char **argv;
13856 {
13857
13858         /* pthread test function */
13859 #ifndef PTHREAD_CREATE_DETACHED
13860 #define PTHREAD_CREATE_DETACHED 1
13861 #endif
13862         pthread_t t;
13863         int status;
13864         int detach = PTHREAD_CREATE_DETACHED;
13865
13866 #if HAVE_PTHREADS > 4
13867         /* Final pthreads */
13868         pthread_attr_t attr;
13869
13870         status = pthread_attr_init(&attr);
13871         if( status ) return status;
13872
13873 #if HAVE_PTHREADS < 7
13874         status = pthread_attr_setdetachstate(&attr, &detach);
13875         if( status < 0 ) status = errno;
13876 #else
13877         status = pthread_attr_setdetachstate(&attr, detach);
13878 #endif
13879         if( status ) return status;
13880         status = pthread_create( &t, &attr, task, NULL );
13881 #if HAVE_PTHREADS < 7
13882         if( status < 0 ) status = errno;
13883 #endif
13884         if( status ) return status;
13885 #else
13886         /* Draft 4 pthreads */
13887         status = pthread_create( &t, pthread_attr_default, task, NULL );
13888         if( status ) return errno;
13889
13890         /* give thread a chance to complete */
13891         /* it should remain joinable and hence detachable */
13892         sleep( 1 );
13893
13894         status = pthread_detach( &t );
13895         if( status ) return errno;
13896 #endif
13897
13898 #ifdef HAVE_LINUX_THREADS
13899         pthread_kill_other_threads_np();
13900 #endif
13901
13902         return 0;
13903
13904 }
13905
13906 EOF
13907 if { (eval echo configure:13907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13908 then
13909   ol_cv_pthread_threads=yes
13910 else
13911   echo "configure: failed program was:" >&5
13912   cat conftest.$ac_ext >&5
13913   rm -fr conftest*
13914   ol_cv_pthread_threads=no
13915 fi
13916 rm -fr conftest*
13917 fi
13918
13919
13920                 # restore the LIBS
13921                 LIBS="$ol_LIBS"
13922         
13923 fi
13924
13925 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13926
13927         if test $ol_cv_pthread_threads = yes ; then
13928                 ol_link_pthreads="-threads"
13929                 ol_link_threads=posix
13930         fi
13931 fi
13932
13933
13934                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13935 if test "$ol_link_threads" = no ; then
13936         # try -lpthreads -lmach -lexc -lc_r
13937         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13938 echo "configure:13938: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13939 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13940   echo $ac_n "(cached) $ac_c" 1>&6
13941 else
13942   
13943                 # save the flags
13944                 ol_LIBS="$LIBS"
13945                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13946
13947                 if test "$cross_compiling" = yes; then
13948   cat > conftest.$ac_ext <<EOF
13949 #line 13949 "configure"
13950 #include "confdefs.h"
13951 /* pthread test headers */
13952 #include <pthread.h>
13953 #if HAVE_PTHREADS < 7
13954 #include <errno.h>
13955 #endif
13956 #ifndef NULL
13957 #define NULL (void*)0
13958 #endif
13959
13960 static void *task(p)
13961         void *p;
13962 {
13963         return (void *) (p == NULL);
13964 }
13965
13966 int main() {
13967
13968         /* pthread test function */
13969 #ifndef PTHREAD_CREATE_DETACHED
13970 #define PTHREAD_CREATE_DETACHED 1
13971 #endif
13972         pthread_t t;
13973         int status;
13974         int detach = PTHREAD_CREATE_DETACHED;
13975
13976 #if HAVE_PTHREADS > 4
13977         /* Final pthreads */
13978         pthread_attr_t attr;
13979
13980         status = pthread_attr_init(&attr);
13981         if( status ) return status;
13982
13983 #if HAVE_PTHREADS < 7
13984         status = pthread_attr_setdetachstate(&attr, &detach);
13985         if( status < 0 ) status = errno;
13986 #else
13987         status = pthread_attr_setdetachstate(&attr, detach);
13988 #endif
13989         if( status ) return status;
13990         status = pthread_create( &t, &attr, task, NULL );
13991 #if HAVE_PTHREADS < 7
13992         if( status < 0 ) status = errno;
13993 #endif
13994         if( status ) return status;
13995 #else
13996         /* Draft 4 pthreads */
13997         status = pthread_create( &t, pthread_attr_default, task, NULL );
13998         if( status ) return errno;
13999
14000         /* give thread a chance to complete */
14001         /* it should remain joinable and hence detachable */
14002         sleep( 1 );
14003
14004         status = pthread_detach( &t );
14005         if( status ) return errno;
14006 #endif
14007
14008 #ifdef HAVE_LINUX_THREADS
14009         pthread_kill_other_threads_np();
14010 #endif
14011
14012         return 0;
14013
14014 ; return 0; }
14015 EOF
14016 if { (eval echo configure:14016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14017   rm -rf conftest*
14018   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14019 else
14020   echo "configure: failed program was:" >&5
14021   cat conftest.$ac_ext >&5
14022   rm -rf conftest*
14023   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14024 fi
14025 rm -f conftest*
14026 else
14027   cat > conftest.$ac_ext <<EOF
14028 #line 14028 "configure"
14029 #include "confdefs.h"
14030 /* pthread test headers */
14031 #include <pthread.h>
14032 #if HAVE_PTHREADS < 7
14033 #include <errno.h>
14034 #endif
14035 #ifndef NULL
14036 #define NULL (void*)0
14037 #endif
14038
14039 static void *task(p)
14040         void *p;
14041 {
14042         return (void *) (p == NULL);
14043 }
14044
14045
14046 int main(argc, argv)
14047         int argc;
14048         char **argv;
14049 {
14050
14051         /* pthread test function */
14052 #ifndef PTHREAD_CREATE_DETACHED
14053 #define PTHREAD_CREATE_DETACHED 1
14054 #endif
14055         pthread_t t;
14056         int status;
14057         int detach = PTHREAD_CREATE_DETACHED;
14058
14059 #if HAVE_PTHREADS > 4
14060         /* Final pthreads */
14061         pthread_attr_t attr;
14062
14063         status = pthread_attr_init(&attr);
14064         if( status ) return status;
14065
14066 #if HAVE_PTHREADS < 7
14067         status = pthread_attr_setdetachstate(&attr, &detach);
14068         if( status < 0 ) status = errno;
14069 #else
14070         status = pthread_attr_setdetachstate(&attr, detach);
14071 #endif
14072         if( status ) return status;
14073         status = pthread_create( &t, &attr, task, NULL );
14074 #if HAVE_PTHREADS < 7
14075         if( status < 0 ) status = errno;
14076 #endif
14077         if( status ) return status;
14078 #else
14079         /* Draft 4 pthreads */
14080         status = pthread_create( &t, pthread_attr_default, task, NULL );
14081         if( status ) return errno;
14082
14083         /* give thread a chance to complete */
14084         /* it should remain joinable and hence detachable */
14085         sleep( 1 );
14086
14087         status = pthread_detach( &t );
14088         if( status ) return errno;
14089 #endif
14090
14091 #ifdef HAVE_LINUX_THREADS
14092         pthread_kill_other_threads_np();
14093 #endif
14094
14095         return 0;
14096
14097 }
14098
14099 EOF
14100 if { (eval echo configure:14100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14101 then
14102   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14103 else
14104   echo "configure: failed program was:" >&5
14105   cat conftest.$ac_ext >&5
14106   rm -fr conftest*
14107   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14108 fi
14109 rm -fr conftest*
14110 fi
14111
14112
14113                 # restore the LIBS
14114                 LIBS="$ol_LIBS"
14115         
14116 fi
14117
14118 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14119
14120         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14121                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14122                 ol_link_threads=posix
14123         fi
14124 fi
14125
14126                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14127 if test "$ol_link_threads" = no ; then
14128         # try -lpthreads -lmach -lexc
14129         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14130 echo "configure:14130: checking for pthread link with -lpthreads -lmach -lexc" >&5
14131 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14132   echo $ac_n "(cached) $ac_c" 1>&6
14133 else
14134   
14135                 # save the flags
14136                 ol_LIBS="$LIBS"
14137                 LIBS="-lpthreads -lmach -lexc $LIBS"
14138
14139                 if test "$cross_compiling" = yes; then
14140   cat > conftest.$ac_ext <<EOF
14141 #line 14141 "configure"
14142 #include "confdefs.h"
14143 /* pthread test headers */
14144 #include <pthread.h>
14145 #if HAVE_PTHREADS < 7
14146 #include <errno.h>
14147 #endif
14148 #ifndef NULL
14149 #define NULL (void*)0
14150 #endif
14151
14152 static void *task(p)
14153         void *p;
14154 {
14155         return (void *) (p == NULL);
14156 }
14157
14158 int main() {
14159
14160         /* pthread test function */
14161 #ifndef PTHREAD_CREATE_DETACHED
14162 #define PTHREAD_CREATE_DETACHED 1
14163 #endif
14164         pthread_t t;
14165         int status;
14166         int detach = PTHREAD_CREATE_DETACHED;
14167
14168 #if HAVE_PTHREADS > 4
14169         /* Final pthreads */
14170         pthread_attr_t attr;
14171
14172         status = pthread_attr_init(&attr);
14173         if( status ) return status;
14174
14175 #if HAVE_PTHREADS < 7
14176         status = pthread_attr_setdetachstate(&attr, &detach);
14177         if( status < 0 ) status = errno;
14178 #else
14179         status = pthread_attr_setdetachstate(&attr, detach);
14180 #endif
14181         if( status ) return status;
14182         status = pthread_create( &t, &attr, task, NULL );
14183 #if HAVE_PTHREADS < 7
14184         if( status < 0 ) status = errno;
14185 #endif
14186         if( status ) return status;
14187 #else
14188         /* Draft 4 pthreads */
14189         status = pthread_create( &t, pthread_attr_default, task, NULL );
14190         if( status ) return errno;
14191
14192         /* give thread a chance to complete */
14193         /* it should remain joinable and hence detachable */
14194         sleep( 1 );
14195
14196         status = pthread_detach( &t );
14197         if( status ) return errno;
14198 #endif
14199
14200 #ifdef HAVE_LINUX_THREADS
14201         pthread_kill_other_threads_np();
14202 #endif
14203
14204         return 0;
14205
14206 ; return 0; }
14207 EOF
14208 if { (eval echo configure:14208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14209   rm -rf conftest*
14210   ol_cv_pthread_lpthreads_lmach_lexc=yes
14211 else
14212   echo "configure: failed program was:" >&5
14213   cat conftest.$ac_ext >&5
14214   rm -rf conftest*
14215   ol_cv_pthread_lpthreads_lmach_lexc=no
14216 fi
14217 rm -f conftest*
14218 else
14219   cat > conftest.$ac_ext <<EOF
14220 #line 14220 "configure"
14221 #include "confdefs.h"
14222 /* pthread test headers */
14223 #include <pthread.h>
14224 #if HAVE_PTHREADS < 7
14225 #include <errno.h>
14226 #endif
14227 #ifndef NULL
14228 #define NULL (void*)0
14229 #endif
14230
14231 static void *task(p)
14232         void *p;
14233 {
14234         return (void *) (p == NULL);
14235 }
14236
14237
14238 int main(argc, argv)
14239         int argc;
14240         char **argv;
14241 {
14242
14243         /* pthread test function */
14244 #ifndef PTHREAD_CREATE_DETACHED
14245 #define PTHREAD_CREATE_DETACHED 1
14246 #endif
14247         pthread_t t;
14248         int status;
14249         int detach = PTHREAD_CREATE_DETACHED;
14250
14251 #if HAVE_PTHREADS > 4
14252         /* Final pthreads */
14253         pthread_attr_t attr;
14254
14255         status = pthread_attr_init(&attr);
14256         if( status ) return status;
14257
14258 #if HAVE_PTHREADS < 7
14259         status = pthread_attr_setdetachstate(&attr, &detach);
14260         if( status < 0 ) status = errno;
14261 #else
14262         status = pthread_attr_setdetachstate(&attr, detach);
14263 #endif
14264         if( status ) return status;
14265         status = pthread_create( &t, &attr, task, NULL );
14266 #if HAVE_PTHREADS < 7
14267         if( status < 0 ) status = errno;
14268 #endif
14269         if( status ) return status;
14270 #else
14271         /* Draft 4 pthreads */
14272         status = pthread_create( &t, pthread_attr_default, task, NULL );
14273         if( status ) return errno;
14274
14275         /* give thread a chance to complete */
14276         /* it should remain joinable and hence detachable */
14277         sleep( 1 );
14278
14279         status = pthread_detach( &t );
14280         if( status ) return errno;
14281 #endif
14282
14283 #ifdef HAVE_LINUX_THREADS
14284         pthread_kill_other_threads_np();
14285 #endif
14286
14287         return 0;
14288
14289 }
14290
14291 EOF
14292 if { (eval echo configure:14292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14293 then
14294   ol_cv_pthread_lpthreads_lmach_lexc=yes
14295 else
14296   echo "configure: failed program was:" >&5
14297   cat conftest.$ac_ext >&5
14298   rm -fr conftest*
14299   ol_cv_pthread_lpthreads_lmach_lexc=no
14300 fi
14301 rm -fr conftest*
14302 fi
14303
14304
14305                 # restore the LIBS
14306                 LIBS="$ol_LIBS"
14307         
14308 fi
14309
14310 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14311
14312         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14313                 ol_link_pthreads="-lpthreads -lmach -lexc"
14314                 ol_link_threads=posix
14315         fi
14316 fi
14317
14318                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14319 if test "$ol_link_threads" = no ; then
14320         # try -lpthreads -lexc
14321         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14322 echo "configure:14322: checking for pthread link with -lpthreads -lexc" >&5
14323 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14324   echo $ac_n "(cached) $ac_c" 1>&6
14325 else
14326   
14327                 # save the flags
14328                 ol_LIBS="$LIBS"
14329                 LIBS="-lpthreads -lexc $LIBS"
14330
14331                 if test "$cross_compiling" = yes; then
14332   cat > conftest.$ac_ext <<EOF
14333 #line 14333 "configure"
14334 #include "confdefs.h"
14335 /* pthread test headers */
14336 #include <pthread.h>
14337 #if HAVE_PTHREADS < 7
14338 #include <errno.h>
14339 #endif
14340 #ifndef NULL
14341 #define NULL (void*)0
14342 #endif
14343
14344 static void *task(p)
14345         void *p;
14346 {
14347         return (void *) (p == NULL);
14348 }
14349
14350 int main() {
14351
14352         /* pthread test function */
14353 #ifndef PTHREAD_CREATE_DETACHED
14354 #define PTHREAD_CREATE_DETACHED 1
14355 #endif
14356         pthread_t t;
14357         int status;
14358         int detach = PTHREAD_CREATE_DETACHED;
14359
14360 #if HAVE_PTHREADS > 4
14361         /* Final pthreads */
14362         pthread_attr_t attr;
14363
14364         status = pthread_attr_init(&attr);
14365         if( status ) return status;
14366
14367 #if HAVE_PTHREADS < 7
14368         status = pthread_attr_setdetachstate(&attr, &detach);
14369         if( status < 0 ) status = errno;
14370 #else
14371         status = pthread_attr_setdetachstate(&attr, detach);
14372 #endif
14373         if( status ) return status;
14374         status = pthread_create( &t, &attr, task, NULL );
14375 #if HAVE_PTHREADS < 7
14376         if( status < 0 ) status = errno;
14377 #endif
14378         if( status ) return status;
14379 #else
14380         /* Draft 4 pthreads */
14381         status = pthread_create( &t, pthread_attr_default, task, NULL );
14382         if( status ) return errno;
14383
14384         /* give thread a chance to complete */
14385         /* it should remain joinable and hence detachable */
14386         sleep( 1 );
14387
14388         status = pthread_detach( &t );
14389         if( status ) return errno;
14390 #endif
14391
14392 #ifdef HAVE_LINUX_THREADS
14393         pthread_kill_other_threads_np();
14394 #endif
14395
14396         return 0;
14397
14398 ; return 0; }
14399 EOF
14400 if { (eval echo configure:14400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14401   rm -rf conftest*
14402   ol_cv_pthread_lpthreads_lexc=yes
14403 else
14404   echo "configure: failed program was:" >&5
14405   cat conftest.$ac_ext >&5
14406   rm -rf conftest*
14407   ol_cv_pthread_lpthreads_lexc=no
14408 fi
14409 rm -f conftest*
14410 else
14411   cat > conftest.$ac_ext <<EOF
14412 #line 14412 "configure"
14413 #include "confdefs.h"
14414 /* pthread test headers */
14415 #include <pthread.h>
14416 #if HAVE_PTHREADS < 7
14417 #include <errno.h>
14418 #endif
14419 #ifndef NULL
14420 #define NULL (void*)0
14421 #endif
14422
14423 static void *task(p)
14424         void *p;
14425 {
14426         return (void *) (p == NULL);
14427 }
14428
14429
14430 int main(argc, argv)
14431         int argc;
14432         char **argv;
14433 {
14434
14435         /* pthread test function */
14436 #ifndef PTHREAD_CREATE_DETACHED
14437 #define PTHREAD_CREATE_DETACHED 1
14438 #endif
14439         pthread_t t;
14440         int status;
14441         int detach = PTHREAD_CREATE_DETACHED;
14442
14443 #if HAVE_PTHREADS > 4
14444         /* Final pthreads */
14445         pthread_attr_t attr;
14446
14447         status = pthread_attr_init(&attr);
14448         if( status ) return status;
14449
14450 #if HAVE_PTHREADS < 7
14451         status = pthread_attr_setdetachstate(&attr, &detach);
14452         if( status < 0 ) status = errno;
14453 #else
14454         status = pthread_attr_setdetachstate(&attr, detach);
14455 #endif
14456         if( status ) return status;
14457         status = pthread_create( &t, &attr, task, NULL );
14458 #if HAVE_PTHREADS < 7
14459         if( status < 0 ) status = errno;
14460 #endif
14461         if( status ) return status;
14462 #else
14463         /* Draft 4 pthreads */
14464         status = pthread_create( &t, pthread_attr_default, task, NULL );
14465         if( status ) return errno;
14466
14467         /* give thread a chance to complete */
14468         /* it should remain joinable and hence detachable */
14469         sleep( 1 );
14470
14471         status = pthread_detach( &t );
14472         if( status ) return errno;
14473 #endif
14474
14475 #ifdef HAVE_LINUX_THREADS
14476         pthread_kill_other_threads_np();
14477 #endif
14478
14479         return 0;
14480
14481 }
14482
14483 EOF
14484 if { (eval echo configure:14484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14485 then
14486   ol_cv_pthread_lpthreads_lexc=yes
14487 else
14488   echo "configure: failed program was:" >&5
14489   cat conftest.$ac_ext >&5
14490   rm -fr conftest*
14491   ol_cv_pthread_lpthreads_lexc=no
14492 fi
14493 rm -fr conftest*
14494 fi
14495
14496
14497                 # restore the LIBS
14498                 LIBS="$ol_LIBS"
14499         
14500 fi
14501
14502 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14503
14504         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14505                 ol_link_pthreads="-lpthreads -lexc"
14506                 ol_link_threads=posix
14507         fi
14508 fi
14509
14510
14511                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14512 if test "$ol_link_threads" = no ; then
14513         # try -lpthreads
14514         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14515 echo "configure:14515: checking for pthread link with -lpthreads" >&5
14516 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14517   echo $ac_n "(cached) $ac_c" 1>&6
14518 else
14519   
14520                 # save the flags
14521                 ol_LIBS="$LIBS"
14522                 LIBS="-lpthreads $LIBS"
14523
14524                 if test "$cross_compiling" = yes; then
14525   cat > conftest.$ac_ext <<EOF
14526 #line 14526 "configure"
14527 #include "confdefs.h"
14528 /* pthread test headers */
14529 #include <pthread.h>
14530 #if HAVE_PTHREADS < 7
14531 #include <errno.h>
14532 #endif
14533 #ifndef NULL
14534 #define NULL (void*)0
14535 #endif
14536
14537 static void *task(p)
14538         void *p;
14539 {
14540         return (void *) (p == NULL);
14541 }
14542
14543 int main() {
14544
14545         /* pthread test function */
14546 #ifndef PTHREAD_CREATE_DETACHED
14547 #define PTHREAD_CREATE_DETACHED 1
14548 #endif
14549         pthread_t t;
14550         int status;
14551         int detach = PTHREAD_CREATE_DETACHED;
14552
14553 #if HAVE_PTHREADS > 4
14554         /* Final pthreads */
14555         pthread_attr_t attr;
14556
14557         status = pthread_attr_init(&attr);
14558         if( status ) return status;
14559
14560 #if HAVE_PTHREADS < 7
14561         status = pthread_attr_setdetachstate(&attr, &detach);
14562         if( status < 0 ) status = errno;
14563 #else
14564         status = pthread_attr_setdetachstate(&attr, detach);
14565 #endif
14566         if( status ) return status;
14567         status = pthread_create( &t, &attr, task, NULL );
14568 #if HAVE_PTHREADS < 7
14569         if( status < 0 ) status = errno;
14570 #endif
14571         if( status ) return status;
14572 #else
14573         /* Draft 4 pthreads */
14574         status = pthread_create( &t, pthread_attr_default, task, NULL );
14575         if( status ) return errno;
14576
14577         /* give thread a chance to complete */
14578         /* it should remain joinable and hence detachable */
14579         sleep( 1 );
14580
14581         status = pthread_detach( &t );
14582         if( status ) return errno;
14583 #endif
14584
14585 #ifdef HAVE_LINUX_THREADS
14586         pthread_kill_other_threads_np();
14587 #endif
14588
14589         return 0;
14590
14591 ; return 0; }
14592 EOF
14593 if { (eval echo configure:14593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14594   rm -rf conftest*
14595   ol_cv_pthread_lib_lpthreads=yes
14596 else
14597   echo "configure: failed program was:" >&5
14598   cat conftest.$ac_ext >&5
14599   rm -rf conftest*
14600   ol_cv_pthread_lib_lpthreads=no
14601 fi
14602 rm -f conftest*
14603 else
14604   cat > conftest.$ac_ext <<EOF
14605 #line 14605 "configure"
14606 #include "confdefs.h"
14607 /* pthread test headers */
14608 #include <pthread.h>
14609 #if HAVE_PTHREADS < 7
14610 #include <errno.h>
14611 #endif
14612 #ifndef NULL
14613 #define NULL (void*)0
14614 #endif
14615
14616 static void *task(p)
14617         void *p;
14618 {
14619         return (void *) (p == NULL);
14620 }
14621
14622
14623 int main(argc, argv)
14624         int argc;
14625         char **argv;
14626 {
14627
14628         /* pthread test function */
14629 #ifndef PTHREAD_CREATE_DETACHED
14630 #define PTHREAD_CREATE_DETACHED 1
14631 #endif
14632         pthread_t t;
14633         int status;
14634         int detach = PTHREAD_CREATE_DETACHED;
14635
14636 #if HAVE_PTHREADS > 4
14637         /* Final pthreads */
14638         pthread_attr_t attr;
14639
14640         status = pthread_attr_init(&attr);
14641         if( status ) return status;
14642
14643 #if HAVE_PTHREADS < 7
14644         status = pthread_attr_setdetachstate(&attr, &detach);
14645         if( status < 0 ) status = errno;
14646 #else
14647         status = pthread_attr_setdetachstate(&attr, detach);
14648 #endif
14649         if( status ) return status;
14650         status = pthread_create( &t, &attr, task, NULL );
14651 #if HAVE_PTHREADS < 7
14652         if( status < 0 ) status = errno;
14653 #endif
14654         if( status ) return status;
14655 #else
14656         /* Draft 4 pthreads */
14657         status = pthread_create( &t, pthread_attr_default, task, NULL );
14658         if( status ) return errno;
14659
14660         /* give thread a chance to complete */
14661         /* it should remain joinable and hence detachable */
14662         sleep( 1 );
14663
14664         status = pthread_detach( &t );
14665         if( status ) return errno;
14666 #endif
14667
14668 #ifdef HAVE_LINUX_THREADS
14669         pthread_kill_other_threads_np();
14670 #endif
14671
14672         return 0;
14673
14674 }
14675
14676 EOF
14677 if { (eval echo configure:14677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14678 then
14679   ol_cv_pthread_lib_lpthreads=yes
14680 else
14681   echo "configure: failed program was:" >&5
14682   cat conftest.$ac_ext >&5
14683   rm -fr conftest*
14684   ol_cv_pthread_lib_lpthreads=no
14685 fi
14686 rm -fr conftest*
14687 fi
14688
14689
14690                 # restore the LIBS
14691                 LIBS="$ol_LIBS"
14692         
14693 fi
14694
14695 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14696
14697         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14698                 ol_link_pthreads="-lpthreads"
14699                 ol_link_threads=posix
14700         fi
14701 fi
14702
14703
14704                 if test $ol_link_threads != no ; then
14705                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14706
14707                                                 save_CPPFLAGS="$CPPFLAGS"
14708                         save_LIBS="$LIBS"
14709                         LIBS="$LTHREAD_LIBS $LIBS"
14710
14711                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14712 do
14713 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14714 echo "configure:14714: checking for $ac_func" >&5
14715 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14716   echo $ac_n "(cached) $ac_c" 1>&6
14717 else
14718   cat > conftest.$ac_ext <<EOF
14719 #line 14719 "configure"
14720 #include "confdefs.h"
14721 /* System header to define __stub macros and hopefully few prototypes,
14722     which can conflict with char $ac_func(); below.  */
14723 #include <assert.h>
14724 /* Override any gcc2 internal prototype to avoid an error.  */
14725 /* We use char because int might match the return type of a gcc2
14726     builtin and then its argument prototype would still apply.  */
14727 char $ac_func();
14728 char (*f)();
14729
14730 int main() {
14731
14732 /* The GNU C library defines this for functions which it implements
14733     to always fail with ENOSYS.  Some functions are actually named
14734     something starting with __ and the normal name is an alias.  */
14735 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14736 choke me
14737 #else
14738 f = $ac_func;
14739 #endif
14740
14741 ; return 0; }
14742 EOF
14743 if { (eval echo configure:14743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14744   rm -rf conftest*
14745   eval "ac_cv_func_$ac_func=yes"
14746 else
14747   echo "configure: failed program was:" >&5
14748   cat conftest.$ac_ext >&5
14749   rm -rf conftest*
14750   eval "ac_cv_func_$ac_func=no"
14751 fi
14752 rm -f conftest*
14753 fi
14754
14755 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14756   echo "$ac_t""yes" 1>&6
14757     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14758   cat >> confdefs.h <<EOF
14759 #define $ac_tr_func 1
14760 EOF
14761  
14762 else
14763   echo "$ac_t""no" 1>&6
14764 fi
14765 done
14766
14767
14768                         if test $ac_cv_func_sched_yield = no -a \
14769                                 $ac_cv_func_pthread_yield = no -a \
14770                                 $ac_cv_func_thr_yield = no ; then
14771                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14772 echo "configure:14772: checking for sched_yield in -lrt" >&5
14773 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14774 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14775   echo $ac_n "(cached) $ac_c" 1>&6
14776 else
14777   ac_save_LIBS="$LIBS"
14778 LIBS="-lrt  $LIBS"
14779 cat > conftest.$ac_ext <<EOF
14780 #line 14780 "configure"
14781 #include "confdefs.h"
14782 /* Override any gcc2 internal prototype to avoid an error.  */
14783 /* We use char because int might match the return type of a gcc2
14784     builtin and then its argument prototype would still apply.  */
14785 char sched_yield();
14786
14787 int main() {
14788 sched_yield()
14789 ; return 0; }
14790 EOF
14791 if { (eval echo configure:14791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14792   rm -rf conftest*
14793   eval "ac_cv_lib_$ac_lib_var=yes"
14794 else
14795   echo "configure: failed program was:" >&5
14796   cat conftest.$ac_ext >&5
14797   rm -rf conftest*
14798   eval "ac_cv_lib_$ac_lib_var=no"
14799 fi
14800 rm -f conftest*
14801 LIBS="$ac_save_LIBS"
14802
14803 fi
14804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14805   echo "$ac_t""yes" 1>&6
14806   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14807                                         cat >> confdefs.h <<\EOF
14808 #define HAVE_SCHED_YIELD 1
14809 EOF
14810
14811                                         ac_cv_func_sched_yield=yes
14812 else
14813   echo "$ac_t""no" 1>&6
14814 ac_cv_func_sched_yield=no
14815 fi
14816
14817                         fi
14818                         if test $ac_cv_func_sched_yield = no -a \
14819                                 $ac_cv_func_pthread_yield = no -a \
14820                                 "$ac_cv_func_thr_yield" = no ; then
14821                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14822                         fi
14823
14824                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14825 do
14826 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14827 echo "configure:14827: checking for $ac_func" >&5
14828 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14829   echo $ac_n "(cached) $ac_c" 1>&6
14830 else
14831   cat > conftest.$ac_ext <<EOF
14832 #line 14832 "configure"
14833 #include "confdefs.h"
14834 /* System header to define __stub macros and hopefully few prototypes,
14835     which can conflict with char $ac_func(); below.  */
14836 #include <assert.h>
14837 /* Override any gcc2 internal prototype to avoid an error.  */
14838 /* We use char because int might match the return type of a gcc2
14839     builtin and then its argument prototype would still apply.  */
14840 char $ac_func();
14841 char (*f)();
14842
14843 int main() {
14844
14845 /* The GNU C library defines this for functions which it implements
14846     to always fail with ENOSYS.  Some functions are actually named
14847     something starting with __ and the normal name is an alias.  */
14848 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14849 choke me
14850 #else
14851 f = $ac_func;
14852 #endif
14853
14854 ; return 0; }
14855 EOF
14856 if { (eval echo configure:14856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14857   rm -rf conftest*
14858   eval "ac_cv_func_$ac_func=yes"
14859 else
14860   echo "configure: failed program was:" >&5
14861   cat conftest.$ac_ext >&5
14862   rm -rf conftest*
14863   eval "ac_cv_func_$ac_func=no"
14864 fi
14865 rm -f conftest*
14866 fi
14867
14868 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14869   echo "$ac_t""yes" 1>&6
14870     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14871   cat >> confdefs.h <<EOF
14872 #define $ac_tr_func 1
14873 EOF
14874  
14875 else
14876   echo "$ac_t""no" 1>&6
14877 fi
14878 done
14879
14880
14881                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14882 echo "configure:14882: checking for pthread_detach with <pthread.h>" >&5
14883 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14884   echo $ac_n "(cached) $ac_c" 1>&6
14885 else
14886   
14887                                                                 cat > conftest.$ac_ext <<EOF
14888 #line 14888 "configure"
14889 #include "confdefs.h"
14890
14891 #include <pthread.h>
14892 #ifndef NULL
14893 #define NULL (void*)0
14894 #endif
14895
14896 int main() {
14897 pthread_detach(NULL);
14898 ; return 0; }
14899 EOF
14900 if { (eval echo configure:14900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14901   rm -rf conftest*
14902   ol_cv_func_pthread_detach=yes
14903 else
14904   echo "configure: failed program was:" >&5
14905   cat conftest.$ac_ext >&5
14906   rm -rf conftest*
14907   ol_cv_func_pthread_detach=no
14908 fi
14909 rm -f conftest*
14910                         
14911 fi
14912
14913 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14914
14915                         if test $ol_cv_func_pthread_detach = no ; then
14916                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14917                         fi
14918
14919                         cat >> confdefs.h <<\EOF
14920 #define HAVE_PTHREAD_DETACH 1
14921 EOF
14922
14923
14924                                                 for ac_func in \
14925                                 pthread_setconcurrency \
14926                                 pthread_getconcurrency \
14927                                 thr_setconcurrency \
14928                                 thr_getconcurrency \
14929                         
14930 do
14931 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14932 echo "configure:14932: checking for $ac_func" >&5
14933 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14934   echo $ac_n "(cached) $ac_c" 1>&6
14935 else
14936   cat > conftest.$ac_ext <<EOF
14937 #line 14937 "configure"
14938 #include "confdefs.h"
14939 /* System header to define __stub macros and hopefully few prototypes,
14940     which can conflict with char $ac_func(); below.  */
14941 #include <assert.h>
14942 /* Override any gcc2 internal prototype to avoid an error.  */
14943 /* We use char because int might match the return type of a gcc2
14944     builtin and then its argument prototype would still apply.  */
14945 char $ac_func();
14946 char (*f)();
14947
14948 int main() {
14949
14950 /* The GNU C library defines this for functions which it implements
14951     to always fail with ENOSYS.  Some functions are actually named
14952     something starting with __ and the normal name is an alias.  */
14953 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14954 choke me
14955 #else
14956 f = $ac_func;
14957 #endif
14958
14959 ; return 0; }
14960 EOF
14961 if { (eval echo configure:14961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14962   rm -rf conftest*
14963   eval "ac_cv_func_$ac_func=yes"
14964 else
14965   echo "configure: failed program was:" >&5
14966   cat conftest.$ac_ext >&5
14967   rm -rf conftest*
14968   eval "ac_cv_func_$ac_func=no"
14969 fi
14970 rm -f conftest*
14971 fi
14972
14973 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14974   echo "$ac_t""yes" 1>&6
14975     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14976   cat >> confdefs.h <<EOF
14977 #define $ac_tr_func 1
14978 EOF
14979  
14980 else
14981   echo "$ac_t""no" 1>&6
14982 fi
14983 done
14984
14985
14986                         
14987         for ac_func in pthread_kill_other_threads_np
14988 do
14989 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14990 echo "configure:14990: checking for $ac_func" >&5
14991 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14992   echo $ac_n "(cached) $ac_c" 1>&6
14993 else
14994   cat > conftest.$ac_ext <<EOF
14995 #line 14995 "configure"
14996 #include "confdefs.h"
14997 /* System header to define __stub macros and hopefully few prototypes,
14998     which can conflict with char $ac_func(); below.  */
14999 #include <assert.h>
15000 /* Override any gcc2 internal prototype to avoid an error.  */
15001 /* We use char because int might match the return type of a gcc2
15002     builtin and then its argument prototype would still apply.  */
15003 char $ac_func();
15004 char (*f)();
15005
15006 int main() {
15007
15008 /* The GNU C library defines this for functions which it implements
15009     to always fail with ENOSYS.  Some functions are actually named
15010     something starting with __ and the normal name is an alias.  */
15011 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15012 choke me
15013 #else
15014 f = $ac_func;
15015 #endif
15016
15017 ; return 0; }
15018 EOF
15019 if { (eval echo configure:15019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15020   rm -rf conftest*
15021   eval "ac_cv_func_$ac_func=yes"
15022 else
15023   echo "configure: failed program was:" >&5
15024   cat conftest.$ac_ext >&5
15025   rm -rf conftest*
15026   eval "ac_cv_func_$ac_func=no"
15027 fi
15028 rm -f conftest*
15029 fi
15030
15031 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15032   echo "$ac_t""yes" 1>&6
15033     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15034   cat >> confdefs.h <<EOF
15035 #define $ac_tr_func 1
15036 EOF
15037  
15038 else
15039   echo "$ac_t""no" 1>&6
15040 fi
15041 done
15042
15043         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15044 echo "configure:15044: checking for LinuxThreads implementation" >&5
15045 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15046   echo $ac_n "(cached) $ac_c" 1>&6
15047 else
15048   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15049 fi
15050
15051 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15052
15053                         
15054         
15055         
15056         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15057 echo "configure:15057: checking for LinuxThreads consistency" >&5
15058 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15059   echo $ac_n "(cached) $ac_c" 1>&6
15060 else
15061   
15062                 if test $ol_cv_header_linux_threads = yes -a \
15063                         $ol_cv_sys_linux_threads = yes; then
15064                         ol_cv_linux_threads=yes
15065                 elif test $ol_cv_header_linux_threads = no -a \
15066                         $ol_cv_sys_linux_threads = no; then
15067                         ol_cv_linux_threads=no
15068                 else
15069                         ol_cv_linux_threads=error
15070                 fi
15071         
15072 fi
15073
15074 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15075
15076
15077                         if test $ol_cv_linux_threads = error; then
15078                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15079                         fi
15080
15081                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15082 echo "configure:15082: checking if pthread_create() works" >&5
15083 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15084   echo $ac_n "(cached) $ac_c" 1>&6
15085 else
15086   
15087                         if test "$cross_compiling" = yes; then
15088                                 ol_cv_pthread_create_works=yes
15089 else
15090   cat > conftest.$ac_ext <<EOF
15091 #line 15091 "configure"
15092 #include "confdefs.h"
15093 /* pthread test headers */
15094 #include <pthread.h>
15095 #if HAVE_PTHREADS < 7
15096 #include <errno.h>
15097 #endif
15098 #ifndef NULL
15099 #define NULL (void*)0
15100 #endif
15101
15102 static void *task(p)
15103         void *p;
15104 {
15105         return (void *) (p == NULL);
15106 }
15107
15108
15109 int main(argc, argv)
15110         int argc;
15111         char **argv;
15112 {
15113
15114         /* pthread test function */
15115 #ifndef PTHREAD_CREATE_DETACHED
15116 #define PTHREAD_CREATE_DETACHED 1
15117 #endif
15118         pthread_t t;
15119         int status;
15120         int detach = PTHREAD_CREATE_DETACHED;
15121
15122 #if HAVE_PTHREADS > 4
15123         /* Final pthreads */
15124         pthread_attr_t attr;
15125
15126         status = pthread_attr_init(&attr);
15127         if( status ) return status;
15128
15129 #if HAVE_PTHREADS < 7
15130         status = pthread_attr_setdetachstate(&attr, &detach);
15131         if( status < 0 ) status = errno;
15132 #else
15133         status = pthread_attr_setdetachstate(&attr, detach);
15134 #endif
15135         if( status ) return status;
15136         status = pthread_create( &t, &attr, task, NULL );
15137 #if HAVE_PTHREADS < 7
15138         if( status < 0 ) status = errno;
15139 #endif
15140         if( status ) return status;
15141 #else
15142         /* Draft 4 pthreads */
15143         status = pthread_create( &t, pthread_attr_default, task, NULL );
15144         if( status ) return errno;
15145
15146         /* give thread a chance to complete */
15147         /* it should remain joinable and hence detachable */
15148         sleep( 1 );
15149
15150         status = pthread_detach( &t );
15151         if( status ) return errno;
15152 #endif
15153
15154 #ifdef HAVE_LINUX_THREADS
15155         pthread_kill_other_threads_np();
15156 #endif
15157
15158         return 0;
15159
15160 }
15161
15162 EOF
15163 if { (eval echo configure:15163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15164 then
15165   ol_cv_pthread_create_works=yes
15166 else
15167   echo "configure: failed program was:" >&5
15168   cat conftest.$ac_ext >&5
15169   rm -fr conftest*
15170   ol_cv_pthread_create_works=no
15171 fi
15172 rm -fr conftest*
15173 fi
15174
15175 fi
15176
15177 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15178
15179                         if test $ol_cv_pthread_create_works = no ; then
15180                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15181                         fi
15182
15183                                                 if test $ol_with_yielding_select = auto ; then
15184                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15185 echo "configure:15185: checking if select yields when using pthreads" >&5
15186 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15187   echo $ac_n "(cached) $ac_c" 1>&6
15188 else
15189   
15190                                 if test "$cross_compiling" = yes; then
15191   ol_cv_pthread_select_yields=cross
15192 else
15193   cat > conftest.$ac_ext <<EOF
15194 #line 15194 "configure"
15195 #include "confdefs.h"
15196
15197 #include <sys/types.h>
15198 #include <sys/time.h>
15199 #include <unistd.h>
15200 #include <pthread.h>
15201 #ifndef NULL
15202 #define NULL (void*) 0
15203 #endif
15204
15205 static int fildes[2];
15206
15207 static void *task(p)
15208         void *p;
15209 {
15210         int i;
15211         struct timeval tv;
15212
15213         fd_set rfds;
15214
15215         tv.tv_sec=10;
15216         tv.tv_usec=0;
15217
15218         FD_ZERO(&rfds);
15219         FD_SET(fildes[0], &rfds);
15220
15221         /* we're not interested in any fds */
15222         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15223
15224         if(i < 0) {
15225                 perror("select");
15226                 exit(10);
15227         }
15228
15229         exit(0); /* if we exit here, the select blocked the whole process */
15230 }
15231
15232 int main(argc, argv)
15233         int argc;
15234         char **argv;
15235 {
15236         pthread_t t;
15237
15238         /* create a pipe to select */
15239         if(pipe(&fildes[0])) {
15240                 perror("select");
15241                 exit(1);
15242         }
15243
15244 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15245         (void) pthread_setconcurrency(2);
15246 #else
15247 #ifdef HAVE_THR_SETCONCURRENCY
15248         /* Set Solaris LWP concurrency to 2 */
15249         thr_setconcurrency(2);
15250 #endif
15251 #endif
15252
15253 #if HAVE_PTHREADS < 6
15254         pthread_create(&t, pthread_attr_default, task, NULL);
15255 #else
15256         pthread_create(&t, NULL, task, NULL);
15257 #endif
15258
15259         /* make sure task runs first */
15260 #if HAVE_THR_YIELD
15261         thr_yield();
15262 #elif defined( HAVE_SCHED_YIELD )
15263         sched_yield();
15264 #elif defined( HAVE_PTHREAD_YIELD )
15265         pthread_yield();
15266 #endif
15267
15268         exit(2);
15269 }
15270 EOF
15271 if { (eval echo configure:15271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15272 then
15273   ol_cv_pthread_select_yields=no
15274 else
15275   echo "configure: failed program was:" >&5
15276   cat conftest.$ac_ext >&5
15277   rm -fr conftest*
15278   ol_cv_pthread_select_yields=yes
15279 fi
15280 rm -fr conftest*
15281 fi
15282
15283 fi
15284
15285 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15286
15287                                 if test $ol_cv_pthread_select_yields = cross ; then
15288                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15289                                 fi
15290
15291                                 if test $ol_cv_pthread_select_yields = yes ; then
15292                                         ol_with_yielding_select=yes
15293                                 fi
15294                         fi
15295
15296                                                 CPPFLAGS="$save_CPPFLAGS"
15297                         LIBS="$save_LIBS"
15298                 else
15299                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15300                 fi
15301         fi
15302
15303         if test $ol_with_threads = posix ; then
15304                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15305         fi
15306 fi
15307
15308 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15309         -o $ol_with_threads = mach ; then
15310
15311                 for ac_hdr in mach/cthreads.h cthreads.h
15312 do
15313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15315 echo "configure:15315: checking for $ac_hdr" >&5
15316 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15317   echo $ac_n "(cached) $ac_c" 1>&6
15318 else
15319   cat > conftest.$ac_ext <<EOF
15320 #line 15320 "configure"
15321 #include "confdefs.h"
15322 #include <$ac_hdr>
15323 EOF
15324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15325 { (eval echo configure:15325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15327 if test -z "$ac_err"; then
15328   rm -rf conftest*
15329   eval "ac_cv_header_$ac_safe=yes"
15330 else
15331   echo "$ac_err" >&5
15332   echo "configure: failed program was:" >&5
15333   cat conftest.$ac_ext >&5
15334   rm -rf conftest*
15335   eval "ac_cv_header_$ac_safe=no"
15336 fi
15337 rm -f conftest*
15338 fi
15339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15340   echo "$ac_t""yes" 1>&6
15341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15342   cat >> confdefs.h <<EOF
15343 #define $ac_tr_hdr 1
15344 EOF
15345  
15346 else
15347   echo "$ac_t""no" 1>&6
15348 fi
15349 done
15350
15351         if test $ac_cv_header_mach_cthreads_h = yes ; then
15352                 ol_with_threads=found
15353
15354                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15355 echo "configure:15355: checking for cthread_fork" >&5
15356 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15357   echo $ac_n "(cached) $ac_c" 1>&6
15358 else
15359   cat > conftest.$ac_ext <<EOF
15360 #line 15360 "configure"
15361 #include "confdefs.h"
15362 /* System header to define __stub macros and hopefully few prototypes,
15363     which can conflict with char cthread_fork(); below.  */
15364 #include <assert.h>
15365 /* Override any gcc2 internal prototype to avoid an error.  */
15366 /* We use char because int might match the return type of a gcc2
15367     builtin and then its argument prototype would still apply.  */
15368 char cthread_fork();
15369 char (*f)();
15370
15371 int main() {
15372
15373 /* The GNU C library defines this for functions which it implements
15374     to always fail with ENOSYS.  Some functions are actually named
15375     something starting with __ and the normal name is an alias.  */
15376 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15377 choke me
15378 #else
15379 f = cthread_fork;
15380 #endif
15381
15382 ; return 0; }
15383 EOF
15384 if { (eval echo configure:15384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15385   rm -rf conftest*
15386   eval "ac_cv_func_cthread_fork=yes"
15387 else
15388   echo "configure: failed program was:" >&5
15389   cat conftest.$ac_ext >&5
15390   rm -rf conftest*
15391   eval "ac_cv_func_cthread_fork=no"
15392 fi
15393 rm -f conftest*
15394 fi
15395
15396 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15397   echo "$ac_t""yes" 1>&6
15398   ol_link_threads=yes
15399 else
15400   echo "$ac_t""no" 1>&6
15401 fi
15402
15403
15404                 if test $ol_link_threads = no ; then
15405                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15406 echo "configure:15406: checking for cthread_fork with -all_load" >&5
15407 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15408   echo $ac_n "(cached) $ac_c" 1>&6
15409 else
15410   
15411                                                                 save_LIBS="$LIBS"
15412                                 LIBS="-all_load $LIBS"
15413                                 cat > conftest.$ac_ext <<EOF
15414 #line 15414 "configure"
15415 #include "confdefs.h"
15416 #include <mach/cthreads.h>
15417 int main() {
15418
15419                                         cthread_fork((void *)0, (void *)0);
15420                                         
15421 ; return 0; }
15422 EOF
15423 if { (eval echo configure:15423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15424   rm -rf conftest*
15425   ol_cv_cthread_all_load=yes
15426 else
15427   echo "configure: failed program was:" >&5
15428   cat conftest.$ac_ext >&5
15429   rm -rf conftest*
15430   ol_cv_cthread_all_load=no
15431 fi
15432 rm -f conftest*
15433                                                                 LIBS="$save_LIBS"
15434                         
15435 fi
15436
15437 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15438
15439                         if test $ol_cv_cthread_all_load = yes ; then
15440                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15441                                 ol_link_threads=mach
15442                                 ol_with_threads=found
15443                         fi
15444                 fi
15445
15446         elif test $ac_cv_header_cthreads_h = yes ; then
15447                                 
15448                 ol_with_threads=found
15449  
15450                                 save_LIBS="$LIBS"
15451                 LIBS="$LIBS -lthreads"
15452                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15453 echo "configure:15453: checking for cthread_fork" >&5
15454 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15455   echo $ac_n "(cached) $ac_c" 1>&6
15456 else
15457   cat > conftest.$ac_ext <<EOF
15458 #line 15458 "configure"
15459 #include "confdefs.h"
15460 /* System header to define __stub macros and hopefully few prototypes,
15461     which can conflict with char cthread_fork(); below.  */
15462 #include <assert.h>
15463 /* Override any gcc2 internal prototype to avoid an error.  */
15464 /* We use char because int might match the return type of a gcc2
15465     builtin and then its argument prototype would still apply.  */
15466 char cthread_fork();
15467 char (*f)();
15468
15469 int main() {
15470
15471 /* The GNU C library defines this for functions which it implements
15472     to always fail with ENOSYS.  Some functions are actually named
15473     something starting with __ and the normal name is an alias.  */
15474 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15475 choke me
15476 #else
15477 f = cthread_fork;
15478 #endif
15479
15480 ; return 0; }
15481 EOF
15482 if { (eval echo configure:15482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15483   rm -rf conftest*
15484   eval "ac_cv_func_cthread_fork=yes"
15485 else
15486   echo "configure: failed program was:" >&5
15487   cat conftest.$ac_ext >&5
15488   rm -rf conftest*
15489   eval "ac_cv_func_cthread_fork=no"
15490 fi
15491 rm -f conftest*
15492 fi
15493
15494 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15495   echo "$ac_t""yes" 1>&6
15496   ol_link_threads=yes
15497 else
15498   echo "$ac_t""no" 1>&6
15499 fi
15500
15501                 LIBS="$save_LIBS"
15502
15503                 if test $ol_link_threads = yes ; then
15504                         LTHREAD_LIBS="-lthreads"
15505                         ol_link_threads=mach
15506                         ol_with_threads=found
15507                 else
15508                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15509                 fi
15510
15511         elif test $ol_with_threads = mach ; then
15512                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15513         fi
15514
15515         if test $ol_link_threads = mach ; then
15516                 cat >> confdefs.h <<\EOF
15517 #define HAVE_MACH_CTHREADS 1
15518 EOF
15519
15520         elif test $ol_with_threads = found ; then
15521                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15522         fi
15523 fi
15524
15525 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15526         -o $ol_with_threads = pth ; then
15527
15528         for ac_hdr in pth.h
15529 do
15530 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15531 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15532 echo "configure:15532: checking for $ac_hdr" >&5
15533 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15534   echo $ac_n "(cached) $ac_c" 1>&6
15535 else
15536   cat > conftest.$ac_ext <<EOF
15537 #line 15537 "configure"
15538 #include "confdefs.h"
15539 #include <$ac_hdr>
15540 EOF
15541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15542 { (eval echo configure:15542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15543 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15544 if test -z "$ac_err"; then
15545   rm -rf conftest*
15546   eval "ac_cv_header_$ac_safe=yes"
15547 else
15548   echo "$ac_err" >&5
15549   echo "configure: failed program was:" >&5
15550   cat conftest.$ac_ext >&5
15551   rm -rf conftest*
15552   eval "ac_cv_header_$ac_safe=no"
15553 fi
15554 rm -f conftest*
15555 fi
15556 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15557   echo "$ac_t""yes" 1>&6
15558     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15559   cat >> confdefs.h <<EOF
15560 #define $ac_tr_hdr 1
15561 EOF
15562  
15563 else
15564   echo "$ac_t""no" 1>&6
15565 fi
15566 done
15567
15568
15569         if test $ac_cv_header_pth_h = yes ; then
15570                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15571 echo "configure:15571: checking for pth_version in -lpth" >&5
15572 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15573 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15574   echo $ac_n "(cached) $ac_c" 1>&6
15575 else
15576   ac_save_LIBS="$LIBS"
15577 LIBS="-lpth  $LIBS"
15578 cat > conftest.$ac_ext <<EOF
15579 #line 15579 "configure"
15580 #include "confdefs.h"
15581 /* Override any gcc2 internal prototype to avoid an error.  */
15582 /* We use char because int might match the return type of a gcc2
15583     builtin and then its argument prototype would still apply.  */
15584 char pth_version();
15585
15586 int main() {
15587 pth_version()
15588 ; return 0; }
15589 EOF
15590 if { (eval echo configure:15590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15591   rm -rf conftest*
15592   eval "ac_cv_lib_$ac_lib_var=yes"
15593 else
15594   echo "configure: failed program was:" >&5
15595   cat conftest.$ac_ext >&5
15596   rm -rf conftest*
15597   eval "ac_cv_lib_$ac_lib_var=no"
15598 fi
15599 rm -f conftest*
15600 LIBS="$ac_save_LIBS"
15601
15602 fi
15603 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15604   echo "$ac_t""yes" 1>&6
15605   have_pth=yes
15606 else
15607   echo "$ac_t""no" 1>&6
15608 have_pth=no
15609 fi
15610
15611
15612                 if test $have_pth = yes ; then
15613                         cat >> confdefs.h <<\EOF
15614 #define HAVE_GNU_PTH 1
15615 EOF
15616
15617                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15618                         ol_link_threads=pth
15619                         ol_with_threads=found
15620
15621                         if test $ol_with_yielding_select = auto ; then
15622                                 ol_with_yielding_select=yes
15623                         fi
15624                 fi
15625         fi
15626 fi
15627
15628 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15629         -o $ol_with_threads = lwp ; then
15630
15631                 for ac_hdr in thread.h synch.h
15632 do
15633 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15634 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15635 echo "configure:15635: checking for $ac_hdr" >&5
15636 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15637   echo $ac_n "(cached) $ac_c" 1>&6
15638 else
15639   cat > conftest.$ac_ext <<EOF
15640 #line 15640 "configure"
15641 #include "confdefs.h"
15642 #include <$ac_hdr>
15643 EOF
15644 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15645 { (eval echo configure:15645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15646 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15647 if test -z "$ac_err"; then
15648   rm -rf conftest*
15649   eval "ac_cv_header_$ac_safe=yes"
15650 else
15651   echo "$ac_err" >&5
15652   echo "configure: failed program was:" >&5
15653   cat conftest.$ac_ext >&5
15654   rm -rf conftest*
15655   eval "ac_cv_header_$ac_safe=no"
15656 fi
15657 rm -f conftest*
15658 fi
15659 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15660   echo "$ac_t""yes" 1>&6
15661     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15662   cat >> confdefs.h <<EOF
15663 #define $ac_tr_hdr 1
15664 EOF
15665  
15666 else
15667   echo "$ac_t""no" 1>&6
15668 fi
15669 done
15670
15671         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15672                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15673 echo "configure:15673: checking for thr_create in -lthread" >&5
15674 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15675 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15676   echo $ac_n "(cached) $ac_c" 1>&6
15677 else
15678   ac_save_LIBS="$LIBS"
15679 LIBS="-lthread  $LIBS"
15680 cat > conftest.$ac_ext <<EOF
15681 #line 15681 "configure"
15682 #include "confdefs.h"
15683 /* Override any gcc2 internal prototype to avoid an error.  */
15684 /* We use char because int might match the return type of a gcc2
15685     builtin and then its argument prototype would still apply.  */
15686 char thr_create();
15687
15688 int main() {
15689 thr_create()
15690 ; return 0; }
15691 EOF
15692 if { (eval echo configure:15692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15693   rm -rf conftest*
15694   eval "ac_cv_lib_$ac_lib_var=yes"
15695 else
15696   echo "configure: failed program was:" >&5
15697   cat conftest.$ac_ext >&5
15698   rm -rf conftest*
15699   eval "ac_cv_lib_$ac_lib_var=no"
15700 fi
15701 rm -f conftest*
15702 LIBS="$ac_save_LIBS"
15703
15704 fi
15705 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15706   echo "$ac_t""yes" 1>&6
15707   have_thr=yes
15708 else
15709   echo "$ac_t""no" 1>&6
15710 have_thr=no
15711 fi
15712
15713
15714                 if test $have_thr = yes ; then
15715                         cat >> confdefs.h <<\EOF
15716 #define HAVE_THR 1
15717 EOF
15718
15719                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15720                         ol_link_threads=thr
15721
15722                         if test $ol_with_yielding_select = auto ; then
15723                                 ol_with_yielding_select=yes
15724                         fi
15725
15726                                                 for ac_func in \
15727                                 thr_setconcurrency \
15728                                 thr_getconcurrency \
15729                         
15730 do
15731 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15732 echo "configure:15732: checking for $ac_func" >&5
15733 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15734   echo $ac_n "(cached) $ac_c" 1>&6
15735 else
15736   cat > conftest.$ac_ext <<EOF
15737 #line 15737 "configure"
15738 #include "confdefs.h"
15739 /* System header to define __stub macros and hopefully few prototypes,
15740     which can conflict with char $ac_func(); below.  */
15741 #include <assert.h>
15742 /* Override any gcc2 internal prototype to avoid an error.  */
15743 /* We use char because int might match the return type of a gcc2
15744     builtin and then its argument prototype would still apply.  */
15745 char $ac_func();
15746 char (*f)();
15747
15748 int main() {
15749
15750 /* The GNU C library defines this for functions which it implements
15751     to always fail with ENOSYS.  Some functions are actually named
15752     something starting with __ and the normal name is an alias.  */
15753 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15754 choke me
15755 #else
15756 f = $ac_func;
15757 #endif
15758
15759 ; return 0; }
15760 EOF
15761 if { (eval echo configure:15761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15762   rm -rf conftest*
15763   eval "ac_cv_func_$ac_func=yes"
15764 else
15765   echo "configure: failed program was:" >&5
15766   cat conftest.$ac_ext >&5
15767   rm -rf conftest*
15768   eval "ac_cv_func_$ac_func=no"
15769 fi
15770 rm -f conftest*
15771 fi
15772
15773 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15774   echo "$ac_t""yes" 1>&6
15775     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15776   cat >> confdefs.h <<EOF
15777 #define $ac_tr_func 1
15778 EOF
15779  
15780 else
15781   echo "$ac_t""no" 1>&6
15782 fi
15783 done
15784
15785                 fi
15786         fi
15787
15788                 for ac_hdr in lwp/lwp.h
15789 do
15790 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15791 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15792 echo "configure:15792: checking for $ac_hdr" >&5
15793 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15794   echo $ac_n "(cached) $ac_c" 1>&6
15795 else
15796   cat > conftest.$ac_ext <<EOF
15797 #line 15797 "configure"
15798 #include "confdefs.h"
15799 #include <$ac_hdr>
15800 EOF
15801 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15802 { (eval echo configure:15802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15803 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15804 if test -z "$ac_err"; then
15805   rm -rf conftest*
15806   eval "ac_cv_header_$ac_safe=yes"
15807 else
15808   echo "$ac_err" >&5
15809   echo "configure: failed program was:" >&5
15810   cat conftest.$ac_ext >&5
15811   rm -rf conftest*
15812   eval "ac_cv_header_$ac_safe=no"
15813 fi
15814 rm -f conftest*
15815 fi
15816 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15817   echo "$ac_t""yes" 1>&6
15818     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15819   cat >> confdefs.h <<EOF
15820 #define $ac_tr_hdr 1
15821 EOF
15822  
15823 else
15824   echo "$ac_t""no" 1>&6
15825 fi
15826 done
15827
15828         if test $ac_cv_header_lwp_lwp_h = yes ; then
15829                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15830 echo "configure:15830: checking for lwp_create in -llwp" >&5
15831 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15832 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15833   echo $ac_n "(cached) $ac_c" 1>&6
15834 else
15835   ac_save_LIBS="$LIBS"
15836 LIBS="-llwp  $LIBS"
15837 cat > conftest.$ac_ext <<EOF
15838 #line 15838 "configure"
15839 #include "confdefs.h"
15840 /* Override any gcc2 internal prototype to avoid an error.  */
15841 /* We use char because int might match the return type of a gcc2
15842     builtin and then its argument prototype would still apply.  */
15843 char lwp_create();
15844
15845 int main() {
15846 lwp_create()
15847 ; return 0; }
15848 EOF
15849 if { (eval echo configure:15849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15850   rm -rf conftest*
15851   eval "ac_cv_lib_$ac_lib_var=yes"
15852 else
15853   echo "configure: failed program was:" >&5
15854   cat conftest.$ac_ext >&5
15855   rm -rf conftest*
15856   eval "ac_cv_lib_$ac_lib_var=no"
15857 fi
15858 rm -f conftest*
15859 LIBS="$ac_save_LIBS"
15860
15861 fi
15862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15863   echo "$ac_t""yes" 1>&6
15864   have_lwp=yes
15865 else
15866   echo "$ac_t""no" 1>&6
15867 have_lwp=no
15868 fi
15869
15870
15871                 if test $have_lwp = yes ; then
15872                         cat >> confdefs.h <<\EOF
15873 #define HAVE_LWP 1
15874 EOF
15875
15876                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15877                         ol_link_threads=lwp
15878
15879                         if test $ol_with_yielding_select = auto ; then
15880                                 ol_with_yielding_select=no
15881                         fi
15882                 fi
15883         fi
15884 fi
15885
15886 if test $ol_with_yielding_select = yes ; then
15887         cat >> confdefs.h <<\EOF
15888 #define HAVE_YIELDING_SELECT 1
15889 EOF
15890
15891 fi
15892
15893 if test $ol_with_threads = manual ; then
15894                 ol_link_threads=yes
15895
15896         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15897
15898         for ac_hdr in pthread.h sched.h
15899 do
15900 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15901 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15902 echo "configure:15902: checking for $ac_hdr" >&5
15903 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15904   echo $ac_n "(cached) $ac_c" 1>&6
15905 else
15906   cat > conftest.$ac_ext <<EOF
15907 #line 15907 "configure"
15908 #include "confdefs.h"
15909 #include <$ac_hdr>
15910 EOF
15911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15912 { (eval echo configure:15912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15914 if test -z "$ac_err"; then
15915   rm -rf conftest*
15916   eval "ac_cv_header_$ac_safe=yes"
15917 else
15918   echo "$ac_err" >&5
15919   echo "configure: failed program was:" >&5
15920   cat conftest.$ac_ext >&5
15921   rm -rf conftest*
15922   eval "ac_cv_header_$ac_safe=no"
15923 fi
15924 rm -f conftest*
15925 fi
15926 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15927   echo "$ac_t""yes" 1>&6
15928     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15929   cat >> confdefs.h <<EOF
15930 #define $ac_tr_hdr 1
15931 EOF
15932  
15933 else
15934   echo "$ac_t""no" 1>&6
15935 fi
15936 done
15937
15938         for ac_func in sched_yield pthread_yield
15939 do
15940 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15941 echo "configure:15941: checking for $ac_func" >&5
15942 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15943   echo $ac_n "(cached) $ac_c" 1>&6
15944 else
15945   cat > conftest.$ac_ext <<EOF
15946 #line 15946 "configure"
15947 #include "confdefs.h"
15948 /* System header to define __stub macros and hopefully few prototypes,
15949     which can conflict with char $ac_func(); below.  */
15950 #include <assert.h>
15951 /* Override any gcc2 internal prototype to avoid an error.  */
15952 /* We use char because int might match the return type of a gcc2
15953     builtin and then its argument prototype would still apply.  */
15954 char $ac_func();
15955 char (*f)();
15956
15957 int main() {
15958
15959 /* The GNU C library defines this for functions which it implements
15960     to always fail with ENOSYS.  Some functions are actually named
15961     something starting with __ and the normal name is an alias.  */
15962 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15963 choke me
15964 #else
15965 f = $ac_func;
15966 #endif
15967
15968 ; return 0; }
15969 EOF
15970 if { (eval echo configure:15970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15971   rm -rf conftest*
15972   eval "ac_cv_func_$ac_func=yes"
15973 else
15974   echo "configure: failed program was:" >&5
15975   cat conftest.$ac_ext >&5
15976   rm -rf conftest*
15977   eval "ac_cv_func_$ac_func=no"
15978 fi
15979 rm -f conftest*
15980 fi
15981
15982 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15983   echo "$ac_t""yes" 1>&6
15984     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15985   cat >> confdefs.h <<EOF
15986 #define $ac_tr_func 1
15987 EOF
15988  
15989 else
15990   echo "$ac_t""no" 1>&6
15991 fi
15992 done
15993
15994         
15995         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15996 echo "configure:15996: checking for LinuxThreads pthread.h" >&5
15997 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15998   echo $ac_n "(cached) $ac_c" 1>&6
15999 else
16000   cat > conftest.$ac_ext <<EOF
16001 #line 16001 "configure"
16002 #include "confdefs.h"
16003 #include <pthread.h>
16004 EOF
16005 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16006   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16007   rm -rf conftest*
16008   ol_cv_header_linux_threads=yes
16009 else
16010   rm -rf conftest*
16011   ol_cv_header_linux_threads=no
16012 fi
16013 rm -f conftest*
16014
16015                 
16016 fi
16017
16018 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16019         if test $ol_cv_header_linux_threads = yes; then
16020                 cat >> confdefs.h <<\EOF
16021 #define HAVE_LINUX_THREADS 1
16022 EOF
16023
16024         fi
16025
16026
16027         for ac_hdr in mach/cthreads.h
16028 do
16029 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16030 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16031 echo "configure:16031: checking for $ac_hdr" >&5
16032 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16033   echo $ac_n "(cached) $ac_c" 1>&6
16034 else
16035   cat > conftest.$ac_ext <<EOF
16036 #line 16036 "configure"
16037 #include "confdefs.h"
16038 #include <$ac_hdr>
16039 EOF
16040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16041 { (eval echo configure:16041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16043 if test -z "$ac_err"; then
16044   rm -rf conftest*
16045   eval "ac_cv_header_$ac_safe=yes"
16046 else
16047   echo "$ac_err" >&5
16048   echo "configure: failed program was:" >&5
16049   cat conftest.$ac_ext >&5
16050   rm -rf conftest*
16051   eval "ac_cv_header_$ac_safe=no"
16052 fi
16053 rm -f conftest*
16054 fi
16055 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16056   echo "$ac_t""yes" 1>&6
16057     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16058   cat >> confdefs.h <<EOF
16059 #define $ac_tr_hdr 1
16060 EOF
16061  
16062 else
16063   echo "$ac_t""no" 1>&6
16064 fi
16065 done
16066
16067         for ac_hdr in lwp/lwp.h
16068 do
16069 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16070 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16071 echo "configure:16071: checking for $ac_hdr" >&5
16072 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16073   echo $ac_n "(cached) $ac_c" 1>&6
16074 else
16075   cat > conftest.$ac_ext <<EOF
16076 #line 16076 "configure"
16077 #include "confdefs.h"
16078 #include <$ac_hdr>
16079 EOF
16080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16081 { (eval echo configure:16081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16083 if test -z "$ac_err"; then
16084   rm -rf conftest*
16085   eval "ac_cv_header_$ac_safe=yes"
16086 else
16087   echo "$ac_err" >&5
16088   echo "configure: failed program was:" >&5
16089   cat conftest.$ac_ext >&5
16090   rm -rf conftest*
16091   eval "ac_cv_header_$ac_safe=no"
16092 fi
16093 rm -f conftest*
16094 fi
16095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16096   echo "$ac_t""yes" 1>&6
16097     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16098   cat >> confdefs.h <<EOF
16099 #define $ac_tr_hdr 1
16100 EOF
16101  
16102 else
16103   echo "$ac_t""no" 1>&6
16104 fi
16105 done
16106
16107         for ac_hdr in thread.h synch.h
16108 do
16109 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16110 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16111 echo "configure:16111: checking for $ac_hdr" >&5
16112 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16113   echo $ac_n "(cached) $ac_c" 1>&6
16114 else
16115   cat > conftest.$ac_ext <<EOF
16116 #line 16116 "configure"
16117 #include "confdefs.h"
16118 #include <$ac_hdr>
16119 EOF
16120 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16121 { (eval echo configure:16121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16122 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16123 if test -z "$ac_err"; then
16124   rm -rf conftest*
16125   eval "ac_cv_header_$ac_safe=yes"
16126 else
16127   echo "$ac_err" >&5
16128   echo "configure: failed program was:" >&5
16129   cat conftest.$ac_ext >&5
16130   rm -rf conftest*
16131   eval "ac_cv_header_$ac_safe=no"
16132 fi
16133 rm -f conftest*
16134 fi
16135 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16136   echo "$ac_t""yes" 1>&6
16137     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16138   cat >> confdefs.h <<EOF
16139 #define $ac_tr_hdr 1
16140 EOF
16141  
16142 else
16143   echo "$ac_t""no" 1>&6
16144 fi
16145 done
16146
16147 fi
16148
16149 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16150                         cat >> confdefs.h <<\EOF
16151 #define REENTRANT 1
16152 EOF
16153
16154         cat >> confdefs.h <<\EOF
16155 #define _REENTRANT 1
16156 EOF
16157
16158         cat >> confdefs.h <<\EOF
16159 #define THREAD_SAFE 1
16160 EOF
16161
16162         cat >> confdefs.h <<\EOF
16163 #define _THREAD_SAFE 1
16164 EOF
16165
16166         cat >> confdefs.h <<\EOF
16167 #define THREADSAFE 1
16168 EOF
16169
16170         cat >> confdefs.h <<\EOF
16171 #define _THREADSAFE 1
16172 EOF
16173
16174         cat >> confdefs.h <<\EOF
16175 #define _SGI_MP_SOURCE 1
16176 EOF
16177
16178
16179                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16180 echo "configure:16180: checking for thread specific errno" >&5
16181 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16182   echo $ac_n "(cached) $ac_c" 1>&6
16183 else
16184   
16185                 cat > conftest.$ac_ext <<EOF
16186 #line 16186 "configure"
16187 #include "confdefs.h"
16188 #include <errno.h>
16189 int main() {
16190 errno = 0;
16191 ; return 0; }
16192 EOF
16193 if { (eval echo configure:16193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16194   rm -rf conftest*
16195   ol_cv_errno_thread_specific=yes
16196 else
16197   echo "configure: failed program was:" >&5
16198   cat conftest.$ac_ext >&5
16199   rm -rf conftest*
16200   ol_cv_errno_thread_specific=no
16201 fi
16202 rm -f conftest*
16203         
16204 fi
16205
16206 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16207
16208                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16209 echo "configure:16209: checking for thread specific h_errno" >&5
16210 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16211   echo $ac_n "(cached) $ac_c" 1>&6
16212 else
16213   
16214                 cat > conftest.$ac_ext <<EOF
16215 #line 16215 "configure"
16216 #include "confdefs.h"
16217 #include <netdb.h>
16218 int main() {
16219 h_errno = 0;
16220 ; return 0; }
16221 EOF
16222 if { (eval echo configure:16222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16223   rm -rf conftest*
16224   ol_cv_h_errno_thread_specific=yes
16225 else
16226   echo "configure: failed program was:" >&5
16227   cat conftest.$ac_ext >&5
16228   rm -rf conftest*
16229   ol_cv_h_errno_thread_specific=no
16230 fi
16231 rm -f conftest*
16232         
16233 fi
16234
16235 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16236
16237         if test $ol_cv_errno_thread_specific != yes \
16238                 -o $ol_cv_h_errno_thread_specific != yes ; then
16239                 LIBS="$LTHREAD_LIBS $LIBS"
16240                 LTHREAD_LIBS=""
16241         fi
16242
16243 fi  
16244
16245 if test $ol_link_threads = no ; then
16246         if test $ol_with_threads = yes ; then
16247                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16248         fi
16249
16250         if test $ol_with_threads = auto ; then
16251                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16252                 ol_with_threads=no
16253         fi
16254
16255         cat >> confdefs.h <<\EOF
16256 #define NO_THREADS 1
16257 EOF
16258
16259         LTHREAD_LIBS=""
16260 fi
16261
16262 if test $ol_link_threads != no ; then
16263         cat >> confdefs.h <<\EOF
16264 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16265 EOF
16266
16267 fi
16268
16269 for ac_func in \
16270         ctime_r                 \
16271         gethostbyname_r gethostbyaddr_r \
16272
16273 do
16274 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16275 echo "configure:16275: checking for $ac_func" >&5
16276 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16277   echo $ac_n "(cached) $ac_c" 1>&6
16278 else
16279   cat > conftest.$ac_ext <<EOF
16280 #line 16280 "configure"
16281 #include "confdefs.h"
16282 /* System header to define __stub macros and hopefully few prototypes,
16283     which can conflict with char $ac_func(); below.  */
16284 #include <assert.h>
16285 /* Override any gcc2 internal prototype to avoid an error.  */
16286 /* We use char because int might match the return type of a gcc2
16287     builtin and then its argument prototype would still apply.  */
16288 char $ac_func();
16289 char (*f)();
16290
16291 int main() {
16292
16293 /* The GNU C library defines this for functions which it implements
16294     to always fail with ENOSYS.  Some functions are actually named
16295     something starting with __ and the normal name is an alias.  */
16296 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16297 choke me
16298 #else
16299 f = $ac_func;
16300 #endif
16301
16302 ; return 0; }
16303 EOF
16304 if { (eval echo configure:16304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16305   rm -rf conftest*
16306   eval "ac_cv_func_$ac_func=yes"
16307 else
16308   echo "configure: failed program was:" >&5
16309   cat conftest.$ac_ext >&5
16310   rm -rf conftest*
16311   eval "ac_cv_func_$ac_func=no"
16312 fi
16313 rm -f conftest*
16314 fi
16315
16316 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16317   echo "$ac_t""yes" 1>&6
16318     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16319   cat >> confdefs.h <<EOF
16320 #define $ac_tr_func 1
16321 EOF
16322  
16323 else
16324   echo "$ac_t""no" 1>&6
16325 fi
16326 done
16327
16328
16329 if test "$ac_cv_func_ctime_r" = no ; then
16330         ol_cv_func_ctime_r_nargs=0
16331 else
16332         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16333 echo "configure:16333: checking number of arguments of ctime_r" >&5
16334 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16335   echo $ac_n "(cached) $ac_c" 1>&6
16336 else
16337   cat > conftest.$ac_ext <<EOF
16338 #line 16338 "configure"
16339 #include "confdefs.h"
16340 #include <time.h>
16341 int main() {
16342 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16343 ; return 0; }
16344 EOF
16345 if { (eval echo configure:16345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16346   rm -rf conftest*
16347   ol_cv_func_ctime_r_nargs3=yes
16348 else
16349   echo "configure: failed program was:" >&5
16350   cat conftest.$ac_ext >&5
16351   rm -rf conftest*
16352   ol_cv_func_ctime_r_nargs3=no
16353 fi
16354 rm -f conftest*
16355
16356         cat > conftest.$ac_ext <<EOF
16357 #line 16357 "configure"
16358 #include "confdefs.h"
16359 #include <time.h>
16360 int main() {
16361 time_t ti; char *buffer; ctime_r(&ti,buffer);
16362 ; return 0; }
16363 EOF
16364 if { (eval echo configure:16364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16365   rm -rf conftest*
16366   ol_cv_func_ctime_r_nargs2=yes
16367 else
16368   echo "configure: failed program was:" >&5
16369   cat conftest.$ac_ext >&5
16370   rm -rf conftest*
16371   ol_cv_func_ctime_r_nargs2=no
16372 fi
16373 rm -f conftest*
16374
16375         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16376                 $ol_cv_func_ctime_r_nargs2 = no ; then
16377
16378                 ol_cv_func_ctime_r_nargs=3
16379
16380         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16381                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16382
16383                 ol_cv_func_ctime_r_nargs=2
16384
16385         else
16386                 ol_cv_func_ctime_r_nargs=0
16387         fi
16388   
16389 fi
16390
16391 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16392
16393   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16394         cat >> confdefs.h <<EOF
16395 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16396 EOF
16397
16398   fi
16399
16400 fi
16401
16402 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16403         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16404 echo "configure:16404: checking number of arguments of gethostbyname_r" >&5
16405 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16406   echo $ac_n "(cached) $ac_c" 1>&6
16407 else
16408   cat > conftest.$ac_ext <<EOF
16409 #line 16409 "configure"
16410 #include "confdefs.h"
16411 #include <sys/types.h>
16412 #include <sys/socket.h>
16413 #include <netinet/in.h>
16414 #include <netdb.h>
16415 #define BUFSIZE (sizeof(struct hostent)+10)
16416 int main() {
16417 struct hostent hent; char buffer[BUFSIZE];
16418                 int bufsize=BUFSIZE;int h_errno;
16419                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16420                         buffer, bufsize, &h_errno);
16421 ; return 0; }
16422 EOF
16423 if { (eval echo configure:16423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16424   rm -rf conftest*
16425   ol_cv_func_gethostbyname_r_nargs5=yes
16426 else
16427   echo "configure: failed program was:" >&5
16428   cat conftest.$ac_ext >&5
16429   rm -rf conftest*
16430   ol_cv_func_gethostbyname_r_nargs5=no
16431 fi
16432 rm -f conftest*
16433
16434         cat > conftest.$ac_ext <<EOF
16435 #line 16435 "configure"
16436 #include "confdefs.h"
16437 #include <sys/types.h>
16438 #include <sys/socket.h>
16439 #include <netinet/in.h>
16440 #include <netdb.h>
16441 #define BUFSIZE (sizeof(struct hostent)+10)
16442 int main() {
16443 struct hostent hent;struct hostent *rhent;
16444                 char buffer[BUFSIZE];
16445                 int bufsize=BUFSIZE;int h_errno;
16446                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16447                         &rhent, &h_errno);
16448 ; return 0; }
16449 EOF
16450 if { (eval echo configure:16450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16451   rm -rf conftest*
16452   ol_cv_func_gethostbyname_r_nargs6=yes
16453 else
16454   echo "configure: failed program was:" >&5
16455   cat conftest.$ac_ext >&5
16456   rm -rf conftest*
16457   ol_cv_func_gethostbyname_r_nargs6=no
16458 fi
16459 rm -f conftest*
16460
16461         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16462                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16463
16464                 ol_cv_func_gethostbyname_r_nargs=5
16465
16466         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16467                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16468
16469                 ol_cv_func_gethostbyname_r_nargs=6
16470
16471         else
16472                 ol_cv_func_gethostbyname_r_nargs=0
16473         fi
16474   
16475 fi
16476
16477 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16478   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16479         cat >> confdefs.h <<EOF
16480 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16481 EOF
16482
16483   fi
16484
16485 else
16486         ol_cv_func_gethostbyname_r_nargs=0
16487 fi
16488  
16489 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16490         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16491 echo "configure:16491: checking number of arguments of gethostbyaddr_r" >&5
16492 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16493   echo $ac_n "(cached) $ac_c" 1>&6
16494 else
16495   cat > conftest.$ac_ext <<EOF
16496 #line 16496 "configure"
16497 #include "confdefs.h"
16498 #include <sys/types.h>
16499 #include <sys/socket.h>
16500 #include <netinet/in.h>
16501 #include <netdb.h>
16502 #define BUFSIZE (sizeof(struct hostent)+10)
16503 int main() {
16504 struct hostent hent; char buffer[BUFSIZE]; 
16505             struct in_addr add;
16506             size_t alen=sizeof(struct in_addr);
16507             int bufsize=BUFSIZE;int h_errno;
16508                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16509                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16510 ; return 0; }
16511 EOF
16512 if { (eval echo configure:16512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16513   rm -rf conftest*
16514   ol_cv_func_gethostbyaddr_r_nargs7=yes
16515 else
16516   echo "configure: failed program was:" >&5
16517   cat conftest.$ac_ext >&5
16518   rm -rf conftest*
16519   ol_cv_func_gethostbyaddr_r_nargs7=no
16520 fi
16521 rm -f conftest*
16522
16523         cat > conftest.$ac_ext <<EOF
16524 #line 16524 "configure"
16525 #include "confdefs.h"
16526 #include <sys/types.h>
16527 #include <sys/socket.h>
16528 #include <netinet/in.h>
16529 #include <netdb.h>
16530 #define BUFSIZE (sizeof(struct hostent)+10)
16531 int main() {
16532 struct hostent hent;
16533                 struct hostent *rhent; char buffer[BUFSIZE]; 
16534                 struct in_addr add;
16535                 size_t alen=sizeof(struct in_addr);
16536                 int bufsize=BUFSIZE;int h_errno;
16537                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16538                         alen, AF_INET, &hent, buffer, bufsize, 
16539                         &rhent, &h_errno);
16540 ; return 0; }
16541 EOF
16542 if { (eval echo configure:16542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16543   rm -rf conftest*
16544   ol_cv_func_gethostbyaddr_r_nargs8=yes
16545 else
16546   echo "configure: failed program was:" >&5
16547   cat conftest.$ac_ext >&5
16548   rm -rf conftest*
16549   ol_cv_func_gethostbyaddr_r_nargs8=no
16550 fi
16551 rm -f conftest*
16552
16553         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16554                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16555
16556                 ol_cv_func_gethostbyaddr_r_nargs=7
16557
16558         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16559                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16560
16561                 ol_cv_func_gethostbyaddr_r_nargs=8
16562
16563         else
16564                 ol_cv_func_gethostbyaddr_r_nargs=0
16565         fi
16566   
16567 fi
16568
16569 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16570   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16571     cat >> confdefs.h <<EOF
16572 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16573 EOF
16574
16575   fi
16576
16577 else
16578         ol_cv_func_gethostbyaddr_r_nargs=0
16579 fi
16580
16581 ol_link_ldbm=no 
16582
16583 if test $ol_with_ldbm_api = auto \
16584         -o $ol_with_ldbm_api = berkeley \
16585         -o $ol_with_ldbm_api = bcompat ; then
16586
16587         if test $ol_with_ldbm_api = bcompat; then \
16588                 for ac_hdr in db_185.h db.h
16589 do
16590 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16591 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16592 echo "configure:16592: checking for $ac_hdr" >&5
16593 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16594   echo $ac_n "(cached) $ac_c" 1>&6
16595 else
16596   cat > conftest.$ac_ext <<EOF
16597 #line 16597 "configure"
16598 #include "confdefs.h"
16599 #include <$ac_hdr>
16600 EOF
16601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16602 { (eval echo configure:16602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16604 if test -z "$ac_err"; then
16605   rm -rf conftest*
16606   eval "ac_cv_header_$ac_safe=yes"
16607 else
16608   echo "$ac_err" >&5
16609   echo "configure: failed program was:" >&5
16610   cat conftest.$ac_ext >&5
16611   rm -rf conftest*
16612   eval "ac_cv_header_$ac_safe=no"
16613 fi
16614 rm -f conftest*
16615 fi
16616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16617   echo "$ac_t""yes" 1>&6
16618     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16619   cat >> confdefs.h <<EOF
16620 #define $ac_tr_hdr 1
16621 EOF
16622  
16623 else
16624   echo "$ac_t""no" 1>&6
16625 fi
16626 done
16627
16628 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16629         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16630 echo "configure:16630: checking if Berkeley DB header compatibility" >&5
16631 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16632   echo $ac_n "(cached) $ac_c" 1>&6
16633 else
16634   
16635                 cat > conftest.$ac_ext <<EOF
16636 #line 16636 "configure"
16637 #include "confdefs.h"
16638
16639 #if HAVE_DB_185_H
16640 #       include <db_185.h>
16641 #else
16642 #       include <db.h>
16643 #endif
16644
16645  /* this check could be improved */
16646 #ifndef DB_VERSION_MAJOR
16647 #       define DB_VERSION_MAJOR 1
16648 #endif
16649
16650 #if DB_VERSION_MAJOR == 1 
16651         __db_version_1
16652 #endif
16653
16654 EOF
16655 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16656   egrep "__db_version_1" >/dev/null 2>&1; then
16657   rm -rf conftest*
16658   ol_cv_header_db1=yes
16659 else
16660   rm -rf conftest*
16661   ol_cv_header_db1=no
16662 fi
16663 rm -f conftest*
16664
16665 fi
16666
16667 echo "$ac_t""$ol_cv_header_db1" 1>&6
16668
16669         if test $ol_cv_header_db1 = yes ; then
16670                 ol_cv_lib_db=no
16671 if test $ol_cv_lib_db = no ; then
16672         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16673 echo "configure:16673: checking for Berkeley DB link (default)" >&5
16674 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16675   echo $ac_n "(cached) $ac_c" 1>&6
16676 else
16677   
16678         ol_DB_LIB=
16679         ol_LIBS=$LIBS
16680         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16681
16682         cat > conftest.$ac_ext <<EOF
16683 #line 16683 "configure"
16684 #include "confdefs.h"
16685
16686 #ifdef HAVE_DB_185_H
16687 # include <db_185.h>
16688 #else
16689 # include <db.h>
16690 #endif
16691
16692 #ifndef DB_VERSION_MAJOR
16693 # define DB_VERSION_MAJOR 1
16694 #endif
16695
16696 #ifndef NULL
16697 #define NULL ((void*)0)
16698 #endif
16699
16700 int main() {
16701
16702 #if DB_VERSION_MAJOR > 1
16703         {
16704                 char *version;
16705                 int major, minor, patch;
16706
16707                 version = db_version( &major, &minor, &patch );
16708
16709                 if( major != DB_VERSION_MAJOR ||
16710                         minor < DB_VERSION_MINOR )
16711                 {
16712                         printf("Berkeley DB version mismatch\n"
16713                                 "\texpected: %s\n\tgot: %s\n",
16714                                 DB_VERSION_STRING, version);
16715                         return 1;
16716                 }
16717         }
16718 #endif
16719
16720 #if DB_VERSION_MAJOR > 2
16721         db_env_create( NULL, 0 );
16722 #elif DB_VERSION_MAJOR > 1
16723         db_appexit( NULL );
16724 #else
16725         (void) dbopen( NULL, 0, 0, 0, NULL);
16726 #endif
16727
16728 ; return 0; }
16729 EOF
16730 if { (eval echo configure:16730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16731   rm -rf conftest*
16732   ol_cv_db_none=yes
16733 else
16734   echo "configure: failed program was:" >&5
16735   cat conftest.$ac_ext >&5
16736   rm -rf conftest*
16737   ol_cv_db_none=no
16738 fi
16739 rm -f conftest*
16740
16741         LIBS="$ol_LIBS"
16742
16743 fi
16744
16745 echo "$ac_t""$ol_cv_db_none" 1>&6
16746
16747         if test $ol_cv_db_none = yes ; then
16748                 ol_cv_lib_db=yes
16749         fi
16750 fi
16751
16752 if test $ol_cv_lib_db = no ; then
16753         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16754 echo "configure:16754: checking for Berkeley DB link (-ldb41)" >&5
16755 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16756   echo $ac_n "(cached) $ac_c" 1>&6
16757 else
16758   
16759         ol_DB_LIB=-ldb41
16760         ol_LIBS=$LIBS
16761         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16762
16763         cat > conftest.$ac_ext <<EOF
16764 #line 16764 "configure"
16765 #include "confdefs.h"
16766
16767 #ifdef HAVE_DB_185_H
16768 # include <db_185.h>
16769 #else
16770 # include <db.h>
16771 #endif
16772
16773 #ifndef DB_VERSION_MAJOR
16774 # define DB_VERSION_MAJOR 1
16775 #endif
16776
16777 #ifndef NULL
16778 #define NULL ((void*)0)
16779 #endif
16780
16781 int main() {
16782
16783 #if DB_VERSION_MAJOR > 1
16784         {
16785                 char *version;
16786                 int major, minor, patch;
16787
16788                 version = db_version( &major, &minor, &patch );
16789
16790                 if( major != DB_VERSION_MAJOR ||
16791                         minor < DB_VERSION_MINOR )
16792                 {
16793                         printf("Berkeley DB version mismatch\n"
16794                                 "\texpected: %s\n\tgot: %s\n",
16795                                 DB_VERSION_STRING, version);
16796                         return 1;
16797                 }
16798         }
16799 #endif
16800
16801 #if DB_VERSION_MAJOR > 2
16802         db_env_create( NULL, 0 );
16803 #elif DB_VERSION_MAJOR > 1
16804         db_appexit( NULL );
16805 #else
16806         (void) dbopen( NULL, 0, 0, 0, NULL);
16807 #endif
16808
16809 ; return 0; }
16810 EOF
16811 if { (eval echo configure:16811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16812   rm -rf conftest*
16813   ol_cv_db_db41=yes
16814 else
16815   echo "configure: failed program was:" >&5
16816   cat conftest.$ac_ext >&5
16817   rm -rf conftest*
16818   ol_cv_db_db41=no
16819 fi
16820 rm -f conftest*
16821
16822         LIBS="$ol_LIBS"
16823
16824 fi
16825
16826 echo "$ac_t""$ol_cv_db_db41" 1>&6
16827
16828         if test $ol_cv_db_db41 = yes ; then
16829                 ol_cv_lib_db=-ldb41
16830         fi
16831 fi
16832
16833 if test $ol_cv_lib_db = no ; then
16834         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16835 echo "configure:16835: checking for Berkeley DB link (-ldb-41)" >&5
16836 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16837   echo $ac_n "(cached) $ac_c" 1>&6
16838 else
16839   
16840         ol_DB_LIB=-ldb-41
16841         ol_LIBS=$LIBS
16842         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16843
16844         cat > conftest.$ac_ext <<EOF
16845 #line 16845 "configure"
16846 #include "confdefs.h"
16847
16848 #ifdef HAVE_DB_185_H
16849 # include <db_185.h>
16850 #else
16851 # include <db.h>
16852 #endif
16853
16854 #ifndef DB_VERSION_MAJOR
16855 # define DB_VERSION_MAJOR 1
16856 #endif
16857
16858 #ifndef NULL
16859 #define NULL ((void*)0)
16860 #endif
16861
16862 int main() {
16863
16864 #if DB_VERSION_MAJOR > 1
16865         {
16866                 char *version;
16867                 int major, minor, patch;
16868
16869                 version = db_version( &major, &minor, &patch );
16870
16871                 if( major != DB_VERSION_MAJOR ||
16872                         minor < DB_VERSION_MINOR )
16873                 {
16874                         printf("Berkeley DB version mismatch\n"
16875                                 "\texpected: %s\n\tgot: %s\n",
16876                                 DB_VERSION_STRING, version);
16877                         return 1;
16878                 }
16879         }
16880 #endif
16881
16882 #if DB_VERSION_MAJOR > 2
16883         db_env_create( NULL, 0 );
16884 #elif DB_VERSION_MAJOR > 1
16885         db_appexit( NULL );
16886 #else
16887         (void) dbopen( NULL, 0, 0, 0, NULL);
16888 #endif
16889
16890 ; return 0; }
16891 EOF
16892 if { (eval echo configure:16892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16893   rm -rf conftest*
16894   ol_cv_db_db_41=yes
16895 else
16896   echo "configure: failed program was:" >&5
16897   cat conftest.$ac_ext >&5
16898   rm -rf conftest*
16899   ol_cv_db_db_41=no
16900 fi
16901 rm -f conftest*
16902
16903         LIBS="$ol_LIBS"
16904
16905 fi
16906
16907 echo "$ac_t""$ol_cv_db_db_41" 1>&6
16908
16909         if test $ol_cv_db_db_41 = yes ; then
16910                 ol_cv_lib_db=-ldb-41
16911         fi
16912 fi
16913
16914 if test $ol_cv_lib_db = no ; then
16915         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
16916 echo "configure:16916: checking for Berkeley DB link (-ldb-4.1)" >&5
16917 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
16918   echo $ac_n "(cached) $ac_c" 1>&6
16919 else
16920   
16921         ol_DB_LIB=-ldb-4.1
16922         ol_LIBS=$LIBS
16923         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16924
16925         cat > conftest.$ac_ext <<EOF
16926 #line 16926 "configure"
16927 #include "confdefs.h"
16928
16929 #ifdef HAVE_DB_185_H
16930 # include <db_185.h>
16931 #else
16932 # include <db.h>
16933 #endif
16934
16935 #ifndef DB_VERSION_MAJOR
16936 # define DB_VERSION_MAJOR 1
16937 #endif
16938
16939 #ifndef NULL
16940 #define NULL ((void*)0)
16941 #endif
16942
16943 int main() {
16944
16945 #if DB_VERSION_MAJOR > 1
16946         {
16947                 char *version;
16948                 int major, minor, patch;
16949
16950                 version = db_version( &major, &minor, &patch );
16951
16952                 if( major != DB_VERSION_MAJOR ||
16953                         minor < DB_VERSION_MINOR )
16954                 {
16955                         printf("Berkeley DB version mismatch\n"
16956                                 "\texpected: %s\n\tgot: %s\n",
16957                                 DB_VERSION_STRING, version);
16958                         return 1;
16959                 }
16960         }
16961 #endif
16962
16963 #if DB_VERSION_MAJOR > 2
16964         db_env_create( NULL, 0 );
16965 #elif DB_VERSION_MAJOR > 1
16966         db_appexit( NULL );
16967 #else
16968         (void) dbopen( NULL, 0, 0, 0, NULL);
16969 #endif
16970
16971 ; return 0; }
16972 EOF
16973 if { (eval echo configure:16973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16974   rm -rf conftest*
16975   ol_cv_db_db_4_dot_1=yes
16976 else
16977   echo "configure: failed program was:" >&5
16978   cat conftest.$ac_ext >&5
16979   rm -rf conftest*
16980   ol_cv_db_db_4_dot_1=no
16981 fi
16982 rm -f conftest*
16983
16984         LIBS="$ol_LIBS"
16985
16986 fi
16987
16988 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
16989
16990         if test $ol_cv_db_db_4_dot_1 = yes ; then
16991                 ol_cv_lib_db=-ldb-4.1
16992         fi
16993 fi
16994
16995 if test $ol_cv_lib_db = no ; then
16996         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
16997 echo "configure:16997: checking for Berkeley DB link (-ldb-4-1)" >&5
16998 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
16999   echo $ac_n "(cached) $ac_c" 1>&6
17000 else
17001   
17002         ol_DB_LIB=-ldb-4-1
17003         ol_LIBS=$LIBS
17004         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17005
17006         cat > conftest.$ac_ext <<EOF
17007 #line 17007 "configure"
17008 #include "confdefs.h"
17009
17010 #ifdef HAVE_DB_185_H
17011 # include <db_185.h>
17012 #else
17013 # include <db.h>
17014 #endif
17015
17016 #ifndef DB_VERSION_MAJOR
17017 # define DB_VERSION_MAJOR 1
17018 #endif
17019
17020 #ifndef NULL
17021 #define NULL ((void*)0)
17022 #endif
17023
17024 int main() {
17025
17026 #if DB_VERSION_MAJOR > 1
17027         {
17028                 char *version;
17029                 int major, minor, patch;
17030
17031                 version = db_version( &major, &minor, &patch );
17032
17033                 if( major != DB_VERSION_MAJOR ||
17034                         minor < DB_VERSION_MINOR )
17035                 {
17036                         printf("Berkeley DB version mismatch\n"
17037                                 "\texpected: %s\n\tgot: %s\n",
17038                                 DB_VERSION_STRING, version);
17039                         return 1;
17040                 }
17041         }
17042 #endif
17043
17044 #if DB_VERSION_MAJOR > 2
17045         db_env_create( NULL, 0 );
17046 #elif DB_VERSION_MAJOR > 1
17047         db_appexit( NULL );
17048 #else
17049         (void) dbopen( NULL, 0, 0, 0, NULL);
17050 #endif
17051
17052 ; return 0; }
17053 EOF
17054 if { (eval echo configure:17054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17055   rm -rf conftest*
17056   ol_cv_db_db_4_1=yes
17057 else
17058   echo "configure: failed program was:" >&5
17059   cat conftest.$ac_ext >&5
17060   rm -rf conftest*
17061   ol_cv_db_db_4_1=no
17062 fi
17063 rm -f conftest*
17064
17065         LIBS="$ol_LIBS"
17066
17067 fi
17068
17069 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17070
17071         if test $ol_cv_db_db_4_1 = yes ; then
17072                 ol_cv_lib_db=-ldb-4-1
17073         fi
17074 fi
17075
17076 if test $ol_cv_lib_db = no ; then
17077         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17078 echo "configure:17078: checking for Berkeley DB link (-ldb-4)" >&5
17079 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17080   echo $ac_n "(cached) $ac_c" 1>&6
17081 else
17082   
17083         ol_DB_LIB=-ldb-4
17084         ol_LIBS=$LIBS
17085         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17086
17087         cat > conftest.$ac_ext <<EOF
17088 #line 17088 "configure"
17089 #include "confdefs.h"
17090
17091 #ifdef HAVE_DB_185_H
17092 # include <db_185.h>
17093 #else
17094 # include <db.h>
17095 #endif
17096
17097 #ifndef DB_VERSION_MAJOR
17098 # define DB_VERSION_MAJOR 1
17099 #endif
17100
17101 #ifndef NULL
17102 #define NULL ((void*)0)
17103 #endif
17104
17105 int main() {
17106
17107 #if DB_VERSION_MAJOR > 1
17108         {
17109                 char *version;
17110                 int major, minor, patch;
17111
17112                 version = db_version( &major, &minor, &patch );
17113
17114                 if( major != DB_VERSION_MAJOR ||
17115                         minor < DB_VERSION_MINOR )
17116                 {
17117                         printf("Berkeley DB version mismatch\n"
17118                                 "\texpected: %s\n\tgot: %s\n",
17119                                 DB_VERSION_STRING, version);
17120                         return 1;
17121                 }
17122         }
17123 #endif
17124
17125 #if DB_VERSION_MAJOR > 2
17126         db_env_create( NULL, 0 );
17127 #elif DB_VERSION_MAJOR > 1
17128         db_appexit( NULL );
17129 #else
17130         (void) dbopen( NULL, 0, 0, 0, NULL);
17131 #endif
17132
17133 ; return 0; }
17134 EOF
17135 if { (eval echo configure:17135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17136   rm -rf conftest*
17137   ol_cv_db_db_4=yes
17138 else
17139   echo "configure: failed program was:" >&5
17140   cat conftest.$ac_ext >&5
17141   rm -rf conftest*
17142   ol_cv_db_db_4=no
17143 fi
17144 rm -f conftest*
17145
17146         LIBS="$ol_LIBS"
17147
17148 fi
17149
17150 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17151
17152         if test $ol_cv_db_db_4 = yes ; then
17153                 ol_cv_lib_db=-ldb-4
17154         fi
17155 fi
17156
17157 if test $ol_cv_lib_db = no ; then
17158         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17159 echo "configure:17159: checking for Berkeley DB link (-ldb4)" >&5
17160 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17161   echo $ac_n "(cached) $ac_c" 1>&6
17162 else
17163   
17164         ol_DB_LIB=-ldb4
17165         ol_LIBS=$LIBS
17166         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17167
17168         cat > conftest.$ac_ext <<EOF
17169 #line 17169 "configure"
17170 #include "confdefs.h"
17171
17172 #ifdef HAVE_DB_185_H
17173 # include <db_185.h>
17174 #else
17175 # include <db.h>
17176 #endif
17177
17178 #ifndef DB_VERSION_MAJOR
17179 # define DB_VERSION_MAJOR 1
17180 #endif
17181
17182 #ifndef NULL
17183 #define NULL ((void*)0)
17184 #endif
17185
17186 int main() {
17187
17188 #if DB_VERSION_MAJOR > 1
17189         {
17190                 char *version;
17191                 int major, minor, patch;
17192
17193                 version = db_version( &major, &minor, &patch );
17194
17195                 if( major != DB_VERSION_MAJOR ||
17196                         minor < DB_VERSION_MINOR )
17197                 {
17198                         printf("Berkeley DB version mismatch\n"
17199                                 "\texpected: %s\n\tgot: %s\n",
17200                                 DB_VERSION_STRING, version);
17201                         return 1;
17202                 }
17203         }
17204 #endif
17205
17206 #if DB_VERSION_MAJOR > 2
17207         db_env_create( NULL, 0 );
17208 #elif DB_VERSION_MAJOR > 1
17209         db_appexit( NULL );
17210 #else
17211         (void) dbopen( NULL, 0, 0, 0, NULL);
17212 #endif
17213
17214 ; return 0; }
17215 EOF
17216 if { (eval echo configure:17216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17217   rm -rf conftest*
17218   ol_cv_db_db4=yes
17219 else
17220   echo "configure: failed program was:" >&5
17221   cat conftest.$ac_ext >&5
17222   rm -rf conftest*
17223   ol_cv_db_db4=no
17224 fi
17225 rm -f conftest*
17226
17227         LIBS="$ol_LIBS"
17228
17229 fi
17230
17231 echo "$ac_t""$ol_cv_db_db4" 1>&6
17232
17233         if test $ol_cv_db_db4 = yes ; then
17234                 ol_cv_lib_db=-ldb4
17235         fi
17236 fi
17237
17238 if test $ol_cv_lib_db = no ; then
17239         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17240 echo "configure:17240: checking for Berkeley DB link (-ldb)" >&5
17241 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17242   echo $ac_n "(cached) $ac_c" 1>&6
17243 else
17244   
17245         ol_DB_LIB=-ldb
17246         ol_LIBS=$LIBS
17247         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17248
17249         cat > conftest.$ac_ext <<EOF
17250 #line 17250 "configure"
17251 #include "confdefs.h"
17252
17253 #ifdef HAVE_DB_185_H
17254 # include <db_185.h>
17255 #else
17256 # include <db.h>
17257 #endif
17258
17259 #ifndef DB_VERSION_MAJOR
17260 # define DB_VERSION_MAJOR 1
17261 #endif
17262
17263 #ifndef NULL
17264 #define NULL ((void*)0)
17265 #endif
17266
17267 int main() {
17268
17269 #if DB_VERSION_MAJOR > 1
17270         {
17271                 char *version;
17272                 int major, minor, patch;
17273
17274                 version = db_version( &major, &minor, &patch );
17275
17276                 if( major != DB_VERSION_MAJOR ||
17277                         minor < DB_VERSION_MINOR )
17278                 {
17279                         printf("Berkeley DB version mismatch\n"
17280                                 "\texpected: %s\n\tgot: %s\n",
17281                                 DB_VERSION_STRING, version);
17282                         return 1;
17283                 }
17284         }
17285 #endif
17286
17287 #if DB_VERSION_MAJOR > 2
17288         db_env_create( NULL, 0 );
17289 #elif DB_VERSION_MAJOR > 1
17290         db_appexit( NULL );
17291 #else
17292         (void) dbopen( NULL, 0, 0, 0, NULL);
17293 #endif
17294
17295 ; return 0; }
17296 EOF
17297 if { (eval echo configure:17297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17298   rm -rf conftest*
17299   ol_cv_db_db=yes
17300 else
17301   echo "configure: failed program was:" >&5
17302   cat conftest.$ac_ext >&5
17303   rm -rf conftest*
17304   ol_cv_db_db=no
17305 fi
17306 rm -f conftest*
17307
17308         LIBS="$ol_LIBS"
17309
17310 fi
17311
17312 echo "$ac_t""$ol_cv_db_db" 1>&6
17313
17314         if test $ol_cv_db_db = yes ; then
17315                 ol_cv_lib_db=-ldb
17316         fi
17317 fi
17318
17319 if test $ol_cv_lib_db = no ; then
17320         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17321 echo "configure:17321: checking for Berkeley DB link (-ldb3)" >&5
17322 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17323   echo $ac_n "(cached) $ac_c" 1>&6
17324 else
17325   
17326         ol_DB_LIB=-ldb3
17327         ol_LIBS=$LIBS
17328         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17329
17330         cat > conftest.$ac_ext <<EOF
17331 #line 17331 "configure"
17332 #include "confdefs.h"
17333
17334 #ifdef HAVE_DB_185_H
17335 # include <db_185.h>
17336 #else
17337 # include <db.h>
17338 #endif
17339
17340 #ifndef DB_VERSION_MAJOR
17341 # define DB_VERSION_MAJOR 1
17342 #endif
17343
17344 #ifndef NULL
17345 #define NULL ((void*)0)
17346 #endif
17347
17348 int main() {
17349
17350 #if DB_VERSION_MAJOR > 1
17351         {
17352                 char *version;
17353                 int major, minor, patch;
17354
17355                 version = db_version( &major, &minor, &patch );
17356
17357                 if( major != DB_VERSION_MAJOR ||
17358                         minor < DB_VERSION_MINOR )
17359                 {
17360                         printf("Berkeley DB version mismatch\n"
17361                                 "\texpected: %s\n\tgot: %s\n",
17362                                 DB_VERSION_STRING, version);
17363                         return 1;
17364                 }
17365         }
17366 #endif
17367
17368 #if DB_VERSION_MAJOR > 2
17369         db_env_create( NULL, 0 );
17370 #elif DB_VERSION_MAJOR > 1
17371         db_appexit( NULL );
17372 #else
17373         (void) dbopen( NULL, 0, 0, 0, NULL);
17374 #endif
17375
17376 ; return 0; }
17377 EOF
17378 if { (eval echo configure:17378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17379   rm -rf conftest*
17380   ol_cv_db_db3=yes
17381 else
17382   echo "configure: failed program was:" >&5
17383   cat conftest.$ac_ext >&5
17384   rm -rf conftest*
17385   ol_cv_db_db3=no
17386 fi
17387 rm -f conftest*
17388
17389         LIBS="$ol_LIBS"
17390
17391 fi
17392
17393 echo "$ac_t""$ol_cv_db_db3" 1>&6
17394
17395         if test $ol_cv_db_db3 = yes ; then
17396                 ol_cv_lib_db=-ldb3
17397         fi
17398 fi
17399
17400 if test $ol_cv_lib_db = no ; then
17401         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17402 echo "configure:17402: checking for Berkeley DB link (-ldb-3)" >&5
17403 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17404   echo $ac_n "(cached) $ac_c" 1>&6
17405 else
17406   
17407         ol_DB_LIB=-ldb-3
17408         ol_LIBS=$LIBS
17409         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17410
17411         cat > conftest.$ac_ext <<EOF
17412 #line 17412 "configure"
17413 #include "confdefs.h"
17414
17415 #ifdef HAVE_DB_185_H
17416 # include <db_185.h>
17417 #else
17418 # include <db.h>
17419 #endif
17420
17421 #ifndef DB_VERSION_MAJOR
17422 # define DB_VERSION_MAJOR 1
17423 #endif
17424
17425 #ifndef NULL
17426 #define NULL ((void*)0)
17427 #endif
17428
17429 int main() {
17430
17431 #if DB_VERSION_MAJOR > 1
17432         {
17433                 char *version;
17434                 int major, minor, patch;
17435
17436                 version = db_version( &major, &minor, &patch );
17437
17438                 if( major != DB_VERSION_MAJOR ||
17439                         minor < DB_VERSION_MINOR )
17440                 {
17441                         printf("Berkeley DB version mismatch\n"
17442                                 "\texpected: %s\n\tgot: %s\n",
17443                                 DB_VERSION_STRING, version);
17444                         return 1;
17445                 }
17446         }
17447 #endif
17448
17449 #if DB_VERSION_MAJOR > 2
17450         db_env_create( NULL, 0 );
17451 #elif DB_VERSION_MAJOR > 1
17452         db_appexit( NULL );
17453 #else
17454         (void) dbopen( NULL, 0, 0, 0, NULL);
17455 #endif
17456
17457 ; return 0; }
17458 EOF
17459 if { (eval echo configure:17459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17460   rm -rf conftest*
17461   ol_cv_db_db_3=yes
17462 else
17463   echo "configure: failed program was:" >&5
17464   cat conftest.$ac_ext >&5
17465   rm -rf conftest*
17466   ol_cv_db_db_3=no
17467 fi
17468 rm -f conftest*
17469
17470         LIBS="$ol_LIBS"
17471
17472 fi
17473
17474 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17475
17476         if test $ol_cv_db_db_3 = yes ; then
17477                 ol_cv_lib_db=-ldb-3
17478         fi
17479 fi
17480
17481 if test $ol_cv_lib_db = no ; then
17482         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17483 echo "configure:17483: checking for Berkeley DB link (-ldb2)" >&5
17484 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17485   echo $ac_n "(cached) $ac_c" 1>&6
17486 else
17487   
17488         ol_DB_LIB=-ldb2
17489         ol_LIBS=$LIBS
17490         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17491
17492         cat > conftest.$ac_ext <<EOF
17493 #line 17493 "configure"
17494 #include "confdefs.h"
17495
17496 #ifdef HAVE_DB_185_H
17497 # include <db_185.h>
17498 #else
17499 # include <db.h>
17500 #endif
17501
17502 #ifndef DB_VERSION_MAJOR
17503 # define DB_VERSION_MAJOR 1
17504 #endif
17505
17506 #ifndef NULL
17507 #define NULL ((void*)0)
17508 #endif
17509
17510 int main() {
17511
17512 #if DB_VERSION_MAJOR > 1
17513         {
17514                 char *version;
17515                 int major, minor, patch;
17516
17517                 version = db_version( &major, &minor, &patch );
17518
17519                 if( major != DB_VERSION_MAJOR ||
17520                         minor < DB_VERSION_MINOR )
17521                 {
17522                         printf("Berkeley DB version mismatch\n"
17523                                 "\texpected: %s\n\tgot: %s\n",
17524                                 DB_VERSION_STRING, version);
17525                         return 1;
17526                 }
17527         }
17528 #endif
17529
17530 #if DB_VERSION_MAJOR > 2
17531         db_env_create( NULL, 0 );
17532 #elif DB_VERSION_MAJOR > 1
17533         db_appexit( NULL );
17534 #else
17535         (void) dbopen( NULL, 0, 0, 0, NULL);
17536 #endif
17537
17538 ; return 0; }
17539 EOF
17540 if { (eval echo configure:17540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17541   rm -rf conftest*
17542   ol_cv_db_db2=yes
17543 else
17544   echo "configure: failed program was:" >&5
17545   cat conftest.$ac_ext >&5
17546   rm -rf conftest*
17547   ol_cv_db_db2=no
17548 fi
17549 rm -f conftest*
17550
17551         LIBS="$ol_LIBS"
17552
17553 fi
17554
17555 echo "$ac_t""$ol_cv_db_db2" 1>&6
17556
17557         if test $ol_cv_db_db2 = yes ; then
17558                 ol_cv_lib_db=-ldb2
17559         fi
17560 fi
17561
17562 if test $ol_cv_lib_db = no ; then
17563         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17564 echo "configure:17564: checking for Berkeley DB link (-ldb-2)" >&5
17565 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17566   echo $ac_n "(cached) $ac_c" 1>&6
17567 else
17568   
17569         ol_DB_LIB=-ldb-2
17570         ol_LIBS=$LIBS
17571         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17572
17573         cat > conftest.$ac_ext <<EOF
17574 #line 17574 "configure"
17575 #include "confdefs.h"
17576
17577 #ifdef HAVE_DB_185_H
17578 # include <db_185.h>
17579 #else
17580 # include <db.h>
17581 #endif
17582
17583 #ifndef DB_VERSION_MAJOR
17584 # define DB_VERSION_MAJOR 1
17585 #endif
17586
17587 #ifndef NULL
17588 #define NULL ((void*)0)
17589 #endif
17590
17591 int main() {
17592
17593 #if DB_VERSION_MAJOR > 1
17594         {
17595                 char *version;
17596                 int major, minor, patch;
17597
17598                 version = db_version( &major, &minor, &patch );
17599
17600                 if( major != DB_VERSION_MAJOR ||
17601                         minor < DB_VERSION_MINOR )
17602                 {
17603                         printf("Berkeley DB version mismatch\n"
17604                                 "\texpected: %s\n\tgot: %s\n",
17605                                 DB_VERSION_STRING, version);
17606                         return 1;
17607                 }
17608         }
17609 #endif
17610
17611 #if DB_VERSION_MAJOR > 2
17612         db_env_create( NULL, 0 );
17613 #elif DB_VERSION_MAJOR > 1
17614         db_appexit( NULL );
17615 #else
17616         (void) dbopen( NULL, 0, 0, 0, NULL);
17617 #endif
17618
17619 ; return 0; }
17620 EOF
17621 if { (eval echo configure:17621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17622   rm -rf conftest*
17623   ol_cv_db_db_2=yes
17624 else
17625   echo "configure: failed program was:" >&5
17626   cat conftest.$ac_ext >&5
17627   rm -rf conftest*
17628   ol_cv_db_db_2=no
17629 fi
17630 rm -f conftest*
17631
17632         LIBS="$ol_LIBS"
17633
17634 fi
17635
17636 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17637
17638         if test $ol_cv_db_db_2 = yes ; then
17639                 ol_cv_lib_db=-ldb-2
17640         fi
17641 fi
17642
17643 if test $ol_cv_lib_db = no ; then
17644         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17645 echo "configure:17645: checking for Berkeley DB link (-ldb1)" >&5
17646 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17647   echo $ac_n "(cached) $ac_c" 1>&6
17648 else
17649   
17650         ol_DB_LIB=-ldb1
17651         ol_LIBS=$LIBS
17652         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17653
17654         cat > conftest.$ac_ext <<EOF
17655 #line 17655 "configure"
17656 #include "confdefs.h"
17657
17658 #ifdef HAVE_DB_185_H
17659 # include <db_185.h>
17660 #else
17661 # include <db.h>
17662 #endif
17663
17664 #ifndef DB_VERSION_MAJOR
17665 # define DB_VERSION_MAJOR 1
17666 #endif
17667
17668 #ifndef NULL
17669 #define NULL ((void*)0)
17670 #endif
17671
17672 int main() {
17673
17674 #if DB_VERSION_MAJOR > 1
17675         {
17676                 char *version;
17677                 int major, minor, patch;
17678
17679                 version = db_version( &major, &minor, &patch );
17680
17681                 if( major != DB_VERSION_MAJOR ||
17682                         minor < DB_VERSION_MINOR )
17683                 {
17684                         printf("Berkeley DB version mismatch\n"
17685                                 "\texpected: %s\n\tgot: %s\n",
17686                                 DB_VERSION_STRING, version);
17687                         return 1;
17688                 }
17689         }
17690 #endif
17691
17692 #if DB_VERSION_MAJOR > 2
17693         db_env_create( NULL, 0 );
17694 #elif DB_VERSION_MAJOR > 1
17695         db_appexit( NULL );
17696 #else
17697         (void) dbopen( NULL, 0, 0, 0, NULL);
17698 #endif
17699
17700 ; return 0; }
17701 EOF
17702 if { (eval echo configure:17702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17703   rm -rf conftest*
17704   ol_cv_db_db1=yes
17705 else
17706   echo "configure: failed program was:" >&5
17707   cat conftest.$ac_ext >&5
17708   rm -rf conftest*
17709   ol_cv_db_db1=no
17710 fi
17711 rm -f conftest*
17712
17713         LIBS="$ol_LIBS"
17714
17715 fi
17716
17717 echo "$ac_t""$ol_cv_db_db1" 1>&6
17718
17719         if test $ol_cv_db_db1 = yes ; then
17720                 ol_cv_lib_db=-ldb1
17721         fi
17722 fi
17723
17724 if test $ol_cv_lib_db = no ; then
17725         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17726 echo "configure:17726: checking for Berkeley DB link (-ldb-1)" >&5
17727 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17728   echo $ac_n "(cached) $ac_c" 1>&6
17729 else
17730   
17731         ol_DB_LIB=-ldb-1
17732         ol_LIBS=$LIBS
17733         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17734
17735         cat > conftest.$ac_ext <<EOF
17736 #line 17736 "configure"
17737 #include "confdefs.h"
17738
17739 #ifdef HAVE_DB_185_H
17740 # include <db_185.h>
17741 #else
17742 # include <db.h>
17743 #endif
17744
17745 #ifndef DB_VERSION_MAJOR
17746 # define DB_VERSION_MAJOR 1
17747 #endif
17748
17749 #ifndef NULL
17750 #define NULL ((void*)0)
17751 #endif
17752
17753 int main() {
17754
17755 #if DB_VERSION_MAJOR > 1
17756         {
17757                 char *version;
17758                 int major, minor, patch;
17759
17760                 version = db_version( &major, &minor, &patch );
17761
17762                 if( major != DB_VERSION_MAJOR ||
17763                         minor < DB_VERSION_MINOR )
17764                 {
17765                         printf("Berkeley DB version mismatch\n"
17766                                 "\texpected: %s\n\tgot: %s\n",
17767                                 DB_VERSION_STRING, version);
17768                         return 1;
17769                 }
17770         }
17771 #endif
17772
17773 #if DB_VERSION_MAJOR > 2
17774         db_env_create( NULL, 0 );
17775 #elif DB_VERSION_MAJOR > 1
17776         db_appexit( NULL );
17777 #else
17778         (void) dbopen( NULL, 0, 0, 0, NULL);
17779 #endif
17780
17781 ; return 0; }
17782 EOF
17783 if { (eval echo configure:17783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17784   rm -rf conftest*
17785   ol_cv_db_db_1=yes
17786 else
17787   echo "configure: failed program was:" >&5
17788   cat conftest.$ac_ext >&5
17789   rm -rf conftest*
17790   ol_cv_db_db_1=no
17791 fi
17792 rm -f conftest*
17793
17794         LIBS="$ol_LIBS"
17795
17796 fi
17797
17798 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17799
17800         if test $ol_cv_db_db_1 = yes ; then
17801                 ol_cv_lib_db=-ldb-1
17802         fi
17803 fi
17804
17805
17806                 if test "$ol_cv_lib_db" != no ; then
17807                         ol_cv_berkeley_db=yes
17808                 fi
17809         fi
17810 fi
17811
17812         else
17813                 ol_cv_berkeley_db=no
17814 for ac_hdr in db.h
17815 do
17816 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17817 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17818 echo "configure:17818: checking for $ac_hdr" >&5
17819 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17820   echo $ac_n "(cached) $ac_c" 1>&6
17821 else
17822   cat > conftest.$ac_ext <<EOF
17823 #line 17823 "configure"
17824 #include "confdefs.h"
17825 #include <$ac_hdr>
17826 EOF
17827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17828 { (eval echo configure:17828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17830 if test -z "$ac_err"; then
17831   rm -rf conftest*
17832   eval "ac_cv_header_$ac_safe=yes"
17833 else
17834   echo "$ac_err" >&5
17835   echo "configure: failed program was:" >&5
17836   cat conftest.$ac_ext >&5
17837   rm -rf conftest*
17838   eval "ac_cv_header_$ac_safe=no"
17839 fi
17840 rm -f conftest*
17841 fi
17842 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17843   echo "$ac_t""yes" 1>&6
17844     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17845   cat >> confdefs.h <<EOF
17846 #define $ac_tr_hdr 1
17847 EOF
17848  
17849 else
17850   echo "$ac_t""no" 1>&6
17851 fi
17852 done
17853
17854 if test $ac_cv_header_db_h = yes; then
17855         ol_cv_lib_db=no
17856 if test $ol_cv_lib_db = no ; then
17857         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17858 echo "configure:17858: checking for Berkeley DB link (default)" >&5
17859 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17860   echo $ac_n "(cached) $ac_c" 1>&6
17861 else
17862   
17863         ol_DB_LIB=
17864         ol_LIBS=$LIBS
17865         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17866
17867         cat > conftest.$ac_ext <<EOF
17868 #line 17868 "configure"
17869 #include "confdefs.h"
17870
17871 #ifdef HAVE_DB_185_H
17872 # include <db_185.h>
17873 #else
17874 # include <db.h>
17875 #endif
17876
17877 #ifndef DB_VERSION_MAJOR
17878 # define DB_VERSION_MAJOR 1
17879 #endif
17880
17881 #ifndef NULL
17882 #define NULL ((void*)0)
17883 #endif
17884
17885 int main() {
17886
17887 #if DB_VERSION_MAJOR > 1
17888         {
17889                 char *version;
17890                 int major, minor, patch;
17891
17892                 version = db_version( &major, &minor, &patch );
17893
17894                 if( major != DB_VERSION_MAJOR ||
17895                         minor < DB_VERSION_MINOR )
17896                 {
17897                         printf("Berkeley DB version mismatch\n"
17898                                 "\texpected: %s\n\tgot: %s\n",
17899                                 DB_VERSION_STRING, version);
17900                         return 1;
17901                 }
17902         }
17903 #endif
17904
17905 #if DB_VERSION_MAJOR > 2
17906         db_env_create( NULL, 0 );
17907 #elif DB_VERSION_MAJOR > 1
17908         db_appexit( NULL );
17909 #else
17910         (void) dbopen( NULL, 0, 0, 0, NULL);
17911 #endif
17912
17913 ; return 0; }
17914 EOF
17915 if { (eval echo configure:17915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17916   rm -rf conftest*
17917   ol_cv_db_none=yes
17918 else
17919   echo "configure: failed program was:" >&5
17920   cat conftest.$ac_ext >&5
17921   rm -rf conftest*
17922   ol_cv_db_none=no
17923 fi
17924 rm -f conftest*
17925
17926         LIBS="$ol_LIBS"
17927
17928 fi
17929
17930 echo "$ac_t""$ol_cv_db_none" 1>&6
17931
17932         if test $ol_cv_db_none = yes ; then
17933                 ol_cv_lib_db=yes
17934         fi
17935 fi
17936
17937 if test $ol_cv_lib_db = no ; then
17938         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17939 echo "configure:17939: checking for Berkeley DB link (-ldb41)" >&5
17940 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17941   echo $ac_n "(cached) $ac_c" 1>&6
17942 else
17943   
17944         ol_DB_LIB=-ldb41
17945         ol_LIBS=$LIBS
17946         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17947
17948         cat > conftest.$ac_ext <<EOF
17949 #line 17949 "configure"
17950 #include "confdefs.h"
17951
17952 #ifdef HAVE_DB_185_H
17953 # include <db_185.h>
17954 #else
17955 # include <db.h>
17956 #endif
17957
17958 #ifndef DB_VERSION_MAJOR
17959 # define DB_VERSION_MAJOR 1
17960 #endif
17961
17962 #ifndef NULL
17963 #define NULL ((void*)0)
17964 #endif
17965
17966 int main() {
17967
17968 #if DB_VERSION_MAJOR > 1
17969         {
17970                 char *version;
17971                 int major, minor, patch;
17972
17973                 version = db_version( &major, &minor, &patch );
17974
17975                 if( major != DB_VERSION_MAJOR ||
17976                         minor < DB_VERSION_MINOR )
17977                 {
17978                         printf("Berkeley DB version mismatch\n"
17979                                 "\texpected: %s\n\tgot: %s\n",
17980                                 DB_VERSION_STRING, version);
17981                         return 1;
17982                 }
17983         }
17984 #endif
17985
17986 #if DB_VERSION_MAJOR > 2
17987         db_env_create( NULL, 0 );
17988 #elif DB_VERSION_MAJOR > 1
17989         db_appexit( NULL );
17990 #else
17991         (void) dbopen( NULL, 0, 0, 0, NULL);
17992 #endif
17993
17994 ; return 0; }
17995 EOF
17996 if { (eval echo configure:17996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17997   rm -rf conftest*
17998   ol_cv_db_db41=yes
17999 else
18000   echo "configure: failed program was:" >&5
18001   cat conftest.$ac_ext >&5
18002   rm -rf conftest*
18003   ol_cv_db_db41=no
18004 fi
18005 rm -f conftest*
18006
18007         LIBS="$ol_LIBS"
18008
18009 fi
18010
18011 echo "$ac_t""$ol_cv_db_db41" 1>&6
18012
18013         if test $ol_cv_db_db41 = yes ; then
18014                 ol_cv_lib_db=-ldb41
18015         fi
18016 fi
18017
18018 if test $ol_cv_lib_db = no ; then
18019         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18020 echo "configure:18020: checking for Berkeley DB link (-ldb-41)" >&5
18021 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18022   echo $ac_n "(cached) $ac_c" 1>&6
18023 else
18024   
18025         ol_DB_LIB=-ldb-41
18026         ol_LIBS=$LIBS
18027         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18028
18029         cat > conftest.$ac_ext <<EOF
18030 #line 18030 "configure"
18031 #include "confdefs.h"
18032
18033 #ifdef HAVE_DB_185_H
18034 # include <db_185.h>
18035 #else
18036 # include <db.h>
18037 #endif
18038
18039 #ifndef DB_VERSION_MAJOR
18040 # define DB_VERSION_MAJOR 1
18041 #endif
18042
18043 #ifndef NULL
18044 #define NULL ((void*)0)
18045 #endif
18046
18047 int main() {
18048
18049 #if DB_VERSION_MAJOR > 1
18050         {
18051                 char *version;
18052                 int major, minor, patch;
18053
18054                 version = db_version( &major, &minor, &patch );
18055
18056                 if( major != DB_VERSION_MAJOR ||
18057                         minor < DB_VERSION_MINOR )
18058                 {
18059                         printf("Berkeley DB version mismatch\n"
18060                                 "\texpected: %s\n\tgot: %s\n",
18061                                 DB_VERSION_STRING, version);
18062                         return 1;
18063                 }
18064         }
18065 #endif
18066
18067 #if DB_VERSION_MAJOR > 2
18068         db_env_create( NULL, 0 );
18069 #elif DB_VERSION_MAJOR > 1
18070         db_appexit( NULL );
18071 #else
18072         (void) dbopen( NULL, 0, 0, 0, NULL);
18073 #endif
18074
18075 ; return 0; }
18076 EOF
18077 if { (eval echo configure:18077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18078   rm -rf conftest*
18079   ol_cv_db_db_41=yes
18080 else
18081   echo "configure: failed program was:" >&5
18082   cat conftest.$ac_ext >&5
18083   rm -rf conftest*
18084   ol_cv_db_db_41=no
18085 fi
18086 rm -f conftest*
18087
18088         LIBS="$ol_LIBS"
18089
18090 fi
18091
18092 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18093
18094         if test $ol_cv_db_db_41 = yes ; then
18095                 ol_cv_lib_db=-ldb-41
18096         fi
18097 fi
18098
18099 if test $ol_cv_lib_db = no ; then
18100         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18101 echo "configure:18101: checking for Berkeley DB link (-ldb-4.1)" >&5
18102 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18103   echo $ac_n "(cached) $ac_c" 1>&6
18104 else
18105   
18106         ol_DB_LIB=-ldb-4.1
18107         ol_LIBS=$LIBS
18108         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18109
18110         cat > conftest.$ac_ext <<EOF
18111 #line 18111 "configure"
18112 #include "confdefs.h"
18113
18114 #ifdef HAVE_DB_185_H
18115 # include <db_185.h>
18116 #else
18117 # include <db.h>
18118 #endif
18119
18120 #ifndef DB_VERSION_MAJOR
18121 # define DB_VERSION_MAJOR 1
18122 #endif
18123
18124 #ifndef NULL
18125 #define NULL ((void*)0)
18126 #endif
18127
18128 int main() {
18129
18130 #if DB_VERSION_MAJOR > 1
18131         {
18132                 char *version;
18133                 int major, minor, patch;
18134
18135                 version = db_version( &major, &minor, &patch );
18136
18137                 if( major != DB_VERSION_MAJOR ||
18138                         minor < DB_VERSION_MINOR )
18139                 {
18140                         printf("Berkeley DB version mismatch\n"
18141                                 "\texpected: %s\n\tgot: %s\n",
18142                                 DB_VERSION_STRING, version);
18143                         return 1;
18144                 }
18145         }
18146 #endif
18147
18148 #if DB_VERSION_MAJOR > 2
18149         db_env_create( NULL, 0 );
18150 #elif DB_VERSION_MAJOR > 1
18151         db_appexit( NULL );
18152 #else
18153         (void) dbopen( NULL, 0, 0, 0, NULL);
18154 #endif
18155
18156 ; return 0; }
18157 EOF
18158 if { (eval echo configure:18158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18159   rm -rf conftest*
18160   ol_cv_db_db_4_dot_1=yes
18161 else
18162   echo "configure: failed program was:" >&5
18163   cat conftest.$ac_ext >&5
18164   rm -rf conftest*
18165   ol_cv_db_db_4_dot_1=no
18166 fi
18167 rm -f conftest*
18168
18169         LIBS="$ol_LIBS"
18170
18171 fi
18172
18173 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18174
18175         if test $ol_cv_db_db_4_dot_1 = yes ; then
18176                 ol_cv_lib_db=-ldb-4.1
18177         fi
18178 fi
18179
18180 if test $ol_cv_lib_db = no ; then
18181         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18182 echo "configure:18182: checking for Berkeley DB link (-ldb-4-1)" >&5
18183 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18184   echo $ac_n "(cached) $ac_c" 1>&6
18185 else
18186   
18187         ol_DB_LIB=-ldb-4-1
18188         ol_LIBS=$LIBS
18189         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18190
18191         cat > conftest.$ac_ext <<EOF
18192 #line 18192 "configure"
18193 #include "confdefs.h"
18194
18195 #ifdef HAVE_DB_185_H
18196 # include <db_185.h>
18197 #else
18198 # include <db.h>
18199 #endif
18200
18201 #ifndef DB_VERSION_MAJOR
18202 # define DB_VERSION_MAJOR 1
18203 #endif
18204
18205 #ifndef NULL
18206 #define NULL ((void*)0)
18207 #endif
18208
18209 int main() {
18210
18211 #if DB_VERSION_MAJOR > 1
18212         {
18213                 char *version;
18214                 int major, minor, patch;
18215
18216                 version = db_version( &major, &minor, &patch );
18217
18218                 if( major != DB_VERSION_MAJOR ||
18219                         minor < DB_VERSION_MINOR )
18220                 {
18221                         printf("Berkeley DB version mismatch\n"
18222                                 "\texpected: %s\n\tgot: %s\n",
18223                                 DB_VERSION_STRING, version);
18224                         return 1;
18225                 }
18226         }
18227 #endif
18228
18229 #if DB_VERSION_MAJOR > 2
18230         db_env_create( NULL, 0 );
18231 #elif DB_VERSION_MAJOR > 1
18232         db_appexit( NULL );
18233 #else
18234         (void) dbopen( NULL, 0, 0, 0, NULL);
18235 #endif
18236
18237 ; return 0; }
18238 EOF
18239 if { (eval echo configure:18239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18240   rm -rf conftest*
18241   ol_cv_db_db_4_1=yes
18242 else
18243   echo "configure: failed program was:" >&5
18244   cat conftest.$ac_ext >&5
18245   rm -rf conftest*
18246   ol_cv_db_db_4_1=no
18247 fi
18248 rm -f conftest*
18249
18250         LIBS="$ol_LIBS"
18251
18252 fi
18253
18254 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18255
18256         if test $ol_cv_db_db_4_1 = yes ; then
18257                 ol_cv_lib_db=-ldb-4-1
18258         fi
18259 fi
18260
18261 if test $ol_cv_lib_db = no ; then
18262         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18263 echo "configure:18263: checking for Berkeley DB link (-ldb-4)" >&5
18264 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18265   echo $ac_n "(cached) $ac_c" 1>&6
18266 else
18267   
18268         ol_DB_LIB=-ldb-4
18269         ol_LIBS=$LIBS
18270         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18271
18272         cat > conftest.$ac_ext <<EOF
18273 #line 18273 "configure"
18274 #include "confdefs.h"
18275
18276 #ifdef HAVE_DB_185_H
18277 # include <db_185.h>
18278 #else
18279 # include <db.h>
18280 #endif
18281
18282 #ifndef DB_VERSION_MAJOR
18283 # define DB_VERSION_MAJOR 1
18284 #endif
18285
18286 #ifndef NULL
18287 #define NULL ((void*)0)
18288 #endif
18289
18290 int main() {
18291
18292 #if DB_VERSION_MAJOR > 1
18293         {
18294                 char *version;
18295                 int major, minor, patch;
18296
18297                 version = db_version( &major, &minor, &patch );
18298
18299                 if( major != DB_VERSION_MAJOR ||
18300                         minor < DB_VERSION_MINOR )
18301                 {
18302                         printf("Berkeley DB version mismatch\n"
18303                                 "\texpected: %s\n\tgot: %s\n",
18304                                 DB_VERSION_STRING, version);
18305                         return 1;
18306                 }
18307         }
18308 #endif
18309
18310 #if DB_VERSION_MAJOR > 2
18311         db_env_create( NULL, 0 );
18312 #elif DB_VERSION_MAJOR > 1
18313         db_appexit( NULL );
18314 #else
18315         (void) dbopen( NULL, 0, 0, 0, NULL);
18316 #endif
18317
18318 ; return 0; }
18319 EOF
18320 if { (eval echo configure:18320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18321   rm -rf conftest*
18322   ol_cv_db_db_4=yes
18323 else
18324   echo "configure: failed program was:" >&5
18325   cat conftest.$ac_ext >&5
18326   rm -rf conftest*
18327   ol_cv_db_db_4=no
18328 fi
18329 rm -f conftest*
18330
18331         LIBS="$ol_LIBS"
18332
18333 fi
18334
18335 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18336
18337         if test $ol_cv_db_db_4 = yes ; then
18338                 ol_cv_lib_db=-ldb-4
18339         fi
18340 fi
18341
18342 if test $ol_cv_lib_db = no ; then
18343         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18344 echo "configure:18344: checking for Berkeley DB link (-ldb4)" >&5
18345 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18346   echo $ac_n "(cached) $ac_c" 1>&6
18347 else
18348   
18349         ol_DB_LIB=-ldb4
18350         ol_LIBS=$LIBS
18351         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18352
18353         cat > conftest.$ac_ext <<EOF
18354 #line 18354 "configure"
18355 #include "confdefs.h"
18356
18357 #ifdef HAVE_DB_185_H
18358 # include <db_185.h>
18359 #else
18360 # include <db.h>
18361 #endif
18362
18363 #ifndef DB_VERSION_MAJOR
18364 # define DB_VERSION_MAJOR 1
18365 #endif
18366
18367 #ifndef NULL
18368 #define NULL ((void*)0)
18369 #endif
18370
18371 int main() {
18372
18373 #if DB_VERSION_MAJOR > 1
18374         {
18375                 char *version;
18376                 int major, minor, patch;
18377
18378                 version = db_version( &major, &minor, &patch );
18379
18380                 if( major != DB_VERSION_MAJOR ||
18381                         minor < DB_VERSION_MINOR )
18382                 {
18383                         printf("Berkeley DB version mismatch\n"
18384                                 "\texpected: %s\n\tgot: %s\n",
18385                                 DB_VERSION_STRING, version);
18386                         return 1;
18387                 }
18388         }
18389 #endif
18390
18391 #if DB_VERSION_MAJOR > 2
18392         db_env_create( NULL, 0 );
18393 #elif DB_VERSION_MAJOR > 1
18394         db_appexit( NULL );
18395 #else
18396         (void) dbopen( NULL, 0, 0, 0, NULL);
18397 #endif
18398
18399 ; return 0; }
18400 EOF
18401 if { (eval echo configure:18401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18402   rm -rf conftest*
18403   ol_cv_db_db4=yes
18404 else
18405   echo "configure: failed program was:" >&5
18406   cat conftest.$ac_ext >&5
18407   rm -rf conftest*
18408   ol_cv_db_db4=no
18409 fi
18410 rm -f conftest*
18411
18412         LIBS="$ol_LIBS"
18413
18414 fi
18415
18416 echo "$ac_t""$ol_cv_db_db4" 1>&6
18417
18418         if test $ol_cv_db_db4 = yes ; then
18419                 ol_cv_lib_db=-ldb4
18420         fi
18421 fi
18422
18423 if test $ol_cv_lib_db = no ; then
18424         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18425 echo "configure:18425: checking for Berkeley DB link (-ldb)" >&5
18426 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18427   echo $ac_n "(cached) $ac_c" 1>&6
18428 else
18429   
18430         ol_DB_LIB=-ldb
18431         ol_LIBS=$LIBS
18432         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18433
18434         cat > conftest.$ac_ext <<EOF
18435 #line 18435 "configure"
18436 #include "confdefs.h"
18437
18438 #ifdef HAVE_DB_185_H
18439 # include <db_185.h>
18440 #else
18441 # include <db.h>
18442 #endif
18443
18444 #ifndef DB_VERSION_MAJOR
18445 # define DB_VERSION_MAJOR 1
18446 #endif
18447
18448 #ifndef NULL
18449 #define NULL ((void*)0)
18450 #endif
18451
18452 int main() {
18453
18454 #if DB_VERSION_MAJOR > 1
18455         {
18456                 char *version;
18457                 int major, minor, patch;
18458
18459                 version = db_version( &major, &minor, &patch );
18460
18461                 if( major != DB_VERSION_MAJOR ||
18462                         minor < DB_VERSION_MINOR )
18463                 {
18464                         printf("Berkeley DB version mismatch\n"
18465                                 "\texpected: %s\n\tgot: %s\n",
18466                                 DB_VERSION_STRING, version);
18467                         return 1;
18468                 }
18469         }
18470 #endif
18471
18472 #if DB_VERSION_MAJOR > 2
18473         db_env_create( NULL, 0 );
18474 #elif DB_VERSION_MAJOR > 1
18475         db_appexit( NULL );
18476 #else
18477         (void) dbopen( NULL, 0, 0, 0, NULL);
18478 #endif
18479
18480 ; return 0; }
18481 EOF
18482 if { (eval echo configure:18482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18483   rm -rf conftest*
18484   ol_cv_db_db=yes
18485 else
18486   echo "configure: failed program was:" >&5
18487   cat conftest.$ac_ext >&5
18488   rm -rf conftest*
18489   ol_cv_db_db=no
18490 fi
18491 rm -f conftest*
18492
18493         LIBS="$ol_LIBS"
18494
18495 fi
18496
18497 echo "$ac_t""$ol_cv_db_db" 1>&6
18498
18499         if test $ol_cv_db_db = yes ; then
18500                 ol_cv_lib_db=-ldb
18501         fi
18502 fi
18503
18504 if test $ol_cv_lib_db = no ; then
18505         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18506 echo "configure:18506: checking for Berkeley DB link (-ldb3)" >&5
18507 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18508   echo $ac_n "(cached) $ac_c" 1>&6
18509 else
18510   
18511         ol_DB_LIB=-ldb3
18512         ol_LIBS=$LIBS
18513         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18514
18515         cat > conftest.$ac_ext <<EOF
18516 #line 18516 "configure"
18517 #include "confdefs.h"
18518
18519 #ifdef HAVE_DB_185_H
18520 # include <db_185.h>
18521 #else
18522 # include <db.h>
18523 #endif
18524
18525 #ifndef DB_VERSION_MAJOR
18526 # define DB_VERSION_MAJOR 1
18527 #endif
18528
18529 #ifndef NULL
18530 #define NULL ((void*)0)
18531 #endif
18532
18533 int main() {
18534
18535 #if DB_VERSION_MAJOR > 1
18536         {
18537                 char *version;
18538                 int major, minor, patch;
18539
18540                 version = db_version( &major, &minor, &patch );
18541
18542                 if( major != DB_VERSION_MAJOR ||
18543                         minor < DB_VERSION_MINOR )
18544                 {
18545                         printf("Berkeley DB version mismatch\n"
18546                                 "\texpected: %s\n\tgot: %s\n",
18547                                 DB_VERSION_STRING, version);
18548                         return 1;
18549                 }
18550         }
18551 #endif
18552
18553 #if DB_VERSION_MAJOR > 2
18554         db_env_create( NULL, 0 );
18555 #elif DB_VERSION_MAJOR > 1
18556         db_appexit( NULL );
18557 #else
18558         (void) dbopen( NULL, 0, 0, 0, NULL);
18559 #endif
18560
18561 ; return 0; }
18562 EOF
18563 if { (eval echo configure:18563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18564   rm -rf conftest*
18565   ol_cv_db_db3=yes
18566 else
18567   echo "configure: failed program was:" >&5
18568   cat conftest.$ac_ext >&5
18569   rm -rf conftest*
18570   ol_cv_db_db3=no
18571 fi
18572 rm -f conftest*
18573
18574         LIBS="$ol_LIBS"
18575
18576 fi
18577
18578 echo "$ac_t""$ol_cv_db_db3" 1>&6
18579
18580         if test $ol_cv_db_db3 = yes ; then
18581                 ol_cv_lib_db=-ldb3
18582         fi
18583 fi
18584
18585 if test $ol_cv_lib_db = no ; then
18586         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18587 echo "configure:18587: checking for Berkeley DB link (-ldb-3)" >&5
18588 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18589   echo $ac_n "(cached) $ac_c" 1>&6
18590 else
18591   
18592         ol_DB_LIB=-ldb-3
18593         ol_LIBS=$LIBS
18594         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18595
18596         cat > conftest.$ac_ext <<EOF
18597 #line 18597 "configure"
18598 #include "confdefs.h"
18599
18600 #ifdef HAVE_DB_185_H
18601 # include <db_185.h>
18602 #else
18603 # include <db.h>
18604 #endif
18605
18606 #ifndef DB_VERSION_MAJOR
18607 # define DB_VERSION_MAJOR 1
18608 #endif
18609
18610 #ifndef NULL
18611 #define NULL ((void*)0)
18612 #endif
18613
18614 int main() {
18615
18616 #if DB_VERSION_MAJOR > 1
18617         {
18618                 char *version;
18619                 int major, minor, patch;
18620
18621                 version = db_version( &major, &minor, &patch );
18622
18623                 if( major != DB_VERSION_MAJOR ||
18624                         minor < DB_VERSION_MINOR )
18625                 {
18626                         printf("Berkeley DB version mismatch\n"
18627                                 "\texpected: %s\n\tgot: %s\n",
18628                                 DB_VERSION_STRING, version);
18629                         return 1;
18630                 }
18631         }
18632 #endif
18633
18634 #if DB_VERSION_MAJOR > 2
18635         db_env_create( NULL, 0 );
18636 #elif DB_VERSION_MAJOR > 1
18637         db_appexit( NULL );
18638 #else
18639         (void) dbopen( NULL, 0, 0, 0, NULL);
18640 #endif
18641
18642 ; return 0; }
18643 EOF
18644 if { (eval echo configure:18644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18645   rm -rf conftest*
18646   ol_cv_db_db_3=yes
18647 else
18648   echo "configure: failed program was:" >&5
18649   cat conftest.$ac_ext >&5
18650   rm -rf conftest*
18651   ol_cv_db_db_3=no
18652 fi
18653 rm -f conftest*
18654
18655         LIBS="$ol_LIBS"
18656
18657 fi
18658
18659 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18660
18661         if test $ol_cv_db_db_3 = yes ; then
18662                 ol_cv_lib_db=-ldb-3
18663         fi
18664 fi
18665
18666 if test $ol_cv_lib_db = no ; then
18667         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18668 echo "configure:18668: checking for Berkeley DB link (-ldb2)" >&5
18669 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18670   echo $ac_n "(cached) $ac_c" 1>&6
18671 else
18672   
18673         ol_DB_LIB=-ldb2
18674         ol_LIBS=$LIBS
18675         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18676
18677         cat > conftest.$ac_ext <<EOF
18678 #line 18678 "configure"
18679 #include "confdefs.h"
18680
18681 #ifdef HAVE_DB_185_H
18682 # include <db_185.h>
18683 #else
18684 # include <db.h>
18685 #endif
18686
18687 #ifndef DB_VERSION_MAJOR
18688 # define DB_VERSION_MAJOR 1
18689 #endif
18690
18691 #ifndef NULL
18692 #define NULL ((void*)0)
18693 #endif
18694
18695 int main() {
18696
18697 #if DB_VERSION_MAJOR > 1
18698         {
18699                 char *version;
18700                 int major, minor, patch;
18701
18702                 version = db_version( &major, &minor, &patch );
18703
18704                 if( major != DB_VERSION_MAJOR ||
18705                         minor < DB_VERSION_MINOR )
18706                 {
18707                         printf("Berkeley DB version mismatch\n"
18708                                 "\texpected: %s\n\tgot: %s\n",
18709                                 DB_VERSION_STRING, version);
18710                         return 1;
18711                 }
18712         }
18713 #endif
18714
18715 #if DB_VERSION_MAJOR > 2
18716         db_env_create( NULL, 0 );
18717 #elif DB_VERSION_MAJOR > 1
18718         db_appexit( NULL );
18719 #else
18720         (void) dbopen( NULL, 0, 0, 0, NULL);
18721 #endif
18722
18723 ; return 0; }
18724 EOF
18725 if { (eval echo configure:18725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18726   rm -rf conftest*
18727   ol_cv_db_db2=yes
18728 else
18729   echo "configure: failed program was:" >&5
18730   cat conftest.$ac_ext >&5
18731   rm -rf conftest*
18732   ol_cv_db_db2=no
18733 fi
18734 rm -f conftest*
18735
18736         LIBS="$ol_LIBS"
18737
18738 fi
18739
18740 echo "$ac_t""$ol_cv_db_db2" 1>&6
18741
18742         if test $ol_cv_db_db2 = yes ; then
18743                 ol_cv_lib_db=-ldb2
18744         fi
18745 fi
18746
18747 if test $ol_cv_lib_db = no ; then
18748         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18749 echo "configure:18749: checking for Berkeley DB link (-ldb-2)" >&5
18750 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18751   echo $ac_n "(cached) $ac_c" 1>&6
18752 else
18753   
18754         ol_DB_LIB=-ldb-2
18755         ol_LIBS=$LIBS
18756         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18757
18758         cat > conftest.$ac_ext <<EOF
18759 #line 18759 "configure"
18760 #include "confdefs.h"
18761
18762 #ifdef HAVE_DB_185_H
18763 # include <db_185.h>
18764 #else
18765 # include <db.h>
18766 #endif
18767
18768 #ifndef DB_VERSION_MAJOR
18769 # define DB_VERSION_MAJOR 1
18770 #endif
18771
18772 #ifndef NULL
18773 #define NULL ((void*)0)
18774 #endif
18775
18776 int main() {
18777
18778 #if DB_VERSION_MAJOR > 1
18779         {
18780                 char *version;
18781                 int major, minor, patch;
18782
18783                 version = db_version( &major, &minor, &patch );
18784
18785                 if( major != DB_VERSION_MAJOR ||
18786                         minor < DB_VERSION_MINOR )
18787                 {
18788                         printf("Berkeley DB version mismatch\n"
18789                                 "\texpected: %s\n\tgot: %s\n",
18790                                 DB_VERSION_STRING, version);
18791                         return 1;
18792                 }
18793         }
18794 #endif
18795
18796 #if DB_VERSION_MAJOR > 2
18797         db_env_create( NULL, 0 );
18798 #elif DB_VERSION_MAJOR > 1
18799         db_appexit( NULL );
18800 #else
18801         (void) dbopen( NULL, 0, 0, 0, NULL);
18802 #endif
18803
18804 ; return 0; }
18805 EOF
18806 if { (eval echo configure:18806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18807   rm -rf conftest*
18808   ol_cv_db_db_2=yes
18809 else
18810   echo "configure: failed program was:" >&5
18811   cat conftest.$ac_ext >&5
18812   rm -rf conftest*
18813   ol_cv_db_db_2=no
18814 fi
18815 rm -f conftest*
18816
18817         LIBS="$ol_LIBS"
18818
18819 fi
18820
18821 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18822
18823         if test $ol_cv_db_db_2 = yes ; then
18824                 ol_cv_lib_db=-ldb-2
18825         fi
18826 fi
18827
18828 if test $ol_cv_lib_db = no ; then
18829         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18830 echo "configure:18830: checking for Berkeley DB link (-ldb1)" >&5
18831 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18832   echo $ac_n "(cached) $ac_c" 1>&6
18833 else
18834   
18835         ol_DB_LIB=-ldb1
18836         ol_LIBS=$LIBS
18837         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18838
18839         cat > conftest.$ac_ext <<EOF
18840 #line 18840 "configure"
18841 #include "confdefs.h"
18842
18843 #ifdef HAVE_DB_185_H
18844 # include <db_185.h>
18845 #else
18846 # include <db.h>
18847 #endif
18848
18849 #ifndef DB_VERSION_MAJOR
18850 # define DB_VERSION_MAJOR 1
18851 #endif
18852
18853 #ifndef NULL
18854 #define NULL ((void*)0)
18855 #endif
18856
18857 int main() {
18858
18859 #if DB_VERSION_MAJOR > 1
18860         {
18861                 char *version;
18862                 int major, minor, patch;
18863
18864                 version = db_version( &major, &minor, &patch );
18865
18866                 if( major != DB_VERSION_MAJOR ||
18867                         minor < DB_VERSION_MINOR )
18868                 {
18869                         printf("Berkeley DB version mismatch\n"
18870                                 "\texpected: %s\n\tgot: %s\n",
18871                                 DB_VERSION_STRING, version);
18872                         return 1;
18873                 }
18874         }
18875 #endif
18876
18877 #if DB_VERSION_MAJOR > 2
18878         db_env_create( NULL, 0 );
18879 #elif DB_VERSION_MAJOR > 1
18880         db_appexit( NULL );
18881 #else
18882         (void) dbopen( NULL, 0, 0, 0, NULL);
18883 #endif
18884
18885 ; return 0; }
18886 EOF
18887 if { (eval echo configure:18887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18888   rm -rf conftest*
18889   ol_cv_db_db1=yes
18890 else
18891   echo "configure: failed program was:" >&5
18892   cat conftest.$ac_ext >&5
18893   rm -rf conftest*
18894   ol_cv_db_db1=no
18895 fi
18896 rm -f conftest*
18897
18898         LIBS="$ol_LIBS"
18899
18900 fi
18901
18902 echo "$ac_t""$ol_cv_db_db1" 1>&6
18903
18904         if test $ol_cv_db_db1 = yes ; then
18905                 ol_cv_lib_db=-ldb1
18906         fi
18907 fi
18908
18909 if test $ol_cv_lib_db = no ; then
18910         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18911 echo "configure:18911: checking for Berkeley DB link (-ldb-1)" >&5
18912 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18913   echo $ac_n "(cached) $ac_c" 1>&6
18914 else
18915   
18916         ol_DB_LIB=-ldb-1
18917         ol_LIBS=$LIBS
18918         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18919
18920         cat > conftest.$ac_ext <<EOF
18921 #line 18921 "configure"
18922 #include "confdefs.h"
18923
18924 #ifdef HAVE_DB_185_H
18925 # include <db_185.h>
18926 #else
18927 # include <db.h>
18928 #endif
18929
18930 #ifndef DB_VERSION_MAJOR
18931 # define DB_VERSION_MAJOR 1
18932 #endif
18933
18934 #ifndef NULL
18935 #define NULL ((void*)0)
18936 #endif
18937
18938 int main() {
18939
18940 #if DB_VERSION_MAJOR > 1
18941         {
18942                 char *version;
18943                 int major, minor, patch;
18944
18945                 version = db_version( &major, &minor, &patch );
18946
18947                 if( major != DB_VERSION_MAJOR ||
18948                         minor < DB_VERSION_MINOR )
18949                 {
18950                         printf("Berkeley DB version mismatch\n"
18951                                 "\texpected: %s\n\tgot: %s\n",
18952                                 DB_VERSION_STRING, version);
18953                         return 1;
18954                 }
18955         }
18956 #endif
18957
18958 #if DB_VERSION_MAJOR > 2
18959         db_env_create( NULL, 0 );
18960 #elif DB_VERSION_MAJOR > 1
18961         db_appexit( NULL );
18962 #else
18963         (void) dbopen( NULL, 0, 0, 0, NULL);
18964 #endif
18965
18966 ; return 0; }
18967 EOF
18968 if { (eval echo configure:18968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18969   rm -rf conftest*
18970   ol_cv_db_db_1=yes
18971 else
18972   echo "configure: failed program was:" >&5
18973   cat conftest.$ac_ext >&5
18974   rm -rf conftest*
18975   ol_cv_db_db_1=no
18976 fi
18977 rm -f conftest*
18978
18979         LIBS="$ol_LIBS"
18980
18981 fi
18982
18983 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18984
18985         if test $ol_cv_db_db_1 = yes ; then
18986                 ol_cv_lib_db=-ldb-1
18987         fi
18988 fi
18989
18990
18991         if test "$ol_cv_lib_db" != no ; then
18992                 ol_cv_berkeley_db=yes
18993                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18994 echo "configure:18994: checking for Berkeley DB thread support" >&5
18995 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18996   echo $ac_n "(cached) $ac_c" 1>&6
18997 else
18998   
18999         ol_LIBS="$LIBS"
19000         LIBS="$LTHREAD_LIBS $LIBS"
19001         if test $ol_cv_lib_db != yes ; then
19002                 LIBS="$ol_cv_lib_db $LIBS"
19003         fi
19004
19005         if test "$cross_compiling" = yes; then
19006   ol_cv_berkeley_db_thread=cross
19007 else
19008   cat > conftest.$ac_ext <<EOF
19009 #line 19009 "configure"
19010 #include "confdefs.h"
19011
19012 #ifdef HAVE_DB_185_H
19013         choke me;
19014 #else
19015 #include <db.h>
19016 #endif
19017 #ifndef NULL
19018 #define NULL ((void *)0)
19019 #endif
19020 main()
19021 {
19022         int rc;
19023         u_int32_t flags = DB_CREATE |
19024 #ifdef DB_PRIVATE
19025                 DB_PRIVATE |
19026 #endif
19027                 DB_THREAD;
19028
19029 #if DB_VERSION_MAJOR > 2
19030         DB_ENV *env = NULL;
19031
19032         rc = db_env_create( &env, 0 );
19033
19034         flags |= DB_INIT_MPOOL;
19035 #ifdef DB_MPOOL_PRIVATE
19036         flags |= DB_MPOOL_PRIVATE;
19037 #endif
19038
19039         if( rc ) {
19040                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19041                 return rc;
19042         }
19043
19044 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19045         rc = env->open( env, NULL, flags, 0 );
19046 #else
19047         rc = env->open( env, NULL, NULL, flags, 0 );
19048 #endif
19049
19050         if ( rc == 0 ) {
19051                 rc = env->close( env, 0 );
19052         }
19053
19054         if( rc ) {
19055                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19056                 return rc;
19057         }
19058
19059 #else
19060         DB_ENV env;
19061         memset( &env, '\0', sizeof(env) );
19062
19063         rc = db_appinit( NULL, NULL, &env, flags );
19064
19065         if( rc == 0 ) {
19066                 db_appexit( &env );
19067         }
19068
19069         unlink("__db_mpool.share");
19070         unlink("__db_lock.share");
19071 #endif
19072
19073         return rc;
19074 }
19075 EOF
19076 if { (eval echo configure:19076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19077 then
19078   ol_cv_berkeley_db_thread=yes
19079 else
19080   echo "configure: failed program was:" >&5
19081   cat conftest.$ac_ext >&5
19082   rm -fr conftest*
19083   ol_cv_berkeley_db_thread=no
19084 fi
19085 rm -fr conftest*
19086 fi
19087
19088
19089         LIBS="$ol_LIBS"
19090
19091 fi
19092
19093 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19094
19095         if test $ol_cv_berkeley_db_thread != no ; then
19096                 cat >> confdefs.h <<\EOF
19097 #define HAVE_BERKELEY_DB_THREAD 1
19098 EOF
19099
19100         fi
19101
19102         fi
19103 fi
19104
19105         fi
19106
19107         if test $ol_cv_berkeley_db != no ; then
19108                 cat >> confdefs.h <<\EOF
19109 #define HAVE_BERKELEY_DB 1
19110 EOF
19111
19112
19113                 ol_link_ldbm=berkeley
19114                 ol_with_ldbm_api=berkeley
19115
19116                 if test $ol_with_ldbm_type = hash ; then
19117                         cat >> confdefs.h <<\EOF
19118 #define LDBM_USE_DBHASH 1
19119 EOF
19120
19121                 else
19122                         cat >> confdefs.h <<\EOF
19123 #define LDBM_USE_DBBTREE 1
19124 EOF
19125
19126                 fi
19127
19128                                                 if test $ol_cv_lib_db != yes ; then
19129                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19130                 fi
19131         fi
19132 fi
19133
19134 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19135         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19136 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19137         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19138 echo "configure:19138: checking Berkeley DB version for BDB backend" >&5
19139 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19140   echo $ac_n "(cached) $ac_c" 1>&6
19141 else
19142   
19143         cat > conftest.$ac_ext <<EOF
19144 #line 19144 "configure"
19145 #include "confdefs.h"
19146
19147 #include <db.h>
19148
19149  /* this check could be improved */
19150 #ifndef DB_VERSION_MAJOR
19151 #       define DB_VERSION_MAJOR 1
19152 #endif
19153 #ifndef DB_VERSION_MINOR
19154 #       define DB_VERSION_MINOR 0
19155 #endif
19156
19157 /* require 4.1 or later */
19158 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
19159         __db_version_compat
19160 #endif
19161         
19162 EOF
19163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19164   egrep "__db_version_compat" >/dev/null 2>&1; then
19165   rm -rf conftest*
19166   ol_cv_bdb_compat=yes
19167 else
19168   rm -rf conftest*
19169   ol_cv_bdb_compat=no
19170 fi
19171 rm -f conftest*
19172
19173 fi
19174
19175 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19176
19177
19178         if test $ol_cv_bdb_compat = yes ; then
19179                 ol_enable_bdb=yes
19180         elif test $ol_enable_bdb = yes ; then
19181                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19182         else
19183                 ol_enable_bdb=no
19184         fi
19185 fi
19186 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19187         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19188 fi
19189
19190 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19191         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19192         ol_with_ldbm_api=none
19193 fi
19194
19195 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19196         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19197 echo "configure:19197: checking for MDBM library" >&5
19198 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19199   echo $ac_n "(cached) $ac_c" 1>&6
19200 else
19201         ol_LIBS="$LIBS"
19202         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19203 echo "configure:19203: checking for mdbm_set_chain" >&5
19204 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19205   echo $ac_n "(cached) $ac_c" 1>&6
19206 else
19207   cat > conftest.$ac_ext <<EOF
19208 #line 19208 "configure"
19209 #include "confdefs.h"
19210 /* System header to define __stub macros and hopefully few prototypes,
19211     which can conflict with char mdbm_set_chain(); below.  */
19212 #include <assert.h>
19213 /* Override any gcc2 internal prototype to avoid an error.  */
19214 /* We use char because int might match the return type of a gcc2
19215     builtin and then its argument prototype would still apply.  */
19216 char mdbm_set_chain();
19217 char (*f)();
19218
19219 int main() {
19220
19221 /* The GNU C library defines this for functions which it implements
19222     to always fail with ENOSYS.  Some functions are actually named
19223     something starting with __ and the normal name is an alias.  */
19224 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19225 choke me
19226 #else
19227 f = mdbm_set_chain;
19228 #endif
19229
19230 ; return 0; }
19231 EOF
19232 if { (eval echo configure:19232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19233   rm -rf conftest*
19234   eval "ac_cv_func_mdbm_set_chain=yes"
19235 else
19236   echo "configure: failed program was:" >&5
19237   cat conftest.$ac_ext >&5
19238   rm -rf conftest*
19239   eval "ac_cv_func_mdbm_set_chain=no"
19240 fi
19241 rm -f conftest*
19242 fi
19243
19244 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19245   echo "$ac_t""yes" 1>&6
19246   ol_cv_lib_mdbm=yes
19247 else
19248   echo "$ac_t""no" 1>&6
19249
19250                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19251 echo "configure:19251: checking for mdbm_set_chain in -lmdbm" >&5
19252 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19253 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19254   echo $ac_n "(cached) $ac_c" 1>&6
19255 else
19256   ac_save_LIBS="$LIBS"
19257 LIBS="-lmdbm  $LIBS"
19258 cat > conftest.$ac_ext <<EOF
19259 #line 19259 "configure"
19260 #include "confdefs.h"
19261 /* Override any gcc2 internal prototype to avoid an error.  */
19262 /* We use char because int might match the return type of a gcc2
19263     builtin and then its argument prototype would still apply.  */
19264 char mdbm_set_chain();
19265
19266 int main() {
19267 mdbm_set_chain()
19268 ; return 0; }
19269 EOF
19270 if { (eval echo configure:19270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19271   rm -rf conftest*
19272   eval "ac_cv_lib_$ac_lib_var=yes"
19273 else
19274   echo "configure: failed program was:" >&5
19275   cat conftest.$ac_ext >&5
19276   rm -rf conftest*
19277   eval "ac_cv_lib_$ac_lib_var=no"
19278 fi
19279 rm -f conftest*
19280 LIBS="$ac_save_LIBS"
19281
19282 fi
19283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19284   echo "$ac_t""yes" 1>&6
19285   ol_cv_lib_mdbm=-lmdbm
19286 else
19287   echo "$ac_t""no" 1>&6
19288 ol_cv_lib_mdbm=no
19289 fi
19290
19291         
19292 fi
19293
19294         LIBS="$ol_LIBS"
19295
19296 fi
19297
19298 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19299
19300
19301  for ac_hdr in mdbm.h
19302 do
19303 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19304 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19305 echo "configure:19305: checking for $ac_hdr" >&5
19306 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19307   echo $ac_n "(cached) $ac_c" 1>&6
19308 else
19309   cat > conftest.$ac_ext <<EOF
19310 #line 19310 "configure"
19311 #include "confdefs.h"
19312 #include <$ac_hdr>
19313 EOF
19314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19315 { (eval echo configure:19315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19317 if test -z "$ac_err"; then
19318   rm -rf conftest*
19319   eval "ac_cv_header_$ac_safe=yes"
19320 else
19321   echo "$ac_err" >&5
19322   echo "configure: failed program was:" >&5
19323   cat conftest.$ac_ext >&5
19324   rm -rf conftest*
19325   eval "ac_cv_header_$ac_safe=no"
19326 fi
19327 rm -f conftest*
19328 fi
19329 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19330   echo "$ac_t""yes" 1>&6
19331     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19332   cat >> confdefs.h <<EOF
19333 #define $ac_tr_hdr 1
19334 EOF
19335  
19336 else
19337   echo "$ac_t""no" 1>&6
19338 fi
19339 done
19340
19341  echo $ac_n "checking for db""... $ac_c" 1>&6
19342 echo "configure:19342: checking for db" >&5
19343 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19344   echo $ac_n "(cached) $ac_c" 1>&6
19345 else
19346   
19347         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19348                 ol_cv_mdbm=no
19349         else
19350                 ol_cv_mdbm=yes
19351         fi
19352
19353 fi
19354
19355 echo "$ac_t""$ol_cv_mdbm" 1>&6
19356  if test $ol_cv_mdbm = yes ; then
19357         cat >> confdefs.h <<\EOF
19358 #define HAVE_MDBM 1
19359 EOF
19360
19361  fi
19362
19363
19364         if test $ol_cv_mdbm = yes ; then
19365                 ol_link_ldbm=mdbm
19366                 ol_with_ldbm_api=mdbm
19367                 if test $ol_cv_lib_mdbm != yes ; then
19368                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19369                 fi
19370         fi
19371 fi
19372
19373 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19374         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19375 echo "configure:19375: checking for GDBM library" >&5
19376 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19377   echo $ac_n "(cached) $ac_c" 1>&6
19378 else
19379         ol_LIBS="$LIBS"
19380         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19381 echo "configure:19381: checking for gdbm_open" >&5
19382 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19383   echo $ac_n "(cached) $ac_c" 1>&6
19384 else
19385   cat > conftest.$ac_ext <<EOF
19386 #line 19386 "configure"
19387 #include "confdefs.h"
19388 /* System header to define __stub macros and hopefully few prototypes,
19389     which can conflict with char gdbm_open(); below.  */
19390 #include <assert.h>
19391 /* Override any gcc2 internal prototype to avoid an error.  */
19392 /* We use char because int might match the return type of a gcc2
19393     builtin and then its argument prototype would still apply.  */
19394 char gdbm_open();
19395 char (*f)();
19396
19397 int main() {
19398
19399 /* The GNU C library defines this for functions which it implements
19400     to always fail with ENOSYS.  Some functions are actually named
19401     something starting with __ and the normal name is an alias.  */
19402 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19403 choke me
19404 #else
19405 f = gdbm_open;
19406 #endif
19407
19408 ; return 0; }
19409 EOF
19410 if { (eval echo configure:19410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19411   rm -rf conftest*
19412   eval "ac_cv_func_gdbm_open=yes"
19413 else
19414   echo "configure: failed program was:" >&5
19415   cat conftest.$ac_ext >&5
19416   rm -rf conftest*
19417   eval "ac_cv_func_gdbm_open=no"
19418 fi
19419 rm -f conftest*
19420 fi
19421
19422 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19423   echo "$ac_t""yes" 1>&6
19424   ol_cv_lib_gdbm=yes
19425 else
19426   echo "$ac_t""no" 1>&6
19427
19428                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19429 echo "configure:19429: checking for gdbm_open in -lgdbm" >&5
19430 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19431 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19432   echo $ac_n "(cached) $ac_c" 1>&6
19433 else
19434   ac_save_LIBS="$LIBS"
19435 LIBS="-lgdbm  $LIBS"
19436 cat > conftest.$ac_ext <<EOF
19437 #line 19437 "configure"
19438 #include "confdefs.h"
19439 /* Override any gcc2 internal prototype to avoid an error.  */
19440 /* We use char because int might match the return type of a gcc2
19441     builtin and then its argument prototype would still apply.  */
19442 char gdbm_open();
19443
19444 int main() {
19445 gdbm_open()
19446 ; return 0; }
19447 EOF
19448 if { (eval echo configure:19448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19449   rm -rf conftest*
19450   eval "ac_cv_lib_$ac_lib_var=yes"
19451 else
19452   echo "configure: failed program was:" >&5
19453   cat conftest.$ac_ext >&5
19454   rm -rf conftest*
19455   eval "ac_cv_lib_$ac_lib_var=no"
19456 fi
19457 rm -f conftest*
19458 LIBS="$ac_save_LIBS"
19459
19460 fi
19461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19462   echo "$ac_t""yes" 1>&6
19463   ol_cv_lib_gdbm=-lgdbm
19464 else
19465   echo "$ac_t""no" 1>&6
19466 ol_cv_lib_gdbm=no
19467 fi
19468
19469         
19470 fi
19471
19472         LIBS="$ol_LIBS"
19473
19474 fi
19475
19476 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19477
19478
19479  for ac_hdr in gdbm.h
19480 do
19481 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19482 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19483 echo "configure:19483: checking for $ac_hdr" >&5
19484 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19485   echo $ac_n "(cached) $ac_c" 1>&6
19486 else
19487   cat > conftest.$ac_ext <<EOF
19488 #line 19488 "configure"
19489 #include "confdefs.h"
19490 #include <$ac_hdr>
19491 EOF
19492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19493 { (eval echo configure:19493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19495 if test -z "$ac_err"; then
19496   rm -rf conftest*
19497   eval "ac_cv_header_$ac_safe=yes"
19498 else
19499   echo "$ac_err" >&5
19500   echo "configure: failed program was:" >&5
19501   cat conftest.$ac_ext >&5
19502   rm -rf conftest*
19503   eval "ac_cv_header_$ac_safe=no"
19504 fi
19505 rm -f conftest*
19506 fi
19507 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19508   echo "$ac_t""yes" 1>&6
19509     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19510   cat >> confdefs.h <<EOF
19511 #define $ac_tr_hdr 1
19512 EOF
19513  
19514 else
19515   echo "$ac_t""no" 1>&6
19516 fi
19517 done
19518
19519  echo $ac_n "checking for db""... $ac_c" 1>&6
19520 echo "configure:19520: checking for db" >&5
19521 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19522   echo $ac_n "(cached) $ac_c" 1>&6
19523 else
19524   
19525         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19526                 ol_cv_gdbm=no
19527         else
19528                 ol_cv_gdbm=yes
19529         fi
19530
19531 fi
19532
19533 echo "$ac_t""$ol_cv_gdbm" 1>&6
19534  if test $ol_cv_gdbm = yes ; then
19535         cat >> confdefs.h <<\EOF
19536 #define HAVE_GDBM 1
19537 EOF
19538
19539  fi
19540
19541
19542         if test $ol_cv_gdbm = yes ; then
19543                 ol_link_ldbm=gdbm
19544                 ol_with_ldbm_api=gdbm
19545
19546                 if test $ol_cv_lib_gdbm != yes ; then
19547                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19548                 fi
19549         fi
19550 fi
19551
19552 if test $ol_with_ldbm_api = ndbm ; then
19553         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19554 echo "configure:19554: checking for NDBM library" >&5
19555 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19556   echo $ac_n "(cached) $ac_c" 1>&6
19557 else
19558         ol_LIBS="$LIBS"
19559         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19560 echo "configure:19560: checking for dbm_open" >&5
19561 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19562   echo $ac_n "(cached) $ac_c" 1>&6
19563 else
19564   cat > conftest.$ac_ext <<EOF
19565 #line 19565 "configure"
19566 #include "confdefs.h"
19567 /* System header to define __stub macros and hopefully few prototypes,
19568     which can conflict with char dbm_open(); below.  */
19569 #include <assert.h>
19570 /* Override any gcc2 internal prototype to avoid an error.  */
19571 /* We use char because int might match the return type of a gcc2
19572     builtin and then its argument prototype would still apply.  */
19573 char dbm_open();
19574 char (*f)();
19575
19576 int main() {
19577
19578 /* The GNU C library defines this for functions which it implements
19579     to always fail with ENOSYS.  Some functions are actually named
19580     something starting with __ and the normal name is an alias.  */
19581 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19582 choke me
19583 #else
19584 f = dbm_open;
19585 #endif
19586
19587 ; return 0; }
19588 EOF
19589 if { (eval echo configure:19589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19590   rm -rf conftest*
19591   eval "ac_cv_func_dbm_open=yes"
19592 else
19593   echo "configure: failed program was:" >&5
19594   cat conftest.$ac_ext >&5
19595   rm -rf conftest*
19596   eval "ac_cv_func_dbm_open=no"
19597 fi
19598 rm -f conftest*
19599 fi
19600
19601 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19602   echo "$ac_t""yes" 1>&6
19603   ol_cv_lib_ndbm=yes
19604 else
19605   echo "$ac_t""no" 1>&6
19606
19607                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19608 echo "configure:19608: checking for dbm_open in -lndbm" >&5
19609 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19610 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19611   echo $ac_n "(cached) $ac_c" 1>&6
19612 else
19613   ac_save_LIBS="$LIBS"
19614 LIBS="-lndbm  $LIBS"
19615 cat > conftest.$ac_ext <<EOF
19616 #line 19616 "configure"
19617 #include "confdefs.h"
19618 /* Override any gcc2 internal prototype to avoid an error.  */
19619 /* We use char because int might match the return type of a gcc2
19620     builtin and then its argument prototype would still apply.  */
19621 char dbm_open();
19622
19623 int main() {
19624 dbm_open()
19625 ; return 0; }
19626 EOF
19627 if { (eval echo configure:19627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19628   rm -rf conftest*
19629   eval "ac_cv_lib_$ac_lib_var=yes"
19630 else
19631   echo "configure: failed program was:" >&5
19632   cat conftest.$ac_ext >&5
19633   rm -rf conftest*
19634   eval "ac_cv_lib_$ac_lib_var=no"
19635 fi
19636 rm -f conftest*
19637 LIBS="$ac_save_LIBS"
19638
19639 fi
19640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19641   echo "$ac_t""yes" 1>&6
19642   ol_cv_lib_ndbm=-lndbm
19643 else
19644   echo "$ac_t""no" 1>&6
19645
19646                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19647 echo "configure:19647: checking for dbm_open in -ldbm" >&5
19648 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19649 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19650   echo $ac_n "(cached) $ac_c" 1>&6
19651 else
19652   ac_save_LIBS="$LIBS"
19653 LIBS="-ldbm  $LIBS"
19654 cat > conftest.$ac_ext <<EOF
19655 #line 19655 "configure"
19656 #include "confdefs.h"
19657 /* Override any gcc2 internal prototype to avoid an error.  */
19658 /* We use char because int might match the return type of a gcc2
19659     builtin and then its argument prototype would still apply.  */
19660 char dbm_open();
19661
19662 int main() {
19663 dbm_open()
19664 ; return 0; }
19665 EOF
19666 if { (eval echo configure:19666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19667   rm -rf conftest*
19668   eval "ac_cv_lib_$ac_lib_var=yes"
19669 else
19670   echo "configure: failed program was:" >&5
19671   cat conftest.$ac_ext >&5
19672   rm -rf conftest*
19673   eval "ac_cv_lib_$ac_lib_var=no"
19674 fi
19675 rm -f conftest*
19676 LIBS="$ac_save_LIBS"
19677
19678 fi
19679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19680   echo "$ac_t""yes" 1>&6
19681   ol_cv_lib_ndbm=-ldbm
19682 else
19683   echo "$ac_t""no" 1>&6
19684 ol_cv_lib_ndbm=no
19685 fi
19686                 
19687 fi
19688
19689         
19690 fi
19691
19692         LIBS="$ol_LIBS"
19693
19694 fi
19695
19696 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19697
19698
19699  for ac_hdr in ndbm.h
19700 do
19701 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19702 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19703 echo "configure:19703: checking for $ac_hdr" >&5
19704 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19705   echo $ac_n "(cached) $ac_c" 1>&6
19706 else
19707   cat > conftest.$ac_ext <<EOF
19708 #line 19708 "configure"
19709 #include "confdefs.h"
19710 #include <$ac_hdr>
19711 EOF
19712 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19713 { (eval echo configure:19713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19714 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19715 if test -z "$ac_err"; then
19716   rm -rf conftest*
19717   eval "ac_cv_header_$ac_safe=yes"
19718 else
19719   echo "$ac_err" >&5
19720   echo "configure: failed program was:" >&5
19721   cat conftest.$ac_ext >&5
19722   rm -rf conftest*
19723   eval "ac_cv_header_$ac_safe=no"
19724 fi
19725 rm -f conftest*
19726 fi
19727 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19728   echo "$ac_t""yes" 1>&6
19729     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19730   cat >> confdefs.h <<EOF
19731 #define $ac_tr_hdr 1
19732 EOF
19733  
19734 else
19735   echo "$ac_t""no" 1>&6
19736 fi
19737 done
19738
19739  echo $ac_n "checking for db""... $ac_c" 1>&6
19740 echo "configure:19740: checking for db" >&5
19741 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19742   echo $ac_n "(cached) $ac_c" 1>&6
19743 else
19744   
19745         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19746                 ol_cv_ndbm=no
19747         else
19748                 ol_cv_ndbm=yes
19749         fi
19750
19751 fi
19752
19753 echo "$ac_t""$ol_cv_ndbm" 1>&6
19754  if test $ol_cv_ndbm = yes ; then
19755         cat >> confdefs.h <<\EOF
19756 #define HAVE_NDBM 1
19757 EOF
19758
19759  fi
19760
19761
19762         if test $ol_cv_ndbm = yes ; then
19763                 ol_link_ldbm=ndbm
19764                 ol_with_ldbm_api=ndbm
19765
19766                 if test $ol_cv_lib_ndbm != yes ; then
19767                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19768                 fi
19769         fi
19770 fi
19771
19772 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19773         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19774         if test $ol_enable_ldbm = yes ; then
19775                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19776         fi
19777
19778         echo "configure: warning: disabling LDBM" 1>&2
19779         ol_enable_ldbm=no
19780 fi
19781
19782
19783 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19784         BUILD_LIBS_DYNAMIC=shared
19785         cat >> confdefs.h <<\EOF
19786 #define LDAP_LIBS_DYNAMIC 1
19787 EOF
19788
19789         LTSTATIC=""
19790 else
19791         BUILD_LIBS_DYNAMIC=static
19792         LTSTATIC="-static"
19793 fi
19794
19795 if test $ol_enable_wrappers != no ; then
19796         for ac_hdr in tcpd.h
19797 do
19798 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19799 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19800 echo "configure:19800: checking for $ac_hdr" >&5
19801 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19802   echo $ac_n "(cached) $ac_c" 1>&6
19803 else
19804   cat > conftest.$ac_ext <<EOF
19805 #line 19805 "configure"
19806 #include "confdefs.h"
19807 #include <$ac_hdr>
19808 EOF
19809 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19810 { (eval echo configure:19810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19811 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19812 if test -z "$ac_err"; then
19813   rm -rf conftest*
19814   eval "ac_cv_header_$ac_safe=yes"
19815 else
19816   echo "$ac_err" >&5
19817   echo "configure: failed program was:" >&5
19818   cat conftest.$ac_ext >&5
19819   rm -rf conftest*
19820   eval "ac_cv_header_$ac_safe=no"
19821 fi
19822 rm -f conftest*
19823 fi
19824 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19825   echo "$ac_t""yes" 1>&6
19826     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19827   cat >> confdefs.h <<EOF
19828 #define $ac_tr_hdr 1
19829 EOF
19830  
19831                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19832 echo "configure:19832: checking for TCP wrappers library" >&5
19833                 save_LIBS="$LIBS"
19834                 LIBS="$LIBS -lwrap"
19835                 cat > conftest.$ac_ext <<EOF
19836 #line 19836 "configure"
19837 #include "confdefs.h"
19838
19839 #include <tcpd.h>
19840 int allow_severity = 0;
19841 int deny_severity  = 0;
19842
19843 struct request_info *req;
19844                 
19845 int main() {
19846
19847 hosts_access(req)
19848                 
19849 ; return 0; }
19850 EOF
19851 if { (eval echo configure:19851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19852   rm -rf conftest*
19853   echo "$ac_t""-lwrap" 1>&6
19854                 have_wrappers=yes
19855                 LIBS="$save_LIBS"
19856 else
19857   echo "configure: failed program was:" >&5
19858   cat conftest.$ac_ext >&5
19859   rm -rf conftest*
19860   
19861                                 LIBS="$LIBS -lnsl"
19862                 cat > conftest.$ac_ext <<EOF
19863 #line 19863 "configure"
19864 #include "confdefs.h"
19865
19866 #include <tcpd.h>
19867 int allow_severity = 0;
19868 int deny_severity  = 0;
19869
19870 struct request_info *req;
19871                 
19872 int main() {
19873
19874 hosts_access(req)
19875                 
19876 ; return 0; }
19877 EOF
19878 if { (eval echo configure:19878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19879   rm -rf conftest*
19880   echo "$ac_t""-lwrap -lnsl" 1>&6
19881                 have_wrappers=yes
19882                 LIBS="$save_LIBS -lnsl"
19883 else
19884   echo "configure: failed program was:" >&5
19885   cat conftest.$ac_ext >&5
19886   rm -rf conftest*
19887   
19888                 echo "$ac_t""no" 1>&6
19889                 have_wrappers=no
19890                 LIBS=$save_LIBS
19891 fi
19892 rm -f conftest*
19893 fi
19894 rm -f conftest*
19895 else
19896   echo "$ac_t""no" 1>&6
19897 have_wrappers=no
19898 fi
19899 done
19900
19901
19902         if test $have_wrappers = yes ; then
19903                 cat >> confdefs.h <<\EOF
19904 #define HAVE_TCPD 1
19905 EOF
19906
19907                 WRAP_LIBS="-lwrap"
19908         elif test $ol_enable_wrappers = yes ; then
19909                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19910         else
19911                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19912                 WRAP_LIBS=""
19913         fi
19914 fi
19915
19916 if test $ol_enable_syslog != no ; then
19917         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19918 echo "configure:19918: checking for openlog" >&5
19919 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19920   echo $ac_n "(cached) $ac_c" 1>&6
19921 else
19922   cat > conftest.$ac_ext <<EOF
19923 #line 19923 "configure"
19924 #include "confdefs.h"
19925 /* System header to define __stub macros and hopefully few prototypes,
19926     which can conflict with char openlog(); below.  */
19927 #include <assert.h>
19928 /* Override any gcc2 internal prototype to avoid an error.  */
19929 /* We use char because int might match the return type of a gcc2
19930     builtin and then its argument prototype would still apply.  */
19931 char openlog();
19932 char (*f)();
19933
19934 int main() {
19935
19936 /* The GNU C library defines this for functions which it implements
19937     to always fail with ENOSYS.  Some functions are actually named
19938     something starting with __ and the normal name is an alias.  */
19939 #if defined (__stub_openlog) || defined (__stub___openlog)
19940 choke me
19941 #else
19942 f = openlog;
19943 #endif
19944
19945 ; return 0; }
19946 EOF
19947 if { (eval echo configure:19947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19948   rm -rf conftest*
19949   eval "ac_cv_func_openlog=yes"
19950 else
19951   echo "configure: failed program was:" >&5
19952   cat conftest.$ac_ext >&5
19953   rm -rf conftest*
19954   eval "ac_cv_func_openlog=no"
19955 fi
19956 rm -f conftest*
19957 fi
19958
19959 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19960   echo "$ac_t""yes" 1>&6
19961   :
19962 else
19963   echo "$ac_t""no" 1>&6
19964 fi
19965
19966         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19967                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19968         fi
19969         ol_enable_syslog=$ac_cv_func_openlog
19970 fi
19971
19972
19973 ol_link_sql=no
19974 if test $ol_enable_sql != no ; then
19975         for ac_hdr in sql.h sqlext.h
19976 do
19977 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19978 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19979 echo "configure:19979: checking for $ac_hdr" >&5
19980 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19981   echo $ac_n "(cached) $ac_c" 1>&6
19982 else
19983   cat > conftest.$ac_ext <<EOF
19984 #line 19984 "configure"
19985 #include "confdefs.h"
19986 #include <$ac_hdr>
19987 EOF
19988 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19989 { (eval echo configure:19989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19990 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19991 if test -z "$ac_err"; then
19992   rm -rf conftest*
19993   eval "ac_cv_header_$ac_safe=yes"
19994 else
19995   echo "$ac_err" >&5
19996   echo "configure: failed program was:" >&5
19997   cat conftest.$ac_ext >&5
19998   rm -rf conftest*
19999   eval "ac_cv_header_$ac_safe=no"
20000 fi
20001 rm -f conftest*
20002 fi
20003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20004   echo "$ac_t""yes" 1>&6
20005     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20006   cat >> confdefs.h <<EOF
20007 #define $ac_tr_hdr 1
20008 EOF
20009  
20010 else
20011   echo "$ac_t""no" 1>&6
20012 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20013         
20014 fi
20015 done
20016
20017
20018         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20019 echo "configure:20019: checking for SQLDriverConnect in -liodbc" >&5
20020 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20021 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20022   echo $ac_n "(cached) $ac_c" 1>&6
20023 else
20024   ac_save_LIBS="$LIBS"
20025 LIBS="-liodbc  $LIBS"
20026 cat > conftest.$ac_ext <<EOF
20027 #line 20027 "configure"
20028 #include "confdefs.h"
20029 /* Override any gcc2 internal prototype to avoid an error.  */
20030 /* We use char because int might match the return type of a gcc2
20031     builtin and then its argument prototype would still apply.  */
20032 char SQLDriverConnect();
20033
20034 int main() {
20035 SQLDriverConnect()
20036 ; return 0; }
20037 EOF
20038 if { (eval echo configure:20038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20039   rm -rf conftest*
20040   eval "ac_cv_lib_$ac_lib_var=yes"
20041 else
20042   echo "configure: failed program was:" >&5
20043   cat conftest.$ac_ext >&5
20044   rm -rf conftest*
20045   eval "ac_cv_lib_$ac_lib_var=no"
20046 fi
20047 rm -f conftest*
20048 LIBS="$ac_save_LIBS"
20049
20050 fi
20051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20052   echo "$ac_t""yes" 1>&6
20053   have_iodbc=yes
20054 else
20055   echo "$ac_t""no" 1>&6
20056 have_iodbc=no
20057 fi
20058
20059         if test $have_iodbc = yes ; then
20060                 ol_link_sql="-liodbc"
20061         else
20062                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20063 echo "configure:20063: checking for SQLDriverConnect in -lodbc" >&5
20064 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20065 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20066   echo $ac_n "(cached) $ac_c" 1>&6
20067 else
20068   ac_save_LIBS="$LIBS"
20069 LIBS="-lodbc  $LIBS"
20070 cat > conftest.$ac_ext <<EOF
20071 #line 20071 "configure"
20072 #include "confdefs.h"
20073 /* Override any gcc2 internal prototype to avoid an error.  */
20074 /* We use char because int might match the return type of a gcc2
20075     builtin and then its argument prototype would still apply.  */
20076 char SQLDriverConnect();
20077
20078 int main() {
20079 SQLDriverConnect()
20080 ; return 0; }
20081 EOF
20082 if { (eval echo configure:20082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20083   rm -rf conftest*
20084   eval "ac_cv_lib_$ac_lib_var=yes"
20085 else
20086   echo "configure: failed program was:" >&5
20087   cat conftest.$ac_ext >&5
20088   rm -rf conftest*
20089   eval "ac_cv_lib_$ac_lib_var=no"
20090 fi
20091 rm -f conftest*
20092 LIBS="$ac_save_LIBS"
20093
20094 fi
20095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20096   echo "$ac_t""yes" 1>&6
20097   have_odbc=yes
20098 else
20099   echo "$ac_t""no" 1>&6
20100 have_odbc=no
20101 fi
20102
20103                 if test $have_odbc = yes ; then
20104                         ol_link_sql="-lodbc"
20105                 fi
20106         fi
20107
20108         if test $ol_link_sql != no ; then
20109                 SLAPD_SQL_LIBS="$ol_link_sql"
20110
20111         elif test $ol_enable_sql != auto ; then
20112                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20113         fi
20114 fi
20115
20116 if test $ol_enable_tcl != no ; then
20117         for ac_hdr in tcl.h
20118 do
20119 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20120 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20121 echo "configure:20121: checking for $ac_hdr" >&5
20122 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20123   echo $ac_n "(cached) $ac_c" 1>&6
20124 else
20125   cat > conftest.$ac_ext <<EOF
20126 #line 20126 "configure"
20127 #include "confdefs.h"
20128 #include <$ac_hdr>
20129 EOF
20130 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20131 { (eval echo configure:20131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20132 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20133 if test -z "$ac_err"; then
20134   rm -rf conftest*
20135   eval "ac_cv_header_$ac_safe=yes"
20136 else
20137   echo "$ac_err" >&5
20138   echo "configure: failed program was:" >&5
20139   cat conftest.$ac_ext >&5
20140   rm -rf conftest*
20141   eval "ac_cv_header_$ac_safe=no"
20142 fi
20143 rm -f conftest*
20144 fi
20145 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20146   echo "$ac_t""yes" 1>&6
20147     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20148   cat >> confdefs.h <<EOF
20149 #define $ac_tr_hdr 1
20150 EOF
20151  
20152 else
20153   echo "$ac_t""no" 1>&6
20154 fi
20155 done
20156
20157
20158         if test $ac_cv_header_tcl_h != yes ; then
20159                 have_tcl=no
20160         else
20161                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
20162                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
20163 echo "configure:20163: checking for main in -l$lib" >&5
20164 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
20165 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20166   echo $ac_n "(cached) $ac_c" 1>&6
20167 else
20168   ac_save_LIBS="$LIBS"
20169 LIBS="-l$lib  $LIBS"
20170 cat > conftest.$ac_ext <<EOF
20171 #line 20171 "configure"
20172 #include "confdefs.h"
20173
20174 int main() {
20175 main()
20176 ; return 0; }
20177 EOF
20178 if { (eval echo configure:20178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20179   rm -rf conftest*
20180   eval "ac_cv_lib_$ac_lib_var=yes"
20181 else
20182   echo "configure: failed program was:" >&5
20183   cat conftest.$ac_ext >&5
20184   rm -rf conftest*
20185   eval "ac_cv_lib_$ac_lib_var=no"
20186 fi
20187 rm -f conftest*
20188 LIBS="$ac_save_LIBS"
20189
20190 fi
20191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20192   echo "$ac_t""yes" 1>&6
20193   have_tcl=yes
20194                            if test x"$ol_with_tcl_module" = "xstatic" ; then
20195                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
20196                            else
20197                                         MOD_TCL_LIB="-l${lib}"
20198                            fi;break
20199 else
20200   echo "$ac_t""no" 1>&6
20201 have_tcl=no
20202 fi
20203
20204                 done
20205         fi
20206
20207         if test $have_tcl != yes ; then
20208                 echo "configure: warning: could not find -ltcl" 1>&2
20209                 if test $ol_enable_tcl = yes ; then
20210                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
20211                 fi
20212
20213                 ol_enable_tcl=no
20214         fi
20215 fi
20216
20217 ol_link_termcap=no
20218 for ac_hdr in termcap.h ncurses.h
20219 do
20220 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20221 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20222 echo "configure:20222: checking for $ac_hdr" >&5
20223 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20224   echo $ac_n "(cached) $ac_c" 1>&6
20225 else
20226   cat > conftest.$ac_ext <<EOF
20227 #line 20227 "configure"
20228 #include "confdefs.h"
20229 #include <$ac_hdr>
20230 EOF
20231 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20232 { (eval echo configure:20232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20233 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20234 if test -z "$ac_err"; then
20235   rm -rf conftest*
20236   eval "ac_cv_header_$ac_safe=yes"
20237 else
20238   echo "$ac_err" >&5
20239   echo "configure: failed program was:" >&5
20240   cat conftest.$ac_ext >&5
20241   rm -rf conftest*
20242   eval "ac_cv_header_$ac_safe=no"
20243 fi
20244 rm -f conftest*
20245 fi
20246 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20247   echo "$ac_t""yes" 1>&6
20248     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20249   cat >> confdefs.h <<EOF
20250 #define $ac_tr_hdr 1
20251 EOF
20252  
20253 else
20254   echo "$ac_t""no" 1>&6
20255 fi
20256 done
20257
20258
20259 if test $ol_link_termcap = no ; then
20260         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
20261 echo "configure:20261: checking for tputs in -ltermcap" >&5
20262 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
20263 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20264   echo $ac_n "(cached) $ac_c" 1>&6
20265 else
20266   ac_save_LIBS="$LIBS"
20267 LIBS="-ltermcap  $LIBS"
20268 cat > conftest.$ac_ext <<EOF
20269 #line 20269 "configure"
20270 #include "confdefs.h"
20271 /* Override any gcc2 internal prototype to avoid an error.  */
20272 /* We use char because int might match the return type of a gcc2
20273     builtin and then its argument prototype would still apply.  */
20274 char tputs();
20275
20276 int main() {
20277 tputs()
20278 ; return 0; }
20279 EOF
20280 if { (eval echo configure:20280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20281   rm -rf conftest*
20282   eval "ac_cv_lib_$ac_lib_var=yes"
20283 else
20284   echo "configure: failed program was:" >&5
20285   cat conftest.$ac_ext >&5
20286   rm -rf conftest*
20287   eval "ac_cv_lib_$ac_lib_var=no"
20288 fi
20289 rm -f conftest*
20290 LIBS="$ac_save_LIBS"
20291
20292 fi
20293 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20294   echo "$ac_t""yes" 1>&6
20295   have_termcap=yes
20296 else
20297   echo "$ac_t""no" 1>&6
20298 have_termcap=no
20299 fi
20300
20301         if test $have_termcap = yes ; then
20302                 cat >> confdefs.h <<\EOF
20303 #define HAVE_TERMCAP 1
20304 EOF
20305
20306                 ol_link_termcap=yes
20307                 TERMCAP_LIBS=-ltermcap
20308         fi
20309 fi
20310
20311 if test $ol_link_termcap = no ; then
20312         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20313 echo "configure:20313: checking for initscr in -lncurses" >&5
20314 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20315 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20316   echo $ac_n "(cached) $ac_c" 1>&6
20317 else
20318   ac_save_LIBS="$LIBS"
20319 LIBS="-lncurses  $LIBS"
20320 cat > conftest.$ac_ext <<EOF
20321 #line 20321 "configure"
20322 #include "confdefs.h"
20323 /* Override any gcc2 internal prototype to avoid an error.  */
20324 /* We use char because int might match the return type of a gcc2
20325     builtin and then its argument prototype would still apply.  */
20326 char initscr();
20327
20328 int main() {
20329 initscr()
20330 ; return 0; }
20331 EOF
20332 if { (eval echo configure:20332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20333   rm -rf conftest*
20334   eval "ac_cv_lib_$ac_lib_var=yes"
20335 else
20336   echo "configure: failed program was:" >&5
20337   cat conftest.$ac_ext >&5
20338   rm -rf conftest*
20339   eval "ac_cv_lib_$ac_lib_var=no"
20340 fi
20341 rm -f conftest*
20342 LIBS="$ac_save_LIBS"
20343
20344 fi
20345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20346   echo "$ac_t""yes" 1>&6
20347   have_ncurses=yes
20348 else
20349   echo "$ac_t""no" 1>&6
20350 have_ncurses=no
20351 fi
20352
20353         if test $have_ncurses = yes ; then
20354                 cat >> confdefs.h <<\EOF
20355 #define HAVE_NCURSES 1
20356 EOF
20357
20358                 ol_link_termcap=yes
20359                 TERMCAP_LIBS=-lncurses
20360         fi
20361 fi
20362
20363 if test $ol_link_termcap = no ; then
20364         cat >> confdefs.h <<\EOF
20365 #define NO_TERMCAP 1
20366 EOF
20367
20368         TERMCAP_LIBS=
20369 fi
20370
20371 ol_link_sasl=no
20372 ol_link_spasswd=no
20373 if test $ol_with_cyrus_sasl != no ; then
20374         for ac_hdr in sasl/sasl.h sasl.h
20375 do
20376 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20377 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20378 echo "configure:20378: checking for $ac_hdr" >&5
20379 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20380   echo $ac_n "(cached) $ac_c" 1>&6
20381 else
20382   cat > conftest.$ac_ext <<EOF
20383 #line 20383 "configure"
20384 #include "confdefs.h"
20385 #include <$ac_hdr>
20386 EOF
20387 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20388 { (eval echo configure:20388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20389 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20390 if test -z "$ac_err"; then
20391   rm -rf conftest*
20392   eval "ac_cv_header_$ac_safe=yes"
20393 else
20394   echo "$ac_err" >&5
20395   echo "configure: failed program was:" >&5
20396   cat conftest.$ac_ext >&5
20397   rm -rf conftest*
20398   eval "ac_cv_header_$ac_safe=no"
20399 fi
20400 rm -f conftest*
20401 fi
20402 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20403   echo "$ac_t""yes" 1>&6
20404     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20405   cat >> confdefs.h <<EOF
20406 #define $ac_tr_hdr 1
20407 EOF
20408  
20409 else
20410   echo "$ac_t""no" 1>&6
20411 fi
20412 done
20413
20414
20415         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20416                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20417 echo "configure:20417: checking for sasl_client_init in -lsasl2" >&5
20418 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20419 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20420   echo $ac_n "(cached) $ac_c" 1>&6
20421 else
20422   ac_save_LIBS="$LIBS"
20423 LIBS="-lsasl2  $LIBS"
20424 cat > conftest.$ac_ext <<EOF
20425 #line 20425 "configure"
20426 #include "confdefs.h"
20427 /* Override any gcc2 internal prototype to avoid an error.  */
20428 /* We use char because int might match the return type of a gcc2
20429     builtin and then its argument prototype would still apply.  */
20430 char sasl_client_init();
20431
20432 int main() {
20433 sasl_client_init()
20434 ; return 0; }
20435 EOF
20436 if { (eval echo configure:20436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20437   rm -rf conftest*
20438   eval "ac_cv_lib_$ac_lib_var=yes"
20439 else
20440   echo "configure: failed program was:" >&5
20441   cat conftest.$ac_ext >&5
20442   rm -rf conftest*
20443   eval "ac_cv_lib_$ac_lib_var=no"
20444 fi
20445 rm -f conftest*
20446 LIBS="$ac_save_LIBS"
20447
20448 fi
20449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20450   echo "$ac_t""yes" 1>&6
20451   ol_link_sasl="-lsasl2"
20452 else
20453   echo "$ac_t""no" 1>&6
20454 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20455 echo "configure:20455: checking for sasl_client_init in -lsasl" >&5
20456 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20457 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20458   echo $ac_n "(cached) $ac_c" 1>&6
20459 else
20460   ac_save_LIBS="$LIBS"
20461 LIBS="-lsasl  $LIBS"
20462 cat > conftest.$ac_ext <<EOF
20463 #line 20463 "configure"
20464 #include "confdefs.h"
20465 /* Override any gcc2 internal prototype to avoid an error.  */
20466 /* We use char because int might match the return type of a gcc2
20467     builtin and then its argument prototype would still apply.  */
20468 char sasl_client_init();
20469
20470 int main() {
20471 sasl_client_init()
20472 ; return 0; }
20473 EOF
20474 if { (eval echo configure:20474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20475   rm -rf conftest*
20476   eval "ac_cv_lib_$ac_lib_var=yes"
20477 else
20478   echo "configure: failed program was:" >&5
20479   cat conftest.$ac_ext >&5
20480   rm -rf conftest*
20481   eval "ac_cv_lib_$ac_lib_var=no"
20482 fi
20483 rm -f conftest*
20484 LIBS="$ac_save_LIBS"
20485
20486 fi
20487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20488   echo "$ac_t""yes" 1>&6
20489   ol_link_sasl="-lsasl"
20490 else
20491   echo "$ac_t""no" 1>&6
20492 fi
20493
20494 fi
20495
20496         fi
20497
20498         if test $ol_link_sasl = no ; then
20499                 if test $ol_with_cyrus_sasl != auto ; then
20500                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20501                 else
20502                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20503                         echo "configure: warning: SASL authentication not supported!" 1>&2
20504                         if test $ol_link_tls = no ; then
20505                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20506                         fi
20507                 fi
20508         else
20509                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20510 echo "configure:20510: checking Cyrus SASL library version" >&5
20511 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20512   echo $ac_n "(cached) $ac_c" 1>&6
20513 else
20514   
20515         cat > conftest.$ac_ext <<EOF
20516 #line 20516 "configure"
20517 #include "confdefs.h"
20518
20519 #ifdef HAVE_SASL_SASL_H
20520 #include <sasl/sasl.h>
20521 #else
20522 #include <sasl.h>
20523 #endif
20524
20525 /* require 2.1.3 or later */
20526 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20527         char *__sasl_compat = "1.5.x okay";
20528 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20529         __sasl_compat "2.2+ or better okay (we guess)";
20530 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20531         && SASL_VERSION_STEP >=3
20532         __sasl_compat = "2.1.3+ or better okay";
20533 #endif
20534         
20535 EOF
20536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20537   egrep "__sasl_compat" >/dev/null 2>&1; then
20538   rm -rf conftest*
20539   ol_cv_sasl_compat=yes
20540 else
20541   rm -rf conftest*
20542   ol_cv_sasl_compat=no
20543 fi
20544 rm -f conftest*
20545
20546 fi
20547
20548 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20549
20550                 if test $ol_cv_sasl_compat = no ; then
20551                         ol_link_sasl=no
20552                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20553                 fi
20554
20555                 cat >> confdefs.h <<\EOF
20556 #define HAVE_CYRUS_SASL 1
20557 EOF
20558
20559                 SASL_LIBS="$ol_link_sasl"
20560                 if test $ol_enable_spasswd != no ; then
20561                         ol_link_spasswd=yes
20562                 fi
20563
20564                 ac_save_LIBS="$LIBS"
20565                 LIBS="$LIBS $ol_link_sasl"
20566                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20567 echo "configure:20567: checking for sasl_version" >&5
20568 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20569   echo $ac_n "(cached) $ac_c" 1>&6
20570 else
20571   cat > conftest.$ac_ext <<EOF
20572 #line 20572 "configure"
20573 #include "confdefs.h"
20574 /* System header to define __stub macros and hopefully few prototypes,
20575     which can conflict with char sasl_version(); below.  */
20576 #include <assert.h>
20577 /* Override any gcc2 internal prototype to avoid an error.  */
20578 /* We use char because int might match the return type of a gcc2
20579     builtin and then its argument prototype would still apply.  */
20580 char sasl_version();
20581 char (*f)();
20582
20583 int main() {
20584
20585 /* The GNU C library defines this for functions which it implements
20586     to always fail with ENOSYS.  Some functions are actually named
20587     something starting with __ and the normal name is an alias.  */
20588 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20589 choke me
20590 #else
20591 f = sasl_version;
20592 #endif
20593
20594 ; return 0; }
20595 EOF
20596 if { (eval echo configure:20596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20597   rm -rf conftest*
20598   eval "ac_cv_func_sasl_version=yes"
20599 else
20600   echo "configure: failed program was:" >&5
20601   cat conftest.$ac_ext >&5
20602   rm -rf conftest*
20603   eval "ac_cv_func_sasl_version=no"
20604 fi
20605 rm -f conftest*
20606 fi
20607
20608 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20609   echo "$ac_t""yes" 1>&6
20610   cat >> confdefs.h <<\EOF
20611 #define HAVE_SASL_VERSION 1
20612 EOF
20613
20614 else
20615   echo "$ac_t""no" 1>&6
20616 fi
20617
20618                 LIBS="$ac_save_LIBS"
20619         fi
20620
20621 else
20622         echo "configure: warning: SASL authentication not supported!" 1>&2
20623         if test $ol_link_tls = no ; then
20624                 echo "configure: warning: Strong authentication not supported!" 1>&2
20625         fi
20626 fi
20627
20628 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20629         dev=no
20630         if test -r /dev/urandom ; then
20631                 dev="/dev/urandom";
20632         elif test -r /idev/urandom ; then
20633                 dev="/idev/urandom";
20634         elif test -r /dev/srandom ; then
20635                 dev="/dev/srandom";
20636         elif test -r /dev/random ; then
20637                 dev="/dev/random";
20638         elif test -r /idev/random ; then
20639                 dev="/idev/random";
20640         fi
20641
20642         if test $dev != no ; then
20643                 cat >> confdefs.h <<EOF
20644 #define URANDOM_DEVICE "$dev"
20645 EOF
20646
20647         fi
20648 fi
20649
20650 ol_link_fetch=no
20651 if test $ol_with_fetch != no ; then
20652         ol_LIBS=$LIBS
20653 LIBS="-lfetch -lcom_err $LIBS"
20654 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20655 echo "configure:20655: checking fetch(3) library" >&5
20656 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20657   echo $ac_n "(cached) $ac_c" 1>&6
20658 else
20659   
20660         cat > conftest.$ac_ext <<EOF
20661 #line 20661 "configure"
20662 #include "confdefs.h"
20663
20664 #include <sys/param.h>
20665 #include <stdio.h>
20666 #include <fetch.h>
20667 int main() {
20668 struct url *u = fetchParseURL("file:///"); 
20669 ; return 0; }
20670 EOF
20671 if { (eval echo configure:20671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20672   rm -rf conftest*
20673   ol_cv_lib_fetch=yes
20674 else
20675   echo "configure: failed program was:" >&5
20676   cat conftest.$ac_ext >&5
20677   rm -rf conftest*
20678   ol_cv_lib_fetch=no
20679 fi
20680 rm -f conftest*
20681 fi
20682
20683 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20684 LIBS=$ol_LIBS
20685 if test $ol_cv_lib_fetch != no ; then
20686         ol_link_fetch="-lfetch -lcom_err"
20687         cat >> confdefs.h <<\EOF
20688 #define HAVE_FETCH 1
20689 EOF
20690
20691 fi
20692
20693
20694         if test $ol_cv_lib_fetch != no ; then
20695                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20696                 ol_link_fetch=freebsd
20697
20698         elif test $ol_with_fetch != auto ; then
20699                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20700         fi 
20701 fi
20702
20703 if test $ol_enable_crypt != no ; then
20704         save_LIBS="$LIBS"
20705         LIBS="$TLS_LIBS $LIBS"
20706
20707         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20708 echo "configure:20708: checking for crypt" >&5
20709 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20710   echo $ac_n "(cached) $ac_c" 1>&6
20711 else
20712   cat > conftest.$ac_ext <<EOF
20713 #line 20713 "configure"
20714 #include "confdefs.h"
20715 /* System header to define __stub macros and hopefully few prototypes,
20716     which can conflict with char crypt(); below.  */
20717 #include <assert.h>
20718 /* Override any gcc2 internal prototype to avoid an error.  */
20719 /* We use char because int might match the return type of a gcc2
20720     builtin and then its argument prototype would still apply.  */
20721 char crypt();
20722 char (*f)();
20723
20724 int main() {
20725
20726 /* The GNU C library defines this for functions which it implements
20727     to always fail with ENOSYS.  Some functions are actually named
20728     something starting with __ and the normal name is an alias.  */
20729 #if defined (__stub_crypt) || defined (__stub___crypt)
20730 choke me
20731 #else
20732 f = crypt;
20733 #endif
20734
20735 ; return 0; }
20736 EOF
20737 if { (eval echo configure:20737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20738   rm -rf conftest*
20739   eval "ac_cv_func_crypt=yes"
20740 else
20741   echo "configure: failed program was:" >&5
20742   cat conftest.$ac_ext >&5
20743   rm -rf conftest*
20744   eval "ac_cv_func_crypt=no"
20745 fi
20746 rm -f conftest*
20747 fi
20748
20749 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20750   echo "$ac_t""yes" 1>&6
20751   have_crypt=yes
20752 else
20753   echo "$ac_t""no" 1>&6
20754
20755                 LIBS="$save_LIBS"
20756                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20757 echo "configure:20757: checking for crypt in -lcrypt" >&5
20758 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20759 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20760   echo $ac_n "(cached) $ac_c" 1>&6
20761 else
20762   ac_save_LIBS="$LIBS"
20763 LIBS="-lcrypt  $LIBS"
20764 cat > conftest.$ac_ext <<EOF
20765 #line 20765 "configure"
20766 #include "confdefs.h"
20767 /* Override any gcc2 internal prototype to avoid an error.  */
20768 /* We use char because int might match the return type of a gcc2
20769     builtin and then its argument prototype would still apply.  */
20770 char crypt();
20771
20772 int main() {
20773 crypt()
20774 ; return 0; }
20775 EOF
20776 if { (eval echo configure:20776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20777   rm -rf conftest*
20778   eval "ac_cv_lib_$ac_lib_var=yes"
20779 else
20780   echo "configure: failed program was:" >&5
20781   cat conftest.$ac_ext >&5
20782   rm -rf conftest*
20783   eval "ac_cv_lib_$ac_lib_var=no"
20784 fi
20785 rm -f conftest*
20786 LIBS="$ac_save_LIBS"
20787
20788 fi
20789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20790   echo "$ac_t""yes" 1>&6
20791   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20792                         have_crypt=yes
20793 else
20794   echo "$ac_t""no" 1>&6
20795 have_crypt=no
20796 fi
20797
20798 fi
20799
20800
20801         LIBS="$save_LIBS"
20802
20803         if test $have_crypt = yes ; then
20804                 cat >> confdefs.h <<\EOF
20805 #define HAVE_CRYPT 1
20806 EOF
20807
20808         else
20809                 echo "configure: warning: could not find crypt" 1>&2
20810                 if test $ol_enable_crypt = yes ; then
20811                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20812                 fi
20813
20814                 echo "configure: warning: disabling crypt support" 1>&2
20815                 ol_enable_crypt=no
20816         fi
20817 fi
20818
20819 if test $ol_enable_proctitle != no ; then
20820         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20821 echo "configure:20821: checking for setproctitle" >&5
20822 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20823   echo $ac_n "(cached) $ac_c" 1>&6
20824 else
20825   cat > conftest.$ac_ext <<EOF
20826 #line 20826 "configure"
20827 #include "confdefs.h"
20828 /* System header to define __stub macros and hopefully few prototypes,
20829     which can conflict with char setproctitle(); below.  */
20830 #include <assert.h>
20831 /* Override any gcc2 internal prototype to avoid an error.  */
20832 /* We use char because int might match the return type of a gcc2
20833     builtin and then its argument prototype would still apply.  */
20834 char setproctitle();
20835 char (*f)();
20836
20837 int main() {
20838
20839 /* The GNU C library defines this for functions which it implements
20840     to always fail with ENOSYS.  Some functions are actually named
20841     something starting with __ and the normal name is an alias.  */
20842 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20843 choke me
20844 #else
20845 f = setproctitle;
20846 #endif
20847
20848 ; return 0; }
20849 EOF
20850 if { (eval echo configure:20850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20851   rm -rf conftest*
20852   eval "ac_cv_func_setproctitle=yes"
20853 else
20854   echo "configure: failed program was:" >&5
20855   cat conftest.$ac_ext >&5
20856   rm -rf conftest*
20857   eval "ac_cv_func_setproctitle=no"
20858 fi
20859 rm -f conftest*
20860 fi
20861
20862 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20863   echo "$ac_t""yes" 1>&6
20864   have_setproctitle=yes
20865 else
20866   echo "$ac_t""no" 1>&6
20867
20868                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20869 echo "configure:20869: checking for setproctitle in -lutil" >&5
20870 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20871 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20872   echo $ac_n "(cached) $ac_c" 1>&6
20873 else
20874   ac_save_LIBS="$LIBS"
20875 LIBS="-lutil  $LIBS"
20876 cat > conftest.$ac_ext <<EOF
20877 #line 20877 "configure"
20878 #include "confdefs.h"
20879 /* Override any gcc2 internal prototype to avoid an error.  */
20880 /* We use char because int might match the return type of a gcc2
20881     builtin and then its argument prototype would still apply.  */
20882 char setproctitle();
20883
20884 int main() {
20885 setproctitle()
20886 ; return 0; }
20887 EOF
20888 if { (eval echo configure:20888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20889   rm -rf conftest*
20890   eval "ac_cv_lib_$ac_lib_var=yes"
20891 else
20892   echo "configure: failed program was:" >&5
20893   cat conftest.$ac_ext >&5
20894   rm -rf conftest*
20895   eval "ac_cv_lib_$ac_lib_var=no"
20896 fi
20897 rm -f conftest*
20898 LIBS="$ac_save_LIBS"
20899
20900 fi
20901 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20902   echo "$ac_t""yes" 1>&6
20903   have_setproctitle=yes
20904                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20905 else
20906   echo "$ac_t""no" 1>&6
20907 have_setproctitle=no
20908                         LIBOBJS="$LIBOBJS setproctitle.o"
20909                         LIBSRCS="$LIBSRCS setproctitle.c"
20910 fi
20911
20912 fi
20913
20914
20915         if test $have_setproctitle = yes ; then
20916                 cat >> confdefs.h <<\EOF
20917 #define HAVE_SETPROCTITLE 1
20918 EOF
20919
20920         fi
20921 fi
20922
20923 if test $ol_enable_slp != no ; then
20924         for ac_hdr in slp.h 
20925 do
20926 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20927 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20928 echo "configure:20928: checking for $ac_hdr" >&5
20929 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20930   echo $ac_n "(cached) $ac_c" 1>&6
20931 else
20932   cat > conftest.$ac_ext <<EOF
20933 #line 20933 "configure"
20934 #include "confdefs.h"
20935 #include <$ac_hdr>
20936 EOF
20937 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20938 { (eval echo configure:20938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20939 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20940 if test -z "$ac_err"; then
20941   rm -rf conftest*
20942   eval "ac_cv_header_$ac_safe=yes"
20943 else
20944   echo "$ac_err" >&5
20945   echo "configure: failed program was:" >&5
20946   cat conftest.$ac_ext >&5
20947   rm -rf conftest*
20948   eval "ac_cv_header_$ac_safe=no"
20949 fi
20950 rm -f conftest*
20951 fi
20952 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20953   echo "$ac_t""yes" 1>&6
20954     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20955   cat >> confdefs.h <<EOF
20956 #define $ac_tr_hdr 1
20957 EOF
20958  
20959 else
20960   echo "$ac_t""no" 1>&6
20961 fi
20962 done
20963
20964
20965         if test $ac_cv_header_slp_h = yes ; then
20966                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20967 echo "configure:20967: checking for SLPOpen in -lslp" >&5
20968 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20969 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20970   echo $ac_n "(cached) $ac_c" 1>&6
20971 else
20972   ac_save_LIBS="$LIBS"
20973 LIBS="-lslp  $LIBS"
20974 cat > conftest.$ac_ext <<EOF
20975 #line 20975 "configure"
20976 #include "confdefs.h"
20977 /* Override any gcc2 internal prototype to avoid an error.  */
20978 /* We use char because int might match the return type of a gcc2
20979     builtin and then its argument prototype would still apply.  */
20980 char SLPOpen();
20981
20982 int main() {
20983 SLPOpen()
20984 ; return 0; }
20985 EOF
20986 if { (eval echo configure:20986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20987   rm -rf conftest*
20988   eval "ac_cv_lib_$ac_lib_var=yes"
20989 else
20990   echo "configure: failed program was:" >&5
20991   cat conftest.$ac_ext >&5
20992   rm -rf conftest*
20993   eval "ac_cv_lib_$ac_lib_var=no"
20994 fi
20995 rm -f conftest*
20996 LIBS="$ac_save_LIBS"
20997
20998 fi
20999 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21000   echo "$ac_t""yes" 1>&6
21001   have_slp=yes
21002 else
21003   echo "$ac_t""no" 1>&6
21004 have_slp=no
21005 fi
21006
21007                 if test $have_slp = yes ; then
21008                         cat >> confdefs.h <<\EOF
21009 #define HAVE_SLP 1
21010 EOF
21011
21012                         SLAPD_SLP_LIBS=-lslp
21013                 fi
21014
21015         elif test $ol_enable_slp = yes ; then
21016                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21017         fi
21018 fi
21019
21020
21021 echo $ac_n "checking long long""... $ac_c" 1>&6
21022 echo "configure:21022: checking long long" >&5
21023 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21024   echo $ac_n "(cached) $ac_c" 1>&6
21025 else
21026   
21027         cat > conftest.$ac_ext <<EOF
21028 #line 21028 "configure"
21029 #include "confdefs.h"
21030
21031 int main() {
21032 long long x;
21033 ; return 0; }
21034 EOF
21035 if { (eval echo configure:21035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21036   rm -rf conftest*
21037   ol_cv_type_long_long=yes
21038 else
21039   echo "configure: failed program was:" >&5
21040   cat conftest.$ac_ext >&5
21041   rm -rf conftest*
21042   ol_cv_type_long_long=no
21043 fi
21044 rm -f conftest*
21045 fi
21046
21047 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21048 if test $ol_cv_type_long_long = yes; then
21049         cat >> confdefs.h <<\EOF
21050 #define HAVE_LONG_LONG 1
21051 EOF
21052
21053 fi
21054
21055 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21056 echo "configure:21056: checking for ANSI C header files" >&5
21057 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21058   echo $ac_n "(cached) $ac_c" 1>&6
21059 else
21060   cat > conftest.$ac_ext <<EOF
21061 #line 21061 "configure"
21062 #include "confdefs.h"
21063 #include <stdlib.h>
21064 #include <stdarg.h>
21065 #include <string.h>
21066 #include <float.h>
21067 EOF
21068 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21069 { (eval echo configure:21069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21070 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21071 if test -z "$ac_err"; then
21072   rm -rf conftest*
21073   ac_cv_header_stdc=yes
21074 else
21075   echo "$ac_err" >&5
21076   echo "configure: failed program was:" >&5
21077   cat conftest.$ac_ext >&5
21078   rm -rf conftest*
21079   ac_cv_header_stdc=no
21080 fi
21081 rm -f conftest*
21082
21083 if test $ac_cv_header_stdc = yes; then
21084   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21085 cat > conftest.$ac_ext <<EOF
21086 #line 21086 "configure"
21087 #include "confdefs.h"
21088 #include <string.h>
21089 EOF
21090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21091   egrep "memchr" >/dev/null 2>&1; then
21092   :
21093 else
21094   rm -rf conftest*
21095   ac_cv_header_stdc=no
21096 fi
21097 rm -f conftest*
21098
21099 fi
21100
21101 if test $ac_cv_header_stdc = yes; then
21102   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21103 cat > conftest.$ac_ext <<EOF
21104 #line 21104 "configure"
21105 #include "confdefs.h"
21106 #include <stdlib.h>
21107 EOF
21108 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21109   egrep "free" >/dev/null 2>&1; then
21110   :
21111 else
21112   rm -rf conftest*
21113   ac_cv_header_stdc=no
21114 fi
21115 rm -f conftest*
21116
21117 fi
21118
21119 if test $ac_cv_header_stdc = yes; then
21120   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21121 if test "$cross_compiling" = yes; then
21122   :
21123 else
21124   cat > conftest.$ac_ext <<EOF
21125 #line 21125 "configure"
21126 #include "confdefs.h"
21127 #include <ctype.h>
21128 #if ((' ' & 0x0FF) == 0x020)
21129 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21130 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21131 #else
21132 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21133  || ('j' <= (c) && (c) <= 'r') \
21134  || ('s' <= (c) && (c) <= 'z'))
21135 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21136 #endif
21137 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21138 int main () { int i; for (i = 0; i < 256; i++)
21139 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21140 exit (0); }
21141
21142 EOF
21143 if { (eval echo configure:21143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21144 then
21145   :
21146 else
21147   echo "configure: failed program was:" >&5
21148   cat conftest.$ac_ext >&5
21149   rm -fr conftest*
21150   ac_cv_header_stdc=no
21151 fi
21152 rm -fr conftest*
21153 fi
21154
21155 fi
21156 fi
21157
21158 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21159 if test $ac_cv_header_stdc = yes; then
21160   cat >> confdefs.h <<\EOF
21161 #define STDC_HEADERS 1
21162 EOF
21163
21164 fi
21165
21166 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21167 echo "configure:21167: checking for mode_t" >&5
21168 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21169   echo $ac_n "(cached) $ac_c" 1>&6
21170 else
21171   cat > conftest.$ac_ext <<EOF
21172 #line 21172 "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])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21183   rm -rf conftest*
21184   eval "ac_cv_type_mode_t=yes"
21185 else
21186   rm -rf conftest*
21187   eval "ac_cv_type_mode_t=no"
21188 fi
21189 rm -f conftest*
21190
21191 fi
21192 if eval "test \"`echo '$ac_cv_type_'mode_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 mode_t int
21198 EOF
21199
21200 fi
21201
21202 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21203 echo "configure:21203: checking for off_t" >&5
21204 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21205   echo $ac_n "(cached) $ac_c" 1>&6
21206 else
21207   cat > conftest.$ac_ext <<EOF
21208 #line 21208 "configure"
21209 #include "confdefs.h"
21210 #include <sys/types.h>
21211 #if STDC_HEADERS
21212 #include <stdlib.h>
21213 #include <stddef.h>
21214 #endif
21215
21216 EOF
21217 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21218   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21219   rm -rf conftest*
21220   eval "ac_cv_type_off_t=yes"
21221 else
21222   rm -rf conftest*
21223   eval "ac_cv_type_off_t=no"
21224 fi
21225 rm -f conftest*
21226
21227 fi
21228 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21229   echo "$ac_t""yes" 1>&6
21230 else
21231   echo "$ac_t""no" 1>&6
21232   cat >> confdefs.h <<EOF
21233 #define off_t long
21234 EOF
21235
21236 fi
21237
21238 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21239 echo "configure:21239: checking for pid_t" >&5
21240 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21241   echo $ac_n "(cached) $ac_c" 1>&6
21242 else
21243   cat > conftest.$ac_ext <<EOF
21244 #line 21244 "configure"
21245 #include "confdefs.h"
21246 #include <sys/types.h>
21247 #if STDC_HEADERS
21248 #include <stdlib.h>
21249 #include <stddef.h>
21250 #endif
21251
21252 EOF
21253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21254   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21255   rm -rf conftest*
21256   eval "ac_cv_type_pid_t=yes"
21257 else
21258   rm -rf conftest*
21259   eval "ac_cv_type_pid_t=no"
21260 fi
21261 rm -f conftest*
21262
21263 fi
21264 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21265   echo "$ac_t""yes" 1>&6
21266 else
21267   echo "$ac_t""no" 1>&6
21268   cat >> confdefs.h <<EOF
21269 #define pid_t int
21270 EOF
21271
21272 fi
21273
21274 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21275 echo "configure:21275: checking for ptrdiff_t" >&5
21276 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21277   echo $ac_n "(cached) $ac_c" 1>&6
21278 else
21279   cat > conftest.$ac_ext <<EOF
21280 #line 21280 "configure"
21281 #include "confdefs.h"
21282 #include <stddef.h>
21283 int main() {
21284 ptrdiff_t p
21285 ; return 0; }
21286 EOF
21287 if { (eval echo configure:21287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21288   rm -rf conftest*
21289   am_cv_type_ptrdiff_t=yes
21290 else
21291   echo "configure: failed program was:" >&5
21292   cat conftest.$ac_ext >&5
21293   rm -rf conftest*
21294   am_cv_type_ptrdiff_t=no
21295 fi
21296 rm -f conftest*
21297 fi
21298
21299 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21300    if test $am_cv_type_ptrdiff_t = yes; then
21301      cat >> confdefs.h <<\EOF
21302 #define HAVE_PTRDIFF_T 1
21303 EOF
21304
21305    fi
21306
21307 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21308 echo "configure:21308: checking return type of signal handlers" >&5
21309 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21310   echo $ac_n "(cached) $ac_c" 1>&6
21311 else
21312   cat > conftest.$ac_ext <<EOF
21313 #line 21313 "configure"
21314 #include "confdefs.h"
21315 #include <sys/types.h>
21316 #include <signal.h>
21317 #ifdef signal
21318 #undef signal
21319 #endif
21320 #ifdef __cplusplus
21321 extern "C" void (*signal (int, void (*)(int)))(int);
21322 #else
21323 void (*signal ()) ();
21324 #endif
21325
21326 int main() {
21327 int i;
21328 ; return 0; }
21329 EOF
21330 if { (eval echo configure:21330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21331   rm -rf conftest*
21332   ac_cv_type_signal=void
21333 else
21334   echo "configure: failed program was:" >&5
21335   cat conftest.$ac_ext >&5
21336   rm -rf conftest*
21337   ac_cv_type_signal=int
21338 fi
21339 rm -f conftest*
21340 fi
21341
21342 echo "$ac_t""$ac_cv_type_signal" 1>&6
21343 cat >> confdefs.h <<EOF
21344 #define RETSIGTYPE $ac_cv_type_signal
21345 EOF
21346
21347
21348 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21349 echo "configure:21349: checking for size_t" >&5
21350 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21351   echo $ac_n "(cached) $ac_c" 1>&6
21352 else
21353   cat > conftest.$ac_ext <<EOF
21354 #line 21354 "configure"
21355 #include "confdefs.h"
21356 #include <sys/types.h>
21357 #if STDC_HEADERS
21358 #include <stdlib.h>
21359 #include <stddef.h>
21360 #endif
21361
21362 EOF
21363 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21364   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21365   rm -rf conftest*
21366   eval "ac_cv_type_size_t=yes"
21367 else
21368   rm -rf conftest*
21369   eval "ac_cv_type_size_t=no"
21370 fi
21371 rm -f conftest*
21372
21373 fi
21374 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21375   echo "$ac_t""yes" 1>&6
21376 else
21377   echo "$ac_t""no" 1>&6
21378   cat >> confdefs.h <<EOF
21379 #define size_t unsigned
21380 EOF
21381
21382 fi
21383
21384
21385 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21386 echo "configure:21386: checking for ssize_t" >&5
21387 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21388   echo $ac_n "(cached) $ac_c" 1>&6
21389 else
21390   cat > conftest.$ac_ext <<EOF
21391 #line 21391 "configure"
21392 #include "confdefs.h"
21393 #include <sys/types.h>
21394 #if STDC_HEADERS
21395 #include <stdlib.h>
21396 #include <stddef.h>
21397 #endif
21398
21399 EOF
21400 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21401   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21402   rm -rf conftest*
21403   eval "ac_cv_type_ssize_t=yes"
21404 else
21405   rm -rf conftest*
21406   eval "ac_cv_type_ssize_t=no"
21407 fi
21408 rm -f conftest*
21409
21410 fi
21411 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21412   echo "$ac_t""yes" 1>&6
21413 else
21414   echo "$ac_t""no" 1>&6
21415   cat >> confdefs.h <<EOF
21416 #define ssize_t signed int
21417 EOF
21418
21419 fi
21420
21421 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21422 echo "configure:21422: checking for caddr_t" >&5
21423 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21424   echo $ac_n "(cached) $ac_c" 1>&6
21425 else
21426   cat > conftest.$ac_ext <<EOF
21427 #line 21427 "configure"
21428 #include "confdefs.h"
21429 #include <sys/types.h>
21430 #if STDC_HEADERS
21431 #include <stdlib.h>
21432 #include <stddef.h>
21433 #endif
21434
21435 EOF
21436 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21437   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21438   rm -rf conftest*
21439   eval "ac_cv_type_caddr_t=yes"
21440 else
21441   rm -rf conftest*
21442   eval "ac_cv_type_caddr_t=no"
21443 fi
21444 rm -f conftest*
21445
21446 fi
21447 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21448   echo "$ac_t""yes" 1>&6
21449 else
21450   echo "$ac_t""no" 1>&6
21451   cat >> confdefs.h <<EOF
21452 #define caddr_t char *
21453 EOF
21454
21455 fi
21456
21457
21458 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21459 echo "configure:21459: checking for socklen_t" >&5
21460 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21461   echo $ac_n "(cached) $ac_c" 1>&6
21462 else
21463   cat > conftest.$ac_ext <<EOF
21464 #line 21464 "configure"
21465 #include "confdefs.h"
21466
21467 #ifdef HAVE_SYS_TYPES_H
21468 #include <sys/types.h>
21469 #endif
21470 #ifdef HAVE_SYS_SOCKET_H
21471 #include <sys/socket.h>
21472 #endif
21473
21474 int main() {
21475 socklen_t len;
21476 ; return 0; }
21477 EOF
21478 if { (eval echo configure:21478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21479   rm -rf conftest*
21480   ol_cv_type_socklen_t=yes
21481 else
21482   echo "configure: failed program was:" >&5
21483   cat conftest.$ac_ext >&5
21484   rm -rf conftest*
21485   ol_cv_type_socklen_t=no
21486 fi
21487 rm -f conftest*
21488 fi
21489
21490 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21491   if test $ol_cv_type_socklen_t = no; then
21492     cat >> confdefs.h <<\EOF
21493 #define socklen_t int
21494 EOF
21495
21496   fi
21497  
21498 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21499 echo "configure:21499: checking for member st_blksize in aggregate type struct stat" >&5
21500 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21501   echo $ac_n "(cached) $ac_c" 1>&6
21502 else
21503   cat > conftest.$ac_ext <<EOF
21504 #line 21504 "configure"
21505 #include "confdefs.h"
21506 #include <sys/types.h>
21507 #include <sys/stat.h>
21508 int main() {
21509 struct stat foo; foo.st_blksize;
21510 ; return 0; }
21511 EOF
21512 if { (eval echo configure:21512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21513   rm -rf conftest*
21514   ac_cv_c_struct_member_st_blksize=yes
21515 else
21516   echo "configure: failed program was:" >&5
21517   cat conftest.$ac_ext >&5
21518   rm -rf conftest*
21519   ac_cv_c_struct_member_st_blksize=no
21520 fi
21521 rm -f conftest*
21522 fi
21523
21524 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21525 st_blksize="$ac_cv_c_struct_member_st_blksize"
21526 if test $ac_cv_c_struct_member_st_blksize = yes; then
21527   cat >> confdefs.h <<\EOF
21528 #define HAVE_ST_BLKSIZE 1
21529 EOF
21530
21531 fi
21532
21533 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21534 echo "configure:21534: checking whether time.h and sys/time.h may both be included" >&5
21535 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21536   echo $ac_n "(cached) $ac_c" 1>&6
21537 else
21538   cat > conftest.$ac_ext <<EOF
21539 #line 21539 "configure"
21540 #include "confdefs.h"
21541 #include <sys/types.h>
21542 #include <sys/time.h>
21543 #include <time.h>
21544 int main() {
21545 struct tm *tp;
21546 ; return 0; }
21547 EOF
21548 if { (eval echo configure:21548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21549   rm -rf conftest*
21550   ac_cv_header_time=yes
21551 else
21552   echo "configure: failed program was:" >&5
21553   cat conftest.$ac_ext >&5
21554   rm -rf conftest*
21555   ac_cv_header_time=no
21556 fi
21557 rm -f conftest*
21558 fi
21559
21560 echo "$ac_t""$ac_cv_header_time" 1>&6
21561 if test $ac_cv_header_time = yes; then
21562   cat >> confdefs.h <<\EOF
21563 #define TIME_WITH_SYS_TIME 1
21564 EOF
21565
21566 fi
21567
21568 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21569 echo "configure:21569: checking whether struct tm is in sys/time.h or time.h" >&5
21570 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21571   echo $ac_n "(cached) $ac_c" 1>&6
21572 else
21573   cat > conftest.$ac_ext <<EOF
21574 #line 21574 "configure"
21575 #include "confdefs.h"
21576 #include <sys/types.h>
21577 #include <time.h>
21578 int main() {
21579 struct tm *tp; tp->tm_sec;
21580 ; return 0; }
21581 EOF
21582 if { (eval echo configure:21582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21583   rm -rf conftest*
21584   ac_cv_struct_tm=time.h
21585 else
21586   echo "configure: failed program was:" >&5
21587   cat conftest.$ac_ext >&5
21588   rm -rf conftest*
21589   ac_cv_struct_tm=sys/time.h
21590 fi
21591 rm -f conftest*
21592 fi
21593
21594 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21595 if test $ac_cv_struct_tm = sys/time.h; then
21596   cat >> confdefs.h <<\EOF
21597 #define TM_IN_SYS_TIME 1
21598 EOF
21599
21600 fi
21601
21602 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21603 echo "configure:21603: checking for uid_t in sys/types.h" >&5
21604 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21605   echo $ac_n "(cached) $ac_c" 1>&6
21606 else
21607   cat > conftest.$ac_ext <<EOF
21608 #line 21608 "configure"
21609 #include "confdefs.h"
21610 #include <sys/types.h>
21611 EOF
21612 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21613   egrep "uid_t" >/dev/null 2>&1; then
21614   rm -rf conftest*
21615   ac_cv_type_uid_t=yes
21616 else
21617   rm -rf conftest*
21618   ac_cv_type_uid_t=no
21619 fi
21620 rm -f conftest*
21621
21622 fi
21623
21624 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21625 if test $ac_cv_type_uid_t = no; then
21626   cat >> confdefs.h <<\EOF
21627 #define uid_t int
21628 EOF
21629
21630   cat >> confdefs.h <<\EOF
21631 #define gid_t int
21632 EOF
21633
21634 fi
21635
21636 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21637 echo "configure:21637: checking for sig_atomic_t" >&5
21638 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21639   echo $ac_n "(cached) $ac_c" 1>&6
21640 else
21641   cat > conftest.$ac_ext <<EOF
21642 #line 21642 "configure"
21643 #include "confdefs.h"
21644 #include <signal.h>
21645 int main() {
21646 sig_atomic_t atomic;
21647 ; return 0; }
21648 EOF
21649 if { (eval echo configure:21649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21650   rm -rf conftest*
21651   ol_cv_type_sig_atomic_t=yes
21652 else
21653   echo "configure: failed program was:" >&5
21654   cat conftest.$ac_ext >&5
21655   rm -rf conftest*
21656   ol_cv_type_sig_atomic_t=no
21657 fi
21658 rm -f conftest*
21659 fi
21660
21661 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21662   if test $ol_cv_type_sig_atomic_t = no; then
21663     cat >> confdefs.h <<\EOF
21664 #define sig_atomic_t int
21665 EOF
21666
21667   fi
21668  
21669
21670
21671 # test for pw_gecos in struct passwd
21672 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21673 echo "configure:21673: checking struct passwd for pw_gecos" >&5
21674 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21675   echo $ac_n "(cached) $ac_c" 1>&6
21676 else
21677   
21678         cat > conftest.$ac_ext <<EOF
21679 #line 21679 "configure"
21680 #include "confdefs.h"
21681 #include <pwd.h>
21682 int main() {
21683
21684         struct passwd pwd;
21685         pwd.pw_gecos = pwd.pw_name;
21686
21687 ; return 0; }
21688 EOF
21689 if { (eval echo configure:21689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21690   rm -rf conftest*
21691   ol_cv_struct_passwd_pw_gecos=yes
21692 else
21693   echo "configure: failed program was:" >&5
21694   cat conftest.$ac_ext >&5
21695   rm -rf conftest*
21696   ol_cv_struct_passwd_pw_gecos=no
21697 fi
21698 rm -f conftest*
21699 fi
21700
21701 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21702 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21703         cat >> confdefs.h <<\EOF
21704 #define HAVE_PW_GECOS 1
21705 EOF
21706
21707 fi
21708
21709 # test for pw_passwd in struct passwd
21710 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21711 echo "configure:21711: checking struct passwd for pw_passwd" >&5
21712 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21713   echo $ac_n "(cached) $ac_c" 1>&6
21714 else
21715   
21716         cat > conftest.$ac_ext <<EOF
21717 #line 21717 "configure"
21718 #include "confdefs.h"
21719 #include <pwd.h>
21720 int main() {
21721
21722         struct passwd pwd;
21723         pwd.pw_passwd = pwd.pw_name;
21724
21725 ; return 0; }
21726 EOF
21727 if { (eval echo configure:21727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21728   rm -rf conftest*
21729   ol_cv_struct_passwd_pw_passwd=yes
21730 else
21731   echo "configure: failed program was:" >&5
21732   cat conftest.$ac_ext >&5
21733   rm -rf conftest*
21734   ol_cv_struct_passwd_pw_passwd=no
21735 fi
21736 rm -f conftest*
21737 fi
21738
21739 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21740 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21741         cat >> confdefs.h <<\EOF
21742 #define HAVE_PW_PASSWD 1
21743 EOF
21744
21745 fi
21746
21747
21748 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21749 echo "configure:21749: checking if toupper() requires islower()" >&5
21750 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21751   echo $ac_n "(cached) $ac_c" 1>&6
21752 else
21753   
21754         if test "$cross_compiling" = yes; then
21755   ol_cv_c_upper_lower=safe
21756 else
21757   cat > conftest.$ac_ext <<EOF
21758 #line 21758 "configure"
21759 #include "confdefs.h"
21760
21761 #include <ctype.h>
21762 main()
21763 {
21764         if ('C' == toupper('C'))
21765                 exit(0);
21766         else
21767                 exit(1);
21768 }
21769 EOF
21770 if { (eval echo configure:21770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21771 then
21772   ol_cv_c_upper_lower=no
21773 else
21774   echo "configure: failed program was:" >&5
21775   cat conftest.$ac_ext >&5
21776   rm -fr conftest*
21777   ol_cv_c_upper_lower=yes
21778 fi
21779 rm -fr conftest*
21780 fi
21781
21782 fi
21783
21784 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21785 if test $ol_cv_c_upper_lower != no ; then
21786         cat >> confdefs.h <<\EOF
21787 #define C_UPPER_LOWER 1
21788 EOF
21789
21790 fi
21791
21792 echo $ac_n "checking for working const""... $ac_c" 1>&6
21793 echo "configure:21793: checking for working const" >&5
21794 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21795   echo $ac_n "(cached) $ac_c" 1>&6
21796 else
21797   cat > conftest.$ac_ext <<EOF
21798 #line 21798 "configure"
21799 #include "confdefs.h"
21800
21801 int main() {
21802
21803 /* Ultrix mips cc rejects this.  */
21804 typedef int charset[2]; const charset x;
21805 /* SunOS 4.1.1 cc rejects this.  */
21806 char const *const *ccp;
21807 char **p;
21808 /* NEC SVR4.0.2 mips cc rejects this.  */
21809 struct point {int x, y;};
21810 static struct point const zero = {0,0};
21811 /* AIX XL C 1.02.0.0 rejects this.
21812    It does not let you subtract one const X* pointer from another in an arm
21813    of an if-expression whose if-part is not a constant expression */
21814 const char *g = "string";
21815 ccp = &g + (g ? g-g : 0);
21816 /* HPUX 7.0 cc rejects these. */
21817 ++ccp;
21818 p = (char**) ccp;
21819 ccp = (char const *const *) p;
21820 { /* SCO 3.2v4 cc rejects this.  */
21821   char *t;
21822   char const *s = 0 ? (char *) 0 : (char const *) 0;
21823
21824   *t++ = 0;
21825 }
21826 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21827   int x[] = {25, 17};
21828   const int *foo = &x[0];
21829   ++foo;
21830 }
21831 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21832   typedef const int *iptr;
21833   iptr p = 0;
21834   ++p;
21835 }
21836 { /* AIX XL C 1.02.0.0 rejects this saying
21837      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21838   struct s { int j; const int *ap[3]; };
21839   struct s *b; b->j = 5;
21840 }
21841 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21842   const int foo = 10;
21843 }
21844
21845 ; return 0; }
21846 EOF
21847 if { (eval echo configure:21847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21848   rm -rf conftest*
21849   ac_cv_c_const=yes
21850 else
21851   echo "configure: failed program was:" >&5
21852   cat conftest.$ac_ext >&5
21853   rm -rf conftest*
21854   ac_cv_c_const=no
21855 fi
21856 rm -f conftest*
21857 fi
21858
21859 echo "$ac_t""$ac_cv_c_const" 1>&6
21860 if test $ac_cv_c_const = no; then
21861   cat >> confdefs.h <<\EOF
21862 #define const 
21863 EOF
21864
21865 fi
21866
21867 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21868 echo "configure:21868: checking if compiler understands volatile" >&5
21869 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21870   echo $ac_n "(cached) $ac_c" 1>&6
21871 else
21872   cat > conftest.$ac_ext <<EOF
21873 #line 21873 "configure"
21874 #include "confdefs.h"
21875 int x, y, z;
21876 int main() {
21877 volatile int a; int * volatile b = x ? &y : &z;
21878       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21879       *b = 0;
21880 ; return 0; }
21881 EOF
21882 if { (eval echo configure:21882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21883   rm -rf conftest*
21884   ol_cv_c_volatile=yes
21885 else
21886   echo "configure: failed program was:" >&5
21887   cat conftest.$ac_ext >&5
21888   rm -rf conftest*
21889   ol_cv_c_volatile=no
21890 fi
21891 rm -f conftest*
21892 fi
21893
21894 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21895   if test $ol_cv_c_volatile = yes; then
21896     : 
21897   else
21898     cat >> confdefs.h <<\EOF
21899 #define volatile 
21900 EOF
21901
21902   fi
21903  
21904
21905 if test $cross_compiling = yes ; then
21906         cat >> confdefs.h <<\EOF
21907 #define CROSS_COMPILING 1
21908 EOF
21909
21910 else
21911         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21912 echo "configure:21912: checking whether byte ordering is bigendian" >&5
21913 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21914   echo $ac_n "(cached) $ac_c" 1>&6
21915 else
21916   ac_cv_c_bigendian=unknown
21917 # See if sys/param.h defines the BYTE_ORDER macro.
21918 cat > conftest.$ac_ext <<EOF
21919 #line 21919 "configure"
21920 #include "confdefs.h"
21921 #include <sys/types.h>
21922 #include <sys/param.h>
21923 int main() {
21924
21925 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21926  bogus endian macros
21927 #endif
21928 ; return 0; }
21929 EOF
21930 if { (eval echo configure:21930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21931   rm -rf conftest*
21932   # It does; now see whether it defined to BIG_ENDIAN or not.
21933 cat > conftest.$ac_ext <<EOF
21934 #line 21934 "configure"
21935 #include "confdefs.h"
21936 #include <sys/types.h>
21937 #include <sys/param.h>
21938 int main() {
21939
21940 #if BYTE_ORDER != BIG_ENDIAN
21941  not big endian
21942 #endif
21943 ; return 0; }
21944 EOF
21945 if { (eval echo configure:21945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21946   rm -rf conftest*
21947   ac_cv_c_bigendian=yes
21948 else
21949   echo "configure: failed program was:" >&5
21950   cat conftest.$ac_ext >&5
21951   rm -rf conftest*
21952   ac_cv_c_bigendian=no
21953 fi
21954 rm -f conftest*
21955 else
21956   echo "configure: failed program was:" >&5
21957   cat conftest.$ac_ext >&5
21958 fi
21959 rm -f conftest*
21960 if test $ac_cv_c_bigendian = unknown; then
21961 if test "$cross_compiling" = yes; then
21962     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21963 else
21964   cat > conftest.$ac_ext <<EOF
21965 #line 21965 "configure"
21966 #include "confdefs.h"
21967 main () {
21968   /* Are we little or big endian?  From Harbison&Steele.  */
21969   union
21970   {
21971     long l;
21972     char c[sizeof (long)];
21973   } u;
21974   u.l = 1;
21975   exit (u.c[sizeof (long) - 1] == 1);
21976 }
21977 EOF
21978 if { (eval echo configure:21978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21979 then
21980   ac_cv_c_bigendian=no
21981 else
21982   echo "configure: failed program was:" >&5
21983   cat conftest.$ac_ext >&5
21984   rm -fr conftest*
21985   ac_cv_c_bigendian=yes
21986 fi
21987 rm -fr conftest*
21988 fi
21989
21990 fi
21991 fi
21992
21993 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21994 if test $ac_cv_c_bigendian = yes; then
21995   cat >> confdefs.h <<\EOF
21996 #define WORDS_BIGENDIAN 1
21997 EOF
21998
21999 fi
22000
22001 fi
22002
22003 echo $ac_n "checking size of short""... $ac_c" 1>&6
22004 echo "configure:22004: checking size of short" >&5 
22005 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22006   echo $ac_n "(cached) $ac_c" 1>&6
22007 else
22008   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22009   cat > conftest.$ac_ext <<EOF
22010 #line 22010 "configure"
22011 #include "confdefs.h"
22012 #include "confdefs.h" 
22013 #include <sys/types.h> 
22014  
22015
22016 int main() {
22017 switch (0) case 0: case (sizeof (short) == $ac_size):;
22018 ; return 0; }
22019 EOF
22020 if { (eval echo configure:22020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22021   rm -rf conftest*
22022   ac_cv_sizeof_short=$ac_size
22023 else
22024   echo "configure: failed program was:" >&5
22025   cat conftest.$ac_ext >&5
22026 fi
22027 rm -f conftest* 
22028   if test x$ac_cv_sizeof_short != x ; then break; fi 
22029 done 
22030
22031 fi
22032  
22033 if test x$ac_cv_sizeof_short = x ; then 
22034   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22035 fi 
22036 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22037 cat >> confdefs.h <<EOF
22038 #define SIZEOF_SHORT $ac_cv_sizeof_short
22039 EOF
22040  
22041  
22042 echo $ac_n "checking size of int""... $ac_c" 1>&6
22043 echo "configure:22043: checking size of int" >&5 
22044 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22045   echo $ac_n "(cached) $ac_c" 1>&6
22046 else
22047   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22048   cat > conftest.$ac_ext <<EOF
22049 #line 22049 "configure"
22050 #include "confdefs.h"
22051 #include "confdefs.h" 
22052 #include <sys/types.h> 
22053  
22054
22055 int main() {
22056 switch (0) case 0: case (sizeof (int) == $ac_size):;
22057 ; return 0; }
22058 EOF
22059 if { (eval echo configure:22059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22060   rm -rf conftest*
22061   ac_cv_sizeof_int=$ac_size
22062 else
22063   echo "configure: failed program was:" >&5
22064   cat conftest.$ac_ext >&5
22065 fi
22066 rm -f conftest* 
22067   if test x$ac_cv_sizeof_int != x ; then break; fi 
22068 done 
22069
22070 fi
22071  
22072 if test x$ac_cv_sizeof_int = x ; then 
22073   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22074 fi 
22075 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22076 cat >> confdefs.h <<EOF
22077 #define SIZEOF_INT $ac_cv_sizeof_int
22078 EOF
22079  
22080  
22081 echo $ac_n "checking size of long""... $ac_c" 1>&6
22082 echo "configure:22082: checking size of long" >&5 
22083 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22084   echo $ac_n "(cached) $ac_c" 1>&6
22085 else
22086   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22087   cat > conftest.$ac_ext <<EOF
22088 #line 22088 "configure"
22089 #include "confdefs.h"
22090 #include "confdefs.h" 
22091 #include <sys/types.h> 
22092  
22093
22094 int main() {
22095 switch (0) case 0: case (sizeof (long) == $ac_size):;
22096 ; return 0; }
22097 EOF
22098 if { (eval echo configure:22098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22099   rm -rf conftest*
22100   ac_cv_sizeof_long=$ac_size
22101 else
22102   echo "configure: failed program was:" >&5
22103   cat conftest.$ac_ext >&5
22104 fi
22105 rm -f conftest* 
22106   if test x$ac_cv_sizeof_long != x ; then break; fi 
22107 done 
22108
22109 fi
22110  
22111 if test x$ac_cv_sizeof_long = x ; then 
22112   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22113 fi 
22114 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22115 cat >> confdefs.h <<EOF
22116 #define SIZEOF_LONG $ac_cv_sizeof_long
22117 EOF
22118  
22119
22120
22121 if test "$ac_cv_sizeof_int" -lt 4 ; then
22122         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22123
22124         cat >> confdefs.h <<\EOF
22125 #define LBER_INT_T long
22126 EOF
22127
22128 else
22129         cat >> confdefs.h <<\EOF
22130 #define LBER_INT_T int
22131 EOF
22132
22133 fi
22134
22135 cat >> confdefs.h <<\EOF
22136 #define LBER_LEN_T long
22137 EOF
22138
22139 cat >> confdefs.h <<\EOF
22140 #define LBER_SOCKET_T int
22141 EOF
22142
22143 cat >> confdefs.h <<\EOF
22144 #define LBER_TAG_T long
22145 EOF
22146
22147
22148 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22149 echo "configure:22149: checking for 8-bit clean memcmp" >&5
22150 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22151   echo $ac_n "(cached) $ac_c" 1>&6
22152 else
22153   if test "$cross_compiling" = yes; then
22154   ac_cv_func_memcmp_clean=no
22155 else
22156   cat > conftest.$ac_ext <<EOF
22157 #line 22157 "configure"
22158 #include "confdefs.h"
22159
22160 main()
22161 {
22162   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22163   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22164 }
22165
22166 EOF
22167 if { (eval echo configure:22167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22168 then
22169   ac_cv_func_memcmp_clean=yes
22170 else
22171   echo "configure: failed program was:" >&5
22172   cat conftest.$ac_ext >&5
22173   rm -fr conftest*
22174   ac_cv_func_memcmp_clean=no
22175 fi
22176 rm -fr conftest*
22177 fi
22178
22179 fi
22180
22181 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22182 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22183
22184 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22185 echo "configure:22185: checking for strftime" >&5
22186 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22187   echo $ac_n "(cached) $ac_c" 1>&6
22188 else
22189   cat > conftest.$ac_ext <<EOF
22190 #line 22190 "configure"
22191 #include "confdefs.h"
22192 /* System header to define __stub macros and hopefully few prototypes,
22193     which can conflict with char strftime(); below.  */
22194 #include <assert.h>
22195 /* Override any gcc2 internal prototype to avoid an error.  */
22196 /* We use char because int might match the return type of a gcc2
22197     builtin and then its argument prototype would still apply.  */
22198 char strftime();
22199 char (*f)();
22200
22201 int main() {
22202
22203 /* The GNU C library defines this for functions which it implements
22204     to always fail with ENOSYS.  Some functions are actually named
22205     something starting with __ and the normal name is an alias.  */
22206 #if defined (__stub_strftime) || defined (__stub___strftime)
22207 choke me
22208 #else
22209 f = strftime;
22210 #endif
22211
22212 ; return 0; }
22213 EOF
22214 if { (eval echo configure:22214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22215   rm -rf conftest*
22216   eval "ac_cv_func_strftime=yes"
22217 else
22218   echo "configure: failed program was:" >&5
22219   cat conftest.$ac_ext >&5
22220   rm -rf conftest*
22221   eval "ac_cv_func_strftime=no"
22222 fi
22223 rm -f conftest*
22224 fi
22225
22226 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22227   echo "$ac_t""yes" 1>&6
22228   cat >> confdefs.h <<\EOF
22229 #define HAVE_STRFTIME 1
22230 EOF
22231
22232 else
22233   echo "$ac_t""no" 1>&6
22234 # strftime is in -lintl on SCO UNIX.
22235 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22236 echo "configure:22236: checking for strftime in -lintl" >&5
22237 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22238 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22239   echo $ac_n "(cached) $ac_c" 1>&6
22240 else
22241   ac_save_LIBS="$LIBS"
22242 LIBS="-lintl  $LIBS"
22243 cat > conftest.$ac_ext <<EOF
22244 #line 22244 "configure"
22245 #include "confdefs.h"
22246 /* Override any gcc2 internal prototype to avoid an error.  */
22247 /* We use char because int might match the return type of a gcc2
22248     builtin and then its argument prototype would still apply.  */
22249 char strftime();
22250
22251 int main() {
22252 strftime()
22253 ; return 0; }
22254 EOF
22255 if { (eval echo configure:22255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22256   rm -rf conftest*
22257   eval "ac_cv_lib_$ac_lib_var=yes"
22258 else
22259   echo "configure: failed program was:" >&5
22260   cat conftest.$ac_ext >&5
22261   rm -rf conftest*
22262   eval "ac_cv_lib_$ac_lib_var=no"
22263 fi
22264 rm -f conftest*
22265 LIBS="$ac_save_LIBS"
22266
22267 fi
22268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22269   echo "$ac_t""yes" 1>&6
22270   cat >> confdefs.h <<\EOF
22271 #define HAVE_STRFTIME 1
22272 EOF
22273
22274 LIBS="-lintl $LIBS"
22275 else
22276   echo "$ac_t""no" 1>&6
22277 fi
22278
22279 fi
22280
22281
22282 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22283 echo "configure:22283: checking for inet_aton()" >&5
22284 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22285   echo $ac_n "(cached) $ac_c" 1>&6
22286 else
22287   cat > conftest.$ac_ext <<EOF
22288 #line 22288 "configure"
22289 #include "confdefs.h"
22290
22291 #ifdef HAVE_SYS_TYPES_H
22292 #       include <sys/types.h>
22293 #endif
22294 #ifdef HAVE_SYS_SOCKET_H
22295 #       include <sys/socket.h>
22296 #       ifdef HAVE_SYS_SELECT_H
22297 #               include <sys/select.h>
22298 #       endif
22299 #       include <netinet/in.h>
22300 #       ifdef HAVE_ARPA_INET_H
22301 #               include <arpa/inet.h>
22302 #       endif
22303 #endif
22304
22305 int main() {
22306 struct in_addr in;
22307 int rc = inet_aton( "255.255.255.255", &in );
22308 ; return 0; }
22309 EOF
22310 if { (eval echo configure:22310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22311   rm -rf conftest*
22312   ol_cv_func_inet_aton=yes
22313 else
22314   echo "configure: failed program was:" >&5
22315   cat conftest.$ac_ext >&5
22316   rm -rf conftest*
22317   ol_cv_func_inet_aton=no
22318 fi
22319 rm -f conftest*
22320 fi
22321
22322 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22323   if test $ol_cv_func_inet_aton != no; then
22324     cat >> confdefs.h <<\EOF
22325 #define HAVE_INET_ATON 1
22326 EOF
22327
22328   fi
22329  
22330
22331 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22332 echo "configure:22332: checking for _spawnlp" >&5
22333 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22334   echo $ac_n "(cached) $ac_c" 1>&6
22335 else
22336   cat > conftest.$ac_ext <<EOF
22337 #line 22337 "configure"
22338 #include "confdefs.h"
22339 /* System header to define __stub macros and hopefully few prototypes,
22340     which can conflict with char _spawnlp(); below.  */
22341 #include <assert.h>
22342 /* Override any gcc2 internal prototype to avoid an error.  */
22343 /* We use char because int might match the return type of a gcc2
22344     builtin and then its argument prototype would still apply.  */
22345 char _spawnlp();
22346 char (*f)();
22347
22348 int main() {
22349
22350 /* The GNU C library defines this for functions which it implements
22351     to always fail with ENOSYS.  Some functions are actually named
22352     something starting with __ and the normal name is an alias.  */
22353 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22354 choke me
22355 #else
22356 f = _spawnlp;
22357 #endif
22358
22359 ; return 0; }
22360 EOF
22361 if { (eval echo configure:22361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22362   rm -rf conftest*
22363   eval "ac_cv_func__spawnlp=yes"
22364 else
22365   echo "configure: failed program was:" >&5
22366   cat conftest.$ac_ext >&5
22367   rm -rf conftest*
22368   eval "ac_cv_func__spawnlp=no"
22369 fi
22370 rm -f conftest*
22371 fi
22372
22373 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22374   echo "$ac_t""yes" 1>&6
22375   cat >> confdefs.h <<\EOF
22376 #define HAVE_SPAWNLP 1
22377 EOF
22378
22379 else
22380   echo "$ac_t""no" 1>&6
22381 fi
22382
22383
22384 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22385 echo "configure:22385: checking for _snprintf" >&5
22386 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22387   echo $ac_n "(cached) $ac_c" 1>&6
22388 else
22389   cat > conftest.$ac_ext <<EOF
22390 #line 22390 "configure"
22391 #include "confdefs.h"
22392 /* System header to define __stub macros and hopefully few prototypes,
22393     which can conflict with char _snprintf(); below.  */
22394 #include <assert.h>
22395 /* Override any gcc2 internal prototype to avoid an error.  */
22396 /* We use char because int might match the return type of a gcc2
22397     builtin and then its argument prototype would still apply.  */
22398 char _snprintf();
22399 char (*f)();
22400
22401 int main() {
22402
22403 /* The GNU C library defines this for functions which it implements
22404     to always fail with ENOSYS.  Some functions are actually named
22405     something starting with __ and the normal name is an alias.  */
22406 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22407 choke me
22408 #else
22409 f = _snprintf;
22410 #endif
22411
22412 ; return 0; }
22413 EOF
22414 if { (eval echo configure:22414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22415   rm -rf conftest*
22416   eval "ac_cv_func__snprintf=yes"
22417 else
22418   echo "configure: failed program was:" >&5
22419   cat conftest.$ac_ext >&5
22420   rm -rf conftest*
22421   eval "ac_cv_func__snprintf=no"
22422 fi
22423 rm -f conftest*
22424 fi
22425
22426 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22427   echo "$ac_t""yes" 1>&6
22428   ac_cv_func_snprintf=yes
22429         cat >> confdefs.h <<\EOF
22430 #define snprintf _snprintf
22431 EOF
22432
22433
22434 else
22435   echo "$ac_t""no" 1>&6
22436 fi
22437
22438
22439 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22440 echo "configure:22440: checking for _vsnprintf" >&5
22441 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22442   echo $ac_n "(cached) $ac_c" 1>&6
22443 else
22444   cat > conftest.$ac_ext <<EOF
22445 #line 22445 "configure"
22446 #include "confdefs.h"
22447 /* System header to define __stub macros and hopefully few prototypes,
22448     which can conflict with char _vsnprintf(); below.  */
22449 #include <assert.h>
22450 /* Override any gcc2 internal prototype to avoid an error.  */
22451 /* We use char because int might match the return type of a gcc2
22452     builtin and then its argument prototype would still apply.  */
22453 char _vsnprintf();
22454 char (*f)();
22455
22456 int main() {
22457
22458 /* The GNU C library defines this for functions which it implements
22459     to always fail with ENOSYS.  Some functions are actually named
22460     something starting with __ and the normal name is an alias.  */
22461 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22462 choke me
22463 #else
22464 f = _vsnprintf;
22465 #endif
22466
22467 ; return 0; }
22468 EOF
22469 if { (eval echo configure:22469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22470   rm -rf conftest*
22471   eval "ac_cv_func__vsnprintf=yes"
22472 else
22473   echo "configure: failed program was:" >&5
22474   cat conftest.$ac_ext >&5
22475   rm -rf conftest*
22476   eval "ac_cv_func__vsnprintf=no"
22477 fi
22478 rm -f conftest*
22479 fi
22480
22481 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22482   echo "$ac_t""yes" 1>&6
22483   ac_cv_func_vsnprintf=yes
22484         cat >> confdefs.h <<\EOF
22485 #define vsnprintf _vsnprintf
22486 EOF
22487
22488
22489 else
22490   echo "$ac_t""no" 1>&6
22491 fi
22492
22493
22494 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22495 echo "configure:22495: checking for vprintf" >&5
22496 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22497   echo $ac_n "(cached) $ac_c" 1>&6
22498 else
22499   cat > conftest.$ac_ext <<EOF
22500 #line 22500 "configure"
22501 #include "confdefs.h"
22502 /* System header to define __stub macros and hopefully few prototypes,
22503     which can conflict with char vprintf(); below.  */
22504 #include <assert.h>
22505 /* Override any gcc2 internal prototype to avoid an error.  */
22506 /* We use char because int might match the return type of a gcc2
22507     builtin and then its argument prototype would still apply.  */
22508 char vprintf();
22509 char (*f)();
22510
22511 int main() {
22512
22513 /* The GNU C library defines this for functions which it implements
22514     to always fail with ENOSYS.  Some functions are actually named
22515     something starting with __ and the normal name is an alias.  */
22516 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22517 choke me
22518 #else
22519 f = vprintf;
22520 #endif
22521
22522 ; return 0; }
22523 EOF
22524 if { (eval echo configure:22524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22525   rm -rf conftest*
22526   eval "ac_cv_func_vprintf=yes"
22527 else
22528   echo "configure: failed program was:" >&5
22529   cat conftest.$ac_ext >&5
22530   rm -rf conftest*
22531   eval "ac_cv_func_vprintf=no"
22532 fi
22533 rm -f conftest*
22534 fi
22535
22536 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22537   echo "$ac_t""yes" 1>&6
22538   cat >> confdefs.h <<\EOF
22539 #define HAVE_VPRINTF 1
22540 EOF
22541
22542 else
22543   echo "$ac_t""no" 1>&6
22544 fi
22545
22546 if test "$ac_cv_func_vprintf" != yes; then
22547 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22548 echo "configure:22548: checking for _doprnt" >&5
22549 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22550   echo $ac_n "(cached) $ac_c" 1>&6
22551 else
22552   cat > conftest.$ac_ext <<EOF
22553 #line 22553 "configure"
22554 #include "confdefs.h"
22555 /* System header to define __stub macros and hopefully few prototypes,
22556     which can conflict with char _doprnt(); below.  */
22557 #include <assert.h>
22558 /* Override any gcc2 internal prototype to avoid an error.  */
22559 /* We use char because int might match the return type of a gcc2
22560     builtin and then its argument prototype would still apply.  */
22561 char _doprnt();
22562 char (*f)();
22563
22564 int main() {
22565
22566 /* The GNU C library defines this for functions which it implements
22567     to always fail with ENOSYS.  Some functions are actually named
22568     something starting with __ and the normal name is an alias.  */
22569 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22570 choke me
22571 #else
22572 f = _doprnt;
22573 #endif
22574
22575 ; return 0; }
22576 EOF
22577 if { (eval echo configure:22577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22578   rm -rf conftest*
22579   eval "ac_cv_func__doprnt=yes"
22580 else
22581   echo "configure: failed program was:" >&5
22582   cat conftest.$ac_ext >&5
22583   rm -rf conftest*
22584   eval "ac_cv_func__doprnt=no"
22585 fi
22586 rm -f conftest*
22587 fi
22588
22589 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22590   echo "$ac_t""yes" 1>&6
22591   cat >> confdefs.h <<\EOF
22592 #define HAVE_DOPRNT 1
22593 EOF
22594
22595 else
22596   echo "$ac_t""no" 1>&6
22597 fi
22598
22599 fi
22600
22601
22602 if test $ac_cv_func_vprintf = yes ; then
22603                 for ac_func in snprintf vsnprintf
22604 do
22605 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22606 echo "configure:22606: checking for $ac_func" >&5
22607 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22608   echo $ac_n "(cached) $ac_c" 1>&6
22609 else
22610   cat > conftest.$ac_ext <<EOF
22611 #line 22611 "configure"
22612 #include "confdefs.h"
22613 /* System header to define __stub macros and hopefully few prototypes,
22614     which can conflict with char $ac_func(); below.  */
22615 #include <assert.h>
22616 /* Override any gcc2 internal prototype to avoid an error.  */
22617 /* We use char because int might match the return type of a gcc2
22618     builtin and then its argument prototype would still apply.  */
22619 char $ac_func();
22620 char (*f)();
22621
22622 int main() {
22623
22624 /* The GNU C library defines this for functions which it implements
22625     to always fail with ENOSYS.  Some functions are actually named
22626     something starting with __ and the normal name is an alias.  */
22627 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22628 choke me
22629 #else
22630 f = $ac_func;
22631 #endif
22632
22633 ; return 0; }
22634 EOF
22635 if { (eval echo configure:22635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22636   rm -rf conftest*
22637   eval "ac_cv_func_$ac_func=yes"
22638 else
22639   echo "configure: failed program was:" >&5
22640   cat conftest.$ac_ext >&5
22641   rm -rf conftest*
22642   eval "ac_cv_func_$ac_func=no"
22643 fi
22644 rm -f conftest*
22645 fi
22646
22647 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22648   echo "$ac_t""yes" 1>&6
22649     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22650   cat >> confdefs.h <<EOF
22651 #define $ac_tr_func 1
22652 EOF
22653  
22654 else
22655   echo "$ac_t""no" 1>&6
22656 fi
22657 done
22658
22659 fi
22660
22661 for ac_func in \
22662         bcopy                   \
22663         closesocket             \
22664         chroot                  \
22665         endgrent                \
22666         endpwent                \
22667         fcntl                   \
22668         flock                   \
22669         fstat                   \
22670         getdtablesize   \
22671         getgrgid                \
22672         gethostname             \
22673         getpass                 \
22674         getpassphrase   \
22675         getpwuid                \
22676         getpwnam                \
22677         getspnam                \
22678         gettimeofday    \
22679         initgroups              \
22680         lockf                   \
22681         memcpy                  \
22682         memmove                 \
22683         mkstemp                 \
22684         mktemp                  \
22685         pipe                    \
22686         read                    \
22687         recv                    \
22688         recvfrom                \
22689         setpwfile               \
22690         setgid                  \
22691         setegid                 \
22692         setsid                  \
22693         setuid                  \
22694         seteuid                 \
22695         sigaction               \
22696         signal                  \
22697         sigset                  \
22698         strdup                  \
22699         strerror                \
22700         strpbrk                 \
22701         strrchr                 \
22702         strsep                  \
22703         strstr                  \
22704         strtol                  \
22705         strtoul                 \
22706         strspn                  \
22707         sysconf                 \
22708         usleep                  \
22709         waitpid                 \
22710         wait4                   \
22711         write                   \
22712         send                    \
22713         sendmsg                 \
22714         sendto                  \
22715
22716 do
22717 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22718 echo "configure:22718: checking for $ac_func" >&5
22719 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22720   echo $ac_n "(cached) $ac_c" 1>&6
22721 else
22722   cat > conftest.$ac_ext <<EOF
22723 #line 22723 "configure"
22724 #include "confdefs.h"
22725 /* System header to define __stub macros and hopefully few prototypes,
22726     which can conflict with char $ac_func(); below.  */
22727 #include <assert.h>
22728 /* Override any gcc2 internal prototype to avoid an error.  */
22729 /* We use char because int might match the return type of a gcc2
22730     builtin and then its argument prototype would still apply.  */
22731 char $ac_func();
22732 char (*f)();
22733
22734 int main() {
22735
22736 /* The GNU C library defines this for functions which it implements
22737     to always fail with ENOSYS.  Some functions are actually named
22738     something starting with __ and the normal name is an alias.  */
22739 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22740 choke me
22741 #else
22742 f = $ac_func;
22743 #endif
22744
22745 ; return 0; }
22746 EOF
22747 if { (eval echo configure:22747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22748   rm -rf conftest*
22749   eval "ac_cv_func_$ac_func=yes"
22750 else
22751   echo "configure: failed program was:" >&5
22752   cat conftest.$ac_ext >&5
22753   rm -rf conftest*
22754   eval "ac_cv_func_$ac_func=no"
22755 fi
22756 rm -f conftest*
22757 fi
22758
22759 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22760   echo "$ac_t""yes" 1>&6
22761     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22762   cat >> confdefs.h <<EOF
22763 #define $ac_tr_func 1
22764 EOF
22765  
22766 else
22767   echo "$ac_t""no" 1>&6
22768 fi
22769 done
22770
22771
22772 for ac_func in getopt getpeereid
22773 do
22774 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22775 echo "configure:22775: checking for $ac_func" >&5
22776 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22777   echo $ac_n "(cached) $ac_c" 1>&6
22778 else
22779   cat > conftest.$ac_ext <<EOF
22780 #line 22780 "configure"
22781 #include "confdefs.h"
22782 /* System header to define __stub macros and hopefully few prototypes,
22783     which can conflict with char $ac_func(); below.  */
22784 #include <assert.h>
22785 /* Override any gcc2 internal prototype to avoid an error.  */
22786 /* We use char because int might match the return type of a gcc2
22787     builtin and then its argument prototype would still apply.  */
22788 char $ac_func();
22789 char (*f)();
22790
22791 int main() {
22792
22793 /* The GNU C library defines this for functions which it implements
22794     to always fail with ENOSYS.  Some functions are actually named
22795     something starting with __ and the normal name is an alias.  */
22796 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22797 choke me
22798 #else
22799 f = $ac_func;
22800 #endif
22801
22802 ; return 0; }
22803 EOF
22804 if { (eval echo configure:22804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22805   rm -rf conftest*
22806   eval "ac_cv_func_$ac_func=yes"
22807 else
22808   echo "configure: failed program was:" >&5
22809   cat conftest.$ac_ext >&5
22810   rm -rf conftest*
22811   eval "ac_cv_func_$ac_func=no"
22812 fi
22813 rm -f conftest*
22814 fi
22815
22816 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22817   echo "$ac_t""yes" 1>&6
22818     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22819   cat >> confdefs.h <<EOF
22820 #define $ac_tr_func 1
22821 EOF
22822  
22823 else
22824   echo "$ac_t""no" 1>&6
22825 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22826 fi
22827 done
22828
22829
22830
22831 if test "$ac_cv_func_getopt" != yes; then
22832         LIBSRCS="$LIBSRCS getopt.c"
22833 fi
22834 if test "$ac_cv_func_getpeereid" != yes; then
22835         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
22836 echo "configure:22836: checking for msg_accrights in msghdr" >&5
22837 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
22838   echo $ac_n "(cached) $ac_c" 1>&6
22839 else
22840   cat > conftest.$ac_ext <<EOF
22841 #line 22841 "configure"
22842 #include "confdefs.h"
22843 #include <sys/socket.h>
22844 int main() {
22845 struct msghdr m; m.msg_accrightslen=0
22846 ; return 0; }
22847 EOF
22848 if { (eval echo configure:22848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22849   rm -rf conftest*
22850   ol_cv_msghdr_msg_accrights=yes
22851 else
22852   echo "configure: failed program was:" >&5
22853   cat conftest.$ac_ext >&5
22854   rm -rf conftest*
22855   ol_cv_msghdr_msg_accrights=no
22856 fi
22857 rm -f conftest*
22858         
22859 fi
22860
22861 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
22862   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
22863         cat >> confdefs.h <<\EOF
22864 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
22865 EOF
22866
22867   fi
22868
22869         LIBSRCS="$LIBSRCS getpeereid.c"
22870 fi
22871 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22872         if test "$ac_cv_func_snprintf" != yes; then
22873                 cat >> confdefs.h <<\EOF
22874 #define snprintf ber_pvt_snprintf
22875 EOF
22876
22877         fi
22878         if test "$ac_cv_func_vsnprintf" != yes; then
22879                 cat >> confdefs.h <<\EOF
22880 #define vsnprintf ber_pvt_vsnprintf
22881 EOF
22882
22883         fi
22884 fi
22885
22886 # Check Configuration
22887 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22888 echo "configure:22888: checking declaration of sys_errlist" >&5
22889 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22890   echo $ac_n "(cached) $ac_c" 1>&6
22891 else
22892   
22893         cat > conftest.$ac_ext <<EOF
22894 #line 22894 "configure"
22895 #include "confdefs.h"
22896
22897 #include <stdio.h>
22898 #include <sys/types.h>
22899 #include <errno.h>
22900 #ifdef WINNT
22901 #include <stdlib.h>
22902 #endif 
22903 int main() {
22904 char *c = (char *) *sys_errlist
22905 ; return 0; }
22906 EOF
22907 if { (eval echo configure:22907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22908   rm -rf conftest*
22909   ol_cv_dcl_sys_errlist=yes
22910         ol_cv_have_sys_errlist=yes
22911 else
22912   echo "configure: failed program was:" >&5
22913   cat conftest.$ac_ext >&5
22914   rm -rf conftest*
22915   ol_cv_dcl_sys_errlist=no
22916 fi
22917 rm -f conftest*
22918 fi
22919
22920 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22921 #
22922 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22923 if test $ol_cv_dcl_sys_errlist = no ; then
22924         cat >> confdefs.h <<\EOF
22925 #define DECL_SYS_ERRLIST 1
22926 EOF
22927
22928
22929         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22930 echo "configure:22930: checking existence of sys_errlist" >&5
22931 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22932   echo $ac_n "(cached) $ac_c" 1>&6
22933 else
22934   
22935                 cat > conftest.$ac_ext <<EOF
22936 #line 22936 "configure"
22937 #include "confdefs.h"
22938 #include <errno.h>
22939 int main() {
22940 char *c = (char *) *sys_errlist
22941 ; return 0; }
22942 EOF
22943 if { (eval echo configure:22943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22944   rm -rf conftest*
22945   ol_cv_have_sys_errlist=yes
22946 else
22947   echo "configure: failed program was:" >&5
22948   cat conftest.$ac_ext >&5
22949   rm -rf conftest*
22950   ol_cv_have_sys_errlist=no
22951 fi
22952 rm -f conftest*
22953 fi
22954
22955 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22956 fi
22957 if test $ol_cv_have_sys_errlist = yes ; then
22958         cat >> confdefs.h <<\EOF
22959 #define HAVE_SYS_ERRLIST 1
22960 EOF
22961
22962 fi
22963
22964
22965
22966 if test "$ol_enable_slapi" != no ; then
22967                         for ac_hdr in ltdl.h
22968 do
22969 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22970 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22971 echo "configure:22971: checking for $ac_hdr" >&5
22972 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22973   echo $ac_n "(cached) $ac_c" 1>&6
22974 else
22975   cat > conftest.$ac_ext <<EOF
22976 #line 22976 "configure"
22977 #include "confdefs.h"
22978 #include <$ac_hdr>
22979 EOF
22980 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22981 { (eval echo configure:22981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22982 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22983 if test -z "$ac_err"; then
22984   rm -rf conftest*
22985   eval "ac_cv_header_$ac_safe=yes"
22986 else
22987   echo "$ac_err" >&5
22988   echo "configure: failed program was:" >&5
22989   cat conftest.$ac_ext >&5
22990   rm -rf conftest*
22991   eval "ac_cv_header_$ac_safe=no"
22992 fi
22993 rm -f conftest*
22994 fi
22995 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22996   echo "$ac_t""yes" 1>&6
22997     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22998   cat >> confdefs.h <<EOF
22999 #define $ac_tr_hdr 1
23000 EOF
23001  
23002 else
23003   echo "$ac_t""no" 1>&6
23004 fi
23005 done
23006
23007
23008         if test $ac_cv_header_ltdl_h != yes ; then
23009                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23010         fi
23011         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23012 echo "configure:23012: checking for lt_dlinit in -lltdl" >&5
23013 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23014 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23015   echo $ac_n "(cached) $ac_c" 1>&6
23016 else
23017   ac_save_LIBS="$LIBS"
23018 LIBS="-lltdl  $LIBS"
23019 cat > conftest.$ac_ext <<EOF
23020 #line 23020 "configure"
23021 #include "confdefs.h"
23022 /* Override any gcc2 internal prototype to avoid an error.  */
23023 /* We use char because int might match the return type of a gcc2
23024     builtin and then its argument prototype would still apply.  */
23025 char lt_dlinit();
23026
23027 int main() {
23028 lt_dlinit()
23029 ; return 0; }
23030 EOF
23031 if { (eval echo configure:23031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23032   rm -rf conftest*
23033   eval "ac_cv_lib_$ac_lib_var=yes"
23034 else
23035   echo "configure: failed program was:" >&5
23036   cat conftest.$ac_ext >&5
23037   rm -rf conftest*
23038   eval "ac_cv_lib_$ac_lib_var=no"
23039 fi
23040 rm -f conftest*
23041 LIBS="$ac_save_LIBS"
23042
23043 fi
23044 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23045   echo "$ac_t""yes" 1>&6
23046   
23047                 SLAPI_LIBS=-lltdl
23048                 LIBSLAPI=libslapi.a
23049                 LIBSLAPITOOLS=../libslapi.a
23050                 cat >> confdefs.h <<\EOF
23051 #define HAVE_LIBLTDL 1
23052 EOF
23053
23054         
23055 else
23056   echo "$ac_t""no" 1>&6
23057 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23058 fi
23059
23060
23061         cat >> confdefs.h <<\EOF
23062 #define LDAP_SLAPI 1
23063 EOF
23064
23065 fi
23066
23067 if test "$ol_enable_debug" != no ; then
23068         cat >> confdefs.h <<\EOF
23069 #define LDAP_DEBUG 1
23070 EOF
23071
23072 fi
23073 if test "$ol_enable_syslog" = yes ; then
23074         cat >> confdefs.h <<\EOF
23075 #define LDAP_SYSLOG 1
23076 EOF
23077
23078 fi
23079 if test "$ol_link_kbind" != no ; then
23080         cat >> confdefs.h <<\EOF
23081 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23082 EOF
23083
23084 fi
23085 if test "$ol_enable_proctitle" != no ; then
23086         cat >> confdefs.h <<\EOF
23087 #define LDAP_PROCTITLE 1
23088 EOF
23089
23090 fi
23091 if test "$ol_enable_referrals" != no ; then
23092         cat >> confdefs.h <<\EOF
23093 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23094 EOF
23095
23096 fi
23097 if test "$ol_enable_local" != no; then
23098         cat >> confdefs.h <<\EOF
23099 #define LDAP_PF_LOCAL 1
23100 EOF
23101
23102 fi
23103 if test "$ol_link_ipv6" != no; then
23104         cat >> confdefs.h <<\EOF
23105 #define LDAP_PF_INET6 1
23106 EOF
23107
23108 fi
23109 if test "$ol_enable_cleartext" != no ; then
23110         cat >> confdefs.h <<\EOF
23111 #define SLAPD_CLEARTEXT 1
23112 EOF
23113
23114 fi
23115 if test "$ol_enable_crypt" != no ; then
23116         cat >> confdefs.h <<\EOF
23117 #define SLAPD_CRYPT 1
23118 EOF
23119
23120 fi
23121 if test "$ol_link_kpasswd" != no ; then
23122         cat >> confdefs.h <<\EOF
23123 #define SLAPD_KPASSWD 1
23124 EOF
23125
23126 fi
23127 if test "$ol_link_spasswd" != no ; then
23128         cat >> confdefs.h <<\EOF
23129 #define SLAPD_SPASSWD 1
23130 EOF
23131
23132 fi
23133 if test "$ol_enable_multimaster" != no ; then
23134         cat >> confdefs.h <<\EOF
23135 #define SLAPD_MULTIMASTER 1
23136 EOF
23137
23138 fi
23139 if test "$ol_enable_rlookups" != no ; then
23140         cat >> confdefs.h <<\EOF
23141 #define SLAPD_RLOOKUPS 1
23142 EOF
23143
23144 fi
23145 if test "$ol_enable_aci" != no ; then
23146         cat >> confdefs.h <<\EOF
23147 #define SLAPD_ACI_ENABLED 1
23148 EOF
23149
23150 fi
23151
23152 if test "$ol_link_modules" != no ; then
23153         cat >> confdefs.h <<\EOF
23154 #define SLAPD_MODULES 1
23155 EOF
23156
23157         BUILD_SLAPD=yes
23158         SLAPD_MODULES_LDFLAGS="-dlopen self"
23159 fi
23160
23161 if test "$ol_enable_bdb" != no ; then
23162         cat >> confdefs.h <<\EOF
23163 #define SLAPD_BDB 1
23164 EOF
23165
23166         BUILD_SLAPD=yes
23167         BUILD_BDB=yes
23168         if test "$ol_with_bdb_module" != static ; then
23169                 cat >> confdefs.h <<\EOF
23170 #define SLAPD_BDB_DYNAMIC 1
23171 EOF
23172
23173                 BUILD_BDB=mod
23174                 BUILD_BDB_DYNAMIC=shared
23175                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23176         else
23177                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23178         fi
23179 fi
23180
23181 if test "$ol_link_dnssrv" != no ; then
23182         cat >> confdefs.h <<\EOF
23183 #define SLAPD_DNSSRV 1
23184 EOF
23185
23186         BUILD_SLAPD=yes
23187         BUILD_DNSSRV=yes
23188         if test "$ol_with_dnssrv_module" != static ; then
23189                 cat >> confdefs.h <<\EOF
23190 #define SLAPD_DNSSRV_DYNAMIC 1
23191 EOF
23192
23193                 BUILD_DNSSRV=mod
23194                 BUILD_DNSSRV_DYNAMIC=shared
23195                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23196         else
23197                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23198         fi
23199 fi
23200
23201 if test "$ol_enable_hdb" != no ; then
23202         cat >> confdefs.h <<\EOF
23203 #define SLAPD_HDB 1
23204 EOF
23205
23206         BUILD_SLAPD=yes
23207         BUILD_HDB=yes
23208         if test "$ol_with_hdb_module" != static ; then
23209                 cat >> confdefs.h <<\EOF
23210 #define SLAPD_HDB_DYNAMIC 1
23211 EOF
23212
23213                 BUILD_HDB=mod
23214                 BUILD_HDB_DYNAMIC=shared
23215                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23216         else
23217                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23218         fi
23219 fi
23220
23221 if test "$ol_enable_ldap" != no ; then
23222         cat >> confdefs.h <<\EOF
23223 #define SLAPD_LDAP 1
23224 EOF
23225
23226         BUILD_SLAPD=yes
23227         BUILD_LDAP=yes
23228         if test "$ol_with_ldap_module" != static ; then
23229                 cat >> confdefs.h <<\EOF
23230 #define SLAPD_LDAP_DYNAMIC 1
23231 EOF
23232
23233                 BUILD_LDAP=mod
23234                 BUILD_LDAP_DYNAMIC=shared
23235                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23236         else
23237                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23238         fi
23239 fi
23240
23241 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23242         cat >> confdefs.h <<\EOF
23243 #define SLAPD_LDBM 1
23244 EOF
23245
23246         BUILD_SLAPD=yes
23247         BUILD_LDBM=yes
23248         if test "$ol_with_ldbm_module" != static ; then
23249                 cat >> confdefs.h <<\EOF
23250 #define SLAPD_LDBM_DYNAMIC 1
23251 EOF
23252
23253                 BUILD_LDBM=mod
23254                 BUILD_LDBM_DYNAMIC=shared
23255                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23256         else
23257                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23258         fi
23259 fi
23260
23261 if test "$ol_enable_meta" != no ; then
23262         if test "$ol_enable_ldap" = no ; then
23263                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23264         fi
23265         if test "$ol_enable_rewrite" = no ; then
23266                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23267         fi
23268         cat >> confdefs.h <<\EOF
23269 #define SLAPD_META 1
23270 EOF
23271
23272         BUILD_SLAPD=yes
23273         BUILD_META=yes
23274         BUILD_REWRITE=yes
23275         if test $ol_enable_ldbm = yes -o \
23276                 $ol_enable_bdb = yes ; then 
23277                 BUILD_CACHE=yes
23278         fi
23279         if test "$ol_with_meta_module" != static ; then
23280                 cat >> confdefs.h <<\EOF
23281 #define SLAPD_META_DYNAMIC 1
23282 EOF
23283
23284                 BUILD_META=mod
23285                 BUILD_META_DYNAMIC=shared
23286                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23287         else
23288                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23289         fi
23290 fi
23291
23292 if test "$ol_enable_monitor" != no ; then
23293         cat >> confdefs.h <<\EOF
23294 #define SLAPD_MONITOR 1
23295 EOF
23296
23297         BUILD_SLAPD=yes
23298         BUILD_MONITOR=yes
23299         if test "$ol_with_monitor_module" != static ; then
23300                 cat >> confdefs.h <<\EOF
23301 #define SLAPD_MONITOR_DYNAMIC 1
23302 EOF
23303
23304                 BUILD_MONITOR=mod
23305                 BUILD_MONITOR_DYNAMIC=shared
23306                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23307         else
23308                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23309         fi
23310 fi
23311
23312 if test "$ol_enable_null" != no ; then
23313         cat >> confdefs.h <<\EOF
23314 #define SLAPD_NULL 1
23315 EOF
23316
23317         BUILD_SLAPD=yes
23318         BUILD_NULL=yes
23319         if test "$ol_with_null_module" != static ; then
23320                 cat >> confdefs.h <<\EOF
23321 #define SLAPD_NULL_DYNAMIC 1
23322 EOF
23323
23324                 BUILD_NULL=mod
23325                 BUILD_NULL_DYNAMIC=shared
23326                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23327         else
23328                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23329         fi
23330 fi
23331
23332 if test "$ol_enable_passwd" != no ; then
23333         cat >> confdefs.h <<\EOF
23334 #define SLAPD_PASSWD 1
23335 EOF
23336
23337         BUILD_SLAPD=yes
23338         BUILD_PASSWD=yes
23339         if test "$ol_with_passwd_module" != static ; then
23340                 cat >> confdefs.h <<\EOF
23341 #define SLAPD_PASSWD_DYNAMIC 1
23342 EOF
23343
23344                 BUILD_PASSWD=mod
23345                 BUILD_PASSWD_DYNAMIC=shared
23346                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23347         else
23348                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23349         fi
23350 fi
23351
23352 if test "$ol_link_perl" != no ; then
23353         cat >> confdefs.h <<\EOF
23354 #define SLAPD_PERL 1
23355 EOF
23356
23357         BUILD_SLAPD=yes
23358         BUILD_PERL=yes
23359         if test "$ol_with_perl_module" != static ; then
23360                 cat >> confdefs.h <<\EOF
23361 #define SLAPD_PERL_DYNAMIC 1
23362 EOF
23363
23364                 BUILD_PERL=mod
23365                 BUILD_PERL_DYNAMIC=shared
23366                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23367         else
23368                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23369         fi
23370 fi
23371
23372 if test "$ol_enable_shell" != no ; then
23373         if test "$ol_link_thread" != no ; then
23374                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23375         fi
23376         cat >> confdefs.h <<\EOF
23377 #define SLAPD_SHELL 1
23378 EOF
23379
23380         BUILD_SLAPD=yes
23381         BUILD_SHELL=yes
23382         if test "$ol_with_shell_module" != static ; then
23383                 cat >> confdefs.h <<\EOF
23384 #define SLAPD_SHELL_DYNAMIC 1
23385 EOF
23386
23387                 BUILD_SHELL=mod
23388                 BUILD_SHELL_DYNAMIC=shared
23389                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23390         else
23391                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23392         fi
23393 fi
23394
23395 if test "$ol_enable_tcl" != no ; then
23396         cat >> confdefs.h <<\EOF
23397 #define SLAPD_TCL 1
23398 EOF
23399
23400         BUILD_SLAPD=yes
23401         BUILD_TCL=yes
23402         if test "$ol_with_tcl_module" != static; then
23403                 cat >> confdefs.h <<\EOF
23404 #define SLAPD_TCL_DYNAMIC 1
23405 EOF
23406
23407                 BUILD_TCL=mod
23408                 BUILD_TCL_DYNAMIC=shared
23409                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
23410         else
23411                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
23412         fi
23413 fi
23414
23415 if test "$ol_link_sql" != no ; then
23416         cat >> confdefs.h <<\EOF
23417 #define SLAPD_SQL 1
23418 EOF
23419
23420         BUILD_SLAPD=yes
23421         BUILD_SQL=yes
23422         if test "$ol_with_sql_module" != static; then
23423                 cat >> confdefs.h <<\EOF
23424 #define SLAPD_SQL_DYNAMIC 1
23425 EOF
23426
23427                 BUILD_SQL=mod
23428                 BUILD_SQL_DYNAMIC=shared
23429                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23430         else
23431                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23432         fi
23433 fi
23434
23435 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23436         $BUILD_SLAPD = yes ; then
23437         BUILD_SLURPD=yes
23438 fi
23439
23440 if test "$ol_enable_rewrite" != no ; then
23441         cat >> confdefs.h <<\EOF
23442 #define ENABLE_REWRITE 1
23443 EOF
23444
23445         BUILD_REWRITE=yes
23446 fi
23447
23448 if test "$ol_enable_slapi" != no ; then
23449         cat >> confdefs.h <<\EOF
23450 #define ENABLE_SLAPI 1
23451 EOF
23452
23453         BUILD_SLAPI=yes
23454         SLAPD_SLAPI_DEPEND=libslapi.a
23455 fi
23456
23457
23458
23459 if test "$ac_cv_mingw32" = yes ; then
23460         PLAT=NT
23461         SLAPD_MODULES_LDFLAGS=
23462 else
23463         PLAT=UNIX
23464 fi
23465
23466 if test -z "$SLAPD_STATIC_BACKENDS"; then
23467         SLAPD_NO_STATIC='#'
23468 else
23469         SLAPD_NO_STATIC=
23470 fi
23471
23472
23473
23474
23475
23476
23477   
23478   
23479   
23480   
23481   
23482   
23483   
23484   
23485   
23486   
23487   
23488   
23489   
23490   
23491   
23492   
23493   
23494   
23495   
23496   
23497   
23498   
23499   
23500   
23501   
23502   
23503   
23504   
23505
23506
23507
23508
23509
23510
23511
23512
23513
23514
23515
23516
23517
23518
23519
23520
23521
23522
23523
23524
23525
23526
23527
23528
23529
23530
23531
23532
23533
23534
23535
23536
23537
23538
23539
23540
23541
23542
23543
23544
23545 # Check whether --with-xxinstall or --without-xxinstall was given.
23546 if test "${with_xxinstall+set}" = set; then
23547   withval="$with_xxinstall"
23548   :
23549 fi
23550
23551
23552
23553 trap '' 1 2 15
23554
23555 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23556
23557 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23558 # Let make expand exec_prefix.
23559 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23560
23561 # Any assignment to VPATH causes Sun make to only execute
23562 # the first set of double-colon rules, so remove it if not needed.
23563 # If there is a colon in the path, we need to keep it.
23564 if test "x$srcdir" = x.; then
23565   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23566 fi
23567
23568 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23569
23570 DEFS=-DHAVE_CONFIG_H
23571
23572 # Without the "./", some shells look in PATH for config.status.
23573 : ${CONFIG_STATUS=./config.status}
23574
23575 echo creating $CONFIG_STATUS
23576 rm -f $CONFIG_STATUS
23577 cat > $CONFIG_STATUS <<EOF
23578 #! /bin/sh
23579 # Generated automatically by configure.
23580 # Run this file to recreate the current configuration.
23581 # This directory was configured as follows,
23582 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23583 #
23584 # $0 $ac_configure_args
23585 #
23586 # Compiler output produced by configure, useful for debugging
23587 # configure, is in ./config.log if it exists.
23588
23589 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23590 for ac_option
23591 do
23592   case "\$ac_option" in
23593   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23594     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23595     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23596   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23597     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23598     exit 0 ;;
23599   -help | --help | --hel | --he | --h)
23600     echo "\$ac_cs_usage"; exit 0 ;;
23601   *) echo "\$ac_cs_usage"; exit 1 ;;
23602   esac
23603 done
23604
23605 ac_given_srcdir=$srcdir
23606 ac_given_INSTALL="$INSTALL"
23607
23608 trap 'rm -fr `echo "\
23609 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23610 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23611 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23612 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23613 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23614 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23615 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23616 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23617 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23618 include/Makefile:build/top.mk:include/Makefile.in \
23619 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23620 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23621 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23622 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23623 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23624 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23625 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23626 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23627 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23628 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23629 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23630 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23631 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23632 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23633 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23634 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23635 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23636 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23637 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23638 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23639 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23640 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23641 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23642 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23643 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23644 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23645 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23646 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23647 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23648 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23649 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23650  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23651 EOF
23652 cat >> $CONFIG_STATUS <<EOF
23653
23654 # Protect against being on the right side of a sed subst in config.status.
23655 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23656  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23657 $ac_vpsub
23658 $extrasub
23659 s%@SHELL@%$SHELL%g
23660 s%@CFLAGS@%$CFLAGS%g
23661 s%@CPPFLAGS@%$CPPFLAGS%g
23662 s%@CXXFLAGS@%$CXXFLAGS%g
23663 s%@FFLAGS@%$FFLAGS%g
23664 s%@DEFS@%$DEFS%g
23665 s%@LDFLAGS@%$LDFLAGS%g
23666 s%@LIBS@%$LIBS%g
23667 s%@exec_prefix@%$exec_prefix%g
23668 s%@prefix@%$prefix%g
23669 s%@program_transform_name@%$program_transform_name%g
23670 s%@bindir@%$bindir%g
23671 s%@sbindir@%$sbindir%g
23672 s%@libexecdir@%$libexecdir%g
23673 s%@datadir@%$datadir%g
23674 s%@sysconfdir@%$sysconfdir%g
23675 s%@sharedstatedir@%$sharedstatedir%g
23676 s%@localstatedir@%$localstatedir%g
23677 s%@libdir@%$libdir%g
23678 s%@includedir@%$includedir%g
23679 s%@oldincludedir@%$oldincludedir%g
23680 s%@infodir@%$infodir%g
23681 s%@mandir@%$mandir%g
23682 s%@host@%$host%g
23683 s%@host_alias@%$host_alias%g
23684 s%@host_cpu@%$host_cpu%g
23685 s%@host_vendor@%$host_vendor%g
23686 s%@host_os@%$host_os%g
23687 s%@target@%$target%g
23688 s%@target_alias@%$target_alias%g
23689 s%@target_cpu@%$target_cpu%g
23690 s%@target_vendor@%$target_vendor%g
23691 s%@target_os@%$target_os%g
23692 s%@build@%$build%g
23693 s%@build_alias@%$build_alias%g
23694 s%@build_cpu@%$build_cpu%g
23695 s%@build_vendor@%$build_vendor%g
23696 s%@build_os@%$build_os%g
23697 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23698 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23699 s%@INSTALL_DATA@%$INSTALL_DATA%g
23700 s%@PACKAGE@%$PACKAGE%g
23701 s%@VERSION@%$VERSION%g
23702 s%@ACLOCAL@%$ACLOCAL%g
23703 s%@AUTOCONF@%$AUTOCONF%g
23704 s%@AUTOMAKE@%$AUTOMAKE%g
23705 s%@AUTOHEADER@%$AUTOHEADER%g
23706 s%@MAKEINFO@%$MAKEINFO%g
23707 s%@install_sh@%$install_sh%g
23708 s%@AMTAR@%$AMTAR%g
23709 s%@AWK@%$AWK%g
23710 s%@AMTARFLAGS@%$AMTARFLAGS%g
23711 s%@SET_MAKE@%$SET_MAKE%g
23712 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23713 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23714 s%@top_builddir@%$top_builddir%g
23715 s%@ldap_subdir@%$ldap_subdir%g
23716 s%@CC@%$CC%g
23717 s%@AR@%$AR%g
23718 s%@LN_S@%$LN_S%g
23719 s%@OBJEXT@%$OBJEXT%g
23720 s%@EXEEXT@%$EXEEXT%g
23721 s%@ECHO@%$ECHO%g
23722 s%@RANLIB@%$RANLIB%g
23723 s%@STRIP@%$STRIP%g
23724 s%@DLLTOOL@%$DLLTOOL%g
23725 s%@AS@%$AS%g
23726 s%@OBJDUMP@%$OBJDUMP%g
23727 s%@CPP@%$CPP%g
23728 s%@LIBTOOL@%$LIBTOOL%g
23729 s%@LN_H@%$LN_H%g
23730 s%@PERLBIN@%$PERLBIN%g
23731 s%@OL_MKDEP@%$OL_MKDEP%g
23732 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23733 s%@LTSTATIC@%$LTSTATIC%g
23734 s%@LIBOBJS@%$LIBOBJS%g
23735 s%@LIBSRCS@%$LIBSRCS%g
23736 s%@PLAT@%$PLAT%g
23737 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23738 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23739 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23740 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23741 s%@BUILD_BDB@%$BUILD_BDB%g
23742 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23743 s%@BUILD_HDB@%$BUILD_HDB%g
23744 s%@BUILD_LDAP@%$BUILD_LDAP%g
23745 s%@BUILD_LDBM@%$BUILD_LDBM%g
23746 s%@BUILD_META@%$BUILD_META%g
23747 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23748 s%@BUILD_CACHE@%$BUILD_CACHE%g
23749 s%@BUILD_NULL@%$BUILD_NULL%g
23750 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23751 s%@BUILD_PERL@%$BUILD_PERL%g
23752 s%@BUILD_SHELL@%$BUILD_SHELL%g
23753 s%@BUILD_SQL@%$BUILD_SQL%g
23754 s%@BUILD_TCL@%$BUILD_TCL%g
23755 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23756 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23757 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
23758 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23759 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23760 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23761 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23762 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23763 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23764 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23765 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23766 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23767 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
23768 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23769 s%@LDAP_LIBS@%$LDAP_LIBS%g
23770 s%@LDIF_LIBS@%$LDIF_LIBS%g
23771 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23772 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23773 s%@LDBM_LIBS@%$LDBM_LIBS%g
23774 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23775 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23776 s%@WRAP_LIBS@%$WRAP_LIBS%g
23777 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
23778 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23779 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23780 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23781 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23782 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23783 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23784 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23785 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23786 s%@KRB4_LIBS@%$KRB4_LIBS%g
23787 s%@KRB5_LIBS@%$KRB5_LIBS%g
23788 s%@SASL_LIBS@%$SASL_LIBS%g
23789 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23790 s%@TLS_LIBS@%$TLS_LIBS%g
23791 s%@MODULES_LIBS@%$MODULES_LIBS%g
23792 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
23793 s%@LIBSLAPI@%$LIBSLAPI%g
23794 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
23795 s%@AUTH_LIBS@%$AUTH_LIBS%g
23796 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23797 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23798 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23799 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23800
23801 CEOF
23802 EOF
23803
23804 cat >> $CONFIG_STATUS <<\EOF
23805
23806 # Split the substitutions into bite-sized pieces for seds with
23807 # small command number limits, like on Digital OSF/1 and HP-UX.
23808 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23809 ac_file=1 # Number of current file.
23810 ac_beg=1 # First line for current file.
23811 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23812 ac_more_lines=:
23813 ac_sed_cmds=""
23814 while $ac_more_lines; do
23815   if test $ac_beg -gt 1; then
23816     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23817   else
23818     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23819   fi
23820   if test ! -s conftest.s$ac_file; then
23821     ac_more_lines=false
23822     rm -f conftest.s$ac_file
23823   else
23824     if test -z "$ac_sed_cmds"; then
23825       ac_sed_cmds="sed -f conftest.s$ac_file"
23826     else
23827       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23828     fi
23829     ac_file=`expr $ac_file + 1`
23830     ac_beg=$ac_end
23831     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23832   fi
23833 done
23834 if test -z "$ac_sed_cmds"; then
23835   ac_sed_cmds=cat
23836 fi
23837 EOF
23838
23839 cat >> $CONFIG_STATUS <<EOF
23840
23841 CONFIG_FILES=\${CONFIG_FILES-"\
23842 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23843 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23844 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23845 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23846 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23847 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23848 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23849 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23850 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23851 include/Makefile:build/top.mk:include/Makefile.in \
23852 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23853 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23854 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23855 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23856 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23857 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23858 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23859 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23860 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23861 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23862 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23863 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23864 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23865 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23866 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23867 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23868 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23869 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23870 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23871 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23872 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23873 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23874 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23875 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23876 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23877 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23878 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23879 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23880 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23881 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23882 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23883 "}
23884 EOF
23885 cat >> $CONFIG_STATUS <<\EOF
23886 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23887   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23888   case "$ac_file" in
23889   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23890        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23891   *) ac_file_in="${ac_file}.in" ;;
23892   esac
23893
23894   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23895
23896   # Remove last slash and all that follows it.  Not all systems have dirname.
23897   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23898   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23899     # The file is in a subdirectory.
23900     test ! -d "$ac_dir" && mkdir "$ac_dir"
23901     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23902     # A "../" for each directory in $ac_dir_suffix.
23903     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23904   else
23905     ac_dir_suffix= ac_dots=
23906   fi
23907
23908   case "$ac_given_srcdir" in
23909   .)  srcdir=.
23910       if test -z "$ac_dots"; then top_srcdir=.
23911       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23912   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23913   *) # Relative path.
23914     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23915     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23916   esac
23917
23918   case "$ac_given_INSTALL" in
23919   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23920   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23921   esac
23922
23923   echo creating "$ac_file"
23924   rm -f "$ac_file"
23925   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23926   case "$ac_file" in
23927   *[Mm]akefile*) ac_comsub="1i\\
23928 # $configure_input" ;;
23929   *) ac_comsub= ;;
23930   esac
23931
23932   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23933   sed -e "$ac_comsub
23934 s%@configure_input@%$configure_input%g
23935 s%@srcdir@%$srcdir%g
23936 s%@top_srcdir@%$top_srcdir%g
23937 s%@INSTALL@%$INSTALL%g
23938 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23939 fi; done
23940 rm -f conftest.s*
23941
23942 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23943 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23944 #
23945 # ac_d sets the value in "#define NAME VALUE" lines.
23946 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23947 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23948 ac_dC='\3'
23949 ac_dD='%g'
23950 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23951 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23952 ac_uB='\([      ]\)%\1#\2define\3'
23953 ac_uC=' '
23954 ac_uD='\4%g'
23955 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23956 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23957 ac_eB='$%\1#\2define\3'
23958 ac_eC=' '
23959 ac_eD='%g'
23960
23961 if test "${CONFIG_HEADERS+set}" != set; then
23962 EOF
23963 cat >> $CONFIG_STATUS <<EOF
23964   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23965 EOF
23966 cat >> $CONFIG_STATUS <<\EOF
23967 fi
23968 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23969   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23970   case "$ac_file" in
23971   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23972        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23973   *) ac_file_in="${ac_file}.in" ;;
23974   esac
23975
23976   echo creating $ac_file
23977
23978   rm -f conftest.frag conftest.in conftest.out
23979   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23980   cat $ac_file_inputs > conftest.in
23981
23982 EOF
23983
23984 # Transform confdefs.h into a sed script conftest.vals that substitutes
23985 # the proper values into config.h.in to produce config.h.  And first:
23986 # Protect against being on the right side of a sed subst in config.status.
23987 # Protect against being in an unquoted here document in config.status.
23988 rm -f conftest.vals
23989 cat > conftest.hdr <<\EOF
23990 s/[\\&%]/\\&/g
23991 s%[\\$`]%\\&%g
23992 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23993 s%ac_d%ac_u%gp
23994 s%ac_u%ac_e%gp
23995 EOF
23996 sed -n -f conftest.hdr confdefs.h > conftest.vals
23997 rm -f conftest.hdr
23998
23999 # This sed command replaces #undef with comments.  This is necessary, for
24000 # example, in the case of _POSIX_SOURCE, which is predefined and required
24001 # on some systems where configure will not decide to define it.
24002 cat >> conftest.vals <<\EOF
24003 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24004 EOF
24005
24006 # Break up conftest.vals because some shells have a limit on
24007 # the size of here documents, and old seds have small limits too.
24008
24009 rm -f conftest.tail
24010 while :
24011 do
24012   ac_lines=`grep -c . conftest.vals`
24013   # grep -c gives empty output for an empty file on some AIX systems.
24014   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24015   # Write a limited-size here document to conftest.frag.
24016   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24017   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24018   echo 'CEOF
24019   sed -f conftest.frag conftest.in > conftest.out
24020   rm -f conftest.in
24021   mv conftest.out conftest.in
24022 ' >> $CONFIG_STATUS
24023   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24024   rm -f conftest.vals
24025   mv conftest.tail conftest.vals
24026 done
24027 rm -f conftest.vals
24028
24029 cat >> $CONFIG_STATUS <<\EOF
24030   rm -f conftest.frag conftest.h
24031   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24032   cat conftest.in >> conftest.h
24033   rm -f conftest.in
24034   if cmp -s $ac_file conftest.h 2>/dev/null; then
24035     echo "$ac_file is unchanged"
24036     rm -f conftest.h
24037   else
24038     # Remove last slash and all that follows it.  Not all systems have dirname.
24039       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24040       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24041       # The file is in a subdirectory.
24042       test ! -d "$ac_dir" && mkdir "$ac_dir"
24043     fi
24044     rm -f $ac_file
24045     mv conftest.h $ac_file
24046   fi
24047 fi; done
24048
24049 EOF
24050 cat >> $CONFIG_STATUS <<EOF
24051
24052 EOF
24053 cat >> $CONFIG_STATUS <<\EOF
24054
24055 date > stamp-h
24056 echo Please run \"make depend\" to build dependencies
24057
24058 exit 0
24059 EOF
24060 chmod +x $CONFIG_STATUS
24061 rm -fr confdefs* $ac_clean_files
24062 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24063