]> git.sur5r.net Git - openldap/blob - configure
Add HAVE_LONG_LONG
[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_NULL=no
2886 BUILD_PASSWD=no
2887 BUILD_PERL=no
2888 BUILD_SHELL=no
2889 BUILD_SQL=no
2890 BUILD_TCL=no
2891
2892 BUILD_BDB_DYNAMIC=static
2893 BUILD_DNSSRV_DYNAMIC=static
2894 BUILD_HDB_DYNAMIC=static
2895 BUILD_LDAP_DYNAMIC=static
2896 BUILD_LDBM_DYNAMIC=static
2897 BUILD_META_DYNAMIC=static
2898 BUILD_MONITOR_DYNAMIC=static
2899 BUILD_NULL_DYNAMIC=static
2900 BUILD_PASSWD_DYNAMIC=static
2901 BUILD_PERL_DYNAMIC=static
2902 BUILD_SHELL_DYNAMIC=static
2903 BUILD_TCL_DYNAMIC=static
2904 BUILD_SQL_DYNAMIC=static
2905
2906 SLAPD_MODULES_LDFLAGS=
2907 SLAPD_MODULES_CPPFLAGS=
2908
2909 SLAPD_STATIC_BACKENDS=
2910 SLAPD_DYNAMIC_BACKENDS=
2911
2912 SLAPD_PERL_LDFLAGS=
2913 MOD_PERL_LDFLAGS=
2914 PERL_CPPFLAGS=
2915
2916 SLAPD_SQL_LDFLAGS=
2917 SLAPD_SQL_LIBS=
2918 SLAPD_SQL_INCLUDES=
2919
2920 MOD_TCL_LIB=
2921 KRB4_LIBS=
2922 KRB5_LIBS=
2923 SASL_LIBS=
2924 TERMCAP_LIBS=
2925 TLS_LIBS=
2926 MODULES_LIBS=
2927 SLAPI_LIBS=
2928 LIBSLAPI=
2929 LIBSLAPITOOLS=
2930 AUTH_LIBS=
2931
2932 SLAPD_SLP_LIBS=
2933
2934
2935 # Find a good install program.  We prefer a C program (faster),
2936 # so one script is as good as another.  But avoid the broken or
2937 # incompatible versions:
2938 # SysV /etc/install, /usr/sbin/install
2939 # SunOS /usr/etc/install
2940 # IRIX /sbin/install
2941 # AIX /bin/install
2942 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2943 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2944 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2945 # ./install, which can be erroneously created by make from ./install.sh.
2946 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2947 echo "configure:2948: checking for a BSD compatible install" >&5
2948 if test -z "$INSTALL"; then
2949 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2950   echo $ac_n "(cached) $ac_c" 1>&6
2951 else
2952     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2953   for ac_dir in $PATH; do
2954     # Account for people who put trailing slashes in PATH elements.
2955     case "$ac_dir/" in
2956     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2957     *)
2958       # OSF1 and SCO ODT 3.0 have their own names for install.
2959       # Don't use installbsd from OSF since it installs stuff as root
2960       # by default.
2961       for ac_prog in ginstall scoinst install; do
2962         if test -f $ac_dir/$ac_prog; then
2963           if test $ac_prog = install &&
2964             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2965             # AIX install.  It has an incompatible calling convention.
2966             :
2967           elif test $ac_prog = install &&
2968             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2969             # program-specific install script used by HP pwplus--don't use.
2970             :
2971           else
2972             ac_cv_path_install="$ac_dir/$ac_prog -c"
2973             break 2
2974           fi
2975         fi
2976       done
2977       ;;
2978     esac
2979   done
2980   IFS="$ac_save_IFS"
2981
2982 fi
2983   if test "${ac_cv_path_install+set}" = set; then
2984     INSTALL="$ac_cv_path_install"
2985   else
2986     # As a last resort, use the slow shell script.  We don't cache a
2987     # path for INSTALL within a source directory, because that will
2988     # break other packages using the cache if that directory is
2989     # removed, or if the path is relative.
2990     INSTALL="$ac_install_sh"
2991   fi
2992 fi
2993 echo "$ac_t""$INSTALL" 1>&6
2994
2995 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2996 # It thinks the first close brace ends the variable substitution.
2997 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2998
2999 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3000
3001 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3002
3003
3004 cat >> confdefs.h <<\EOF
3005 #define HAVE_MKVERSION 1
3006 EOF
3007
3008
3009
3010
3011 ol_aix_threads=no
3012 case "$target" in
3013 *-*-aix*)       if test -z "$CC" ; then
3014                 case "$ol_with_threads" in
3015                 auto | yes |  posix) ol_aix_threads=yes ;;
3016                 esac
3017         fi
3018 ;;
3019 esac
3020
3021 if test $ol_aix_threads = yes ; then
3022         if test -z "${CC}" ; then
3023                 for ac_prog in cc_r xlc_r cc
3024 do
3025 # Extract the first word of "$ac_prog", so it can be a program name with args.
3026 set dummy $ac_prog; ac_word=$2
3027 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3028 echo "configure:3029: checking for $ac_word" >&5
3029 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3030   echo $ac_n "(cached) $ac_c" 1>&6
3031 else
3032   if test -n "$CC"; then
3033   ac_cv_prog_CC="$CC" # Let the user override the test.
3034 else
3035   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3036   ac_dummy="$PATH"
3037   for ac_dir in $ac_dummy; do
3038     test -z "$ac_dir" && ac_dir=.
3039     if test -f $ac_dir/$ac_word; then
3040       ac_cv_prog_CC="$ac_prog"
3041       break
3042     fi
3043   done
3044   IFS="$ac_save_ifs"
3045 fi
3046 fi
3047 CC="$ac_cv_prog_CC"
3048 if test -n "$CC"; then
3049   echo "$ac_t""$CC" 1>&6
3050 else
3051   echo "$ac_t""no" 1>&6
3052 fi
3053
3054 test -n "$CC" && break
3055 done
3056
3057
3058                 if test "$CC" = cc ; then
3059                                                 if test $ol_with_threads != auto ; then
3060                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3061                         else
3062                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3063                         fi
3064                         ol_with_threads=no
3065                 fi
3066         fi
3067
3068         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3069                 ol_with_threads=posix
3070                 ol_cv_pthread_create=yes
3071         fi
3072 fi
3073
3074 if test -z "${CC}"; then
3075         for ac_prog in cc gcc
3076 do
3077 # Extract the first word of "$ac_prog", so it can be a program name with args.
3078 set dummy $ac_prog; ac_word=$2
3079 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3080 echo "configure:3081: checking for $ac_word" >&5
3081 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   if test -n "$CC"; then
3085   ac_cv_prog_CC="$CC" # Let the user override the test.
3086 else
3087   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3088   ac_dummy="$PATH"
3089   for ac_dir in $ac_dummy; do
3090     test -z "$ac_dir" && ac_dir=.
3091     if test -f $ac_dir/$ac_word; then
3092       ac_cv_prog_CC="$ac_prog"
3093       break
3094     fi
3095   done
3096   IFS="$ac_save_ifs"
3097 fi
3098 fi
3099 CC="$ac_cv_prog_CC"
3100 if test -n "$CC"; then
3101   echo "$ac_t""$CC" 1>&6
3102 else
3103   echo "$ac_t""no" 1>&6
3104 fi
3105
3106 test -n "$CC" && break
3107 done
3108 test -n "$CC" || CC="missing"
3109
3110
3111         if test "${CC}" = "missing" ; then
3112                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3113         fi
3114 fi
3115
3116 if test -z "${AR}"; then
3117         for ac_prog in ar gar
3118 do
3119 # Extract the first word of "$ac_prog", so it can be a program name with args.
3120 set dummy $ac_prog; ac_word=$2
3121 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3122 echo "configure:3123: checking for $ac_word" >&5
3123 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3124   echo $ac_n "(cached) $ac_c" 1>&6
3125 else
3126   if test -n "$AR"; then
3127   ac_cv_prog_AR="$AR" # Let the user override the test.
3128 else
3129   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3130   ac_dummy="$PATH"
3131   for ac_dir in $ac_dummy; do
3132     test -z "$ac_dir" && ac_dir=.
3133     if test -f $ac_dir/$ac_word; then
3134       ac_cv_prog_AR="$ac_prog"
3135       break
3136     fi
3137   done
3138   IFS="$ac_save_ifs"
3139 fi
3140 fi
3141 AR="$ac_cv_prog_AR"
3142 if test -n "$AR"; then
3143   echo "$ac_t""$AR" 1>&6
3144 else
3145   echo "$ac_t""no" 1>&6
3146 fi
3147
3148 test -n "$AR" && break
3149 done
3150 test -n "$AR" || AR="missing"
3151
3152
3153         if test "${AR}" = "missing" ; then
3154                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3155         fi
3156 fi
3157
3158
3159
3160 # Find the correct PATH separator.  Usually this is `:', but
3161 # DJGPP uses `;' like DOS.
3162 if test "X${PATH_SEPARATOR+set}" != Xset; then
3163   UNAME=${UNAME-`uname 2>/dev/null`}
3164   case X$UNAME in
3165     *-DOS) lt_cv_sys_path_separator=';' ;;
3166     *)     lt_cv_sys_path_separator=':' ;;
3167   esac
3168   PATH_SEPARATOR=$lt_cv_sys_path_separator
3169 fi
3170
3171 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3172 echo "configure:3173: checking for Cygwin environment" >&5
3173 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3174   echo $ac_n "(cached) $ac_c" 1>&6
3175 else
3176   cat > conftest.$ac_ext <<EOF
3177 #line 3178 "configure"
3178 #include "confdefs.h"
3179
3180 int main() {
3181
3182 #ifndef __CYGWIN__
3183 #define __CYGWIN__ __CYGWIN32__
3184 #endif
3185 return __CYGWIN__;
3186 ; return 0; }
3187 EOF
3188 if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3189   rm -rf conftest*
3190   ac_cv_cygwin=yes
3191 else
3192   echo "configure: failed program was:" >&5
3193   cat conftest.$ac_ext >&5
3194   rm -rf conftest*
3195   ac_cv_cygwin=no
3196 fi
3197 rm -f conftest*
3198 fi
3199
3200 echo "$ac_t""$ac_cv_cygwin" 1>&6
3201 CYGWIN=
3202 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3203 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3204 echo "configure:3205: checking for mingw32 environment" >&5
3205 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3206   echo $ac_n "(cached) $ac_c" 1>&6
3207 else
3208   cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211
3212 int main() {
3213 return __MINGW32__;
3214 ; return 0; }
3215 EOF
3216 if { (eval echo configure:3217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3217   rm -rf conftest*
3218   ac_cv_mingw32=yes
3219 else
3220   echo "configure: failed program was:" >&5
3221   cat conftest.$ac_ext >&5
3222   rm -rf conftest*
3223   ac_cv_mingw32=no
3224 fi
3225 rm -f conftest*
3226 fi
3227
3228 echo "$ac_t""$ac_cv_mingw32" 1>&6
3229 MINGW32=
3230 test "$ac_cv_mingw32" = yes && MINGW32=yes
3231 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3232 echo "configure:3233: checking for EMX OS/2 environment" >&5
3233 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3234   echo $ac_n "(cached) $ac_c" 1>&6
3235 else
3236   cat > conftest.$ac_ext <<EOF
3237 #line 3238 "configure"
3238 #include "confdefs.h"
3239
3240 int main() {
3241 return __EMX__;
3242 ; return 0; }
3243 EOF
3244 if { (eval echo configure:3245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3245   rm -rf conftest*
3246   ac_cv_emxos2=yes
3247 else
3248   echo "configure: failed program was:" >&5
3249   cat conftest.$ac_ext >&5
3250   rm -rf conftest*
3251   ac_cv_emxos2=no
3252 fi
3253 rm -f conftest*
3254 fi
3255
3256 echo "$ac_t""$ac_cv_emxos2" 1>&6
3257 EMXOS2=
3258 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3259 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3260 echo "configure:3261: checking how to run the C preprocessor" >&5
3261 # On Suns, sometimes $CPP names a directory.
3262 if test -n "$CPP" && test -d "$CPP"; then
3263   CPP=
3264 fi
3265 if test -z "$CPP"; then
3266 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3267   echo $ac_n "(cached) $ac_c" 1>&6
3268 else
3269     # This must be in double quotes, not single quotes, because CPP may get
3270   # substituted into the Makefile and "${CC-cc}" will confuse make.
3271   CPP="${CC-cc} -E"
3272   # On the NeXT, cc -E runs the code through the compiler's parser,
3273   # not just through cpp.
3274   cat > conftest.$ac_ext <<EOF
3275 #line 3276 "configure"
3276 #include "confdefs.h"
3277 #include <assert.h>
3278 Syntax Error
3279 EOF
3280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3281 { (eval echo configure:3282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3283 if test -z "$ac_err"; then
3284   :
3285 else
3286   echo "$ac_err" >&5
3287   echo "configure: failed program was:" >&5
3288   cat conftest.$ac_ext >&5
3289   rm -rf conftest*
3290   CPP="${CC-cc} -E -traditional-cpp"
3291   cat > conftest.$ac_ext <<EOF
3292 #line 3293 "configure"
3293 #include "confdefs.h"
3294 #include <assert.h>
3295 Syntax Error
3296 EOF
3297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3298 { (eval echo configure:3299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3300 if test -z "$ac_err"; then
3301   :
3302 else
3303   echo "$ac_err" >&5
3304   echo "configure: failed program was:" >&5
3305   cat conftest.$ac_ext >&5
3306   rm -rf conftest*
3307   CPP="${CC-cc} -nologo -E"
3308   cat > conftest.$ac_ext <<EOF
3309 #line 3310 "configure"
3310 #include "confdefs.h"
3311 #include <assert.h>
3312 Syntax Error
3313 EOF
3314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3315 { (eval echo configure:3316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3317 if test -z "$ac_err"; then
3318   :
3319 else
3320   echo "$ac_err" >&5
3321   echo "configure: failed program was:" >&5
3322   cat conftest.$ac_ext >&5
3323   rm -rf conftest*
3324   CPP=/lib/cpp
3325 fi
3326 rm -f conftest*
3327 fi
3328 rm -f conftest*
3329 fi
3330 rm -f conftest*
3331   ac_cv_prog_CPP="$CPP"
3332 fi
3333   CPP="$ac_cv_prog_CPP"
3334 else
3335   ac_cv_prog_CPP="$CPP"
3336 fi
3337 echo "$ac_t""$CPP" 1>&6
3338
3339 # Check whether --enable-fast-install or --disable-fast-install was given.
3340 if test "${enable_fast_install+set}" = set; then
3341   enableval="$enable_fast_install"
3342   p=${PACKAGE-default}
3343 case $enableval in
3344 yes) enable_fast_install=yes ;;
3345 no) enable_fast_install=no ;;
3346 *)
3347   enable_fast_install=no
3348   # Look at the argument we got.  We use all the common list separators.
3349   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3350   for pkg in $enableval; do
3351     if test "X$pkg" = "X$p"; then
3352       enable_fast_install=yes
3353     fi
3354   done
3355   IFS="$ac_save_ifs"
3356   ;;
3357 esac
3358 else
3359   enable_fast_install=yes
3360 fi
3361
3362 # Extract the first word of "gcc", so it can be a program name with args.
3363 set dummy gcc; ac_word=$2
3364 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3365 echo "configure:3366: checking for $ac_word" >&5
3366 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3367   echo $ac_n "(cached) $ac_c" 1>&6
3368 else
3369   if test -n "$CC"; then
3370   ac_cv_prog_CC="$CC" # Let the user override the test.
3371 else
3372   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3373   ac_dummy="$PATH"
3374   for ac_dir in $ac_dummy; do
3375     test -z "$ac_dir" && ac_dir=.
3376     if test -f $ac_dir/$ac_word; then
3377       ac_cv_prog_CC="gcc"
3378       break
3379     fi
3380   done
3381   IFS="$ac_save_ifs"
3382 fi
3383 fi
3384 CC="$ac_cv_prog_CC"
3385 if test -n "$CC"; then
3386   echo "$ac_t""$CC" 1>&6
3387 else
3388   echo "$ac_t""no" 1>&6
3389 fi
3390
3391 if test -z "$CC"; then
3392   # Extract the first word of "cc", so it can be a program name with args.
3393 set dummy cc; ac_word=$2
3394 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3395 echo "configure:3396: checking for $ac_word" >&5
3396 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3397   echo $ac_n "(cached) $ac_c" 1>&6
3398 else
3399   if test -n "$CC"; then
3400   ac_cv_prog_CC="$CC" # Let the user override the test.
3401 else
3402   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3403   ac_prog_rejected=no
3404   ac_dummy="$PATH"
3405   for ac_dir in $ac_dummy; do
3406     test -z "$ac_dir" && ac_dir=.
3407     if test -f $ac_dir/$ac_word; then
3408       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3409         ac_prog_rejected=yes
3410         continue
3411       fi
3412       ac_cv_prog_CC="cc"
3413       break
3414     fi
3415   done
3416   IFS="$ac_save_ifs"
3417 if test $ac_prog_rejected = yes; then
3418   # We found a bogon in the path, so make sure we never use it.
3419   set dummy $ac_cv_prog_CC
3420   shift
3421   if test $# -gt 0; then
3422     # We chose a different compiler from the bogus one.
3423     # However, it has the same basename, so the bogon will be chosen
3424     # first if we set CC to just the basename; use the full file name.
3425     shift
3426     set dummy "$ac_dir/$ac_word" "$@"
3427     shift
3428     ac_cv_prog_CC="$@"
3429   fi
3430 fi
3431 fi
3432 fi
3433 CC="$ac_cv_prog_CC"
3434 if test -n "$CC"; then
3435   echo "$ac_t""$CC" 1>&6
3436 else
3437   echo "$ac_t""no" 1>&6
3438 fi
3439
3440   if test -z "$CC"; then
3441     case "`uname -s`" in
3442     *win32* | *WIN32* | *CYGWIN*)
3443       # Extract the first word of "cl", so it can be a program name with args.
3444 set dummy cl; ac_word=$2
3445 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3446 echo "configure:3447: checking for $ac_word" >&5
3447 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3448   echo $ac_n "(cached) $ac_c" 1>&6
3449 else
3450   if test -n "$CC"; then
3451   ac_cv_prog_CC="$CC" # Let the user override the test.
3452 else
3453   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3454   ac_dummy="$PATH"
3455   for ac_dir in $ac_dummy; do
3456     test -z "$ac_dir" && ac_dir=.
3457     if test -f $ac_dir/$ac_word; then
3458       ac_cv_prog_CC="cl"
3459       break
3460     fi
3461   done
3462   IFS="$ac_save_ifs"
3463 fi
3464 fi
3465 CC="$ac_cv_prog_CC"
3466 if test -n "$CC"; then
3467   echo "$ac_t""$CC" 1>&6
3468 else
3469   echo "$ac_t""no" 1>&6
3470 fi
3471  ;;
3472     esac
3473   fi
3474   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3475 fi
3476
3477 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3478 echo "configure:3479: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3479
3480 ac_ext=c
3481 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3482 ac_cpp='$CPP $CPPFLAGS'
3483 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3484 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3485 cross_compiling=$ac_cv_prog_cc_cross
3486
3487 cat > conftest.$ac_ext << EOF
3488
3489 #line 3490 "configure"
3490 #include "confdefs.h"
3491
3492 main(){return(0);}
3493 EOF
3494 if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3495   ac_cv_prog_cc_works=yes
3496   # If we can't run a trivial program, we are probably using a cross compiler.
3497   if (./conftest; exit) 2>/dev/null; then
3498     ac_cv_prog_cc_cross=no
3499   else
3500     ac_cv_prog_cc_cross=yes
3501   fi
3502 else
3503   echo "configure: failed program was:" >&5
3504   cat conftest.$ac_ext >&5
3505   ac_cv_prog_cc_works=no
3506 fi
3507 rm -fr conftest*
3508 ac_ext=c
3509 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3510 ac_cpp='$CPP $CPPFLAGS'
3511 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3512 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3513 cross_compiling=$ac_cv_prog_cc_cross
3514
3515 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3516 if test $ac_cv_prog_cc_works = no; then
3517   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3518 fi
3519 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3520 echo "configure:3521: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3521 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3522 cross_compiling=$ac_cv_prog_cc_cross
3523
3524 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3525 echo "configure:3526: checking whether we are using GNU C" >&5
3526 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529   cat > conftest.c <<EOF
3530 #ifdef __GNUC__
3531   yes;
3532 #endif
3533 EOF
3534 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
3535   ac_cv_prog_gcc=yes
3536 else
3537   ac_cv_prog_gcc=no
3538 fi
3539 fi
3540
3541 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3542
3543 if test $ac_cv_prog_gcc = yes; then
3544   GCC=yes
3545 else
3546   GCC=
3547 fi
3548
3549 ac_test_CFLAGS="${CFLAGS+set}"
3550 ac_save_CFLAGS="$CFLAGS"
3551 CFLAGS=
3552 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3553 echo "configure:3554: checking whether ${CC-cc} accepts -g" >&5
3554 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3555   echo $ac_n "(cached) $ac_c" 1>&6
3556 else
3557   echo 'void f(){}' > conftest.c
3558 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3559   ac_cv_prog_cc_g=yes
3560 else
3561   ac_cv_prog_cc_g=no
3562 fi
3563 rm -f conftest*
3564
3565 fi
3566
3567 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3568 if test "$ac_test_CFLAGS" = set; then
3569   CFLAGS="$ac_save_CFLAGS"
3570 elif test $ac_cv_prog_cc_g = yes; then
3571   if test "$GCC" = yes; then
3572     CFLAGS="-g -O2"
3573   else
3574     CFLAGS="-g"
3575   fi
3576 else
3577   if test "$GCC" = yes; then
3578     CFLAGS="-O2"
3579   else
3580     CFLAGS=
3581   fi
3582 fi
3583
3584 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3585 if test "${with_gnu_ld+set}" = set; then
3586   withval="$with_gnu_ld"
3587   test "$withval" = no || with_gnu_ld=yes
3588 else
3589   with_gnu_ld=no
3590 fi
3591
3592 ac_prog=ld
3593 if test "$GCC" = yes; then
3594   # Check if gcc -print-prog-name=ld gives a path.
3595   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3596 echo "configure:3597: checking for ld used by GCC" >&5
3597   case $host in
3598   *-*-mingw*)
3599     # gcc leaves a trailing carriage return which upsets mingw
3600     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3601   *)
3602     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3603   esac
3604   case $ac_prog in
3605     # Accept absolute paths.
3606     [\\/]* | [A-Za-z]:[\\/]*)
3607       re_direlt='/[^/][^/]*/\.\./'
3608       # Canonicalize the path of ld
3609       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3610       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3611         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3612       done
3613       test -z "$LD" && LD="$ac_prog"
3614       ;;
3615   "")
3616     # If it fails, then pretend we aren't using GCC.
3617     ac_prog=ld
3618     ;;
3619   *)
3620     # If it is relative, then search for the first ld in PATH.
3621     with_gnu_ld=unknown
3622     ;;
3623   esac
3624 elif test "$with_gnu_ld" = yes; then
3625   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3626 echo "configure:3627: checking for GNU ld" >&5
3627 else
3628   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3629 echo "configure:3630: checking for non-GNU ld" >&5
3630 fi
3631 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3632   echo $ac_n "(cached) $ac_c" 1>&6
3633 else
3634   if test -z "$LD"; then
3635   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3636   for ac_dir in $PATH; do
3637     test -z "$ac_dir" && ac_dir=.
3638     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3639       lt_cv_path_LD="$ac_dir/$ac_prog"
3640       # Check to see if the program is GNU ld.  I'd rather use --version,
3641       # but apparently some GNU ld's only accept -v.
3642       # Break only if it was the GNU/non-GNU ld that we prefer.
3643       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3644         test "$with_gnu_ld" != no && break
3645       else
3646         test "$with_gnu_ld" != yes && break
3647       fi
3648     fi
3649   done
3650   IFS="$ac_save_ifs"
3651 else
3652   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3653 fi
3654 fi
3655
3656 LD="$lt_cv_path_LD"
3657 if test -n "$LD"; then
3658   echo "$ac_t""$LD" 1>&6
3659 else
3660   echo "$ac_t""no" 1>&6
3661 fi
3662 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3663 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3664 echo "configure:3665: checking if the linker ($LD) is GNU ld" >&5
3665 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3666   echo $ac_n "(cached) $ac_c" 1>&6
3667 else
3668   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3669 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3670   lt_cv_prog_gnu_ld=yes
3671 else
3672   lt_cv_prog_gnu_ld=no
3673 fi
3674 fi
3675
3676 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3677 with_gnu_ld=$lt_cv_prog_gnu_ld
3678
3679
3680 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3681 echo "configure:3682: checking for $LD option to reload object files" >&5
3682 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3683   echo $ac_n "(cached) $ac_c" 1>&6
3684 else
3685   lt_cv_ld_reload_flag='-r'
3686 fi
3687
3688 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3689 reload_flag=$lt_cv_ld_reload_flag
3690 test -n "$reload_flag" && reload_flag=" $reload_flag"
3691
3692 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3693 echo "configure:3694: checking for BSD-compatible nm" >&5
3694 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3695   echo $ac_n "(cached) $ac_c" 1>&6
3696 else
3697   if test -n "$NM"; then
3698   # Let the user override the test.
3699   lt_cv_path_NM="$NM"
3700 else
3701   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3702   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3703     test -z "$ac_dir" && ac_dir=.
3704     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3705     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3706       # Check to see if the nm accepts a BSD-compat flag.
3707       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3708       #   nm: unknown option "B" ignored
3709       # Tru64's nm complains that /dev/null is an invalid object file
3710       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3711         lt_cv_path_NM="$tmp_nm -B"
3712         break
3713       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3714         lt_cv_path_NM="$tmp_nm -p"
3715         break
3716       else
3717         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3718         continue # so that we can try to find one that supports BSD flags
3719       fi
3720     fi
3721   done
3722   IFS="$ac_save_ifs"
3723   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3724 fi
3725 fi
3726
3727 NM="$lt_cv_path_NM"
3728 echo "$ac_t""$NM" 1>&6
3729
3730 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3731 echo "configure:3732: checking for a sed that does not truncate output" >&5
3732 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3733   echo $ac_n "(cached) $ac_c" 1>&6
3734 else
3735   # Loop through the user's path and test for sed and gsed.
3736 # Then use that list of sed's as ones to test for truncation.
3737 as_executable_p="test -f"
3738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3739 for as_dir in $PATH
3740 do
3741   IFS=$as_save_IFS
3742   test -z "$as_dir" && as_dir=.
3743   for ac_prog in sed gsed; do
3744     for ac_exec_ext in '' $ac_executable_extensions; do
3745       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3746         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3747       fi
3748     done
3749   done
3750 done
3751
3752   # Create a temporary directory, and hook for its removal unless debugging.
3753 $debug ||
3754 {
3755   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3756   trap '{ (exit 1); exit 1; }' 1 2 13 15
3757 }
3758
3759 # Create a (secure) tmp directory for tmp files.
3760 : ${TMPDIR=/tmp}
3761 {
3762   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3763   test -n "$tmp" && test -d "$tmp"
3764 }  ||
3765 {
3766   tmp=$TMPDIR/sed$$-$RANDOM
3767   (umask 077 && mkdir $tmp)
3768 } ||
3769 {
3770    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3771    { (exit 1); exit 1; }
3772 }
3773   _max=0
3774   _count=0
3775   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3776   # along with /bin/sed that truncates output.
3777   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3778     test ! -f ${_sed} && break
3779     cat /dev/null > "$tmp/sed.in"
3780     _count=0
3781     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3782     # Check for GNU sed and select it if it is found.
3783     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3784       lt_cv_path_SED=${_sed}
3785       break
3786     fi
3787     while true; do
3788       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3789       mv "$tmp/sed.tmp" "$tmp/sed.in"
3790       cp "$tmp/sed.in" "$tmp/sed.nl"
3791       echo >>"$tmp/sed.nl"
3792       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3793       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3794       # 40000 chars as input seems more than enough
3795       test $_count -gt 10 && break
3796       _count=`expr $_count + 1`
3797       if test $_count -gt $_max; then
3798         _max=$_count
3799         lt_cv_path_SED=$_sed
3800       fi
3801     done
3802   done
3803   rm -rf "$tmp"
3804
3805 fi
3806
3807 if test "X$SED" != "X"; then
3808   lt_cv_path_SED=$SED
3809 else
3810   SED=$lt_cv_path_SED
3811 fi
3812 echo "$ac_t""$SED" 1>&6
3813
3814 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3815 echo "configure:3816: checking whether ln -s works" >&5
3816 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3817   echo $ac_n "(cached) $ac_c" 1>&6
3818 else
3819   rm -f conftestdata
3820 if ln -s X conftestdata 2>/dev/null
3821 then
3822   rm -f conftestdata
3823   ac_cv_prog_LN_S="ln -s"
3824 else
3825   ac_cv_prog_LN_S=ln
3826 fi
3827 fi
3828 LN_S="$ac_cv_prog_LN_S"
3829 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3830   echo "$ac_t""yes" 1>&6
3831 else
3832   echo "$ac_t""no" 1>&6
3833 fi
3834
3835 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3836 echo "configure:3837: checking how to recognise dependent libraries" >&5
3837 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3838   echo $ac_n "(cached) $ac_c" 1>&6
3839 else
3840   lt_cv_file_magic_cmd='$MAGIC_CMD'
3841 lt_cv_file_magic_test_file=
3842 lt_cv_deplibs_check_method='unknown'
3843 # Need to set the preceding variable on all platforms that support
3844 # interlibrary dependencies.
3845 # 'none' -- dependencies not supported.
3846 # `unknown' -- same as none, but documents that we really don't know.
3847 # 'pass_all' -- all dependencies passed with no checks.
3848 # 'test_compile' -- check by making test program.
3849 # 'file_magic [[regex]]' -- check by looking for files in library path
3850 # which responds to the $file_magic_cmd with a given egrep regex.
3851 # If you have `file' or equivalent on your system and you're not sure
3852 # whether `pass_all' will *always* work, you probably want this one.
3853
3854 case $host_os in
3855 aix4* | aix5*)
3856   lt_cv_deplibs_check_method=pass_all
3857   ;;
3858
3859 beos*)
3860   lt_cv_deplibs_check_method=pass_all
3861   ;;
3862
3863 bsdi4*)
3864   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3865   lt_cv_file_magic_cmd='/usr/bin/file -L'
3866   lt_cv_file_magic_test_file=/shlib/libc.so
3867   ;;
3868
3869 cygwin* | mingw* | pw32*)
3870   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3871   lt_cv_file_magic_cmd='$OBJDUMP -f'
3872   ;;
3873
3874 darwin* | rhapsody*)
3875   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3876   lt_cv_file_magic_cmd='/usr/bin/file -L'
3877   case "$host_os" in
3878   rhapsody* | darwin1.[012])
3879     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3880     ;;
3881   *) # Darwin 1.3 on
3882     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3883     ;;
3884   esac
3885   ;;
3886
3887 freebsd*)
3888   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3889     case $host_cpu in
3890     i*86 )
3891       # Not sure whether the presence of OpenBSD here was a mistake.
3892       # Let's accept both of them until this is cleared up.
3893       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3894       lt_cv_file_magic_cmd=/usr/bin/file
3895       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3896       ;;
3897     esac
3898   else
3899     lt_cv_deplibs_check_method=pass_all
3900   fi
3901   ;;
3902
3903 gnu*)
3904   lt_cv_deplibs_check_method=pass_all
3905   ;;
3906
3907 hpux10.20*|hpux11*)
3908   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3909   lt_cv_file_magic_cmd=/usr/bin/file
3910   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3911   ;;
3912
3913 irix5* | irix6* | nonstopux*)
3914   case $host_os in
3915   irix5* | nonstopux*)
3916     # this will be overridden with pass_all, but let us keep it just in case
3917     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3918     ;;
3919   *)
3920     case $LD in
3921     *-32|*"-32 ") libmagic=32-bit;;
3922     *-n32|*"-n32 ") libmagic=N32;;
3923     *-64|*"-64 ") libmagic=64-bit;;
3924     *) libmagic=never-match;;
3925     esac
3926     # this will be overridden with pass_all, but let us keep it just in case
3927     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3928     ;;
3929   esac
3930   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3931   lt_cv_deplibs_check_method=pass_all
3932   ;;
3933
3934 # This must be Linux ELF.
3935 linux-gnu*)
3936   case $host_cpu in
3937   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3938     lt_cv_deplibs_check_method=pass_all ;;
3939   *)
3940     # glibc up to 2.1.1 does not perform some relocations on ARM
3941     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3942   esac
3943   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3944   ;;
3945
3946 netbsd*)
3947   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3948     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3949   else
3950     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3951   fi
3952   ;;
3953
3954 newos6*)
3955   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3956   lt_cv_file_magic_cmd=/usr/bin/file
3957   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3958   ;;
3959
3960 openbsd*)
3961   lt_cv_file_magic_cmd=/usr/bin/file
3962   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3963   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3964     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3965   else
3966     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3967   fi
3968   ;;
3969
3970 osf3* | osf4* | osf5*)
3971   # this will be overridden with pass_all, but let us keep it just in case
3972   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3973   lt_cv_file_magic_test_file=/shlib/libc.so
3974   lt_cv_deplibs_check_method=pass_all
3975   ;;
3976
3977 sco3.2v5*)
3978   lt_cv_deplibs_check_method=pass_all
3979   ;;
3980
3981 solaris*)
3982   lt_cv_deplibs_check_method=pass_all
3983   lt_cv_file_magic_test_file=/lib/libc.so
3984   ;;
3985
3986 sysv5uw[78]* | sysv4*uw2*)
3987   lt_cv_deplibs_check_method=pass_all
3988   ;;
3989
3990 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3991   case $host_vendor in
3992   motorola)
3993     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]'
3994     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3995     ;;
3996   ncr)
3997     lt_cv_deplibs_check_method=pass_all
3998     ;;
3999   sequent)
4000     lt_cv_file_magic_cmd='/bin/file'
4001     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4002     ;;
4003   sni)
4004     lt_cv_file_magic_cmd='/bin/file'
4005     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4006     lt_cv_file_magic_test_file=/lib/libc.so
4007     ;;
4008   siemens)
4009     lt_cv_deplibs_check_method=pass_all
4010     ;;
4011   esac
4012   ;;
4013 esac
4014
4015 fi
4016
4017 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
4018 file_magic_cmd=$lt_cv_file_magic_cmd
4019 deplibs_check_method=$lt_cv_deplibs_check_method
4020
4021 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4022 echo "configure:4023: checking for object suffix" >&5
4023 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4024   echo $ac_n "(cached) $ac_c" 1>&6
4025 else
4026   rm -f conftest*
4027 echo 'int i = 1;' > conftest.$ac_ext
4028 if { (eval echo configure:4029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4029   for ac_file in conftest.*; do
4030     case $ac_file in
4031     *.c) ;;
4032     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4033     esac
4034   done
4035 else
4036   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4037 fi
4038 rm -f conftest*
4039 fi
4040
4041 echo "$ac_t""$ac_cv_objext" 1>&6
4042 OBJEXT=$ac_cv_objext
4043 ac_objext=$ac_cv_objext
4044
4045
4046
4047
4048 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4049 echo "configure:4050: checking for executable suffix" >&5
4050 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4051   echo $ac_n "(cached) $ac_c" 1>&6
4052 else
4053   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4054   ac_cv_exeext=.exe
4055 else
4056   rm -f conftest*
4057   echo 'int main () { return 0; }' > conftest.$ac_ext
4058   ac_cv_exeext=
4059   if { (eval echo configure:4060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4060     for file in conftest.*; do
4061       case $file in
4062       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4063       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4064       esac
4065     done
4066   else
4067     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4068   fi
4069   rm -f conftest*
4070   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4071 fi
4072 fi
4073
4074 EXEEXT=""
4075 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4076 echo "$ac_t""${ac_cv_exeext}" 1>&6
4077 ac_exeext=$EXEEXT
4078
4079 if test $host != $build; then
4080   ac_tool_prefix=${host_alias}-
4081 else
4082   ac_tool_prefix=
4083 fi
4084
4085
4086
4087
4088 # Check for command to grab the raw symbol name followed by C symbol from nm.
4089 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4090 echo "configure:4091: checking command to parse $NM output" >&5
4091 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4092   echo $ac_n "(cached) $ac_c" 1>&6
4093 else
4094   
4095 # These are sane defaults that work on at least a few old systems.
4096 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4097
4098 # Character class describing NM global symbol codes.
4099 symcode='[BCDEGRST]'
4100
4101 # Regexp to match symbols that can be accessed directly from C.
4102 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4103
4104 # Transform the above into a raw symbol and a C symbol.
4105 symxfrm='\1 \2\3 \3'
4106
4107 # Transform an extracted symbol line into a proper C declaration
4108 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4109
4110 # Transform an extracted symbol line into symbol name and symbol address
4111 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'"
4112
4113 # Define system-specific variables.
4114 case $host_os in
4115 aix*)
4116   symcode='[BCDT]'
4117   ;;
4118 cygwin* | mingw* | pw32*)
4119   symcode='[ABCDGISTW]'
4120   ;;
4121 hpux*) # Its linker distinguishes data from code symbols
4122   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4123   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'"
4124   ;;
4125 irix* | nonstopux*)
4126   symcode='[BCDEGRST]'
4127   ;;
4128 osf*)
4129   symcode='[BCDEGQRST]'
4130   ;;
4131 solaris* | sysv5*)
4132   symcode='[BDT]'
4133   ;;
4134 sysv4)
4135   symcode='[DFNSTU]'
4136   ;;
4137 esac
4138
4139 # Handle CRLF in mingw tool chain
4140 opt_cr=
4141 case $host_os in
4142 mingw*)
4143   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4144   ;;
4145 esac
4146
4147 # If we're using GNU nm, then use its standard symbol codes.
4148 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4149   symcode='[ABCDGISTW]'
4150 fi
4151
4152 # Try without a prefix undercore, then with it.
4153 for ac_symprfx in "" "_"; do
4154
4155   # Write the raw and C identifiers.
4156 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4157
4158   # Check to see that the pipe works correctly.
4159   pipe_works=no
4160   rm -f conftest*
4161   cat > conftest.$ac_ext <<EOF
4162 #ifdef __cplusplus
4163 extern "C" {
4164 #endif
4165 char nm_test_var;
4166 void nm_test_func(){}
4167 #ifdef __cplusplus
4168 }
4169 #endif
4170 int main(){nm_test_var='a';nm_test_func();return(0);}
4171 EOF
4172
4173   if { (eval echo configure:4174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4174     # Now try to grab the symbols.
4175     nlist=conftest.nm
4176     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
4177       # Try sorting and uniquifying the output.
4178       if sort "$nlist" | uniq > "$nlist"T; then
4179         mv -f "$nlist"T "$nlist"
4180       else
4181         rm -f "$nlist"T
4182       fi
4183
4184       # Make sure that we snagged all the symbols we need.
4185       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4186         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4187           cat <<EOF > conftest.$ac_ext
4188 #ifdef __cplusplus
4189 extern "C" {
4190 #endif
4191
4192 EOF
4193           # Now generate the symbol file.
4194           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4195
4196           cat <<EOF >> conftest.$ac_ext
4197 #if defined (__STDC__) && __STDC__
4198 # define lt_ptr void *
4199 #else
4200 # define lt_ptr char *
4201 # define const
4202 #endif
4203
4204 /* The mapping between symbol names and symbols. */
4205 const struct {
4206   const char *name;
4207   lt_ptr address;
4208 }
4209 lt_preloaded_symbols[] =
4210 {
4211 EOF
4212           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4213           cat <<\EOF >> conftest.$ac_ext
4214   {0, (lt_ptr) 0}
4215 };
4216
4217 #ifdef __cplusplus
4218 }
4219 #endif
4220 EOF
4221           # Now try linking the two files.
4222           mv conftest.$ac_objext conftstm.$ac_objext
4223           save_LIBS="$LIBS"
4224           save_CFLAGS="$CFLAGS"
4225           LIBS="conftstm.$ac_objext"
4226           CFLAGS="$CFLAGS$no_builtin_flag"
4227           if { (eval echo configure:4228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4228             pipe_works=yes
4229           fi
4230           LIBS="$save_LIBS"
4231           CFLAGS="$save_CFLAGS"
4232         else
4233           echo "cannot find nm_test_func in $nlist" >&5
4234         fi
4235       else
4236         echo "cannot find nm_test_var in $nlist" >&5
4237       fi
4238     else
4239       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4240     fi
4241   else
4242     echo "$progname: failed program was:" >&5
4243     cat conftest.$ac_ext >&5
4244   fi
4245   rm -f conftest* conftst*
4246
4247   # Do not use the global_symbol_pipe unless it works.
4248   if test "$pipe_works" = yes; then
4249     break
4250   else
4251     lt_cv_sys_global_symbol_pipe=
4252   fi
4253 done
4254
4255 fi
4256
4257 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4258 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4259   global_symbol_to_cdecl=
4260   global_symbol_to_c_name_address=
4261 else
4262   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4263   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4264 fi
4265 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4266 then
4267   echo "$ac_t""failed" 1>&6
4268 else
4269   echo "$ac_t""ok" 1>&6
4270 fi
4271
4272 for ac_hdr in dlfcn.h
4273 do
4274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4276 echo "configure:4277: checking for $ac_hdr" >&5
4277 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4278   echo $ac_n "(cached) $ac_c" 1>&6
4279 else
4280   cat > conftest.$ac_ext <<EOF
4281 #line 4282 "configure"
4282 #include "confdefs.h"
4283 #include <$ac_hdr>
4284 EOF
4285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4286 { (eval echo configure:4287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4288 if test -z "$ac_err"; then
4289   rm -rf conftest*
4290   eval "ac_cv_header_$ac_safe=yes"
4291 else
4292   echo "$ac_err" >&5
4293   echo "configure: failed program was:" >&5
4294   cat conftest.$ac_ext >&5
4295   rm -rf conftest*
4296   eval "ac_cv_header_$ac_safe=no"
4297 fi
4298 rm -f conftest*
4299 fi
4300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4301   echo "$ac_t""yes" 1>&6
4302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4303   cat >> confdefs.h <<EOF
4304 #define $ac_tr_hdr 1
4305 EOF
4306  
4307 else
4308   echo "$ac_t""no" 1>&6
4309 fi
4310 done
4311
4312
4313
4314
4315
4316
4317 # Only perform the check for file, if the check method requires it
4318 case $deplibs_check_method in
4319 file_magic*)
4320   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4321     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4322 echo "configure:4323: checking for ${ac_tool_prefix}file" >&5
4323 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4324   echo $ac_n "(cached) $ac_c" 1>&6
4325 else
4326   case $MAGIC_CMD in
4327   /*)
4328   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4329   ;;
4330   ?:/*)
4331   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4332   ;;
4333   *)
4334   ac_save_MAGIC_CMD="$MAGIC_CMD"
4335   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4336   ac_dummy="/usr/bin:$PATH"
4337   for ac_dir in $ac_dummy; do
4338     test -z "$ac_dir" && ac_dir=.
4339     if test -f $ac_dir/${ac_tool_prefix}file; then
4340       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4341       if test -n "$file_magic_test_file"; then
4342         case $deplibs_check_method in
4343         "file_magic "*)
4344           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4345           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4346           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4347             egrep "$file_magic_regex" > /dev/null; then
4348             :
4349           else
4350             cat <<EOF 1>&2
4351
4352 *** Warning: the command libtool uses to detect shared libraries,
4353 *** $file_magic_cmd, produces output that libtool cannot recognize.
4354 *** The result is that libtool may fail to recognize shared libraries
4355 *** as such.  This will affect the creation of libtool libraries that
4356 *** depend on shared libraries, but programs linked with such libtool
4357 *** libraries will work regardless of this problem.  Nevertheless, you
4358 *** may want to report the problem to your system manager and/or to
4359 *** bug-libtool@gnu.org
4360
4361 EOF
4362           fi ;;
4363         esac
4364       fi
4365       break
4366     fi
4367   done
4368   IFS="$ac_save_ifs"
4369   MAGIC_CMD="$ac_save_MAGIC_CMD"
4370   ;;
4371 esac
4372 fi
4373
4374 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4375 if test -n "$MAGIC_CMD"; then
4376   echo "$ac_t""$MAGIC_CMD" 1>&6
4377 else
4378   echo "$ac_t""no" 1>&6
4379 fi
4380
4381 if test -z "$lt_cv_path_MAGIC_CMD"; then
4382   if test -n "$ac_tool_prefix"; then
4383     echo $ac_n "checking for file""... $ac_c" 1>&6
4384 echo "configure:4385: checking for file" >&5
4385 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4386   echo $ac_n "(cached) $ac_c" 1>&6
4387 else
4388   case $MAGIC_CMD in
4389   /*)
4390   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4391   ;;
4392   ?:/*)
4393   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4394   ;;
4395   *)
4396   ac_save_MAGIC_CMD="$MAGIC_CMD"
4397   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4398   ac_dummy="/usr/bin:$PATH"
4399   for ac_dir in $ac_dummy; do
4400     test -z "$ac_dir" && ac_dir=.
4401     if test -f $ac_dir/file; then
4402       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4403       if test -n "$file_magic_test_file"; then
4404         case $deplibs_check_method in
4405         "file_magic "*)
4406           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4407           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4408           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4409             egrep "$file_magic_regex" > /dev/null; then
4410             :
4411           else
4412             cat <<EOF 1>&2
4413
4414 *** Warning: the command libtool uses to detect shared libraries,
4415 *** $file_magic_cmd, produces output that libtool cannot recognize.
4416 *** The result is that libtool may fail to recognize shared libraries
4417 *** as such.  This will affect the creation of libtool libraries that
4418 *** depend on shared libraries, but programs linked with such libtool
4419 *** libraries will work regardless of this problem.  Nevertheless, you
4420 *** may want to report the problem to your system manager and/or to
4421 *** bug-libtool@gnu.org
4422
4423 EOF
4424           fi ;;
4425         esac
4426       fi
4427       break
4428     fi
4429   done
4430   IFS="$ac_save_ifs"
4431   MAGIC_CMD="$ac_save_MAGIC_CMD"
4432   ;;
4433 esac
4434 fi
4435
4436 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4437 if test -n "$MAGIC_CMD"; then
4438   echo "$ac_t""$MAGIC_CMD" 1>&6
4439 else
4440   echo "$ac_t""no" 1>&6
4441 fi
4442
4443   else
4444     MAGIC_CMD=:
4445   fi
4446 fi
4447
4448   fi
4449   ;;
4450 esac
4451
4452 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4453 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4454 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4455 echo "configure:4456: checking for $ac_word" >&5
4456 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4457   echo $ac_n "(cached) $ac_c" 1>&6
4458 else
4459   if test -n "$RANLIB"; then
4460   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4461 else
4462   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4463   ac_dummy="$PATH"
4464   for ac_dir in $ac_dummy; do
4465     test -z "$ac_dir" && ac_dir=.
4466     if test -f $ac_dir/$ac_word; then
4467       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4468       break
4469     fi
4470   done
4471   IFS="$ac_save_ifs"
4472 fi
4473 fi
4474 RANLIB="$ac_cv_prog_RANLIB"
4475 if test -n "$RANLIB"; then
4476   echo "$ac_t""$RANLIB" 1>&6
4477 else
4478   echo "$ac_t""no" 1>&6
4479 fi
4480
4481
4482 if test -z "$ac_cv_prog_RANLIB"; then
4483 if test -n "$ac_tool_prefix"; then
4484   # Extract the first word of "ranlib", so it can be a program name with args.
4485 set dummy ranlib; ac_word=$2
4486 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4487 echo "configure:4488: checking for $ac_word" >&5
4488 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4489   echo $ac_n "(cached) $ac_c" 1>&6
4490 else
4491   if test -n "$RANLIB"; then
4492   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4493 else
4494   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4495   ac_dummy="$PATH"
4496   for ac_dir in $ac_dummy; do
4497     test -z "$ac_dir" && ac_dir=.
4498     if test -f $ac_dir/$ac_word; then
4499       ac_cv_prog_RANLIB="ranlib"
4500       break
4501     fi
4502   done
4503   IFS="$ac_save_ifs"
4504   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4505 fi
4506 fi
4507 RANLIB="$ac_cv_prog_RANLIB"
4508 if test -n "$RANLIB"; then
4509   echo "$ac_t""$RANLIB" 1>&6
4510 else
4511   echo "$ac_t""no" 1>&6
4512 fi
4513
4514 else
4515   RANLIB=":"
4516 fi
4517 fi
4518
4519 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4520 set dummy ${ac_tool_prefix}strip; ac_word=$2
4521 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4522 echo "configure:4523: checking for $ac_word" >&5
4523 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4524   echo $ac_n "(cached) $ac_c" 1>&6
4525 else
4526   if test -n "$STRIP"; then
4527   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4528 else
4529   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4530   ac_dummy="$PATH"
4531   for ac_dir in $ac_dummy; do
4532     test -z "$ac_dir" && ac_dir=.
4533     if test -f $ac_dir/$ac_word; then
4534       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4535       break
4536     fi
4537   done
4538   IFS="$ac_save_ifs"
4539 fi
4540 fi
4541 STRIP="$ac_cv_prog_STRIP"
4542 if test -n "$STRIP"; then
4543   echo "$ac_t""$STRIP" 1>&6
4544 else
4545   echo "$ac_t""no" 1>&6
4546 fi
4547
4548
4549 if test -z "$ac_cv_prog_STRIP"; then
4550 if test -n "$ac_tool_prefix"; then
4551   # Extract the first word of "strip", so it can be a program name with args.
4552 set dummy strip; ac_word=$2
4553 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4554 echo "configure:4555: checking for $ac_word" >&5
4555 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4556   echo $ac_n "(cached) $ac_c" 1>&6
4557 else
4558   if test -n "$STRIP"; then
4559   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4560 else
4561   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4562   ac_dummy="$PATH"
4563   for ac_dir in $ac_dummy; do
4564     test -z "$ac_dir" && ac_dir=.
4565     if test -f $ac_dir/$ac_word; then
4566       ac_cv_prog_STRIP="strip"
4567       break
4568     fi
4569   done
4570   IFS="$ac_save_ifs"
4571   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4572 fi
4573 fi
4574 STRIP="$ac_cv_prog_STRIP"
4575 if test -n "$STRIP"; then
4576   echo "$ac_t""$STRIP" 1>&6
4577 else
4578   echo "$ac_t""no" 1>&6
4579 fi
4580
4581 else
4582   STRIP=":"
4583 fi
4584 fi
4585
4586
4587 enable_dlopen=yes
4588 enable_win32_dll=yes
4589
4590 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4591 if test "${enable_libtool_lock+set}" = set; then
4592   enableval="$enable_libtool_lock"
4593   :
4594 fi
4595
4596 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4597
4598 # Some flags need to be propagated to the compiler or linker for good
4599 # libtool support.
4600 case $host in
4601 *-*-irix6*)
4602   # Find out which ABI we are using.
4603   echo '#line 4604 "configure"' > conftest.$ac_ext
4604   if { (eval echo configure:4605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4605     case `/usr/bin/file conftest.$ac_objext` in
4606     *32-bit*)
4607       LD="${LD-ld} -32"
4608       ;;
4609     *N32*)
4610       LD="${LD-ld} -n32"
4611       ;;
4612     *64-bit*)
4613       LD="${LD-ld} -64"
4614       ;;
4615     esac
4616   fi
4617   rm -rf conftest*
4618   ;;
4619
4620 *-*-sco3.2v5*)
4621   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4622   SAVE_CFLAGS="$CFLAGS"
4623   CFLAGS="$CFLAGS -belf"
4624   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4625 echo "configure:4626: checking whether the C compiler needs -belf" >&5
4626 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4627   echo $ac_n "(cached) $ac_c" 1>&6
4628 else
4629   
4630      ac_ext=c
4631 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4632 ac_cpp='$CPP $CPPFLAGS'
4633 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4634 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4635 cross_compiling=$ac_cv_prog_cc_cross
4636
4637      cat > conftest.$ac_ext <<EOF
4638 #line 4639 "configure"
4639 #include "confdefs.h"
4640
4641 int main() {
4642
4643 ; return 0; }
4644 EOF
4645 if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4646   rm -rf conftest*
4647   lt_cv_cc_needs_belf=yes
4648 else
4649   echo "configure: failed program was:" >&5
4650   cat conftest.$ac_ext >&5
4651   rm -rf conftest*
4652   lt_cv_cc_needs_belf=no
4653 fi
4654 rm -f conftest*
4655      ac_ext=c
4656 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4657 ac_cpp='$CPP $CPPFLAGS'
4658 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4659 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4660 cross_compiling=$ac_cv_prog_cc_cross
4661
4662 fi
4663
4664 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4665   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4666     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4667     CFLAGS="$SAVE_CFLAGS"
4668   fi
4669   ;;
4670
4671 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4672   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4673 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4675 echo "configure:4676: checking for $ac_word" >&5
4676 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4677   echo $ac_n "(cached) $ac_c" 1>&6
4678 else
4679   if test -n "$DLLTOOL"; then
4680   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4681 else
4682   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4683   ac_dummy="$PATH"
4684   for ac_dir in $ac_dummy; do
4685     test -z "$ac_dir" && ac_dir=.
4686     if test -f $ac_dir/$ac_word; then
4687       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4688       break
4689     fi
4690   done
4691   IFS="$ac_save_ifs"
4692 fi
4693 fi
4694 DLLTOOL="$ac_cv_prog_DLLTOOL"
4695 if test -n "$DLLTOOL"; then
4696   echo "$ac_t""$DLLTOOL" 1>&6
4697 else
4698   echo "$ac_t""no" 1>&6
4699 fi
4700
4701
4702 if test -z "$ac_cv_prog_DLLTOOL"; then
4703 if test -n "$ac_tool_prefix"; then
4704   # Extract the first word of "dlltool", so it can be a program name with args.
4705 set dummy dlltool; ac_word=$2
4706 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4707 echo "configure:4708: checking for $ac_word" >&5
4708 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4709   echo $ac_n "(cached) $ac_c" 1>&6
4710 else
4711   if test -n "$DLLTOOL"; then
4712   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4713 else
4714   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4715   ac_dummy="$PATH"
4716   for ac_dir in $ac_dummy; do
4717     test -z "$ac_dir" && ac_dir=.
4718     if test -f $ac_dir/$ac_word; then
4719       ac_cv_prog_DLLTOOL="dlltool"
4720       break
4721     fi
4722   done
4723   IFS="$ac_save_ifs"
4724   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4725 fi
4726 fi
4727 DLLTOOL="$ac_cv_prog_DLLTOOL"
4728 if test -n "$DLLTOOL"; then
4729   echo "$ac_t""$DLLTOOL" 1>&6
4730 else
4731   echo "$ac_t""no" 1>&6
4732 fi
4733
4734 else
4735   DLLTOOL="false"
4736 fi
4737 fi
4738
4739   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4740 set dummy ${ac_tool_prefix}as; ac_word=$2
4741 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4742 echo "configure:4743: checking for $ac_word" >&5
4743 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4744   echo $ac_n "(cached) $ac_c" 1>&6
4745 else
4746   if test -n "$AS"; then
4747   ac_cv_prog_AS="$AS" # Let the user override the test.
4748 else
4749   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4750   ac_dummy="$PATH"
4751   for ac_dir in $ac_dummy; do
4752     test -z "$ac_dir" && ac_dir=.
4753     if test -f $ac_dir/$ac_word; then
4754       ac_cv_prog_AS="${ac_tool_prefix}as"
4755       break
4756     fi
4757   done
4758   IFS="$ac_save_ifs"
4759 fi
4760 fi
4761 AS="$ac_cv_prog_AS"
4762 if test -n "$AS"; then
4763   echo "$ac_t""$AS" 1>&6
4764 else
4765   echo "$ac_t""no" 1>&6
4766 fi
4767
4768
4769 if test -z "$ac_cv_prog_AS"; then
4770 if test -n "$ac_tool_prefix"; then
4771   # Extract the first word of "as", so it can be a program name with args.
4772 set dummy as; ac_word=$2
4773 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4774 echo "configure:4775: checking for $ac_word" >&5
4775 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4776   echo $ac_n "(cached) $ac_c" 1>&6
4777 else
4778   if test -n "$AS"; then
4779   ac_cv_prog_AS="$AS" # Let the user override the test.
4780 else
4781   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4782   ac_dummy="$PATH"
4783   for ac_dir in $ac_dummy; do
4784     test -z "$ac_dir" && ac_dir=.
4785     if test -f $ac_dir/$ac_word; then
4786       ac_cv_prog_AS="as"
4787       break
4788     fi
4789   done
4790   IFS="$ac_save_ifs"
4791   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4792 fi
4793 fi
4794 AS="$ac_cv_prog_AS"
4795 if test -n "$AS"; then
4796   echo "$ac_t""$AS" 1>&6
4797 else
4798   echo "$ac_t""no" 1>&6
4799 fi
4800
4801 else
4802   AS="false"
4803 fi
4804 fi
4805
4806   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4807 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4808 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4809 echo "configure:4810: checking for $ac_word" >&5
4810 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4811   echo $ac_n "(cached) $ac_c" 1>&6
4812 else
4813   if test -n "$OBJDUMP"; then
4814   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4815 else
4816   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4817   ac_dummy="$PATH"
4818   for ac_dir in $ac_dummy; do
4819     test -z "$ac_dir" && ac_dir=.
4820     if test -f $ac_dir/$ac_word; then
4821       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4822       break
4823     fi
4824   done
4825   IFS="$ac_save_ifs"
4826 fi
4827 fi
4828 OBJDUMP="$ac_cv_prog_OBJDUMP"
4829 if test -n "$OBJDUMP"; then
4830   echo "$ac_t""$OBJDUMP" 1>&6
4831 else
4832   echo "$ac_t""no" 1>&6
4833 fi
4834
4835
4836 if test -z "$ac_cv_prog_OBJDUMP"; then
4837 if test -n "$ac_tool_prefix"; then
4838   # Extract the first word of "objdump", so it can be a program name with args.
4839 set dummy objdump; ac_word=$2
4840 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4841 echo "configure:4842: checking for $ac_word" >&5
4842 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4843   echo $ac_n "(cached) $ac_c" 1>&6
4844 else
4845   if test -n "$OBJDUMP"; then
4846   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4847 else
4848   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4849   ac_dummy="$PATH"
4850   for ac_dir in $ac_dummy; do
4851     test -z "$ac_dir" && ac_dir=.
4852     if test -f $ac_dir/$ac_word; then
4853       ac_cv_prog_OBJDUMP="objdump"
4854       break
4855     fi
4856   done
4857   IFS="$ac_save_ifs"
4858   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4859 fi
4860 fi
4861 OBJDUMP="$ac_cv_prog_OBJDUMP"
4862 if test -n "$OBJDUMP"; then
4863   echo "$ac_t""$OBJDUMP" 1>&6
4864 else
4865   echo "$ac_t""no" 1>&6
4866 fi
4867
4868 else
4869   OBJDUMP="false"
4870 fi
4871 fi
4872
4873
4874   # recent cygwin and mingw systems supply a stub DllMain which the user
4875   # can override, but on older systems we have to supply one
4876   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4877 echo "configure:4878: checking if libtool should supply DllMain function" >&5
4878 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4879   echo $ac_n "(cached) $ac_c" 1>&6
4880 else
4881   cat > conftest.$ac_ext <<EOF
4882 #line 4883 "configure"
4883 #include "confdefs.h"
4884
4885 int main() {
4886 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4887       DllMain (0, 0, 0);
4888 ; return 0; }
4889 EOF
4890 if { (eval echo configure:4891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4891   rm -rf conftest*
4892   lt_cv_need_dllmain=no
4893 else
4894   echo "configure: failed program was:" >&5
4895   cat conftest.$ac_ext >&5
4896   rm -rf conftest*
4897   lt_cv_need_dllmain=yes
4898 fi
4899 rm -f conftest*
4900 fi
4901
4902 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4903
4904   case $host/$CC in
4905   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4906     # old mingw systems require "-dll" to link a DLL, while more recent ones
4907     # require "-mdll"
4908     SAVE_CFLAGS="$CFLAGS"
4909     CFLAGS="$CFLAGS -mdll"
4910     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4911 echo "configure:4912: checking how to link DLLs" >&5
4912 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4913   echo $ac_n "(cached) $ac_c" 1>&6
4914 else
4915   cat > conftest.$ac_ext <<EOF
4916 #line 4917 "configure"
4917 #include "confdefs.h"
4918
4919 int main() {
4920
4921 ; return 0; }
4922 EOF
4923 if { (eval echo configure:4924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4924   rm -rf conftest*
4925   lt_cv_cc_dll_switch=-mdll
4926 else
4927   echo "configure: failed program was:" >&5
4928   cat conftest.$ac_ext >&5
4929   rm -rf conftest*
4930   lt_cv_cc_dll_switch=-dll
4931 fi
4932 rm -f conftest*
4933 fi
4934
4935 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4936     CFLAGS="$SAVE_CFLAGS" ;;
4937   *-*-cygwin* | *-*-pw32*)
4938     # cygwin systems need to pass --dll to the linker, and not link
4939     # crt.o which will require a WinMain@16 definition.
4940     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4941   esac
4942   ;;
4943   
4944 esac
4945
4946 # Sed substitution that helps us do robust quoting.  It backslashifies
4947 # metacharacters that are still active within double-quoted strings.
4948 Xsed='sed -e s/^X//'
4949 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4950
4951 # Same as above, but do not quote variable references.
4952 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4953
4954 # Sed substitution to delay expansion of an escaped shell variable in a
4955 # double_quote_subst'ed string.
4956 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4957
4958 # Constants:
4959 rm="rm -f"
4960
4961 # Global variables:
4962 default_ofile=libtool
4963 can_build_shared=yes
4964
4965 # All known linkers require a `.a' archive for static linking (except M$VC,
4966 # which needs '.lib').
4967 libext=a
4968 ltmain="$ac_aux_dir/ltmain.sh"
4969 ofile="$default_ofile"
4970 with_gnu_ld="$lt_cv_prog_gnu_ld"
4971 need_locks="$enable_libtool_lock"
4972
4973 old_CC="$CC"
4974 old_CFLAGS="$CFLAGS"
4975
4976 # Set sane defaults for various variables
4977 test -z "$AR" && AR=ar
4978 test -z "$AR_FLAGS" && AR_FLAGS=cru
4979 test -z "$AS" && AS=as
4980 test -z "$CC" && CC=cc
4981 test -z "$DLLTOOL" && DLLTOOL=dlltool
4982 test -z "$LD" && LD=ld
4983 test -z "$LN_S" && LN_S="ln -s"
4984 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4985 test -z "$NM" && NM=nm
4986 test -z "$OBJDUMP" && OBJDUMP=objdump
4987 test -z "$RANLIB" && RANLIB=:
4988 test -z "$STRIP" && STRIP=:
4989 test -z "$ac_objext" && ac_objext=o
4990
4991 if test x"$host" != x"$build"; then
4992   ac_tool_prefix=${host_alias}-
4993 else
4994   ac_tool_prefix=
4995 fi
4996
4997 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4998 case $host_os in
4999 linux-gnu*) ;;
5000 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
5001 esac
5002
5003 case $host_os in
5004 aix3*)
5005   # AIX sometimes has problems with the GCC collect2 program.  For some
5006   # reason, if we set the COLLECT_NAMES environment variable, the problems
5007   # vanish in a puff of smoke.
5008   if test "X${COLLECT_NAMES+set}" != Xset; then
5009     COLLECT_NAMES=
5010     export COLLECT_NAMES
5011   fi
5012   ;;
5013 esac
5014
5015 # Determine commands to create old-style static archives.
5016 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5017 old_postinstall_cmds='chmod 644 $oldlib'
5018 old_postuninstall_cmds=
5019
5020 if test -n "$RANLIB"; then
5021   case $host_os in
5022   openbsd*)
5023     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5024     ;;
5025   *)
5026     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5027     ;;
5028   esac
5029   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5030 fi
5031
5032 # Allow CC to be a program name with arguments.
5033 set dummy $CC
5034 compiler="$2"
5035
5036 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5037 echo "configure:5038: checking for objdir" >&5
5038 rm -f .libs 2>/dev/null
5039 mkdir .libs 2>/dev/null
5040 if test -d .libs; then
5041   objdir=.libs
5042 else
5043   # MS-DOS does not allow filenames that begin with a dot.
5044   objdir=_libs
5045 fi
5046 rmdir .libs 2>/dev/null
5047 echo "$ac_t""$objdir" 1>&6
5048
5049
5050 # Check whether --with-pic or --without-pic was given.
5051 if test "${with_pic+set}" = set; then
5052   withval="$with_pic"
5053   pic_mode="$withval"
5054 else
5055   pic_mode=default
5056 fi
5057
5058 test -z "$pic_mode" && pic_mode=default
5059
5060 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5061 # in isolation, and that seeing it set (from the cache) indicates that
5062 # the associated values are set (in the cache) correctly too.
5063 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5064 echo "configure:5065: checking for $compiler option to produce PIC" >&5
5065 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5066   echo $ac_n "(cached) $ac_c" 1>&6
5067 else
5068    lt_cv_prog_cc_pic=
5069   lt_cv_prog_cc_shlib=
5070   lt_cv_prog_cc_wl=
5071   lt_cv_prog_cc_static=
5072   lt_cv_prog_cc_no_builtin=
5073   lt_cv_prog_cc_can_build_shared=$can_build_shared
5074
5075   if test "$GCC" = yes; then
5076     lt_cv_prog_cc_wl='-Wl,'
5077     lt_cv_prog_cc_static='-static'
5078
5079     case $host_os in
5080     aix*)
5081       # Below there is a dirty hack to force normal static linking with -ldl
5082       # The problem is because libdl dynamically linked with both libc and
5083       # libC (AIX C++ library), which obviously doesn't included in libraries
5084       # list by gcc. This cause undefined symbols with -static flags.
5085       # This hack allows C programs to be linked with "-static -ldl", but
5086       # not sure about C++ programs.
5087       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5088       ;;
5089     amigaos*)
5090       # FIXME: we need at least 68020 code to build shared libraries, but
5091       # adding the `-m68020' flag to GCC prevents building anything better,
5092       # like `-m68040'.
5093       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5094       ;;
5095     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5096       # PIC is the default for these OSes.
5097       ;;
5098     darwin* | rhapsody*)
5099       # PIC is the default on this platform
5100       # Common symbols not allowed in MH_DYLIB files
5101       lt_cv_prog_cc_pic='-fno-common'
5102       ;;
5103     cygwin* | mingw* | pw32* | os2*)
5104       # This hack is so that the source file can tell whether it is being
5105       # built for inclusion in a dll (and should export symbols for example).
5106       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5107       ;;
5108     sysv4*MP*)
5109       if test -d /usr/nec; then
5110          lt_cv_prog_cc_pic=-Kconform_pic
5111       fi
5112       ;;
5113     *)
5114       lt_cv_prog_cc_pic='-fPIC'
5115       ;;
5116     esac
5117   else
5118     # PORTME Check for PIC flags for the system compiler.
5119     case $host_os in
5120     aix3* | aix4* | aix5*)
5121       lt_cv_prog_cc_wl='-Wl,'
5122       # All AIX code is PIC.
5123       if test "$host_cpu" = ia64; then
5124         # AIX 5 now supports IA64 processor
5125         lt_cv_prog_cc_static='-Bstatic'
5126       else
5127         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5128       fi
5129       ;;
5130
5131     hpux9* | hpux10* | hpux11*)
5132       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5133       lt_cv_prog_cc_wl='-Wl,'
5134       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5135       lt_cv_prog_cc_pic='+Z'
5136       ;;
5137
5138     irix5* | irix6* | nonstopux*)
5139       lt_cv_prog_cc_wl='-Wl,'
5140       lt_cv_prog_cc_static='-non_shared'
5141       # PIC (with -KPIC) is the default.
5142       ;;
5143
5144     cygwin* | mingw* | pw32* | os2*)
5145       # This hack is so that the source file can tell whether it is being
5146       # built for inclusion in a dll (and should export symbols for example).
5147       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5148       ;;
5149
5150     newsos6)
5151       lt_cv_prog_cc_pic='-KPIC'
5152       lt_cv_prog_cc_static='-Bstatic'
5153       ;;
5154
5155     osf3* | osf4* | osf5*)
5156       # All OSF/1 code is PIC.
5157       lt_cv_prog_cc_wl='-Wl,'
5158       lt_cv_prog_cc_static='-non_shared'
5159       ;;
5160
5161     sco3.2v5*)
5162       lt_cv_prog_cc_pic='-Kpic'
5163       lt_cv_prog_cc_static='-dn'
5164       lt_cv_prog_cc_shlib='-belf'
5165       ;;
5166
5167     solaris*)
5168       lt_cv_prog_cc_pic='-KPIC'
5169       lt_cv_prog_cc_static='-Bstatic'
5170       lt_cv_prog_cc_wl='-Wl,'
5171       ;;
5172
5173     sunos4*)
5174       lt_cv_prog_cc_pic='-PIC'
5175       lt_cv_prog_cc_static='-Bstatic'
5176       lt_cv_prog_cc_wl='-Qoption ld '
5177       ;;
5178
5179     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5180       lt_cv_prog_cc_pic='-KPIC'
5181       lt_cv_prog_cc_static='-Bstatic'
5182       lt_cv_prog_cc_wl='-Wl,'
5183       ;;
5184
5185     uts4*)
5186       lt_cv_prog_cc_pic='-pic'
5187       lt_cv_prog_cc_static='-Bstatic'
5188       ;;
5189
5190     sysv4*MP*)
5191       if test -d /usr/nec ;then
5192         lt_cv_prog_cc_pic='-Kconform_pic'
5193         lt_cv_prog_cc_static='-Bstatic'
5194       fi
5195       ;;
5196
5197     *)
5198       lt_cv_prog_cc_can_build_shared=no
5199       ;;
5200     esac
5201   fi
5202
5203 fi
5204
5205 if test -z "$lt_cv_prog_cc_pic"; then
5206   echo "$ac_t""none" 1>&6
5207 else
5208   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5209
5210   # Check to make sure the pic_flag actually works.
5211   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5212 echo "configure:5213: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5213   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5214   echo $ac_n "(cached) $ac_c" 1>&6
5215 else
5216       save_CFLAGS="$CFLAGS"
5217     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5218     cat > conftest.$ac_ext <<EOF
5219 #line 5220 "configure"
5220 #include "confdefs.h"
5221
5222 int main() {
5223
5224 ; return 0; }
5225 EOF
5226 if { (eval echo configure:5227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5227   rm -rf conftest*
5228         case $host_os in
5229       hpux9* | hpux10* | hpux11*)
5230         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5231         # they create non-PIC objects.  So, if there were any warnings, we
5232         # assume that PIC is not supported.
5233         if test -s conftest.err; then
5234           lt_cv_prog_cc_pic_works=no
5235         else
5236           lt_cv_prog_cc_pic_works=yes
5237         fi
5238         ;;
5239       *)
5240         lt_cv_prog_cc_pic_works=yes
5241         ;;
5242       esac
5243     
5244 else
5245   echo "configure: failed program was:" >&5
5246   cat conftest.$ac_ext >&5
5247   rm -rf conftest*
5248         lt_cv_prog_cc_pic_works=no
5249     
5250 fi
5251 rm -f conftest*
5252     CFLAGS="$save_CFLAGS"
5253   
5254 fi
5255
5256
5257   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5258     lt_cv_prog_cc_pic=
5259     lt_cv_prog_cc_can_build_shared=no
5260   else
5261     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5262   fi
5263
5264   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5265 fi
5266
5267 # Check for any special shared library compilation flags.
5268 if test -n "$lt_cv_prog_cc_shlib"; then
5269   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5270   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5271   else
5272    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5273     lt_cv_prog_cc_can_build_shared=no
5274   fi
5275 fi
5276
5277 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5278 echo "configure:5279: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5279 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5280   echo $ac_n "(cached) $ac_c" 1>&6
5281 else
5282     lt_cv_prog_cc_static_works=no
5283   save_LDFLAGS="$LDFLAGS"
5284   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5285   cat > conftest.$ac_ext <<EOF
5286 #line 5287 "configure"
5287 #include "confdefs.h"
5288
5289 int main() {
5290
5291 ; return 0; }
5292 EOF
5293 if { (eval echo configure:5294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5294   rm -rf conftest*
5295   lt_cv_prog_cc_static_works=yes
5296 else
5297   echo "configure: failed program was:" >&5
5298   cat conftest.$ac_ext >&5
5299 fi
5300 rm -f conftest*
5301   LDFLAGS="$save_LDFLAGS"
5302
5303 fi
5304
5305
5306 # Belt *and* braces to stop my trousers falling down:
5307 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5308 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5309
5310 pic_flag="$lt_cv_prog_cc_pic"
5311 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5312 wl="$lt_cv_prog_cc_wl"
5313 link_static_flag="$lt_cv_prog_cc_static"
5314 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5315 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5316
5317
5318 # Check to see if options -o and -c are simultaneously supported by compiler
5319 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5320 echo "configure:5321: checking if $compiler supports -c -o file.$ac_objext" >&5
5321 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5322   echo $ac_n "(cached) $ac_c" 1>&6
5323 else
5324   
5325 $rm -r conftest 2>/dev/null
5326 mkdir conftest
5327 cd conftest
5328 echo "int some_variable = 0;" > conftest.$ac_ext
5329 mkdir out
5330 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5331 # that will create temporary files in the current directory regardless of
5332 # the output directory.  Thus, making CWD read-only will cause this test
5333 # to fail, enabling locking or at least warning the user not to do parallel
5334 # builds.
5335 chmod -w .
5336 save_CFLAGS="$CFLAGS"
5337 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5338 compiler_c_o=no
5339 if { (eval echo configure:5340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5340   # The compiler can only warn and ignore the option if not recognized
5341   # So say no if there are warnings
5342   if test -s out/conftest.err; then
5343     lt_cv_compiler_c_o=no
5344   else
5345     lt_cv_compiler_c_o=yes
5346   fi
5347 else
5348   # Append any errors to the config.log.
5349   cat out/conftest.err 1>&5
5350   lt_cv_compiler_c_o=no
5351 fi
5352 CFLAGS="$save_CFLAGS"
5353 chmod u+w .
5354 $rm conftest* out/*
5355 rmdir out
5356 cd ..
5357 rmdir conftest
5358 $rm -r conftest 2>/dev/null
5359
5360 fi
5361
5362 compiler_c_o=$lt_cv_compiler_c_o
5363 echo "$ac_t""$compiler_c_o" 1>&6
5364
5365 if test x"$compiler_c_o" = x"yes"; then
5366   # Check to see if we can write to a .lo
5367   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5368 echo "configure:5369: checking if $compiler supports -c -o file.lo" >&5
5369   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5370   echo $ac_n "(cached) $ac_c" 1>&6
5371 else
5372   
5373   lt_cv_compiler_o_lo=no
5374   save_CFLAGS="$CFLAGS"
5375   CFLAGS="$CFLAGS -c -o conftest.lo"
5376   save_objext="$ac_objext"
5377   ac_objext=lo
5378   cat > conftest.$ac_ext <<EOF
5379 #line 5380 "configure"
5380 #include "confdefs.h"
5381
5382 int main() {
5383 int some_variable = 0;
5384 ; return 0; }
5385 EOF
5386 if { (eval echo configure:5387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5387   rm -rf conftest*
5388       # The compiler can only warn and ignore the option if not recognized
5389     # So say no if there are warnings
5390     if test -s conftest.err; then
5391       lt_cv_compiler_o_lo=no
5392     else
5393       lt_cv_compiler_o_lo=yes
5394     fi
5395   
5396 else
5397   echo "configure: failed program was:" >&5
5398   cat conftest.$ac_ext >&5
5399 fi
5400 rm -f conftest*
5401   ac_objext="$save_objext"
5402   CFLAGS="$save_CFLAGS"
5403   
5404 fi
5405
5406   compiler_o_lo=$lt_cv_compiler_o_lo
5407   echo "$ac_t""$compiler_o_lo" 1>&6
5408 else
5409   compiler_o_lo=no
5410 fi
5411
5412 # Check to see if we can do hard links to lock some files if needed
5413 hard_links="nottested"
5414 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5415   # do not overwrite the value of need_locks provided by the user
5416   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5417 echo "configure:5418: checking if we can lock with hard links" >&5
5418   hard_links=yes
5419   $rm conftest*
5420   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5421   touch conftest.a
5422   ln conftest.a conftest.b 2>&5 || hard_links=no
5423   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5424   echo "$ac_t""$hard_links" 1>&6
5425   if test "$hard_links" = no; then
5426     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5427     need_locks=warn
5428   fi
5429 else
5430   need_locks=no
5431 fi
5432
5433 if test "$GCC" = yes; then
5434   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5435   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5436 echo "configure:5437: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5437   echo "int some_variable = 0;" > conftest.$ac_ext
5438   save_CFLAGS="$CFLAGS"
5439   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5440   compiler_rtti_exceptions=no
5441   cat > conftest.$ac_ext <<EOF
5442 #line 5443 "configure"
5443 #include "confdefs.h"
5444
5445 int main() {
5446 int some_variable = 0;
5447 ; return 0; }
5448 EOF
5449 if { (eval echo configure:5450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5450   rm -rf conftest*
5451       # The compiler can only warn and ignore the option if not recognized
5452     # So say no if there are warnings
5453     if test -s conftest.err; then
5454       compiler_rtti_exceptions=no
5455     else
5456       compiler_rtti_exceptions=yes
5457     fi
5458   
5459 else
5460   echo "configure: failed program was:" >&5
5461   cat conftest.$ac_ext >&5
5462 fi
5463 rm -f conftest*
5464   CFLAGS="$save_CFLAGS"
5465   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5466
5467   if test "$compiler_rtti_exceptions" = "yes"; then
5468     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5469   else
5470     no_builtin_flag=' -fno-builtin'
5471   fi
5472 fi
5473
5474 # See if the linker supports building shared libraries.
5475 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5476 echo "configure:5477: checking whether the linker ($LD) supports shared libraries" >&5
5477
5478 allow_undefined_flag=
5479 no_undefined_flag=
5480 need_lib_prefix=unknown
5481 need_version=unknown
5482 # when you set need_version to no, make sure it does not cause -set_version
5483 # flags to be left without arguments
5484 archive_cmds=
5485 archive_expsym_cmds=
5486 old_archive_from_new_cmds=
5487 old_archive_from_expsyms_cmds=
5488 export_dynamic_flag_spec=
5489 whole_archive_flag_spec=
5490 thread_safe_flag_spec=
5491 hardcode_into_libs=no
5492 hardcode_libdir_flag_spec=
5493 hardcode_libdir_separator=
5494 hardcode_direct=no
5495 hardcode_minus_L=no
5496 hardcode_shlibpath_var=unsupported
5497 runpath_var=
5498 link_all_deplibs=unknown
5499 always_export_symbols=no
5500 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5501 # include_expsyms should be a list of space-separated symbols to be *always*
5502 # included in the symbol list
5503 include_expsyms=
5504 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5505 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5506 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5507 # as well as any symbol that contains `d'.
5508 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5509 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5510 # platforms (ab)use it in PIC code, but their linkers get confused if
5511 # the symbol is explicitly referenced.  Since portable code cannot
5512 # rely on this symbol name, it's probably fine to never include it in
5513 # preloaded symbol tables.
5514 extract_expsyms_cmds=
5515
5516 case $host_os in
5517 cygwin* | mingw* | pw32*)
5518   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5519   # When not using gcc, we currently assume that we are using
5520   # Microsoft Visual C++.
5521   if test "$GCC" != yes; then
5522     with_gnu_ld=no
5523   fi
5524   ;;
5525 openbsd*)
5526   with_gnu_ld=no
5527   ;;
5528 esac
5529
5530 ld_shlibs=yes
5531 if test "$with_gnu_ld" = yes; then
5532   # If archive_cmds runs LD, not CC, wlarc should be empty
5533   wlarc='${wl}'
5534
5535   # See if GNU ld supports shared libraries.
5536   case $host_os in
5537   aix3* | aix4* | aix5*)
5538     # On AIX, the GNU linker is very broken
5539     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5540     ld_shlibs=no
5541     cat <<EOF 1>&2
5542
5543 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5544 *** to be unable to reliably create shared libraries on AIX.
5545 *** Therefore, libtool is disabling shared libraries support.  If you
5546 *** really care for shared libraries, you may want to modify your PATH
5547 *** so that a non-GNU linker is found, and then restart.
5548
5549 EOF
5550     ;;
5551
5552   amigaos*)
5553     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)'
5554     hardcode_libdir_flag_spec='-L$libdir'
5555     hardcode_minus_L=yes
5556
5557     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5558     # that the semantics of dynamic libraries on AmigaOS, at least up
5559     # to version 4, is to share data among multiple programs linked
5560     # with the same dynamic library.  Since this doesn't match the
5561     # behavior of shared libraries on other platforms, we can use
5562     # them.
5563     ld_shlibs=no
5564     ;;
5565
5566   beos*)
5567     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5568       allow_undefined_flag=unsupported
5569       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5570       # support --undefined.  This deserves some investigation.  FIXME
5571       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5572     else
5573       ld_shlibs=no
5574     fi
5575     ;;
5576
5577   cygwin* | mingw* | pw32*)
5578     # hardcode_libdir_flag_spec is actually meaningless, as there is
5579     # no search path for DLLs.
5580     hardcode_libdir_flag_spec='-L$libdir'
5581     allow_undefined_flag=unsupported
5582     always_export_symbols=yes
5583
5584     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5585       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5586       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5587       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5588       else $CC -o impgen impgen.c ; fi)~
5589       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5590
5591     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5592
5593     # cygwin and mingw dlls have different entry points and sets of symbols
5594     # to exclude.
5595     # FIXME: what about values for MSVC?
5596     dll_entry=__cygwin_dll_entry@12
5597     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5598     case $host_os in
5599     mingw*)
5600       # mingw values
5601       dll_entry=_DllMainCRTStartup@12
5602       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5603       ;;
5604     esac
5605
5606     # mingw and cygwin differ, and it's simplest to just exclude the union
5607     # of the two symbol sets.
5608     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5609
5610     # recent cygwin and mingw systems supply a stub DllMain which the user
5611     # can override, but on older systems we have to supply one (in ltdll.c)
5612     if test "x$lt_cv_need_dllmain" = "xyes"; then
5613       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5614       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~
5615         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5616     else
5617       ltdll_obj=
5618       ltdll_cmds=
5619     fi
5620
5621     # Extract the symbol export list from an `--export-all' def file,
5622     # then regenerate the def file from the symbol export list, so that
5623     # the compiled dll only exports the symbol export list.
5624     # Be careful not to strip the DATA tag left be newer dlltools.
5625     export_symbols_cmds="$ltdll_cmds"'
5626       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5627       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5628
5629     # If the export-symbols file already is a .def file (1st line
5630     # is EXPORTS), use it as is.
5631     # If DATA tags from a recent dlltool are present, honour them!
5632     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5633         cp $export_symbols $output_objdir/$soname-def;
5634       else
5635         echo EXPORTS > $output_objdir/$soname-def;
5636         _lt_hint=1;
5637         cat $export_symbols | while read symbol; do
5638          set dummy \$symbol;
5639          case \$# in
5640            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5641            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5642            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5643          esac;
5644          _lt_hint=`expr 1 + \$_lt_hint`;
5645         done;
5646       fi~
5647       '"$ltdll_cmds"'
5648       $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~
5649       $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~
5650       $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~
5651       $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~
5652       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5653     ;;
5654
5655   netbsd*)
5656     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5657       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5658       wlarc=
5659     else
5660       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5661       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5662     fi
5663     ;;
5664
5665   solaris* | sysv5*)
5666     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5667       ld_shlibs=no
5668       cat <<EOF 1>&2
5669
5670 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5671 *** create shared libraries on Solaris systems.  Therefore, libtool
5672 *** is disabling shared libraries support.  We urge you to upgrade GNU
5673 *** binutils to release 2.9.1 or newer.  Another option is to modify
5674 *** your PATH or compiler configuration so that the native linker is
5675 *** used, and then restart.
5676
5677 EOF
5678     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5679       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5680       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5681     else
5682       ld_shlibs=no
5683     fi
5684     ;;
5685
5686   sunos4*)
5687     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5688     wlarc=
5689     hardcode_direct=yes
5690     hardcode_shlibpath_var=no
5691     ;;
5692
5693   *)
5694     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5695       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5696       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5697     else
5698       ld_shlibs=no
5699     fi
5700     ;;
5701   esac
5702
5703   if test "$ld_shlibs" = yes; then
5704     runpath_var=LD_RUN_PATH
5705     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5706     export_dynamic_flag_spec='${wl}--export-dynamic'
5707     case $host_os in
5708     cygwin* | mingw* | pw32*)
5709       # dlltool doesn't understand --whole-archive et. al.
5710       whole_archive_flag_spec=
5711       ;;
5712     *)
5713       # ancient GNU ld didn't support --whole-archive et. al.
5714       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5715         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5716       else
5717         whole_archive_flag_spec=
5718       fi
5719       ;;
5720     esac
5721   fi
5722 else
5723   # PORTME fill in a description of your system's linker (not GNU ld)
5724   case $host_os in
5725   aix3*)
5726     allow_undefined_flag=unsupported
5727     always_export_symbols=yes
5728     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'
5729     # Note: this linker hardcodes the directories in LIBPATH if there
5730     # are no directories specified by -L.
5731     hardcode_minus_L=yes
5732     if test "$GCC" = yes && test -z "$link_static_flag"; then
5733       # Neither direct hardcoding nor static linking is supported with a
5734       # broken collect2.
5735       hardcode_direct=unsupported
5736     fi
5737     ;;
5738
5739   aix4* | aix5*)
5740     if test "$host_cpu" = ia64; then
5741       # On IA64, the linker does run time linking by default, so we don't
5742       # have to do anything special.
5743       aix_use_runtimelinking=no
5744       exp_sym_flag='-Bexport'
5745       no_entry_flag=""
5746     else
5747       aix_use_runtimelinking=no
5748
5749       # Test if we are trying to use run time linking or normal
5750       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5751       # need to do runtime linking.
5752       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5753         for ld_flag in $LDFLAGS; do
5754           case $ld_flag in
5755           *-brtl*)
5756             aix_use_runtimelinking=yes
5757             break
5758           ;;
5759           esac
5760         done
5761       esac
5762
5763       exp_sym_flag='-bexport'
5764       no_entry_flag='-bnoentry'
5765     fi
5766
5767     # When large executables or shared objects are built, AIX ld can
5768     # have problems creating the table of contents.  If linking a library
5769     # or program results in "error TOC overflow" add -mminimal-toc to
5770     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5771     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5772
5773     hardcode_direct=yes
5774     archive_cmds=''
5775     hardcode_libdir_separator=':'
5776     if test "$GCC" = yes; then
5777       case $host_os in aix4.[012]|aix4.[012].*)
5778         collect2name=`${CC} -print-prog-name=collect2`
5779         if test -f "$collect2name" && \
5780           strings "$collect2name" | grep resolve_lib_name >/dev/null
5781         then
5782           # We have reworked collect2
5783           hardcode_direct=yes
5784         else
5785           # We have old collect2
5786           hardcode_direct=unsupported
5787           # It fails to find uninstalled libraries when the uninstalled
5788           # path is not listed in the libpath.  Setting hardcode_minus_L
5789           # to unsupported forces relinking
5790           hardcode_minus_L=yes
5791           hardcode_libdir_flag_spec='-L$libdir'
5792           hardcode_libdir_separator=
5793         fi
5794       esac
5795
5796       shared_flag='-shared'
5797     else
5798       # not using gcc
5799       if test "$host_cpu" = ia64; then
5800         shared_flag='${wl}-G'
5801       else
5802         if test "$aix_use_runtimelinking" = yes; then
5803           shared_flag='${wl}-G'
5804         else
5805           shared_flag='${wl}-bM:SRE'
5806         fi
5807       fi
5808     fi
5809
5810     # It seems that -bexpall can do strange things, so it is better to
5811     # generate a list of symbols to export.
5812     always_export_symbols=yes
5813     if test "$aix_use_runtimelinking" = yes; then
5814       # Warning - without using the other runtime loading flags (-brtl),
5815       # -berok will link without error, but may produce a broken library.
5816       allow_undefined_flag='-berok'
5817       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5818       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"
5819     else
5820       if test "$host_cpu" = ia64; then
5821         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5822         allow_undefined_flag="-z nodefs"
5823         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"
5824       else
5825         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5826         # Warning - without using the other run time loading flags,
5827         # -berok will link without error, but may produce a broken library.
5828         allow_undefined_flag='${wl}-berok'
5829         # This is a bit strange, but is similar to how AIX traditionally builds
5830         # it's shared libraries.
5831         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'
5832       fi
5833     fi
5834     ;;
5835
5836   amigaos*)
5837     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)'
5838     hardcode_libdir_flag_spec='-L$libdir'
5839     hardcode_minus_L=yes
5840     # see comment about different semantics on the GNU ld section
5841     ld_shlibs=no
5842     ;;
5843
5844   cygwin* | mingw* | pw32*)
5845     # When not using gcc, we currently assume that we are using
5846     # Microsoft Visual C++.
5847     # hardcode_libdir_flag_spec is actually meaningless, as there is
5848     # no search path for DLLs.
5849     hardcode_libdir_flag_spec=' '
5850     allow_undefined_flag=unsupported
5851     # Tell ltmain to make .lib files, not .a files.
5852     libext=lib
5853     # FIXME: Setting linknames here is a bad hack.
5854     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5855     # The linker will automatically build a .lib file if we build a DLL.
5856     old_archive_from_new_cmds='true'
5857     # FIXME: Should let the user specify the lib program.
5858     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5859     fix_srcfile_path='`cygpath -w "$srcfile"`'
5860     ;;
5861
5862   darwin* | rhapsody*)
5863     case "$host_os" in
5864     rhapsody* | darwin1.[012])
5865       allow_undefined_flag='-undefined suppress'
5866       ;;
5867     *) # Darwin 1.3 on
5868       allow_undefined_flag='-flat_namespace -undefined suppress'
5869       ;;
5870     esac
5871     # FIXME: Relying on posixy $() will cause problems for
5872     #        cross-compilation, but unfortunately the echo tests do not
5873     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5874     #        `"' quotes if we put them in here... so don't!
5875     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)'
5876     # We need to add '_' to the symbols in $export_symbols first
5877     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5878     hardcode_direct=yes
5879     hardcode_shlibpath_var=no
5880     whole_archive_flag_spec='-all_load $convenience'
5881     ;;
5882
5883   freebsd1*)
5884     ld_shlibs=no
5885     ;;
5886
5887   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5888   # support.  Future versions do this automatically, but an explicit c++rt0.o
5889   # does not break anything, and helps significantly (at the cost of a little
5890   # extra space).
5891   freebsd2.2*)
5892     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5893     hardcode_libdir_flag_spec='-R$libdir'
5894     hardcode_direct=yes
5895     hardcode_shlibpath_var=no
5896     ;;
5897
5898   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5899   freebsd2*)
5900     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5901     hardcode_direct=yes
5902     hardcode_minus_L=yes
5903     hardcode_shlibpath_var=no
5904     ;;
5905
5906   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5907   freebsd*)
5908     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5909     hardcode_libdir_flag_spec='-R$libdir'
5910     hardcode_direct=yes
5911     hardcode_shlibpath_var=no
5912     ;;
5913
5914   hpux9* | hpux10* | hpux11*)
5915     case $host_os in
5916     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' ;;
5917     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5918     esac
5919     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5920     hardcode_libdir_separator=:
5921     hardcode_direct=yes
5922     hardcode_minus_L=yes # Not in the search PATH, but as the default
5923                          # location of the library.
5924     export_dynamic_flag_spec='${wl}-E'
5925     ;;
5926
5927   irix5* | irix6* | nonstopux*)
5928     if test "$GCC" = yes; then
5929       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'
5930       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5931     else
5932       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'
5933       hardcode_libdir_flag_spec='-rpath $libdir'
5934     fi
5935     hardcode_libdir_separator=:
5936     link_all_deplibs=yes
5937     ;;
5938
5939   netbsd*)
5940     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5941       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5942     else
5943       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5944     fi
5945     hardcode_libdir_flag_spec='-R$libdir'
5946     hardcode_direct=yes
5947     hardcode_shlibpath_var=no
5948     ;;
5949
5950   newsos6)
5951     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5952     hardcode_direct=yes
5953     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5954     hardcode_libdir_separator=:
5955     hardcode_shlibpath_var=no
5956     ;;
5957
5958   openbsd*)
5959     hardcode_direct=yes
5960     hardcode_shlibpath_var=no
5961     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5962       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5963       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5964       export_dynamic_flag_spec='${wl}-E'
5965     else
5966       case "$host_os" in
5967       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5968         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5969         hardcode_libdir_flag_spec='-R$libdir'
5970         ;;
5971       *)
5972         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5973         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5974         ;;
5975       esac
5976     fi
5977     ;;
5978
5979   os2*)
5980     hardcode_libdir_flag_spec='-L$libdir'
5981     hardcode_minus_L=yes
5982     allow_undefined_flag=unsupported
5983     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'
5984     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5985     ;;
5986
5987   osf3*)
5988     if test "$GCC" = yes; then
5989       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5990       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'
5991     else
5992       allow_undefined_flag=' -expect_unresolved \*'
5993       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'
5994     fi
5995     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5996     hardcode_libdir_separator=:
5997     ;;
5998
5999   osf4* | osf5*)        # as osf3* with the addition of -msym flag
6000     if test "$GCC" = yes; then
6001       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6002       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'
6003       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6004     else
6005       allow_undefined_flag=' -expect_unresolved \*'
6006       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'
6007       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6008       $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'
6009
6010       #Both c and cxx compiler support -rpath directly
6011       hardcode_libdir_flag_spec='-rpath $libdir'
6012     fi
6013     hardcode_libdir_separator=:
6014     ;;
6015
6016   sco3.2v5*)
6017     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6018     hardcode_shlibpath_var=no
6019     runpath_var=LD_RUN_PATH
6020     hardcode_runpath_var=yes
6021     export_dynamic_flag_spec='${wl}-Bexport'
6022     ;;
6023
6024   solaris*)
6025     # gcc --version < 3.0 without binutils cannot create self contained
6026     # shared libraries reliably, requiring libgcc.a to resolve some of
6027     # the object symbols generated in some cases.  Libraries that use
6028     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6029     # a copy of libgcc.a into every shared library to guarantee resolving
6030     # such symbols causes other problems:  According to Tim Van Holder
6031     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6032     # (to the application) exception stack for one thing.
6033     no_undefined_flag=' -z defs'
6034     if test "$GCC" = yes; then
6035       case `$CC --version 2>/dev/null` in
6036       [12].*)
6037         cat <<EOF 1>&2
6038
6039 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6040 *** create self contained shared libraries on Solaris systems, without
6041 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6042 *** -no-undefined support, which will at least allow you to build shared
6043 *** libraries.  However, you may find that when you link such libraries
6044 *** into an application without using GCC, you have to manually add
6045 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6046 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6047 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6048
6049 EOF
6050         no_undefined_flag=
6051         ;;
6052       esac
6053     fi
6054     # $CC -shared without GNU ld will not create a library from C++
6055     # object files and a static libstdc++, better avoid it by now
6056     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6057     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6058                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6059     hardcode_libdir_flag_spec='-R$libdir'
6060     hardcode_shlibpath_var=no
6061     case $host_os in
6062     solaris2.[0-5] | solaris2.[0-5].*) ;;
6063     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6064       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6065     esac
6066     link_all_deplibs=yes
6067     ;;
6068
6069   sunos4*)
6070     if test "x$host_vendor" = xsequent; then
6071       # Use $CC to link under sequent, because it throws in some extra .o
6072       # files that make .init and .fini sections work.
6073       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6074     else
6075       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6076     fi
6077     hardcode_libdir_flag_spec='-L$libdir'
6078     hardcode_direct=yes
6079     hardcode_minus_L=yes
6080     hardcode_shlibpath_var=no
6081     ;;
6082
6083   sysv4)
6084     case $host_vendor in
6085       sni)
6086         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6087         hardcode_direct=yes # is this really true???
6088         ;;
6089       siemens)
6090         ## LD is ld it makes a PLAMLIB
6091         ## CC just makes a GrossModule.
6092         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6093         reload_cmds='$CC -r -o $output$reload_objs'
6094         hardcode_direct=no
6095         ;;
6096       motorola)
6097         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6098         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6099         ;;
6100     esac
6101     runpath_var='LD_RUN_PATH'
6102     hardcode_shlibpath_var=no
6103     ;;
6104
6105   sysv4.3*)
6106     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6107     hardcode_shlibpath_var=no
6108     export_dynamic_flag_spec='-Bexport'
6109     ;;
6110
6111   sysv5*)
6112     no_undefined_flag=' -z text'
6113     # $CC -shared without GNU ld will not create a library from C++
6114     # object files and a static libstdc++, better avoid it by now
6115     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6116     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6117                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6118     hardcode_libdir_flag_spec=
6119     hardcode_shlibpath_var=no
6120     runpath_var='LD_RUN_PATH'
6121     ;;
6122
6123   uts4*)
6124     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6125     hardcode_libdir_flag_spec='-L$libdir'
6126     hardcode_shlibpath_var=no
6127     ;;
6128
6129   dgux*)
6130     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6131     hardcode_libdir_flag_spec='-L$libdir'
6132     hardcode_shlibpath_var=no
6133     ;;
6134
6135   sysv4*MP*)
6136     if test -d /usr/nec; then
6137       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6138       hardcode_shlibpath_var=no
6139       runpath_var=LD_RUN_PATH
6140       hardcode_runpath_var=yes
6141       ld_shlibs=yes
6142     fi
6143     ;;
6144
6145   sysv4.2uw2*)
6146     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6147     hardcode_direct=yes
6148     hardcode_minus_L=no
6149     hardcode_shlibpath_var=no
6150     hardcode_runpath_var=yes
6151     runpath_var=LD_RUN_PATH
6152     ;;
6153
6154   sysv5uw7* | unixware7*)
6155     no_undefined_flag='${wl}-z ${wl}text'
6156     if test "$GCC" = yes; then
6157       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6158     else
6159       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6160     fi
6161     runpath_var='LD_RUN_PATH'
6162     hardcode_shlibpath_var=no
6163     ;;
6164
6165   *)
6166     ld_shlibs=no
6167     ;;
6168   esac
6169 fi
6170 echo "$ac_t""$ld_shlibs" 1>&6
6171 test "$ld_shlibs" = no && can_build_shared=no
6172
6173 # Check hardcoding attributes.
6174 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6175 echo "configure:6176: checking how to hardcode library paths into programs" >&5
6176 hardcode_action=
6177 if test -n "$hardcode_libdir_flag_spec" || \
6178    test -n "$runpath_var"; then
6179
6180   # We can hardcode non-existant directories.
6181   if test "$hardcode_direct" != no &&
6182      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6183      # have to relink, otherwise we might link with an installed library
6184      # when we should be linking with a yet-to-be-installed one
6185      ## test "$hardcode_shlibpath_var" != no &&
6186      test "$hardcode_minus_L" != no; then
6187     # Linking always hardcodes the temporary library directory.
6188     hardcode_action=relink
6189   else
6190     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6191     hardcode_action=immediate
6192   fi
6193 else
6194   # We cannot hardcode anything, or else we can only hardcode existing
6195   # directories.
6196   hardcode_action=unsupported
6197 fi
6198 echo "$ac_t""$hardcode_action" 1>&6
6199
6200 striplib=
6201 old_striplib=
6202 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6203 echo "configure:6204: checking whether stripping libraries is possible" >&5
6204 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6205   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6206   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6207   echo "$ac_t""yes" 1>&6
6208 else
6209   echo "$ac_t""no" 1>&6
6210 fi
6211
6212 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6213 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6214
6215 # PORTME Fill in your ld.so characteristics
6216 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6217 echo "configure:6218: checking dynamic linker characteristics" >&5
6218 library_names_spec=
6219 libname_spec='lib$name'
6220 soname_spec=
6221 postinstall_cmds=
6222 postuninstall_cmds=
6223 finish_cmds=
6224 finish_eval=
6225 shlibpath_var=
6226 shlibpath_overrides_runpath=unknown
6227 version_type=none
6228 dynamic_linker="$host_os ld.so"
6229 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6230 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6231
6232 case $host_os in
6233 aix3*)
6234   version_type=linux
6235   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6236   shlibpath_var=LIBPATH
6237
6238   # AIX has no versioning support, so we append a major version to the name.
6239   soname_spec='${libname}${release}.so$major'
6240   ;;
6241
6242 aix4* | aix5*)
6243   version_type=linux
6244   need_lib_prefix=no
6245   need_version=no
6246   hardcode_into_libs=yes
6247   if test "$host_cpu" = ia64; then
6248     # AIX 5 supports IA64
6249     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6250     shlibpath_var=LD_LIBRARY_PATH
6251   else
6252     # With GCC up to 2.95.x, collect2 would create an import file
6253     # for dependence libraries.  The import file would start with
6254     # the line `#! .'.  This would cause the generated library to
6255     # depend on `.', always an invalid library.  This was fixed in
6256     # development snapshots of GCC prior to 3.0.
6257     case $host_os in
6258       aix4 | aix4.[01] | aix4.[01].*)
6259         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6260              echo ' yes '
6261              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6262           :
6263         else
6264           can_build_shared=no
6265         fi
6266         ;;
6267     esac
6268     # AIX (on Power*) has no versioning support, so currently we can
6269     # not hardcode correct soname into executable. Probably we can
6270     # add versioning support to collect2, so additional links can
6271     # be useful in future.
6272     if test "$aix_use_runtimelinking" = yes; then
6273       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6274       # instead of lib<name>.a to let people know that these are not
6275       # typical AIX shared libraries.
6276       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6277     else
6278       # We preserve .a as extension for shared libraries through AIX4.2
6279       # and later when we are not doing run time linking.
6280       library_names_spec='${libname}${release}.a $libname.a'
6281       soname_spec='${libname}${release}.so$major'
6282     fi
6283     shlibpath_var=LIBPATH
6284   fi
6285   hardcode_into_libs=yes
6286   ;;
6287
6288 amigaos*)
6289   library_names_spec='$libname.ixlibrary $libname.a'
6290   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6291   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'
6292   ;;
6293
6294 beos*)
6295   library_names_spec='${libname}.so'
6296   dynamic_linker="$host_os ld.so"
6297   shlibpath_var=LIBRARY_PATH
6298   ;;
6299
6300 bsdi4*)
6301   version_type=linux
6302   need_version=no
6303   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6304   soname_spec='${libname}${release}.so$major'
6305   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6306   shlibpath_var=LD_LIBRARY_PATH
6307   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6308   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6309   export_dynamic_flag_spec=-rdynamic
6310   # the default ld.so.conf also contains /usr/contrib/lib and
6311   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6312   # libtool to hard-code these into programs
6313   ;;
6314
6315 cygwin* | mingw* | pw32*)
6316   version_type=windows
6317   need_version=no
6318   need_lib_prefix=no
6319   case $GCC,$host_os in
6320   yes,cygwin*)
6321     library_names_spec='$libname.dll.a'
6322     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6323     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6324       dldir=$destdir/`dirname \$dlpath`~
6325       test -d \$dldir || mkdir -p \$dldir~
6326       $install_prog .libs/$dlname \$dldir/$dlname'
6327     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6328       dlpath=$dir/\$dldll~
6329        $rm \$dlpath'
6330     ;;
6331   yes,mingw*)
6332     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6333     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6334     ;;
6335   yes,pw32*)
6336     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6337     ;;
6338   *)
6339     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6340     ;;
6341   esac
6342   dynamic_linker='Win32 ld.exe'
6343   # FIXME: first we should search . and the directory the executable is in
6344   shlibpath_var=PATH
6345   ;;
6346
6347 darwin* | rhapsody*)
6348   dynamic_linker="$host_os dyld"
6349   version_type=darwin
6350   need_lib_prefix=no
6351   need_version=no
6352   # FIXME: Relying on posixy $() will cause problems for
6353   #        cross-compilation, but unfortunately the echo tests do not
6354   #        yet detect zsh echo's removal of \ escapes.
6355   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)'
6356   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6357   shlibpath_overrides_runpath=yes
6358   shlibpath_var=DYLD_LIBRARY_PATH
6359   ;;
6360
6361 freebsd1*)
6362   dynamic_linker=no
6363   ;;
6364
6365 freebsd*)
6366   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6367   version_type=freebsd-$objformat
6368   case $version_type in
6369     freebsd-elf*)
6370       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6371       need_version=no
6372       need_lib_prefix=no
6373       ;;
6374     freebsd-*)
6375       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6376       need_version=yes
6377       ;;
6378   esac
6379   shlibpath_var=LD_LIBRARY_PATH
6380   case $host_os in
6381   freebsd2*)
6382     shlibpath_overrides_runpath=yes
6383     ;;
6384   *)
6385     shlibpath_overrides_runpath=no
6386     hardcode_into_libs=yes
6387     ;;
6388   esac
6389   ;;
6390
6391 gnu*)
6392   version_type=linux
6393   need_lib_prefix=no
6394   need_version=no
6395   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6396   soname_spec='${libname}${release}.so$major'
6397   shlibpath_var=LD_LIBRARY_PATH
6398   hardcode_into_libs=yes
6399   ;;
6400
6401 hpux9* | hpux10* | hpux11*)
6402   # Give a soname corresponding to the major version so that dld.sl refuses to
6403   # link against other versions.
6404   dynamic_linker="$host_os dld.sl"
6405   version_type=sunos
6406   need_lib_prefix=no
6407   need_version=no
6408   shlibpath_var=SHLIB_PATH
6409   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6410   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6411   soname_spec='${libname}${release}.sl$major'
6412   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6413   postinstall_cmds='chmod 555 $lib'
6414   ;;
6415
6416 irix5* | irix6* | nonstopux*)
6417   case $host_os in
6418     nonstopux*) version_type=nonstopux ;;
6419     *)          version_type=irix ;;
6420   esac
6421   need_lib_prefix=no
6422   need_version=no
6423   soname_spec='${libname}${release}.so$major'
6424   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6425   case $host_os in
6426   irix5* | nonstopux*)
6427     libsuff= shlibsuff=
6428     ;;
6429   *)
6430     case $LD in # libtool.m4 will add one of these switches to LD
6431     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6432     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6433     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6434     *) libsuff= shlibsuff= libmagic=never-match;;
6435     esac
6436     ;;
6437   esac
6438   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6439   shlibpath_overrides_runpath=no
6440   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6441   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6442   ;;
6443
6444 # No shared lib support for Linux oldld, aout, or coff.
6445 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6446   dynamic_linker=no
6447   ;;
6448
6449 # This must be Linux ELF.
6450 linux-gnu*)
6451   version_type=linux
6452   need_lib_prefix=no
6453   need_version=no
6454   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6455   soname_spec='${libname}${release}.so$major'
6456   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6457   shlibpath_var=LD_LIBRARY_PATH
6458   shlibpath_overrides_runpath=no
6459   # This implies no fast_install, which is unacceptable.
6460   # Some rework will be needed to allow for fast_install
6461   # before this can be enabled.
6462   hardcode_into_libs=yes
6463
6464   # We used to test for /lib/ld.so.1 and disable shared libraries on
6465   # powerpc, because MkLinux only supported shared libraries with the
6466   # GNU dynamic linker.  Since this was broken with cross compilers,
6467   # most powerpc-linux boxes support dynamic linking these days and
6468   # people can always --disable-shared, the test was removed, and we
6469   # assume the GNU/Linux dynamic linker is in use.
6470   dynamic_linker='GNU/Linux ld.so'
6471   ;;
6472
6473 netbsd*)
6474   version_type=sunos
6475   need_lib_prefix=no
6476   need_version=no
6477   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6478     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6479     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6480     dynamic_linker='NetBSD (a.out) ld.so'
6481   else
6482     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6483     soname_spec='${libname}${release}.so$major'
6484     dynamic_linker='NetBSD ld.elf_so'
6485   fi
6486   shlibpath_var=LD_LIBRARY_PATH
6487   shlibpath_overrides_runpath=yes
6488   hardcode_into_libs=yes
6489   ;;
6490
6491 newsos6)
6492   version_type=linux
6493   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6494   shlibpath_var=LD_LIBRARY_PATH
6495   shlibpath_overrides_runpath=yes
6496   ;;
6497
6498 openbsd*)
6499   version_type=sunos
6500   need_lib_prefix=no
6501   need_version=no
6502   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6503     case "$host_os" in
6504     openbsd2.[89] | openbsd2.[89].*)
6505       shlibpath_overrides_runpath=no
6506       ;;
6507     *)
6508       shlibpath_overrides_runpath=yes
6509       ;;
6510     esac
6511   else
6512     shlibpath_overrides_runpath=yes
6513   fi
6514   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6515   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6516   shlibpath_var=LD_LIBRARY_PATH
6517   ;;
6518
6519 os2*)
6520   libname_spec='$name'
6521   need_lib_prefix=no
6522   library_names_spec='$libname.dll $libname.a'
6523   dynamic_linker='OS/2 ld.exe'
6524   shlibpath_var=LIBPATH
6525   ;;
6526
6527 osf3* | osf4* | osf5*)
6528   version_type=osf
6529   need_version=no
6530   soname_spec='${libname}${release}.so$major'
6531   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6532   shlibpath_var=LD_LIBRARY_PATH
6533   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6534   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6535   hardcode_into_libs=yes
6536   ;;
6537
6538 sco3.2v5*)
6539   version_type=osf
6540   soname_spec='${libname}${release}.so$major'
6541   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6542   shlibpath_var=LD_LIBRARY_PATH
6543   ;;
6544
6545 solaris*)
6546   version_type=linux
6547   need_lib_prefix=no
6548   need_version=no
6549   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6550   soname_spec='${libname}${release}.so$major'
6551   shlibpath_var=LD_LIBRARY_PATH
6552   shlibpath_overrides_runpath=yes
6553   hardcode_into_libs=yes
6554   # ldd complains unless libraries are executable
6555   postinstall_cmds='chmod +x $lib'
6556   ;;
6557
6558 sunos4*)
6559   version_type=sunos
6560   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6561   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6562   shlibpath_var=LD_LIBRARY_PATH
6563   shlibpath_overrides_runpath=yes
6564   if test "$with_gnu_ld" = yes; then
6565     need_lib_prefix=no
6566   fi
6567   need_version=yes
6568   ;;
6569
6570 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6571   version_type=linux
6572   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6573   soname_spec='${libname}${release}.so$major'
6574   shlibpath_var=LD_LIBRARY_PATH
6575   case $host_vendor in
6576     sni)
6577       shlibpath_overrides_runpath=no
6578       need_lib_prefix=no
6579       export_dynamic_flag_spec='${wl}-Blargedynsym'
6580       runpath_var=LD_RUN_PATH
6581       ;;
6582     siemens)
6583       need_lib_prefix=no
6584       ;;
6585     motorola)
6586       need_lib_prefix=no
6587       need_version=no
6588       shlibpath_overrides_runpath=no
6589       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6590       ;;
6591   esac
6592   ;;
6593
6594 uts4*)
6595   version_type=linux
6596   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6597   soname_spec='${libname}${release}.so$major'
6598   shlibpath_var=LD_LIBRARY_PATH
6599   ;;
6600
6601 dgux*)
6602   version_type=linux
6603   need_lib_prefix=no
6604   need_version=no
6605   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6606   soname_spec='${libname}${release}.so$major'
6607   shlibpath_var=LD_LIBRARY_PATH
6608   ;;
6609
6610 sysv4*MP*)
6611   if test -d /usr/nec ;then
6612     version_type=linux
6613     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6614     soname_spec='$libname.so.$major'
6615     shlibpath_var=LD_LIBRARY_PATH
6616   fi
6617   ;;
6618
6619 *)
6620   dynamic_linker=no
6621   ;;
6622 esac
6623 echo "$ac_t""$dynamic_linker" 1>&6
6624 test "$dynamic_linker" = no && can_build_shared=no
6625
6626 # Report the final consequences.
6627 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6628 echo "configure:6629: checking if libtool supports shared libraries" >&5
6629 echo "$ac_t""$can_build_shared" 1>&6
6630
6631 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6632 echo "configure:6633: checking whether to build shared libraries" >&5
6633 test "$can_build_shared" = "no" && enable_shared=no
6634
6635 # On AIX, shared libraries and static libraries use the same namespace, and
6636 # are all built from PIC.
6637 case "$host_os" in
6638 aix3*)
6639   test "$enable_shared" = yes && enable_static=no
6640   if test -n "$RANLIB"; then
6641     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6642     postinstall_cmds='$RANLIB $lib'
6643   fi
6644   ;;
6645
6646 aix4*)
6647   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6648     test "$enable_shared" = yes && enable_static=no
6649   fi
6650   ;;
6651 esac
6652 echo "$ac_t""$enable_shared" 1>&6
6653
6654 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6655 echo "configure:6656: checking whether to build static libraries" >&5
6656 # Make sure either enable_shared or enable_static is yes.
6657 test "$enable_shared" = yes || enable_static=yes
6658 echo "$ac_t""$enable_static" 1>&6
6659
6660 if test "$hardcode_action" = relink; then
6661   # Fast installation is not supported
6662   enable_fast_install=no
6663 elif test "$shlibpath_overrides_runpath" = yes ||
6664      test "$enable_shared" = no; then
6665   # Fast installation is not necessary
6666   enable_fast_install=needless
6667 fi
6668
6669 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6670 if test "$GCC" = yes; then
6671   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6672 fi
6673
6674 if test "x$enable_dlopen" != xyes; then
6675   enable_dlopen=unknown
6676   enable_dlopen_self=unknown
6677   enable_dlopen_self_static=unknown
6678 else
6679   lt_cv_dlopen=no
6680   lt_cv_dlopen_libs=
6681
6682   case $host_os in
6683   beos*)
6684     lt_cv_dlopen="load_add_on"
6685     lt_cv_dlopen_libs=
6686     lt_cv_dlopen_self=yes
6687     ;;
6688
6689   cygwin* | mingw* | pw32*)
6690     lt_cv_dlopen="LoadLibrary"
6691     lt_cv_dlopen_libs=
6692    ;;
6693
6694   *)
6695     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6696 echo "configure:6697: checking for shl_load" >&5
6697 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6698   echo $ac_n "(cached) $ac_c" 1>&6
6699 else
6700   cat > conftest.$ac_ext <<EOF
6701 #line 6702 "configure"
6702 #include "confdefs.h"
6703 /* System header to define __stub macros and hopefully few prototypes,
6704     which can conflict with char shl_load(); below.  */
6705 #include <assert.h>
6706 /* Override any gcc2 internal prototype to avoid an error.  */
6707 /* We use char because int might match the return type of a gcc2
6708     builtin and then its argument prototype would still apply.  */
6709 char shl_load();
6710 char (*f)();
6711
6712 int main() {
6713
6714 /* The GNU C library defines this for functions which it implements
6715     to always fail with ENOSYS.  Some functions are actually named
6716     something starting with __ and the normal name is an alias.  */
6717 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6718 choke me
6719 #else
6720 f = shl_load;
6721 #endif
6722
6723 ; return 0; }
6724 EOF
6725 if { (eval echo configure:6726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6726   rm -rf conftest*
6727   eval "ac_cv_func_shl_load=yes"
6728 else
6729   echo "configure: failed program was:" >&5
6730   cat conftest.$ac_ext >&5
6731   rm -rf conftest*
6732   eval "ac_cv_func_shl_load=no"
6733 fi
6734 rm -f conftest*
6735 fi
6736
6737 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6738   echo "$ac_t""yes" 1>&6
6739   lt_cv_dlopen="shl_load"
6740 else
6741   echo "$ac_t""no" 1>&6
6742 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6743 echo "configure:6744: checking for shl_load in -ldld" >&5
6744 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6745 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6746   echo $ac_n "(cached) $ac_c" 1>&6
6747 else
6748   ac_save_LIBS="$LIBS"
6749 LIBS="-ldld  $LIBS"
6750 cat > conftest.$ac_ext <<EOF
6751 #line 6752 "configure"
6752 #include "confdefs.h"
6753 /* Override any gcc2 internal prototype to avoid an error.  */
6754 /* We use char because int might match the return type of a gcc2
6755     builtin and then its argument prototype would still apply.  */
6756 char shl_load();
6757
6758 int main() {
6759 shl_load()
6760 ; return 0; }
6761 EOF
6762 if { (eval echo configure:6763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6763   rm -rf conftest*
6764   eval "ac_cv_lib_$ac_lib_var=yes"
6765 else
6766   echo "configure: failed program was:" >&5
6767   cat conftest.$ac_ext >&5
6768   rm -rf conftest*
6769   eval "ac_cv_lib_$ac_lib_var=no"
6770 fi
6771 rm -f conftest*
6772 LIBS="$ac_save_LIBS"
6773
6774 fi
6775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6776   echo "$ac_t""yes" 1>&6
6777   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6778 else
6779   echo "$ac_t""no" 1>&6
6780 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6781 echo "configure:6782: checking for dlopen" >&5
6782 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6783   echo $ac_n "(cached) $ac_c" 1>&6
6784 else
6785   cat > conftest.$ac_ext <<EOF
6786 #line 6787 "configure"
6787 #include "confdefs.h"
6788 /* System header to define __stub macros and hopefully few prototypes,
6789     which can conflict with char dlopen(); below.  */
6790 #include <assert.h>
6791 /* Override any gcc2 internal prototype to avoid an error.  */
6792 /* We use char because int might match the return type of a gcc2
6793     builtin and then its argument prototype would still apply.  */
6794 char dlopen();
6795 char (*f)();
6796
6797 int main() {
6798
6799 /* The GNU C library defines this for functions which it implements
6800     to always fail with ENOSYS.  Some functions are actually named
6801     something starting with __ and the normal name is an alias.  */
6802 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6803 choke me
6804 #else
6805 f = dlopen;
6806 #endif
6807
6808 ; return 0; }
6809 EOF
6810 if { (eval echo configure:6811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6811   rm -rf conftest*
6812   eval "ac_cv_func_dlopen=yes"
6813 else
6814   echo "configure: failed program was:" >&5
6815   cat conftest.$ac_ext >&5
6816   rm -rf conftest*
6817   eval "ac_cv_func_dlopen=no"
6818 fi
6819 rm -f conftest*
6820 fi
6821
6822 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6823   echo "$ac_t""yes" 1>&6
6824   lt_cv_dlopen="dlopen"
6825 else
6826   echo "$ac_t""no" 1>&6
6827 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6828 echo "configure:6829: checking for dlopen in -ldl" >&5
6829 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6830 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6831   echo $ac_n "(cached) $ac_c" 1>&6
6832 else
6833   ac_save_LIBS="$LIBS"
6834 LIBS="-ldl  $LIBS"
6835 cat > conftest.$ac_ext <<EOF
6836 #line 6837 "configure"
6837 #include "confdefs.h"
6838 /* Override any gcc2 internal prototype to avoid an error.  */
6839 /* We use char because int might match the return type of a gcc2
6840     builtin and then its argument prototype would still apply.  */
6841 char dlopen();
6842
6843 int main() {
6844 dlopen()
6845 ; return 0; }
6846 EOF
6847 if { (eval echo configure:6848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6848   rm -rf conftest*
6849   eval "ac_cv_lib_$ac_lib_var=yes"
6850 else
6851   echo "configure: failed program was:" >&5
6852   cat conftest.$ac_ext >&5
6853   rm -rf conftest*
6854   eval "ac_cv_lib_$ac_lib_var=no"
6855 fi
6856 rm -f conftest*
6857 LIBS="$ac_save_LIBS"
6858
6859 fi
6860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6861   echo "$ac_t""yes" 1>&6
6862   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6863 else
6864   echo "$ac_t""no" 1>&6
6865 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6866 echo "configure:6867: checking for dlopen in -lsvld" >&5
6867 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6868 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6869   echo $ac_n "(cached) $ac_c" 1>&6
6870 else
6871   ac_save_LIBS="$LIBS"
6872 LIBS="-lsvld  $LIBS"
6873 cat > conftest.$ac_ext <<EOF
6874 #line 6875 "configure"
6875 #include "confdefs.h"
6876 /* Override any gcc2 internal prototype to avoid an error.  */
6877 /* We use char because int might match the return type of a gcc2
6878     builtin and then its argument prototype would still apply.  */
6879 char dlopen();
6880
6881 int main() {
6882 dlopen()
6883 ; return 0; }
6884 EOF
6885 if { (eval echo configure:6886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6886   rm -rf conftest*
6887   eval "ac_cv_lib_$ac_lib_var=yes"
6888 else
6889   echo "configure: failed program was:" >&5
6890   cat conftest.$ac_ext >&5
6891   rm -rf conftest*
6892   eval "ac_cv_lib_$ac_lib_var=no"
6893 fi
6894 rm -f conftest*
6895 LIBS="$ac_save_LIBS"
6896
6897 fi
6898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6899   echo "$ac_t""yes" 1>&6
6900   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6901 else
6902   echo "$ac_t""no" 1>&6
6903 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6904 echo "configure:6905: checking for dld_link in -ldld" >&5
6905 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6906 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6907   echo $ac_n "(cached) $ac_c" 1>&6
6908 else
6909   ac_save_LIBS="$LIBS"
6910 LIBS="-ldld  $LIBS"
6911 cat > conftest.$ac_ext <<EOF
6912 #line 6913 "configure"
6913 #include "confdefs.h"
6914 /* Override any gcc2 internal prototype to avoid an error.  */
6915 /* We use char because int might match the return type of a gcc2
6916     builtin and then its argument prototype would still apply.  */
6917 char dld_link();
6918
6919 int main() {
6920 dld_link()
6921 ; return 0; }
6922 EOF
6923 if { (eval echo configure:6924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6924   rm -rf conftest*
6925   eval "ac_cv_lib_$ac_lib_var=yes"
6926 else
6927   echo "configure: failed program was:" >&5
6928   cat conftest.$ac_ext >&5
6929   rm -rf conftest*
6930   eval "ac_cv_lib_$ac_lib_var=no"
6931 fi
6932 rm -f conftest*
6933 LIBS="$ac_save_LIBS"
6934
6935 fi
6936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6937   echo "$ac_t""yes" 1>&6
6938   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6939 else
6940   echo "$ac_t""no" 1>&6
6941 fi
6942
6943               
6944 fi
6945
6946             
6947 fi
6948
6949           
6950 fi
6951
6952         
6953 fi
6954
6955       
6956 fi
6957
6958     ;;
6959   esac
6960
6961   if test "x$lt_cv_dlopen" != xno; then
6962     enable_dlopen=yes
6963   else
6964     enable_dlopen=no
6965   fi
6966
6967   case $lt_cv_dlopen in
6968   dlopen)
6969     save_CPPFLAGS="$CPPFLAGS"
6970         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6971
6972     save_LDFLAGS="$LDFLAGS"
6973     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6974
6975     save_LIBS="$LIBS"
6976     LIBS="$lt_cv_dlopen_libs $LIBS"
6977
6978     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6979 echo "configure:6980: checking whether a program can dlopen itself" >&5
6980 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6981   echo $ac_n "(cached) $ac_c" 1>&6
6982 else
6983           if test "$cross_compiling" = yes; then :
6984   lt_cv_dlopen_self=cross
6985 else
6986     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6987   lt_status=$lt_dlunknown
6988   cat > conftest.$ac_ext <<EOF
6989 #line 6990 "configure"
6990 #include "confdefs.h"
6991
6992 #if HAVE_DLFCN_H
6993 #include <dlfcn.h>
6994 #endif
6995
6996 #include <stdio.h>
6997
6998 #ifdef RTLD_GLOBAL
6999 #  define LT_DLGLOBAL           RTLD_GLOBAL
7000 #else
7001 #  ifdef DL_GLOBAL
7002 #    define LT_DLGLOBAL         DL_GLOBAL
7003 #  else
7004 #    define LT_DLGLOBAL         0
7005 #  endif
7006 #endif
7007
7008 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7009    find out it does not work in some platform. */
7010 #ifndef LT_DLLAZY_OR_NOW
7011 #  ifdef RTLD_LAZY
7012 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7013 #  else
7014 #    ifdef DL_LAZY
7015 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7016 #    else
7017 #      ifdef RTLD_NOW
7018 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7019 #      else
7020 #        ifdef DL_NOW
7021 #          define LT_DLLAZY_OR_NOW      DL_NOW
7022 #        else
7023 #          define LT_DLLAZY_OR_NOW      0
7024 #        endif
7025 #      endif
7026 #    endif
7027 #  endif
7028 #endif
7029
7030 #ifdef __cplusplus
7031 extern "C" void exit (int);
7032 #endif
7033
7034 void fnord() { int i=42;}
7035 int main ()
7036 {
7037   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7038   int status = $lt_dlunknown;
7039
7040   if (self)
7041     {
7042       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7043       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7044       /* dlclose (self); */
7045     }
7046
7047     exit (status);
7048 }
7049 EOF
7050   if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7051     (./conftest; exit; ) 2>/dev/null
7052     lt_status=$?
7053     case x$lt_status in
7054       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7055       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7056       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7057     esac
7058   else :
7059     # compilation failed
7060     lt_cv_dlopen_self=no
7061   fi
7062 fi
7063 rm -fr conftest*
7064
7065     
7066 fi
7067
7068 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7069
7070     if test "x$lt_cv_dlopen_self" = xyes; then
7071       LDFLAGS="$LDFLAGS $link_static_flag"
7072       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7073 echo "configure:7074: checking whether a statically linked program can dlopen itself" >&5
7074 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7075   echo $ac_n "(cached) $ac_c" 1>&6
7076 else
7077           if test "$cross_compiling" = yes; then :
7078   lt_cv_dlopen_self_static=cross
7079 else
7080     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7081   lt_status=$lt_dlunknown
7082   cat > conftest.$ac_ext <<EOF
7083 #line 7084 "configure"
7084 #include "confdefs.h"
7085
7086 #if HAVE_DLFCN_H
7087 #include <dlfcn.h>
7088 #endif
7089
7090 #include <stdio.h>
7091
7092 #ifdef RTLD_GLOBAL
7093 #  define LT_DLGLOBAL           RTLD_GLOBAL
7094 #else
7095 #  ifdef DL_GLOBAL
7096 #    define LT_DLGLOBAL         DL_GLOBAL
7097 #  else
7098 #    define LT_DLGLOBAL         0
7099 #  endif
7100 #endif
7101
7102 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7103    find out it does not work in some platform. */
7104 #ifndef LT_DLLAZY_OR_NOW
7105 #  ifdef RTLD_LAZY
7106 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7107 #  else
7108 #    ifdef DL_LAZY
7109 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7110 #    else
7111 #      ifdef RTLD_NOW
7112 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7113 #      else
7114 #        ifdef DL_NOW
7115 #          define LT_DLLAZY_OR_NOW      DL_NOW
7116 #        else
7117 #          define LT_DLLAZY_OR_NOW      0
7118 #        endif
7119 #      endif
7120 #    endif
7121 #  endif
7122 #endif
7123
7124 #ifdef __cplusplus
7125 extern "C" void exit (int);
7126 #endif
7127
7128 void fnord() { int i=42;}
7129 int main ()
7130 {
7131   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7132   int status = $lt_dlunknown;
7133
7134   if (self)
7135     {
7136       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7137       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7138       /* dlclose (self); */
7139     }
7140
7141     exit (status);
7142 }
7143 EOF
7144   if { (eval echo configure:7145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7145     (./conftest; exit; ) 2>/dev/null
7146     lt_status=$?
7147     case x$lt_status in
7148       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7149       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7150       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7151     esac
7152   else :
7153     # compilation failed
7154     lt_cv_dlopen_self_static=no
7155   fi
7156 fi
7157 rm -fr conftest*
7158
7159       
7160 fi
7161
7162 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7163     fi
7164
7165     CPPFLAGS="$save_CPPFLAGS"
7166     LDFLAGS="$save_LDFLAGS"
7167     LIBS="$save_LIBS"
7168     ;;
7169   esac
7170
7171   case $lt_cv_dlopen_self in
7172   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7173   *) enable_dlopen_self=unknown ;;
7174   esac
7175
7176   case $lt_cv_dlopen_self_static in
7177   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7178   *) enable_dlopen_self_static=unknown ;;
7179   esac
7180 fi
7181
7182
7183 if test "$enable_shared" = yes && test "$GCC" = yes; then
7184   case $archive_cmds in
7185   *'~'*)
7186     # FIXME: we may have to deal with multi-command sequences.
7187     ;;
7188   '$CC '*)
7189     # Test whether the compiler implicitly links with -lc since on some
7190     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7191     # to ld, don't add -lc before -lgcc.
7192     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7193 echo "configure:7194: checking whether -lc should be explicitly linked in" >&5
7194     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7195   echo $ac_n "(cached) $ac_c" 1>&6
7196 else
7197   $rm conftest*
7198     echo 'static int dummy;' > conftest.$ac_ext
7199
7200     if { (eval echo configure:7201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7201       soname=conftest
7202       lib=conftest
7203       libobjs=conftest.$ac_objext
7204       deplibs=
7205       wl=$lt_cv_prog_cc_wl
7206       compiler_flags=-v
7207       linker_flags=-v
7208       verstring=
7209       output_objdir=.
7210       libname=conftest
7211       save_allow_undefined_flag=$allow_undefined_flag
7212       allow_undefined_flag=
7213       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; }
7214       then
7215         lt_cv_archive_cmds_need_lc=no
7216       else
7217         lt_cv_archive_cmds_need_lc=yes
7218       fi
7219       allow_undefined_flag=$save_allow_undefined_flag
7220     else
7221       cat conftest.err 1>&5
7222     fi
7223 fi
7224
7225     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7226     ;;
7227   esac
7228 fi
7229 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7230
7231 # The second clause should only fire when bootstrapping the
7232 # libtool distribution, otherwise you forgot to ship ltmain.sh
7233 # with your package, and you will get complaints that there are
7234 # no rules to generate ltmain.sh.
7235 if test -f "$ltmain"; then
7236   :
7237 else
7238   # If there is no Makefile yet, we rely on a make rule to execute
7239   # `config.status --recheck' to rerun these tests and create the
7240   # libtool script then.
7241   test -f Makefile && make "$ltmain"
7242 fi
7243
7244 if test -f "$ltmain"; then
7245   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7246   $rm -f "${ofile}T"
7247
7248   echo creating $ofile
7249
7250   # Now quote all the things that may contain metacharacters while being
7251   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7252   # variables and quote the copies for generation of the libtool script.
7253   for var in echo old_CC old_CFLAGS SED \
7254     AR AR_FLAGS CC LD LN_S NM SHELL \
7255     reload_flag reload_cmds wl \
7256     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7257     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7258     library_names_spec soname_spec \
7259     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7260     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7261     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7262     old_striplib striplib file_magic_cmd export_symbols_cmds \
7263     deplibs_check_method allow_undefined_flag no_undefined_flag \
7264     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7265     global_symbol_to_c_name_address \
7266     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7267     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7268     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7269
7270     case $var in
7271     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7272     old_postinstall_cmds | old_postuninstall_cmds | \
7273     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7274     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7275     postinstall_cmds | postuninstall_cmds | \
7276     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7277       # Double-quote double-evaled strings.
7278       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7279       ;;
7280     *)
7281       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7282       ;;
7283     esac
7284   done
7285
7286   cat <<__EOF__ > "${ofile}T"
7287 #! $SHELL
7288
7289 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7290 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7291 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7292 #
7293 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7294 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7295 #
7296 # This program is free software; you can redistribute it and/or modify
7297 # it under the terms of the GNU General Public License as published by
7298 # the Free Software Foundation; either version 2 of the License, or
7299 # (at your option) any later version.
7300 #
7301 # This program is distributed in the hope that it will be useful, but
7302 # WITHOUT ANY WARRANTY; without even the implied warranty of
7303 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7304 # General Public License for more details.
7305 #
7306 # You should have received a copy of the GNU General Public License
7307 # along with this program; if not, write to the Free Software
7308 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7309 #
7310 # As a special exception to the GNU General Public License, if you
7311 # distribute this file as part of a program that contains a
7312 # configuration script generated by Autoconf, you may include it under
7313 # the same distribution terms that you use for the rest of that program.
7314
7315 # A sed that does not truncate output.
7316 SED=$lt_SED
7317
7318 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7319 Xsed="${SED} -e s/^X//"
7320
7321 # The HP-UX ksh and POSIX shell print the target directory to stdout
7322 # if CDPATH is set.
7323 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7324
7325 # ### BEGIN LIBTOOL CONFIG
7326
7327 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7328
7329 # Shell to use when invoking shell scripts.
7330 SHELL=$lt_SHELL
7331
7332 # Whether or not to build shared libraries.
7333 build_libtool_libs=$enable_shared
7334
7335 # Whether or not to build static libraries.
7336 build_old_libs=$enable_static
7337
7338 # Whether or not to add -lc for building shared libraries.
7339 build_libtool_need_lc=$need_lc
7340
7341 # Whether or not to optimize for fast installation.
7342 fast_install=$enable_fast_install
7343
7344 # The host system.
7345 host_alias=$host_alias
7346 host=$host
7347
7348 # An echo program that does not interpret backslashes.
7349 echo=$lt_echo
7350
7351 # The archiver.
7352 AR=$lt_AR
7353 AR_FLAGS=$lt_AR_FLAGS
7354
7355 # The default C compiler.
7356 CC=$lt_CC
7357
7358 # Is the compiler the GNU C compiler?
7359 with_gcc=$GCC
7360
7361 # The linker used to build libraries.
7362 LD=$lt_LD
7363
7364 # Whether we need hard or soft links.
7365 LN_S=$lt_LN_S
7366
7367 # A BSD-compatible nm program.
7368 NM=$lt_NM
7369
7370 # A symbol stripping program
7371 STRIP=$STRIP
7372
7373 # Used to examine libraries when file_magic_cmd begins "file"
7374 MAGIC_CMD=$MAGIC_CMD
7375
7376 # Used on cygwin: DLL creation program.
7377 DLLTOOL="$DLLTOOL"
7378
7379 # Used on cygwin: object dumper.
7380 OBJDUMP="$OBJDUMP"
7381
7382 # Used on cygwin: assembler.
7383 AS="$AS"
7384
7385 # The name of the directory that contains temporary libtool files.
7386 objdir=$objdir
7387
7388 # How to create reloadable object files.
7389 reload_flag=$lt_reload_flag
7390 reload_cmds=$lt_reload_cmds
7391
7392 # How to pass a linker flag through the compiler.
7393 wl=$lt_wl
7394
7395 # Object file suffix (normally "o").
7396 objext="$ac_objext"
7397
7398 # Old archive suffix (normally "a").
7399 libext="$libext"
7400
7401 # Executable file suffix (normally "").
7402 exeext="$exeext"
7403
7404 # Additional compiler flags for building library objects.
7405 pic_flag=$lt_pic_flag
7406 pic_mode=$pic_mode
7407
7408 # Does compiler simultaneously support -c and -o options?
7409 compiler_c_o=$lt_compiler_c_o
7410
7411 # Can we write directly to a .lo ?
7412 compiler_o_lo=$lt_compiler_o_lo
7413
7414 # Must we lock files when doing compilation ?
7415 need_locks=$lt_need_locks
7416
7417 # Do we need the lib prefix for modules?
7418 need_lib_prefix=$need_lib_prefix
7419
7420 # Do we need a version for libraries?
7421 need_version=$need_version
7422
7423 # Whether dlopen is supported.
7424 dlopen_support=$enable_dlopen
7425
7426 # Whether dlopen of programs is supported.
7427 dlopen_self=$enable_dlopen_self
7428
7429 # Whether dlopen of statically linked programs is supported.
7430 dlopen_self_static=$enable_dlopen_self_static
7431
7432 # Compiler flag to prevent dynamic linking.
7433 link_static_flag=$lt_link_static_flag
7434
7435 # Compiler flag to turn off builtin functions.
7436 no_builtin_flag=$lt_no_builtin_flag
7437
7438 # Compiler flag to allow reflexive dlopens.
7439 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7440
7441 # Compiler flag to generate shared objects directly from archives.
7442 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7443
7444 # Compiler flag to generate thread-safe objects.
7445 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7446
7447 # Library versioning type.
7448 version_type=$version_type
7449
7450 # Format of library name prefix.
7451 libname_spec=$lt_libname_spec
7452
7453 # List of archive names.  First name is the real one, the rest are links.
7454 # The last name is the one that the linker finds with -lNAME.
7455 library_names_spec=$lt_library_names_spec
7456
7457 # The coded name of the library, if different from the real name.
7458 soname_spec=$lt_soname_spec
7459
7460 # Commands used to build and install an old-style archive.
7461 RANLIB=$lt_RANLIB
7462 old_archive_cmds=$lt_old_archive_cmds
7463 old_postinstall_cmds=$lt_old_postinstall_cmds
7464 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7465
7466 # Create an old-style archive from a shared archive.
7467 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7468
7469 # Create a temporary old-style archive to link instead of a shared archive.
7470 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7471
7472 # Commands used to build and install a shared archive.
7473 archive_cmds=$lt_archive_cmds
7474 archive_expsym_cmds=$lt_archive_expsym_cmds
7475 postinstall_cmds=$lt_postinstall_cmds
7476 postuninstall_cmds=$lt_postuninstall_cmds
7477
7478 # Commands to strip libraries.
7479 old_striplib=$lt_old_striplib
7480 striplib=$lt_striplib
7481
7482 # Method to check whether dependent libraries are shared objects.
7483 deplibs_check_method=$lt_deplibs_check_method
7484
7485 # Command to use when deplibs_check_method == file_magic.
7486 file_magic_cmd=$lt_file_magic_cmd
7487
7488 # Flag that allows shared libraries with undefined symbols to be built.
7489 allow_undefined_flag=$lt_allow_undefined_flag
7490
7491 # Flag that forces no undefined symbols.
7492 no_undefined_flag=$lt_no_undefined_flag
7493
7494 # Commands used to finish a libtool library installation in a directory.
7495 finish_cmds=$lt_finish_cmds
7496
7497 # Same as above, but a single script fragment to be evaled but not shown.
7498 finish_eval=$lt_finish_eval
7499
7500 # Take the output of nm and produce a listing of raw symbols and C names.
7501 global_symbol_pipe=$lt_global_symbol_pipe
7502
7503 # Transform the output of nm in a proper C declaration
7504 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7505
7506 # Transform the output of nm in a C name address pair
7507 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7508
7509 # This is the shared library runtime path variable.
7510 runpath_var=$runpath_var
7511
7512 # This is the shared library path variable.
7513 shlibpath_var=$shlibpath_var
7514
7515 # Is shlibpath searched before the hard-coded library search path?
7516 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7517
7518 # How to hardcode a shared library path into an executable.
7519 hardcode_action=$hardcode_action
7520
7521 # Whether we should hardcode library paths into libraries.
7522 hardcode_into_libs=$hardcode_into_libs
7523
7524 # Flag to hardcode \$libdir into a binary during linking.
7525 # This must work even if \$libdir does not exist.
7526 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7527
7528 # Whether we need a single -rpath flag with a separated argument.
7529 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7530
7531 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7532 # resulting binary.
7533 hardcode_direct=$hardcode_direct
7534
7535 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7536 # resulting binary.
7537 hardcode_minus_L=$hardcode_minus_L
7538
7539 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7540 # the resulting binary.
7541 hardcode_shlibpath_var=$hardcode_shlibpath_var
7542
7543 # Variables whose values should be saved in libtool wrapper scripts and
7544 # restored at relink time.
7545 variables_saved_for_relink="$variables_saved_for_relink"
7546
7547 # Whether libtool must link a program against all its dependency libraries.
7548 link_all_deplibs=$link_all_deplibs
7549
7550 # Compile-time system search path for libraries
7551 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7552
7553 # Run-time system search path for libraries
7554 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7555
7556 # Fix the shell variable \$srcfile for the compiler.
7557 fix_srcfile_path="$fix_srcfile_path"
7558
7559 # Set to yes if exported symbols are required.
7560 always_export_symbols=$always_export_symbols
7561
7562 # The commands to list exported symbols.
7563 export_symbols_cmds=$lt_export_symbols_cmds
7564
7565 # The commands to extract the exported symbol list from a shared archive.
7566 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7567
7568 # Symbols that should not be listed in the preloaded symbols.
7569 exclude_expsyms=$lt_exclude_expsyms
7570
7571 # Symbols that must always be exported.
7572 include_expsyms=$lt_include_expsyms
7573
7574 # ### END LIBTOOL CONFIG
7575
7576 __EOF__
7577
7578   case $host_os in
7579   aix3*)
7580     cat <<\EOF >> "${ofile}T"
7581
7582 # AIX sometimes has problems with the GCC collect2 program.  For some
7583 # reason, if we set the COLLECT_NAMES environment variable, the problems
7584 # vanish in a puff of smoke.
7585 if test "X${COLLECT_NAMES+set}" != Xset; then
7586   COLLECT_NAMES=
7587   export COLLECT_NAMES
7588 fi
7589 EOF
7590     ;;
7591   esac
7592
7593   case $host_os in
7594   cygwin* | mingw* | pw32* | os2*)
7595     cat <<'EOF' >> "${ofile}T"
7596       # This is a source program that is used to create dlls on Windows
7597       # Don't remove nor modify the starting and closing comments
7598 # /* ltdll.c starts here */
7599 # #define WIN32_LEAN_AND_MEAN
7600 # #include <windows.h>
7601 # #undef WIN32_LEAN_AND_MEAN
7602 # #include <stdio.h>
7603 #
7604 # #ifndef __CYGWIN__
7605 # #  ifdef __CYGWIN32__
7606 # #    define __CYGWIN__ __CYGWIN32__
7607 # #  endif
7608 # #endif
7609 #
7610 # #ifdef __cplusplus
7611 # extern "C" {
7612 # #endif
7613 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7614 # #ifdef __cplusplus
7615 # }
7616 # #endif
7617 #
7618 # #ifdef __CYGWIN__
7619 # #include <cygwin/cygwin_dll.h>
7620 # DECLARE_CYGWIN_DLL( DllMain );
7621 # #endif
7622 # HINSTANCE __hDllInstance_base;
7623 #
7624 # BOOL APIENTRY
7625 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7626 # {
7627 #   __hDllInstance_base = hInst;
7628 #   return TRUE;
7629 # }
7630 # /* ltdll.c ends here */
7631         # This is a source program that is used to create import libraries
7632         # on Windows for dlls which lack them. Don't remove nor modify the
7633         # starting and closing comments
7634 # /* impgen.c starts here */
7635 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7636 #
7637 #  This file is part of GNU libtool.
7638 #
7639 #  This program is free software; you can redistribute it and/or modify
7640 #  it under the terms of the GNU General Public License as published by
7641 #  the Free Software Foundation; either version 2 of the License, or
7642 #  (at your option) any later version.
7643 #
7644 #  This program is distributed in the hope that it will be useful,
7645 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7646 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7647 #  GNU General Public License for more details.
7648 #
7649 #  You should have received a copy of the GNU General Public License
7650 #  along with this program; if not, write to the Free Software
7651 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7652 #  */
7653 #
7654 # #include <stdio.h>            /* for printf() */
7655 # #include <unistd.h>           /* for open(), lseek(), read() */
7656 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7657 # #include <string.h>           /* for strdup() */
7658 #
7659 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7660 # #ifndef O_BINARY
7661 # #define O_BINARY 0
7662 # #endif
7663 #
7664 # static unsigned int
7665 # pe_get16 (fd, offset)
7666 #      int fd;
7667 #      int offset;
7668 # {
7669 #   unsigned char b[2];
7670 #   lseek (fd, offset, SEEK_SET);
7671 #   read (fd, b, 2);
7672 #   return b[0] + (b[1]<<8);
7673 # }
7674 #
7675 # static unsigned int
7676 # pe_get32 (fd, offset)
7677 #     int fd;
7678 #     int offset;
7679 # {
7680 #   unsigned char b[4];
7681 #   lseek (fd, offset, SEEK_SET);
7682 #   read (fd, b, 4);
7683 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7684 # }
7685 #
7686 # static unsigned int
7687 # pe_as32 (ptr)
7688 #      void *ptr;
7689 # {
7690 #   unsigned char *b = ptr;
7691 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7692 # }
7693 #
7694 # int
7695 # main (argc, argv)
7696 #     int argc;
7697 #     char *argv[];
7698 # {
7699 #     int dll;
7700 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7701 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7702 #     unsigned long name_rvas, nexp;
7703 #     unsigned char *expdata, *erva;
7704 #     char *filename, *dll_name;
7705 #
7706 #     filename = argv[1];
7707 #
7708 #     dll = open(filename, O_RDONLY|O_BINARY);
7709 #     if (dll < 1)
7710 #       return 1;
7711 #
7712 #     dll_name = filename;
7713 #
7714 #     for (i=0; filename[i]; i++)
7715 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7716 #           dll_name = filename + i +1;
7717 #
7718 #     pe_header_offset = pe_get32 (dll, 0x3c);
7719 #     opthdr_ofs = pe_header_offset + 4 + 20;
7720 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7721 #
7722 #     if (num_entries < 1) /* no exports */
7723 #       return 1;
7724 #
7725 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7726 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7727 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7728 #     secptr = (pe_header_offset + 4 + 20 +
7729 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7730 #
7731 #     expptr = 0;
7732 #     for (i = 0; i < nsections; i++)
7733 #     {
7734 #       char sname[8];
7735 #       unsigned long secptr1 = secptr + 40 * i;
7736 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7737 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7738 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7739 #       lseek(dll, secptr1, SEEK_SET);
7740 #       read(dll, sname, 8);
7741 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7742 #       {
7743 #           expptr = fptr + (export_rva - vaddr);
7744 #           if (export_rva + export_size > vaddr + vsize)
7745 #               export_size = vsize - (export_rva - vaddr);
7746 #           break;
7747 #       }
7748 #     }
7749 #
7750 #     expdata = (unsigned char*)malloc(export_size);
7751 #     lseek (dll, expptr, SEEK_SET);
7752 #     read (dll, expdata, export_size);
7753 #     erva = expdata - export_rva;
7754 #
7755 #     nexp = pe_as32 (expdata+24);
7756 #     name_rvas = pe_as32 (expdata+32);
7757 #
7758 #     printf ("EXPORTS\n");
7759 #     for (i = 0; i<nexp; i++)
7760 #     {
7761 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7762 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7763 #     }
7764 #
7765 #     return 0;
7766 # }
7767 # /* impgen.c ends here */
7768
7769 EOF
7770     ;;
7771   esac
7772
7773   # We use sed instead of cat because bash on DJGPP gets confused if
7774   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7775   # text mode, it properly converts lines to CR/LF.  This bash problem
7776   # is reportedly fixed, but why not run on old versions too?
7777   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7778
7779   mv -f "${ofile}T" "$ofile" || \
7780     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7781   chmod +x "$ofile"
7782 fi
7783
7784
7785
7786
7787
7788 # This can be used to rebuild libtool when needed
7789 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7790
7791 # Always use our own libtool.
7792 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7793
7794 # Prevent multiple expansion
7795
7796
7797
7798 # test for ln hardlink support
7799 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7800 echo "configure:7801: checking whether ln works" >&5
7801 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7802   echo $ac_n "(cached) $ac_c" 1>&6
7803 else
7804   rm -f conftest.src conftest.dst
7805 echo "conftest" > conftest.src
7806 if ln conftest.src conftest.dst 2>/dev/null
7807 then
7808   ol_cv_prog_LN_H="ln"
7809 else
7810   ol_cv_prog_LN_H="cp"
7811 fi
7812 rm -f conftest.src conftest.dst
7813
7814 fi
7815 LN_H="$ol_cv_prog_LN_H"
7816 if test "$ol_cv_prog_LN_H" = "ln"; then
7817         echo "$ac_t""yes" 1>&6
7818 else
7819         echo "$ac_t""no" 1>&6
7820 fi
7821
7822 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7823 echo "configure:7824: checking whether ln -s works" >&5
7824 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7825   echo $ac_n "(cached) $ac_c" 1>&6
7826 else
7827   rm -f conftestdata
7828 if ln -s X conftestdata 2>/dev/null
7829 then
7830   rm -f conftestdata
7831   ac_cv_prog_LN_S="ln -s"
7832 else
7833   ac_cv_prog_LN_S=ln
7834 fi
7835 fi
7836 LN_S="$ac_cv_prog_LN_S"
7837 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7838   echo "$ac_t""yes" 1>&6
7839 else
7840   echo "$ac_t""no" 1>&6
7841 fi
7842
7843
7844 ol_link_perl=no
7845 if test $ol_enable_perl != no ; then
7846         # Extract the first word of "perl", so it can be a program name with args.
7847 set dummy perl; ac_word=$2
7848 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7849 echo "configure:7850: checking for $ac_word" >&5
7850 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7851   echo $ac_n "(cached) $ac_c" 1>&6
7852 else
7853   case "$PERLBIN" in
7854   /*)
7855   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7856   ;;
7857   ?:/*)
7858   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7859   ;;
7860   *)
7861   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7862   ac_dummy="$PATH"
7863   for ac_dir in $ac_dummy; do 
7864     test -z "$ac_dir" && ac_dir=.
7865     if test -f $ac_dir/$ac_word; then
7866       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7867       break
7868     fi
7869   done
7870   IFS="$ac_save_ifs"
7871   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7872   ;;
7873 esac
7874 fi
7875 PERLBIN="$ac_cv_path_PERLBIN"
7876 if test -n "$PERLBIN"; then
7877   echo "$ac_t""$PERLBIN" 1>&6
7878 else
7879   echo "$ac_t""no" 1>&6
7880 fi
7881
7882
7883         if test "no$PERLBIN" = "no" ; then
7884                 if test $ol_enable_perl = yes ; then
7885                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7886                 fi
7887
7888         else
7889                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7890                 if test x"$ol_with_perl_module" = "xstatic" ; then
7891                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7892                 else
7893                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7894                 fi
7895                                 ol_link_perl=yes
7896         fi
7897 fi
7898
7899 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7900 echo "configure:7901: checking how to run the C preprocessor" >&5
7901 # On Suns, sometimes $CPP names a directory.
7902 if test -n "$CPP" && test -d "$CPP"; then
7903   CPP=
7904 fi
7905 if test -z "$CPP"; then
7906 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7907   echo $ac_n "(cached) $ac_c" 1>&6
7908 else
7909     # This must be in double quotes, not single quotes, because CPP may get
7910   # substituted into the Makefile and "${CC-cc}" will confuse make.
7911   CPP="${CC-cc} -E"
7912   # On the NeXT, cc -E runs the code through the compiler's parser,
7913   # not just through cpp.
7914   cat > conftest.$ac_ext <<EOF
7915 #line 7916 "configure"
7916 #include "confdefs.h"
7917 #include <assert.h>
7918 Syntax Error
7919 EOF
7920 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7921 { (eval echo configure:7922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7922 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7923 if test -z "$ac_err"; then
7924   :
7925 else
7926   echo "$ac_err" >&5
7927   echo "configure: failed program was:" >&5
7928   cat conftest.$ac_ext >&5
7929   rm -rf conftest*
7930   CPP="${CC-cc} -E -traditional-cpp"
7931   cat > conftest.$ac_ext <<EOF
7932 #line 7933 "configure"
7933 #include "confdefs.h"
7934 #include <assert.h>
7935 Syntax Error
7936 EOF
7937 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7938 { (eval echo configure:7939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7939 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7940 if test -z "$ac_err"; then
7941   :
7942 else
7943   echo "$ac_err" >&5
7944   echo "configure: failed program was:" >&5
7945   cat conftest.$ac_ext >&5
7946   rm -rf conftest*
7947   CPP="${CC-cc} -nologo -E"
7948   cat > conftest.$ac_ext <<EOF
7949 #line 7950 "configure"
7950 #include "confdefs.h"
7951 #include <assert.h>
7952 Syntax Error
7953 EOF
7954 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7955 { (eval echo configure:7956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7956 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7957 if test -z "$ac_err"; then
7958   :
7959 else
7960   echo "$ac_err" >&5
7961   echo "configure: failed program was:" >&5
7962   cat conftest.$ac_ext >&5
7963   rm -rf conftest*
7964   CPP=/lib/cpp
7965 fi
7966 rm -f conftest*
7967 fi
7968 rm -f conftest*
7969 fi
7970 rm -f conftest*
7971   ac_cv_prog_CPP="$CPP"
7972 fi
7973   CPP="$ac_cv_prog_CPP"
7974 else
7975   ac_cv_prog_CPP="$CPP"
7976 fi
7977 echo "$ac_t""$CPP" 1>&6
7978
7979
7980 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7981         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7982
7983 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7984         echo "configure: warning: programs compiled here do run here..." 1>&2
7985         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7986
7987 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7988         echo "configure: warning: programs compiled here do not run here..." 1>&2
7989         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7990 fi
7991
7992
7993 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7994 echo "configure:7995: checking for Cygwin environment" >&5
7995 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7996   echo $ac_n "(cached) $ac_c" 1>&6
7997 else
7998   cat > conftest.$ac_ext <<EOF
7999 #line 8000 "configure"
8000 #include "confdefs.h"
8001
8002 int main() {
8003
8004 #ifndef __CYGWIN__
8005 #define __CYGWIN__ __CYGWIN32__
8006 #endif
8007 return __CYGWIN__;
8008 ; return 0; }
8009 EOF
8010 if { (eval echo configure:8011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8011   rm -rf conftest*
8012   ac_cv_cygwin=yes
8013 else
8014   echo "configure: failed program was:" >&5
8015   cat conftest.$ac_ext >&5
8016   rm -rf conftest*
8017   ac_cv_cygwin=no
8018 fi
8019 rm -f conftest*
8020 fi
8021
8022 echo "$ac_t""$ac_cv_cygwin" 1>&6
8023 CYGWIN=
8024 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8025 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8026 echo "configure:8027: checking for mingw32 environment" >&5
8027 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8028   echo $ac_n "(cached) $ac_c" 1>&6
8029 else
8030   cat > conftest.$ac_ext <<EOF
8031 #line 8032 "configure"
8032 #include "confdefs.h"
8033
8034 int main() {
8035 return __MINGW32__;
8036 ; return 0; }
8037 EOF
8038 if { (eval echo configure:8039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8039   rm -rf conftest*
8040   ac_cv_mingw32=yes
8041 else
8042   echo "configure: failed program was:" >&5
8043   cat conftest.$ac_ext >&5
8044   rm -rf conftest*
8045   ac_cv_mingw32=no
8046 fi
8047 rm -f conftest*
8048 fi
8049
8050 echo "$ac_t""$ac_cv_mingw32" 1>&6
8051 MINGW32=
8052 test "$ac_cv_mingw32" = yes && MINGW32=yes
8053
8054
8055
8056 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8057 echo "configure:8058: checking for executable suffix" >&5
8058 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8059   echo $ac_n "(cached) $ac_c" 1>&6
8060 else
8061   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8062   ac_cv_exeext=.exe
8063 else
8064   rm -f conftest*
8065   echo 'int main () { return 0; }' > conftest.$ac_ext
8066   ac_cv_exeext=
8067   if { (eval echo configure:8068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8068     for file in conftest.*; do
8069       case $file in
8070       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8071       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8072       esac
8073     done
8074   else
8075     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8076   fi
8077   rm -f conftest*
8078   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8079 fi
8080 fi
8081
8082 EXEEXT=""
8083 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8084 echo "$ac_t""${ac_cv_exeext}" 1>&6
8085 ac_exeext=$EXEEXT
8086
8087 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8088 echo "configure:8089: checking for object suffix" >&5
8089 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8090   echo $ac_n "(cached) $ac_c" 1>&6
8091 else
8092   rm -f conftest*
8093 echo 'int i = 1;' > conftest.$ac_ext
8094 if { (eval echo configure:8095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8095   for ac_file in conftest.*; do
8096     case $ac_file in
8097     *.c) ;;
8098     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8099     esac
8100   done
8101 else
8102   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8103 fi
8104 rm -f conftest*
8105 fi
8106
8107 echo "$ac_t""$ac_cv_objext" 1>&6
8108 OBJEXT=$ac_cv_objext
8109 ac_objext=$ac_cv_objext
8110
8111
8112 cat >> confdefs.h <<EOF
8113 #define EXEEXT "${EXEEXT}"
8114 EOF
8115
8116
8117 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8118 echo "configure:8119: checking for be_app in -lbe" >&5
8119 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8120 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8121   echo $ac_n "(cached) $ac_c" 1>&6
8122 else
8123   ac_save_LIBS="$LIBS"
8124 LIBS="-lbe -lroot -lnet $LIBS"
8125 cat > conftest.$ac_ext <<EOF
8126 #line 8127 "configure"
8127 #include "confdefs.h"
8128 /* Override any gcc2 internal prototype to avoid an error.  */
8129 /* We use char because int might match the return type of a gcc2
8130     builtin and then its argument prototype would still apply.  */
8131 char be_app();
8132
8133 int main() {
8134 be_app()
8135 ; return 0; }
8136 EOF
8137 if { (eval echo configure:8138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8138   rm -rf conftest*
8139   eval "ac_cv_lib_$ac_lib_var=yes"
8140 else
8141   echo "configure: failed program was:" >&5
8142   cat conftest.$ac_ext >&5
8143   rm -rf conftest*
8144   eval "ac_cv_lib_$ac_lib_var=no"
8145 fi
8146 rm -f conftest*
8147 LIBS="$ac_save_LIBS"
8148
8149 fi
8150 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8151   echo "$ac_t""yes" 1>&6
8152   LIBS="$LIBS -lbe -lroot -lnet"
8153 else
8154   echo "$ac_t""no" 1>&6
8155 :
8156 fi
8157
8158
8159
8160
8161
8162 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8163 echo "configure:8164: checking for ${CC-cc} option to accept ANSI C" >&5
8164 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8165   echo $ac_n "(cached) $ac_c" 1>&6
8166 else
8167   am_cv_prog_cc_stdc=no
8168 ac_save_CC="$CC"
8169 # Don't try gcc -ansi; that turns off useful extensions and
8170 # breaks some systems' header files.
8171 # AIX                   -qlanglvl=ansi
8172 # Ultrix and OSF/1      -std1
8173 # HP-UX 10.20 and later -Ae
8174 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8175 # SVR4                  -Xc -D__EXTENSIONS__
8176 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8177 do
8178   CC="$ac_save_CC $ac_arg"
8179   cat > conftest.$ac_ext <<EOF
8180 #line 8181 "configure"
8181 #include "confdefs.h"
8182 #include <stdarg.h>
8183 #include <stdio.h>
8184 #include <sys/types.h>
8185 #include <sys/stat.h>
8186 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8187 struct buf { int x; };
8188 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8189 static char *e (p, i)
8190      char **p;
8191      int i;
8192 {
8193   return p[i];
8194 }
8195 static char *f (char * (*g) (char **, int), char **p, ...)
8196 {
8197   char *s;
8198   va_list v;
8199   va_start (v,p);
8200   s = g (p, va_arg (v,int));
8201   va_end (v);
8202   return s;
8203 }
8204 int test (int i, double x);
8205 struct s1 {int (*f) (int a);};
8206 struct s2 {int (*f) (double a);};
8207 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8208 int argc;
8209 char **argv;
8210
8211 int main() {
8212
8213 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8214
8215 ; return 0; }
8216 EOF
8217 if { (eval echo configure:8218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8218   rm -rf conftest*
8219   am_cv_prog_cc_stdc="$ac_arg"; break
8220 else
8221   echo "configure: failed program was:" >&5
8222   cat conftest.$ac_ext >&5
8223 fi
8224 rm -f conftest*
8225 done
8226 CC="$ac_save_CC"
8227
8228 fi
8229
8230 if test -z "$am_cv_prog_cc_stdc"; then
8231   echo "$ac_t""none needed" 1>&6
8232 else
8233   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8234 fi
8235 case "x$am_cv_prog_cc_stdc" in
8236   x|xno) ;;
8237   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8238 esac
8239
8240 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8241         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8242 fi
8243
8244 # test for make depend flag
8245 OL_MKDEP=
8246 OL_MKDEP_FLAGS=
8247 if test -z "${MKDEP}"; then
8248         OL_MKDEP="${CC-cc}"
8249         if test -z "${MKDEP_FLAGS}"; then
8250                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8251 echo "configure:8252: checking for ${OL_MKDEP} depend flag" >&5
8252 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8253   echo $ac_n "(cached) $ac_c" 1>&6
8254 else
8255   
8256                         ol_cv_mkdep=no
8257                         for flag in "-M" "-xM"; do
8258                                 cat > conftest.c <<EOF
8259  noCode;
8260 EOF
8261                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8262                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8263                                 then
8264                                         if test ! -f conftest."${ac_object}" ; then
8265                                                 ol_cv_mkdep=$flag
8266                                                 OL_MKDEP_FLAGS="$flag"
8267                                                 break
8268                                         fi
8269                                 fi
8270                         done
8271                         rm -f conftest*
8272                 
8273 fi
8274
8275 echo "$ac_t""$ol_cv_mkdep" 1>&6
8276         else
8277                 cc_cv_mkdep=yes
8278                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8279         fi
8280 else
8281         cc_cv_mkdep=yes
8282         OL_MKDEP="${MKDEP}"
8283         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8284 fi
8285
8286
8287
8288 if test "${ol_cv_mkdep}" = no ; then
8289         # this will soon become an error
8290         echo "configure: warning: do not know how to generate dependencies" 1>&2
8291 fi
8292
8293 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8294 echo "configure:8295: checking for afopen in -ls" >&5
8295 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8296 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8297   echo $ac_n "(cached) $ac_c" 1>&6
8298 else
8299   ac_save_LIBS="$LIBS"
8300 LIBS="-ls  $LIBS"
8301 cat > conftest.$ac_ext <<EOF
8302 #line 8303 "configure"
8303 #include "confdefs.h"
8304 /* Override any gcc2 internal prototype to avoid an error.  */
8305 /* We use char because int might match the return type of a gcc2
8306     builtin and then its argument prototype would still apply.  */
8307 char afopen();
8308
8309 int main() {
8310 afopen()
8311 ; return 0; }
8312 EOF
8313 if { (eval echo configure:8314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8314   rm -rf conftest*
8315   eval "ac_cv_lib_$ac_lib_var=yes"
8316 else
8317   echo "configure: failed program was:" >&5
8318   cat conftest.$ac_ext >&5
8319   rm -rf conftest*
8320   eval "ac_cv_lib_$ac_lib_var=no"
8321 fi
8322 rm -f conftest*
8323 LIBS="$ac_save_LIBS"
8324
8325 fi
8326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8327   echo "$ac_t""yes" 1>&6
8328   
8329         AUTH_LIBS=-ls
8330         cat >> confdefs.h <<\EOF
8331 #define HAVE_AIX_SECURITY 1
8332 EOF
8333
8334
8335 else
8336   echo "$ac_t""no" 1>&6
8337 fi
8338
8339
8340 case "$target" in
8341 *-ibm-openedition)
8342         ac_cv_func_getopt=no
8343         cat >> confdefs.h <<\EOF
8344 #define BOTH_STRINGS_H 1
8345 EOF
8346
8347         ;;
8348 esac
8349
8350 ol_link_modules=no
8351 if test $ol_enable_modules != no ; then
8352         for ac_hdr in ltdl.h
8353 do
8354 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8355 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8356 echo "configure:8357: checking for $ac_hdr" >&5
8357 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8358   echo $ac_n "(cached) $ac_c" 1>&6
8359 else
8360   cat > conftest.$ac_ext <<EOF
8361 #line 8362 "configure"
8362 #include "confdefs.h"
8363 #include <$ac_hdr>
8364 EOF
8365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8366 { (eval echo configure:8367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8368 if test -z "$ac_err"; then
8369   rm -rf conftest*
8370   eval "ac_cv_header_$ac_safe=yes"
8371 else
8372   echo "$ac_err" >&5
8373   echo "configure: failed program was:" >&5
8374   cat conftest.$ac_ext >&5
8375   rm -rf conftest*
8376   eval "ac_cv_header_$ac_safe=no"
8377 fi
8378 rm -f conftest*
8379 fi
8380 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8381   echo "$ac_t""yes" 1>&6
8382     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8383   cat >> confdefs.h <<EOF
8384 #define $ac_tr_hdr 1
8385 EOF
8386  
8387 else
8388   echo "$ac_t""no" 1>&6
8389 fi
8390 done
8391
8392
8393         if test $ac_cv_header_ltdl_h = no ; then
8394                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8395         fi
8396
8397         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8398 echo "configure:8399: checking for lt_dlinit in -lltdl" >&5
8399 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8400 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8401   echo $ac_n "(cached) $ac_c" 1>&6
8402 else
8403   ac_save_LIBS="$LIBS"
8404 LIBS="-lltdl  $LIBS"
8405 cat > conftest.$ac_ext <<EOF
8406 #line 8407 "configure"
8407 #include "confdefs.h"
8408 /* Override any gcc2 internal prototype to avoid an error.  */
8409 /* We use char because int might match the return type of a gcc2
8410     builtin and then its argument prototype would still apply.  */
8411 char lt_dlinit();
8412
8413 int main() {
8414 lt_dlinit()
8415 ; return 0; }
8416 EOF
8417 if { (eval echo configure:8418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8418   rm -rf conftest*
8419   eval "ac_cv_lib_$ac_lib_var=yes"
8420 else
8421   echo "configure: failed program was:" >&5
8422   cat conftest.$ac_ext >&5
8423   rm -rf conftest*
8424   eval "ac_cv_lib_$ac_lib_var=no"
8425 fi
8426 rm -f conftest*
8427 LIBS="$ac_save_LIBS"
8428
8429 fi
8430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8431   echo "$ac_t""yes" 1>&6
8432   
8433                 MODULES_LIBS=-lltdl
8434                 cat >> confdefs.h <<\EOF
8435 #define HAVE_LIBLTDL 1
8436 EOF
8437
8438         
8439 else
8440   echo "$ac_t""no" 1>&6
8441 fi
8442
8443
8444         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8445                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8446         fi
8447         ol_link_modules=yes
8448 else
8449         ol_with_bdb_module=static
8450         ol_with_dnssrv_module=static
8451         ol_with_hdb_module=static
8452         ol_with_ldap_module=static
8453         ol_with_ldbm_module=static
8454         ol_with_meta_module=static
8455         ol_with_monitor_module=static
8456         ol_with_null_module=static
8457         ol_with_passwd_module=static
8458         ol_with_perl_module=static
8459         ol_with_shell_module=static
8460         ol_with_tcl_module=static
8461         ol_with_sql_module=static
8462 fi
8463
8464 # test for EBCDIC
8465 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8466 echo "configure:8467: checking for EBCDIC" >&5
8467 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8468   echo $ac_n "(cached) $ac_c" 1>&6
8469 else
8470   
8471         cat > conftest.$ac_ext <<EOF
8472 #line 8473 "configure"
8473 #include "confdefs.h"
8474
8475 #if !('M' == 0xd4)
8476 #include <__ASCII__/generate_error.h>
8477 #endif
8478
8479 EOF
8480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8481 { (eval echo configure:8482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8483 if test -z "$ac_err"; then
8484   rm -rf conftest*
8485   ol_cv_cpp_ebcdic=yes
8486 else
8487   echo "$ac_err" >&5
8488   echo "configure: failed program was:" >&5
8489   cat conftest.$ac_ext >&5
8490   rm -rf conftest*
8491   ol_cv_cpp_ebcdic=no
8492 fi
8493 rm -f conftest*
8494 fi
8495
8496 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8497 if test $ol_cv_cpp_ebcdic = yes ; then
8498         cat >> confdefs.h <<\EOF
8499 #define HAVE_EBCDIC 1
8500 EOF
8501
8502 fi
8503
8504 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8505 echo "configure:8506: checking for ANSI C header files" >&5
8506 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8507   echo $ac_n "(cached) $ac_c" 1>&6
8508 else
8509   cat > conftest.$ac_ext <<EOF
8510 #line 8511 "configure"
8511 #include "confdefs.h"
8512 #include <stdlib.h>
8513 #include <stdarg.h>
8514 #include <string.h>
8515 #include <float.h>
8516 EOF
8517 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8518 { (eval echo configure:8519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8519 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8520 if test -z "$ac_err"; then
8521   rm -rf conftest*
8522   ol_cv_header_stdc=yes
8523 else
8524   echo "$ac_err" >&5
8525   echo "configure: failed program was:" >&5
8526   cat conftest.$ac_ext >&5
8527   rm -rf conftest*
8528   ol_cv_header_stdc=no
8529 fi
8530 rm -f conftest*
8531
8532 if test $ol_cv_header_stdc = yes; then
8533   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8534 cat > conftest.$ac_ext <<EOF
8535 #line 8536 "configure"
8536 #include "confdefs.h"
8537 #include <string.h>
8538 EOF
8539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8540   egrep "memchr" >/dev/null 2>&1; then
8541   :
8542 else
8543   rm -rf conftest*
8544   ol_cv_header_stdc=no
8545 fi
8546 rm -f conftest*
8547
8548 fi
8549
8550 if test $ol_cv_header_stdc = yes; then
8551   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8552 cat > conftest.$ac_ext <<EOF
8553 #line 8554 "configure"
8554 #include "confdefs.h"
8555 #include <stdlib.h>
8556 EOF
8557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8558   egrep "free" >/dev/null 2>&1; then
8559   :
8560 else
8561   rm -rf conftest*
8562   ol_cv_header_stdc=no
8563 fi
8564 rm -f conftest*
8565
8566 fi
8567
8568 if test $ol_cv_header_stdc = yes; then
8569   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8570 if test "$cross_compiling" = yes; then
8571   :
8572 else
8573   cat > conftest.$ac_ext <<EOF
8574 #line 8575 "configure"
8575 #include "confdefs.h"
8576 #include <ctype.h>
8577 #ifndef HAVE_EBCDIC
8578 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8579 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8580 #else
8581 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8582                 || ('j' <= (c) && (c) <= 'r') \
8583                 || ('s' <= (c) && (c) <= 'z'))
8584 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8585 #endif
8586 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8587 int main () { int i; for (i = 0; i < 256; i++)
8588 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8589 exit (0); }
8590
8591 EOF
8592 if { (eval echo configure:8593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8593 then
8594   :
8595 else
8596   echo "configure: failed program was:" >&5
8597   cat conftest.$ac_ext >&5
8598   rm -fr conftest*
8599   ol_cv_header_stdc=no
8600 fi
8601 rm -fr conftest*
8602 fi
8603
8604 fi
8605 fi
8606
8607 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8608 if test $ol_cv_header_stdc = yes; then
8609   cat >> confdefs.h <<\EOF
8610 #define STDC_HEADERS 1
8611 EOF
8612
8613 fi
8614 ac_cv_header_stdc=disable
8615
8616
8617 if test $ol_cv_header_stdc != yes; then
8618         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8619 fi
8620
8621 ac_header_dirent=no
8622 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8623 do
8624 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8625 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8626 echo "configure:8627: checking for $ac_hdr that defines DIR" >&5
8627 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8628   echo $ac_n "(cached) $ac_c" 1>&6
8629 else
8630   cat > conftest.$ac_ext <<EOF
8631 #line 8632 "configure"
8632 #include "confdefs.h"
8633 #include <sys/types.h>
8634 #include <$ac_hdr>
8635 int main() {
8636 DIR *dirp = 0;
8637 ; return 0; }
8638 EOF
8639 if { (eval echo configure:8640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8640   rm -rf conftest*
8641   eval "ac_cv_header_dirent_$ac_safe=yes"
8642 else
8643   echo "configure: failed program was:" >&5
8644   cat conftest.$ac_ext >&5
8645   rm -rf conftest*
8646   eval "ac_cv_header_dirent_$ac_safe=no"
8647 fi
8648 rm -f conftest*
8649 fi
8650 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8651   echo "$ac_t""yes" 1>&6
8652     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8653   cat >> confdefs.h <<EOF
8654 #define $ac_tr_hdr 1
8655 EOF
8656  ac_header_dirent=$ac_hdr; break
8657 else
8658   echo "$ac_t""no" 1>&6
8659 fi
8660 done
8661 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8662 if test $ac_header_dirent = dirent.h; then
8663 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8664 echo "configure:8665: checking for opendir in -ldir" >&5
8665 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8666 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8667   echo $ac_n "(cached) $ac_c" 1>&6
8668 else
8669   ac_save_LIBS="$LIBS"
8670 LIBS="-ldir  $LIBS"
8671 cat > conftest.$ac_ext <<EOF
8672 #line 8673 "configure"
8673 #include "confdefs.h"
8674 /* Override any gcc2 internal prototype to avoid an error.  */
8675 /* We use char because int might match the return type of a gcc2
8676     builtin and then its argument prototype would still apply.  */
8677 char opendir();
8678
8679 int main() {
8680 opendir()
8681 ; return 0; }
8682 EOF
8683 if { (eval echo configure:8684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8684   rm -rf conftest*
8685   eval "ac_cv_lib_$ac_lib_var=yes"
8686 else
8687   echo "configure: failed program was:" >&5
8688   cat conftest.$ac_ext >&5
8689   rm -rf conftest*
8690   eval "ac_cv_lib_$ac_lib_var=no"
8691 fi
8692 rm -f conftest*
8693 LIBS="$ac_save_LIBS"
8694
8695 fi
8696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8697   echo "$ac_t""yes" 1>&6
8698   LIBS="$LIBS -ldir"
8699 else
8700   echo "$ac_t""no" 1>&6
8701 fi
8702
8703 else
8704 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8705 echo "configure:8706: checking for opendir in -lx" >&5
8706 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8707 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8708   echo $ac_n "(cached) $ac_c" 1>&6
8709 else
8710   ac_save_LIBS="$LIBS"
8711 LIBS="-lx  $LIBS"
8712 cat > conftest.$ac_ext <<EOF
8713 #line 8714 "configure"
8714 #include "confdefs.h"
8715 /* Override any gcc2 internal prototype to avoid an error.  */
8716 /* We use char because int might match the return type of a gcc2
8717     builtin and then its argument prototype would still apply.  */
8718 char opendir();
8719
8720 int main() {
8721 opendir()
8722 ; return 0; }
8723 EOF
8724 if { (eval echo configure:8725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8725   rm -rf conftest*
8726   eval "ac_cv_lib_$ac_lib_var=yes"
8727 else
8728   echo "configure: failed program was:" >&5
8729   cat conftest.$ac_ext >&5
8730   rm -rf conftest*
8731   eval "ac_cv_lib_$ac_lib_var=no"
8732 fi
8733 rm -f conftest*
8734 LIBS="$ac_save_LIBS"
8735
8736 fi
8737 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8738   echo "$ac_t""yes" 1>&6
8739   LIBS="$LIBS -lx"
8740 else
8741   echo "$ac_t""no" 1>&6
8742 fi
8743
8744 fi
8745
8746 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8747 echo "configure:8748: checking for sys/wait.h that is POSIX.1 compatible" >&5
8748 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8749   echo $ac_n "(cached) $ac_c" 1>&6
8750 else
8751   cat > conftest.$ac_ext <<EOF
8752 #line 8753 "configure"
8753 #include "confdefs.h"
8754 #include <sys/types.h>
8755 #include <sys/wait.h>
8756 #ifndef WEXITSTATUS
8757 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8758 #endif
8759 #ifndef WIFEXITED
8760 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8761 #endif
8762 int main() {
8763 int s;
8764 wait (&s);
8765 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8766 ; return 0; }
8767 EOF
8768 if { (eval echo configure:8769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8769   rm -rf conftest*
8770   ac_cv_header_sys_wait_h=yes
8771 else
8772   echo "configure: failed program was:" >&5
8773   cat conftest.$ac_ext >&5
8774   rm -rf conftest*
8775   ac_cv_header_sys_wait_h=no
8776 fi
8777 rm -f conftest*
8778 fi
8779
8780 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8781 if test $ac_cv_header_sys_wait_h = yes; then
8782   cat >> confdefs.h <<\EOF
8783 #define HAVE_SYS_WAIT_H 1
8784 EOF
8785
8786 fi
8787
8788 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8789 echo "configure:8790: checking POSIX termios" >&5
8790 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8791   echo $ac_n "(cached) $ac_c" 1>&6
8792 else
8793   cat > conftest.$ac_ext <<EOF
8794 #line 8795 "configure"
8795 #include "confdefs.h"
8796 #include <sys/types.h>
8797 #include <unistd.h>
8798 #include <termios.h>
8799 int main() {
8800 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8801    tcgetattr(0, 0);
8802 ; return 0; }
8803 EOF
8804 if { (eval echo configure:8805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8805   rm -rf conftest*
8806   am_cv_sys_posix_termios=yes
8807 else
8808   echo "configure: failed program was:" >&5
8809   cat conftest.$ac_ext >&5
8810   rm -rf conftest*
8811   am_cv_sys_posix_termios=no
8812 fi
8813 rm -f conftest*
8814 fi
8815
8816 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8817
8818
8819  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8820 echo "configure:8821: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8821 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8822   echo $ac_n "(cached) $ac_c" 1>&6
8823 else
8824   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8825
8826   gwinsz_in_termios_h=no
8827   if test $am_cv_sys_posix_termios = yes; then
8828     cat > conftest.$ac_ext <<EOF
8829 #line 8830 "configure"
8830 #include "confdefs.h"
8831 #include <sys/types.h>
8832 #     include <termios.h>
8833 #     ifdef TIOCGWINSZ
8834         yes
8835 #     endif
8836     
8837 EOF
8838 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8839   egrep "yes" >/dev/null 2>&1; then
8840   rm -rf conftest*
8841   gwinsz_in_termios_h=yes
8842 fi
8843 rm -f conftest*
8844
8845   fi
8846
8847   if test $gwinsz_in_termios_h = no; then
8848     cat > conftest.$ac_ext <<EOF
8849 #line 8850 "configure"
8850 #include "confdefs.h"
8851 #include <sys/types.h>
8852 #     include <sys/ioctl.h>
8853 #     ifdef TIOCGWINSZ
8854         yes
8855 #     endif
8856     
8857 EOF
8858 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8859   egrep "yes" >/dev/null 2>&1; then
8860   rm -rf conftest*
8861   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8862 fi
8863 rm -f conftest*
8864
8865   fi
8866   
8867 fi
8868
8869 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8870   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8871     cat >> confdefs.h <<\EOF
8872 #define GWINSZ_IN_SYS_IOCTL 1
8873 EOF
8874
8875   fi
8876
8877 if test $am_cv_sys_posix_termios = yes ; then
8878         cat >> confdefs.h <<\EOF
8879 #define HAVE_POSIX_TERMIOS 1
8880 EOF
8881
8882 fi
8883
8884 for ac_hdr in \
8885         arpa/inet.h             \
8886         arpa/nameser.h  \
8887         assert.h                \
8888         conio.h                 \
8889         crypt.h                 \
8890         direct.h                \
8891         errno.h                 \
8892         fcntl.h                 \
8893         filio.h                 \
8894         getopt.h                \
8895         grp.h                   \
8896         io.h                    \
8897         libutil.h               \
8898         limits.h                \
8899         locale.h                \
8900         netinet/tcp.h   \
8901         malloc.h                \
8902         memory.h                \
8903         psap.h                  \
8904         pwd.h                   \
8905         process.h               \
8906         resolv.h                \
8907         sgtty.h                 \
8908         shadow.h                \
8909         stddef.h                \
8910         string.h                \
8911         strings.h               \
8912         sysexits.h              \
8913         sys/file.h              \
8914         sys/filio.h             \
8915         sys/errno.h             \
8916         sys/ioctl.h             \
8917         sys/param.h             \
8918         sys/resource.h  \
8919         sys/select.h    \
8920         sys/socket.h    \
8921         sys/stat.h              \
8922         sys/syslog.h    \
8923         sys/time.h              \
8924         sys/types.h             \
8925         sys/ucred.h             \
8926         sys/uio.h               \
8927         syslog.h                \
8928         termios.h               \
8929         unistd.h                \
8930         winsock.h               \
8931         winsock2.h              \
8932
8933 do
8934 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8935 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8936 echo "configure:8937: checking for $ac_hdr" >&5
8937 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8938   echo $ac_n "(cached) $ac_c" 1>&6
8939 else
8940   cat > conftest.$ac_ext <<EOF
8941 #line 8942 "configure"
8942 #include "confdefs.h"
8943 #include <$ac_hdr>
8944 EOF
8945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8946 { (eval echo configure:8947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8947 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8948 if test -z "$ac_err"; then
8949   rm -rf conftest*
8950   eval "ac_cv_header_$ac_safe=yes"
8951 else
8952   echo "$ac_err" >&5
8953   echo "configure: failed program was:" >&5
8954   cat conftest.$ac_ext >&5
8955   rm -rf conftest*
8956   eval "ac_cv_header_$ac_safe=no"
8957 fi
8958 rm -f conftest*
8959 fi
8960 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8961   echo "$ac_t""yes" 1>&6
8962     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8963   cat >> confdefs.h <<EOF
8964 #define $ac_tr_hdr 1
8965 EOF
8966  
8967 else
8968   echo "$ac_t""no" 1>&6
8969 fi
8970 done
8971
8972
8973
8974
8975 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8976 echo "configure:8977: checking for dlopen" >&5
8977 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8978   echo $ac_n "(cached) $ac_c" 1>&6
8979 else
8980   cat > conftest.$ac_ext <<EOF
8981 #line 8982 "configure"
8982 #include "confdefs.h"
8983 /* System header to define __stub macros and hopefully few prototypes,
8984     which can conflict with char dlopen(); below.  */
8985 #include <assert.h>
8986 /* Override any gcc2 internal prototype to avoid an error.  */
8987 /* We use char because int might match the return type of a gcc2
8988     builtin and then its argument prototype would still apply.  */
8989 char dlopen();
8990 char (*f)();
8991
8992 int main() {
8993
8994 /* The GNU C library defines this for functions which it implements
8995     to always fail with ENOSYS.  Some functions are actually named
8996     something starting with __ and the normal name is an alias.  */
8997 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8998 choke me
8999 #else
9000 f = dlopen;
9001 #endif
9002
9003 ; return 0; }
9004 EOF
9005 if { (eval echo configure:9006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9006   rm -rf conftest*
9007   eval "ac_cv_func_dlopen=yes"
9008 else
9009   echo "configure: failed program was:" >&5
9010   cat conftest.$ac_ext >&5
9011   rm -rf conftest*
9012   eval "ac_cv_func_dlopen=no"
9013 fi
9014 rm -f conftest*
9015 fi
9016
9017 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
9018   echo "$ac_t""yes" 1>&6
9019   :
9020 else
9021   echo "$ac_t""no" 1>&6
9022 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9023 echo "configure:9024: checking for dlopen in -ldl" >&5
9024 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9025 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9026   echo $ac_n "(cached) $ac_c" 1>&6
9027 else
9028   ac_save_LIBS="$LIBS"
9029 LIBS="-ldl  $LIBS"
9030 cat > conftest.$ac_ext <<EOF
9031 #line 9032 "configure"
9032 #include "confdefs.h"
9033 /* Override any gcc2 internal prototype to avoid an error.  */
9034 /* We use char because int might match the return type of a gcc2
9035     builtin and then its argument prototype would still apply.  */
9036 char dlopen();
9037
9038 int main() {
9039 dlopen()
9040 ; return 0; }
9041 EOF
9042 if { (eval echo configure:9043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9043   rm -rf conftest*
9044   eval "ac_cv_lib_$ac_lib_var=yes"
9045 else
9046   echo "configure: failed program was:" >&5
9047   cat conftest.$ac_ext >&5
9048   rm -rf conftest*
9049   eval "ac_cv_lib_$ac_lib_var=no"
9050 fi
9051 rm -f conftest*
9052 LIBS="$ac_save_LIBS"
9053
9054 fi
9055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9056   echo "$ac_t""yes" 1>&6
9057     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9058     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9059   cat >> confdefs.h <<EOF
9060 #define $ac_tr_lib 1
9061 EOF
9062
9063   LIBS="-ldl $LIBS"
9064
9065 else
9066   echo "$ac_t""no" 1>&6
9067 fi
9068
9069 fi
9070
9071
9072 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9073 echo "configure:9074: checking for sigset in -lV3" >&5
9074 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9075 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9076   echo $ac_n "(cached) $ac_c" 1>&6
9077 else
9078   ac_save_LIBS="$LIBS"
9079 LIBS="-lV3  $LIBS"
9080 cat > conftest.$ac_ext <<EOF
9081 #line 9082 "configure"
9082 #include "confdefs.h"
9083 /* Override any gcc2 internal prototype to avoid an error.  */
9084 /* We use char because int might match the return type of a gcc2
9085     builtin and then its argument prototype would still apply.  */
9086 char sigset();
9087
9088 int main() {
9089 sigset()
9090 ; return 0; }
9091 EOF
9092 if { (eval echo configure:9093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9093   rm -rf conftest*
9094   eval "ac_cv_lib_$ac_lib_var=yes"
9095 else
9096   echo "configure: failed program was:" >&5
9097   cat conftest.$ac_ext >&5
9098   rm -rf conftest*
9099   eval "ac_cv_lib_$ac_lib_var=no"
9100 fi
9101 rm -f conftest*
9102 LIBS="$ac_save_LIBS"
9103
9104 fi
9105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9106   echo "$ac_t""yes" 1>&6
9107     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9108     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9109   cat >> confdefs.h <<EOF
9110 #define $ac_tr_lib 1
9111 EOF
9112
9113   LIBS="-lV3 $LIBS"
9114
9115 else
9116   echo "$ac_t""no" 1>&6
9117 fi
9118
9119
9120 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9121 echo "configure:9122: checking for winsock" >&5
9122 save_LIBS="$LIBS"
9123 for curlib in ws2_32 wsock32; do
9124         LIBS="$LIBS -l$curlib"
9125         cat > conftest.$ac_ext <<EOF
9126 #line 9127 "configure"
9127 #include "confdefs.h"
9128
9129                         char socket@12();
9130                         char select@20();
9131                         char closesocket@4();
9132                         char gethostname@8();
9133                         
9134 int main() {
9135
9136                         socket@12();
9137                         select@20();
9138                         closesocket@4();
9139                         gethostname@8();
9140                         
9141 ; return 0; }
9142 EOF
9143 if { (eval echo configure:9144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9144   rm -rf conftest*
9145   have_winsock=yes
9146 else
9147   echo "configure: failed program was:" >&5
9148   cat conftest.$ac_ext >&5
9149   rm -rf conftest*
9150   have_winsock=no
9151 fi
9152 rm -f conftest*
9153
9154         if test $have_winsock = yes; then
9155                 cat >> confdefs.h <<\EOF
9156 #define HAVE_WINSOCK 1
9157 EOF
9158
9159                 ac_cv_func_socket=yes
9160                 ac_cv_func_select=yes
9161                 ac_cv_func_closesocket=yes
9162                 ac_cv_func_gethostname=yes
9163                 if test $curlib = ws2_32; then
9164                         have_winsock=winsock2
9165                         cat >> confdefs.h <<\EOF
9166 #define HAVE_WINSOCK2 1
9167 EOF
9168
9169                 fi
9170                 break
9171         fi
9172         LIBS="$save_LIBS"
9173 done
9174 echo "$ac_t""$have_winsock" 1>&6
9175
9176
9177 echo $ac_n "checking for socket""... $ac_c" 1>&6
9178 echo "configure:9179: checking for socket" >&5
9179 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9180   echo $ac_n "(cached) $ac_c" 1>&6
9181 else
9182   cat > conftest.$ac_ext <<EOF
9183 #line 9184 "configure"
9184 #include "confdefs.h"
9185 /* System header to define __stub macros and hopefully few prototypes,
9186     which can conflict with char socket(); below.  */
9187 #include <assert.h>
9188 /* Override any gcc2 internal prototype to avoid an error.  */
9189 /* We use char because int might match the return type of a gcc2
9190     builtin and then its argument prototype would still apply.  */
9191 char socket();
9192 char (*f)();
9193
9194 int main() {
9195
9196 /* The GNU C library defines this for functions which it implements
9197     to always fail with ENOSYS.  Some functions are actually named
9198     something starting with __ and the normal name is an alias.  */
9199 #if defined (__stub_socket) || defined (__stub___socket)
9200 choke me
9201 #else
9202 f = socket;
9203 #endif
9204
9205 ; return 0; }
9206 EOF
9207 if { (eval echo configure:9208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9208   rm -rf conftest*
9209   eval "ac_cv_func_socket=yes"
9210 else
9211   echo "configure: failed program was:" >&5
9212   cat conftest.$ac_ext >&5
9213   rm -rf conftest*
9214   eval "ac_cv_func_socket=no"
9215 fi
9216 rm -f conftest*
9217 fi
9218
9219 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9220   echo "$ac_t""yes" 1>&6
9221   :
9222 else
9223   echo "$ac_t""no" 1>&6
9224         
9225         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9226 echo "configure:9227: checking for main in -lsocket" >&5
9227 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9228 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9229   echo $ac_n "(cached) $ac_c" 1>&6
9230 else
9231   ac_save_LIBS="$LIBS"
9232 LIBS="-lsocket  $LIBS"
9233 cat > conftest.$ac_ext <<EOF
9234 #line 9235 "configure"
9235 #include "confdefs.h"
9236
9237 int main() {
9238 main()
9239 ; return 0; }
9240 EOF
9241 if { (eval echo configure:9242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9242   rm -rf conftest*
9243   eval "ac_cv_lib_$ac_lib_var=yes"
9244 else
9245   echo "configure: failed program was:" >&5
9246   cat conftest.$ac_ext >&5
9247   rm -rf conftest*
9248   eval "ac_cv_lib_$ac_lib_var=no"
9249 fi
9250 rm -f conftest*
9251 LIBS="$ac_save_LIBS"
9252
9253 fi
9254 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9255   echo "$ac_t""yes" 1>&6
9256     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9257     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9258   cat >> confdefs.h <<EOF
9259 #define $ac_tr_lib 1
9260 EOF
9261
9262   LIBS="-lsocket $LIBS"
9263
9264 else
9265   echo "$ac_t""no" 1>&6
9266 fi
9267
9268         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9269 echo "configure:9270: checking for main in -lnet" >&5
9270 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9271 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9272   echo $ac_n "(cached) $ac_c" 1>&6
9273 else
9274   ac_save_LIBS="$LIBS"
9275 LIBS="-lnet  $LIBS"
9276 cat > conftest.$ac_ext <<EOF
9277 #line 9278 "configure"
9278 #include "confdefs.h"
9279
9280 int main() {
9281 main()
9282 ; return 0; }
9283 EOF
9284 if { (eval echo configure:9285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9285   rm -rf conftest*
9286   eval "ac_cv_lib_$ac_lib_var=yes"
9287 else
9288   echo "configure: failed program was:" >&5
9289   cat conftest.$ac_ext >&5
9290   rm -rf conftest*
9291   eval "ac_cv_lib_$ac_lib_var=no"
9292 fi
9293 rm -f conftest*
9294 LIBS="$ac_save_LIBS"
9295
9296 fi
9297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9298   echo "$ac_t""yes" 1>&6
9299     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9300     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9301   cat >> confdefs.h <<EOF
9302 #define $ac_tr_lib 1
9303 EOF
9304
9305   LIBS="-lnet $LIBS"
9306
9307 else
9308   echo "$ac_t""no" 1>&6
9309 fi
9310
9311         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9312 echo "configure:9313: checking for main in -lnsl_s" >&5
9313 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9314 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9315   echo $ac_n "(cached) $ac_c" 1>&6
9316 else
9317   ac_save_LIBS="$LIBS"
9318 LIBS="-lnsl_s  $LIBS"
9319 cat > conftest.$ac_ext <<EOF
9320 #line 9321 "configure"
9321 #include "confdefs.h"
9322
9323 int main() {
9324 main()
9325 ; return 0; }
9326 EOF
9327 if { (eval echo configure:9328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9328   rm -rf conftest*
9329   eval "ac_cv_lib_$ac_lib_var=yes"
9330 else
9331   echo "configure: failed program was:" >&5
9332   cat conftest.$ac_ext >&5
9333   rm -rf conftest*
9334   eval "ac_cv_lib_$ac_lib_var=no"
9335 fi
9336 rm -f conftest*
9337 LIBS="$ac_save_LIBS"
9338
9339 fi
9340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9341   echo "$ac_t""yes" 1>&6
9342     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9343     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9344   cat >> confdefs.h <<EOF
9345 #define $ac_tr_lib 1
9346 EOF
9347
9348   LIBS="-lnsl_s $LIBS"
9349
9350 else
9351   echo "$ac_t""no" 1>&6
9352 fi
9353
9354         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9355 echo "configure:9356: checking for main in -lnsl" >&5
9356 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9357 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9358   echo $ac_n "(cached) $ac_c" 1>&6
9359 else
9360   ac_save_LIBS="$LIBS"
9361 LIBS="-lnsl  $LIBS"
9362 cat > conftest.$ac_ext <<EOF
9363 #line 9364 "configure"
9364 #include "confdefs.h"
9365
9366 int main() {
9367 main()
9368 ; return 0; }
9369 EOF
9370 if { (eval echo configure:9371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9371   rm -rf conftest*
9372   eval "ac_cv_lib_$ac_lib_var=yes"
9373 else
9374   echo "configure: failed program was:" >&5
9375   cat conftest.$ac_ext >&5
9376   rm -rf conftest*
9377   eval "ac_cv_lib_$ac_lib_var=no"
9378 fi
9379 rm -f conftest*
9380 LIBS="$ac_save_LIBS"
9381
9382 fi
9383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9384   echo "$ac_t""yes" 1>&6
9385     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9386     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9387   cat >> confdefs.h <<EOF
9388 #define $ac_tr_lib 1
9389 EOF
9390
9391   LIBS="-lnsl $LIBS"
9392
9393 else
9394   echo "$ac_t""no" 1>&6
9395 fi
9396
9397         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9398 echo "configure:9399: checking for socket in -linet" >&5
9399 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9400 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9401   echo $ac_n "(cached) $ac_c" 1>&6
9402 else
9403   ac_save_LIBS="$LIBS"
9404 LIBS="-linet  $LIBS"
9405 cat > conftest.$ac_ext <<EOF
9406 #line 9407 "configure"
9407 #include "confdefs.h"
9408 /* Override any gcc2 internal prototype to avoid an error.  */
9409 /* We use char because int might match the return type of a gcc2
9410     builtin and then its argument prototype would still apply.  */
9411 char socket();
9412
9413 int main() {
9414 socket()
9415 ; return 0; }
9416 EOF
9417 if { (eval echo configure:9418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9418   rm -rf conftest*
9419   eval "ac_cv_lib_$ac_lib_var=yes"
9420 else
9421   echo "configure: failed program was:" >&5
9422   cat conftest.$ac_ext >&5
9423   rm -rf conftest*
9424   eval "ac_cv_lib_$ac_lib_var=no"
9425 fi
9426 rm -f conftest*
9427 LIBS="$ac_save_LIBS"
9428
9429 fi
9430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9431   echo "$ac_t""yes" 1>&6
9432     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9433     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9434   cat >> confdefs.h <<EOF
9435 #define $ac_tr_lib 1
9436 EOF
9437
9438   LIBS="-linet $LIBS"
9439
9440 else
9441   echo "$ac_t""no" 1>&6
9442 fi
9443
9444         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9445 echo "configure:9446: checking for main in -lgen" >&5
9446 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9447 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9448   echo $ac_n "(cached) $ac_c" 1>&6
9449 else
9450   ac_save_LIBS="$LIBS"
9451 LIBS="-lgen  $LIBS"
9452 cat > conftest.$ac_ext <<EOF
9453 #line 9454 "configure"
9454 #include "confdefs.h"
9455
9456 int main() {
9457 main()
9458 ; return 0; }
9459 EOF
9460 if { (eval echo configure:9461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9461   rm -rf conftest*
9462   eval "ac_cv_lib_$ac_lib_var=yes"
9463 else
9464   echo "configure: failed program was:" >&5
9465   cat conftest.$ac_ext >&5
9466   rm -rf conftest*
9467   eval "ac_cv_lib_$ac_lib_var=no"
9468 fi
9469 rm -f conftest*
9470 LIBS="$ac_save_LIBS"
9471
9472 fi
9473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9474   echo "$ac_t""yes" 1>&6
9475     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9476     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9477   cat >> confdefs.h <<EOF
9478 #define $ac_tr_lib 1
9479 EOF
9480
9481   LIBS="-lgen $LIBS"
9482
9483 else
9484   echo "$ac_t""no" 1>&6
9485 fi
9486
9487
9488 fi
9489
9490
9491 echo $ac_n "checking for select""... $ac_c" 1>&6
9492 echo "configure:9493: checking for select" >&5
9493 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9494   echo $ac_n "(cached) $ac_c" 1>&6
9495 else
9496   cat > conftest.$ac_ext <<EOF
9497 #line 9498 "configure"
9498 #include "confdefs.h"
9499 /* System header to define __stub macros and hopefully few prototypes,
9500     which can conflict with char select(); below.  */
9501 #include <assert.h>
9502 /* Override any gcc2 internal prototype to avoid an error.  */
9503 /* We use char because int might match the return type of a gcc2
9504     builtin and then its argument prototype would still apply.  */
9505 char select();
9506 char (*f)();
9507
9508 int main() {
9509
9510 /* The GNU C library defines this for functions which it implements
9511     to always fail with ENOSYS.  Some functions are actually named
9512     something starting with __ and the normal name is an alias.  */
9513 #if defined (__stub_select) || defined (__stub___select)
9514 choke me
9515 #else
9516 f = select;
9517 #endif
9518
9519 ; return 0; }
9520 EOF
9521 if { (eval echo configure:9522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9522   rm -rf conftest*
9523   eval "ac_cv_func_select=yes"
9524 else
9525   echo "configure: failed program was:" >&5
9526   cat conftest.$ac_ext >&5
9527   rm -rf conftest*
9528   eval "ac_cv_func_select=no"
9529 fi
9530 rm -f conftest*
9531 fi
9532
9533 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9534   echo "$ac_t""yes" 1>&6
9535   :
9536 else
9537   echo "$ac_t""no" 1>&6
9538 { echo "configure: error: select() required." 1>&2; exit 1; }
9539 fi
9540
9541
9542 if test "${ac_cv_header_winsock_h}" != yes; then
9543                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9544 echo "configure:9545: checking types of arguments for select()" >&5
9545  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9546   echo $ac_n "(cached) $ac_c" 1>&6
9547 else
9548    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9549   echo $ac_n "(cached) $ac_c" 1>&6
9550 else
9551     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9552   echo $ac_n "(cached) $ac_c" 1>&6
9553 else
9554      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9555      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9556       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9557        cat > conftest.$ac_ext <<EOF
9558 #line 9559 "configure"
9559 #include "confdefs.h"
9560 #ifdef HAVE_SYS_TYPES_H
9561 #include <sys/types.h>
9562 #endif
9563 #ifdef HAVE_SYS_TIME_H
9564 #include <sys/time.h>
9565 #endif
9566 #ifdef HAVE_SYS_SELECT_H
9567 #include <sys/select.h>
9568 #endif
9569 #ifdef HAVE_SYS_SOCKET_H
9570 #include <sys/socket.h>
9571 #endif
9572 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);
9573 int main() {
9574
9575 ; return 0; }
9576 EOF
9577 if { (eval echo configure:9578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9578   rm -rf conftest*
9579           ac_not_found=no ; break 3
9580 else
9581   echo "configure: failed program was:" >&5
9582   cat conftest.$ac_ext >&5
9583   rm -rf conftest*
9584   ac_not_found=yes
9585 fi
9586 rm -f conftest*
9587       done
9588      done
9589     done
9590    
9591 fi
9592   
9593 fi
9594  
9595 fi
9596  if test "$ac_not_found" = yes; then
9597   ac_cv_func_select_arg1=int 
9598   ac_cv_func_select_arg234='int *' 
9599   ac_cv_func_select_arg5='struct timeval *'
9600  fi
9601  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9602  cat >> confdefs.h <<EOF
9603 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9604 EOF
9605
9606  cat >> confdefs.h <<EOF
9607 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9608 EOF
9609
9610  cat >> confdefs.h <<EOF
9611 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9612 EOF
9613
9614
9615 fi
9616
9617
9618 for ac_hdr in regex.h 
9619 do
9620 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9621 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9622 echo "configure:9623: checking for $ac_hdr" >&5
9623 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9624   echo $ac_n "(cached) $ac_c" 1>&6
9625 else
9626   cat > conftest.$ac_ext <<EOF
9627 #line 9628 "configure"
9628 #include "confdefs.h"
9629 #include <$ac_hdr>
9630 EOF
9631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9632 { (eval echo configure:9633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9634 if test -z "$ac_err"; then
9635   rm -rf conftest*
9636   eval "ac_cv_header_$ac_safe=yes"
9637 else
9638   echo "$ac_err" >&5
9639   echo "configure: failed program was:" >&5
9640   cat conftest.$ac_ext >&5
9641   rm -rf conftest*
9642   eval "ac_cv_header_$ac_safe=no"
9643 fi
9644 rm -f conftest*
9645 fi
9646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9647   echo "$ac_t""yes" 1>&6
9648     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9649   cat >> confdefs.h <<EOF
9650 #define $ac_tr_hdr 1
9651 EOF
9652  
9653 else
9654   echo "$ac_t""no" 1>&6
9655 fi
9656 done
9657
9658 if test "$ac_cv_header_regex_h" != yes ; then
9659         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9660 fi
9661
9662 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9663 echo "configure:9664: checking for library containing regfree" >&5
9664 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9665   echo $ac_n "(cached) $ac_c" 1>&6
9666 else
9667   ac_func_search_save_LIBS="$LIBS"
9668 ac_cv_search_regfree="no"
9669 cat > conftest.$ac_ext <<EOF
9670 #line 9671 "configure"
9671 #include "confdefs.h"
9672 /* Override any gcc2 internal prototype to avoid an error.  */
9673 /* We use char because int might match the return type of a gcc2
9674     builtin and then its argument prototype would still apply.  */
9675 char regfree();
9676
9677 int main() {
9678 regfree()
9679 ; return 0; }
9680 EOF
9681 if { (eval echo configure:9682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9682   rm -rf conftest*
9683   ac_cv_search_regfree="none required"
9684 else
9685   echo "configure: failed program was:" >&5
9686   cat conftest.$ac_ext >&5
9687 fi
9688 rm -f conftest*
9689 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9690 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9691 cat > conftest.$ac_ext <<EOF
9692 #line 9693 "configure"
9693 #include "confdefs.h"
9694 /* Override any gcc2 internal prototype to avoid an error.  */
9695 /* We use char because int might match the return type of a gcc2
9696     builtin and then its argument prototype would still apply.  */
9697 char regfree();
9698
9699 int main() {
9700 regfree()
9701 ; return 0; }
9702 EOF
9703 if { (eval echo configure:9704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9704   rm -rf conftest*
9705   ac_cv_search_regfree="-l$ac_lib"
9706 break
9707 else
9708   echo "configure: failed program was:" >&5
9709   cat conftest.$ac_ext >&5
9710 fi
9711 rm -f conftest*
9712 done
9713 LIBS="$ac_func_search_save_LIBS"
9714 fi
9715
9716 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9717 if test "$ac_cv_search_regfree" != "no"; then
9718   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9719   :
9720 else :
9721   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9722 fi
9723
9724
9725 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9726 echo "configure:9727: checking for compatible POSIX regex" >&5
9727 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9728   echo $ac_n "(cached) $ac_c" 1>&6
9729 else
9730   
9731         if test "$cross_compiling" = yes; then
9732   ol_cv_c_posix_regex=cross
9733 else
9734   cat > conftest.$ac_ext <<EOF
9735 #line 9736 "configure"
9736 #include "confdefs.h"
9737
9738 #include <sys/types.h>
9739 #include <regex.h>
9740 static char *pattern, *string;
9741 main()
9742 {
9743         int rc;
9744         regex_t re;
9745
9746         pattern = "^A";
9747
9748         if(regcomp(&re, pattern, 0)) {
9749                 return -1;
9750         }
9751         
9752         string = "ALL MATCH";
9753         
9754         rc = regexec(&re, string, 0, (void*)0, 0);
9755
9756         regfree(&re);
9757
9758         return rc;
9759 }
9760 EOF
9761 if { (eval echo configure:9762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9762 then
9763   ol_cv_c_posix_regex=yes
9764 else
9765   echo "configure: failed program was:" >&5
9766   cat conftest.$ac_ext >&5
9767   rm -fr conftest*
9768   ol_cv_c_posix_regex=no
9769 fi
9770 rm -fr conftest*
9771 fi
9772
9773 fi
9774
9775 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9776
9777 if test "$ol_cv_c_posix_regex" = no ; then
9778         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9779 fi
9780
9781
9782 have_uuid=no
9783 for ac_hdr in sys/uuid.h
9784 do
9785 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9786 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9787 echo "configure:9788: checking for $ac_hdr" >&5
9788 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9789   echo $ac_n "(cached) $ac_c" 1>&6
9790 else
9791   cat > conftest.$ac_ext <<EOF
9792 #line 9793 "configure"
9793 #include "confdefs.h"
9794 #include <$ac_hdr>
9795 EOF
9796 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9797 { (eval echo configure:9798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9798 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9799 if test -z "$ac_err"; then
9800   rm -rf conftest*
9801   eval "ac_cv_header_$ac_safe=yes"
9802 else
9803   echo "$ac_err" >&5
9804   echo "configure: failed program was:" >&5
9805   cat conftest.$ac_ext >&5
9806   rm -rf conftest*
9807   eval "ac_cv_header_$ac_safe=no"
9808 fi
9809 rm -f conftest*
9810 fi
9811 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9812   echo "$ac_t""yes" 1>&6
9813     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9814   cat >> confdefs.h <<EOF
9815 #define $ac_tr_hdr 1
9816 EOF
9817  
9818 else
9819   echo "$ac_t""no" 1>&6
9820 fi
9821 done
9822
9823 if test $ac_cv_header_sys_uuid_h = yes ; then
9824         save_LIBS="$LIBS"
9825         
9826 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9827 echo "configure:9828: checking for library containing uuid_to_str" >&5
9828 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9829   echo $ac_n "(cached) $ac_c" 1>&6
9830 else
9831   ac_func_search_save_LIBS="$LIBS"
9832 ac_cv_search_uuid_to_str="no"
9833 cat > conftest.$ac_ext <<EOF
9834 #line 9835 "configure"
9835 #include "confdefs.h"
9836 /* Override any gcc2 internal prototype to avoid an error.  */
9837 /* We use char because int might match the return type of a gcc2
9838     builtin and then its argument prototype would still apply.  */
9839 char uuid_to_str();
9840
9841 int main() {
9842 uuid_to_str()
9843 ; return 0; }
9844 EOF
9845 if { (eval echo configure:9846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9846   rm -rf conftest*
9847   ac_cv_search_uuid_to_str="none required"
9848 else
9849   echo "configure: failed program was:" >&5
9850   cat conftest.$ac_ext >&5
9851 fi
9852 rm -f conftest*
9853 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9854 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9855 cat > conftest.$ac_ext <<EOF
9856 #line 9857 "configure"
9857 #include "confdefs.h"
9858 /* Override any gcc2 internal prototype to avoid an error.  */
9859 /* We use char because int might match the return type of a gcc2
9860     builtin and then its argument prototype would still apply.  */
9861 char uuid_to_str();
9862
9863 int main() {
9864 uuid_to_str()
9865 ; return 0; }
9866 EOF
9867 if { (eval echo configure:9868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9868   rm -rf conftest*
9869   ac_cv_search_uuid_to_str="-l$ac_lib"
9870 break
9871 else
9872   echo "configure: failed program was:" >&5
9873   cat conftest.$ac_ext >&5
9874 fi
9875 rm -f conftest*
9876 done
9877 LIBS="$ac_func_search_save_LIBS"
9878 fi
9879
9880 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9881 if test "$ac_cv_search_uuid_to_str" != "no"; then
9882   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9883   have_uuid=yes
9884 else :
9885   :
9886 fi
9887         LIBS="$save_LIBS"
9888
9889         if test have_uuid = yes ; then
9890                 cat >> confdefs.h <<\EOF
9891 #define HAVE_UUID_TO_STR 1
9892 EOF
9893
9894
9895                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9896                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9897         fi
9898 fi
9899
9900 if test $have_uuid = no ; then
9901         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9902 echo "configure:9903: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9903         save_LIBS="$LIBS"
9904         LIBS="$LIBS -lrpcrt4"
9905         cat > conftest.$ac_ext <<EOF
9906 #line 9907 "configure"
9907 #include "confdefs.h"
9908
9909                 char UuidCreate@4();
9910                 char UuidToStringA@8();
9911                 
9912 int main() {
9913
9914                 UuidCreate@4();
9915                 UuidToStringA@8();
9916                 
9917 ; return 0; }
9918 EOF
9919 if { (eval echo configure:9920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9920   rm -rf conftest*
9921   need_rpcrt=yes
9922 else
9923   echo "configure: failed program was:" >&5
9924   cat conftest.$ac_ext >&5
9925   rm -rf conftest*
9926   need_rpcrt=no
9927 fi
9928 rm -f conftest*
9929         if test $need_rpcrt = yes; then
9930                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9931         fi
9932         LIBS="$save_LIBS"
9933         echo "$ac_t""$need_rpcrt" 1>&6
9934 fi
9935
9936 ol_link_dnssrv=no
9937 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9938 echo "configure:9939: checking for res_query" >&5
9939 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9940   echo $ac_n "(cached) $ac_c" 1>&6
9941 else
9942   cat > conftest.$ac_ext <<EOF
9943 #line 9944 "configure"
9944 #include "confdefs.h"
9945 /* System header to define __stub macros and hopefully few prototypes,
9946     which can conflict with char res_query(); below.  */
9947 #include <assert.h>
9948 /* Override any gcc2 internal prototype to avoid an error.  */
9949 /* We use char because int might match the return type of a gcc2
9950     builtin and then its argument prototype would still apply.  */
9951 char res_query();
9952 char (*f)();
9953
9954 int main() {
9955
9956 /* The GNU C library defines this for functions which it implements
9957     to always fail with ENOSYS.  Some functions are actually named
9958     something starting with __ and the normal name is an alias.  */
9959 #if defined (__stub_res_query) || defined (__stub___res_query)
9960 choke me
9961 #else
9962 f = res_query;
9963 #endif
9964
9965 ; return 0; }
9966 EOF
9967 if { (eval echo configure:9968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9968   rm -rf conftest*
9969   eval "ac_cv_func_res_query=yes"
9970 else
9971   echo "configure: failed program was:" >&5
9972   cat conftest.$ac_ext >&5
9973   rm -rf conftest*
9974   eval "ac_cv_func_res_query=no"
9975 fi
9976 rm -f conftest*
9977 fi
9978
9979 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9980   echo "$ac_t""yes" 1>&6
9981   :
9982 else
9983   echo "$ac_t""no" 1>&6
9984 fi
9985
9986 if test $ac_cv_func_res_query = no ; then 
9987         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9988 echo "configure:9989: checking for __res_query" >&5
9989 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9990   echo $ac_n "(cached) $ac_c" 1>&6
9991 else
9992   cat > conftest.$ac_ext <<EOF
9993 #line 9994 "configure"
9994 #include "confdefs.h"
9995 /* System header to define __stub macros and hopefully few prototypes,
9996     which can conflict with char __res_query(); below.  */
9997 #include <assert.h>
9998 /* Override any gcc2 internal prototype to avoid an error.  */
9999 /* We use char because int might match the return type of a gcc2
10000     builtin and then its argument prototype would still apply.  */
10001 char __res_query();
10002 char (*f)();
10003
10004 int main() {
10005
10006 /* The GNU C library defines this for functions which it implements
10007     to always fail with ENOSYS.  Some functions are actually named
10008     something starting with __ and the normal name is an alias.  */
10009 #if defined (__stub___res_query) || defined (__stub_____res_query)
10010 choke me
10011 #else
10012 f = __res_query;
10013 #endif
10014
10015 ; return 0; }
10016 EOF
10017 if { (eval echo configure:10018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10018   rm -rf conftest*
10019   eval "ac_cv_func___res_query=yes"
10020 else
10021   echo "configure: failed program was:" >&5
10022   cat conftest.$ac_ext >&5
10023   rm -rf conftest*
10024   eval "ac_cv_func___res_query=no"
10025 fi
10026 rm -f conftest*
10027 fi
10028
10029 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10030   echo "$ac_t""yes" 1>&6
10031   :
10032 else
10033   echo "$ac_t""no" 1>&6
10034 fi
10035
10036         ac_cv_func_res_query=$ac_cv_func___res_query
10037 fi
10038
10039 if test $ac_cv_func_res_query = no ; then 
10040         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10041 echo "configure:10042: checking for res_query in -lbind" >&5
10042 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10043 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10044   echo $ac_n "(cached) $ac_c" 1>&6
10045 else
10046   ac_save_LIBS="$LIBS"
10047 LIBS="-lbind  $LIBS"
10048 cat > conftest.$ac_ext <<EOF
10049 #line 10050 "configure"
10050 #include "confdefs.h"
10051 /* Override any gcc2 internal prototype to avoid an error.  */
10052 /* We use char because int might match the return type of a gcc2
10053     builtin and then its argument prototype would still apply.  */
10054 char res_query();
10055
10056 int main() {
10057 res_query()
10058 ; return 0; }
10059 EOF
10060 if { (eval echo configure:10061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10061   rm -rf conftest*
10062   eval "ac_cv_lib_$ac_lib_var=yes"
10063 else
10064   echo "configure: failed program was:" >&5
10065   cat conftest.$ac_ext >&5
10066   rm -rf conftest*
10067   eval "ac_cv_lib_$ac_lib_var=no"
10068 fi
10069 rm -f conftest*
10070 LIBS="$ac_save_LIBS"
10071
10072 fi
10073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10074   echo "$ac_t""yes" 1>&6
10075     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10076     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10077   cat >> confdefs.h <<EOF
10078 #define $ac_tr_lib 1
10079 EOF
10080
10081   LIBS="-lbind $LIBS"
10082
10083 else
10084   echo "$ac_t""no" 1>&6
10085 fi
10086
10087         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10088 fi
10089
10090 if test $ac_cv_func_res_query = no ; then 
10091         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10092 echo "configure:10093: checking for __res_query in -lbind" >&5
10093 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10094 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10095   echo $ac_n "(cached) $ac_c" 1>&6
10096 else
10097   ac_save_LIBS="$LIBS"
10098 LIBS="-lbind  $LIBS"
10099 cat > conftest.$ac_ext <<EOF
10100 #line 10101 "configure"
10101 #include "confdefs.h"
10102 /* Override any gcc2 internal prototype to avoid an error.  */
10103 /* We use char because int might match the return type of a gcc2
10104     builtin and then its argument prototype would still apply.  */
10105 char __res_query();
10106
10107 int main() {
10108 __res_query()
10109 ; return 0; }
10110 EOF
10111 if { (eval echo configure:10112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10112   rm -rf conftest*
10113   eval "ac_cv_lib_$ac_lib_var=yes"
10114 else
10115   echo "configure: failed program was:" >&5
10116   cat conftest.$ac_ext >&5
10117   rm -rf conftest*
10118   eval "ac_cv_lib_$ac_lib_var=no"
10119 fi
10120 rm -f conftest*
10121 LIBS="$ac_save_LIBS"
10122
10123 fi
10124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10125   echo "$ac_t""yes" 1>&6
10126     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10127     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10128   cat >> confdefs.h <<EOF
10129 #define $ac_tr_lib 1
10130 EOF
10131
10132   LIBS="-lbind $LIBS"
10133
10134 else
10135   echo "$ac_t""no" 1>&6
10136 fi
10137
10138         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10139 fi
10140
10141 if test $ac_cv_func_res_query = no ; then 
10142         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10143 echo "configure:10144: checking for res_query in -lresolv" >&5
10144 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10145 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10146   echo $ac_n "(cached) $ac_c" 1>&6
10147 else
10148   ac_save_LIBS="$LIBS"
10149 LIBS="-lresolv  $LIBS"
10150 cat > conftest.$ac_ext <<EOF
10151 #line 10152 "configure"
10152 #include "confdefs.h"
10153 /* Override any gcc2 internal prototype to avoid an error.  */
10154 /* We use char because int might match the return type of a gcc2
10155     builtin and then its argument prototype would still apply.  */
10156 char res_query();
10157
10158 int main() {
10159 res_query()
10160 ; return 0; }
10161 EOF
10162 if { (eval echo configure:10163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10163   rm -rf conftest*
10164   eval "ac_cv_lib_$ac_lib_var=yes"
10165 else
10166   echo "configure: failed program was:" >&5
10167   cat conftest.$ac_ext >&5
10168   rm -rf conftest*
10169   eval "ac_cv_lib_$ac_lib_var=no"
10170 fi
10171 rm -f conftest*
10172 LIBS="$ac_save_LIBS"
10173
10174 fi
10175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10176   echo "$ac_t""yes" 1>&6
10177     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10178     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10179   cat >> confdefs.h <<EOF
10180 #define $ac_tr_lib 1
10181 EOF
10182
10183   LIBS="-lresolv $LIBS"
10184
10185 else
10186   echo "$ac_t""no" 1>&6
10187 fi
10188
10189         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10190 fi
10191
10192 if test $ac_cv_func_res_query = no ; then 
10193         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10194 echo "configure:10195: checking for __res_query in -lresolv" >&5
10195 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10196 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10197   echo $ac_n "(cached) $ac_c" 1>&6
10198 else
10199   ac_save_LIBS="$LIBS"
10200 LIBS="-lresolv  $LIBS"
10201 cat > conftest.$ac_ext <<EOF
10202 #line 10203 "configure"
10203 #include "confdefs.h"
10204 /* Override any gcc2 internal prototype to avoid an error.  */
10205 /* We use char because int might match the return type of a gcc2
10206     builtin and then its argument prototype would still apply.  */
10207 char __res_query();
10208
10209 int main() {
10210 __res_query()
10211 ; return 0; }
10212 EOF
10213 if { (eval echo configure:10214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10214   rm -rf conftest*
10215   eval "ac_cv_lib_$ac_lib_var=yes"
10216 else
10217   echo "configure: failed program was:" >&5
10218   cat conftest.$ac_ext >&5
10219   rm -rf conftest*
10220   eval "ac_cv_lib_$ac_lib_var=no"
10221 fi
10222 rm -f conftest*
10223 LIBS="$ac_save_LIBS"
10224
10225 fi
10226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10227   echo "$ac_t""yes" 1>&6
10228     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10229     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10230   cat >> confdefs.h <<EOF
10231 #define $ac_tr_lib 1
10232 EOF
10233
10234   LIBS="-lresolv $LIBS"
10235
10236 else
10237   echo "$ac_t""no" 1>&6
10238 fi
10239
10240         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10241 fi
10242
10243 if test "$ac_cv_func_res_query" = yes ; then
10244         cat >> confdefs.h <<\EOF
10245 #define HAVE_RES_QUERY 1
10246 EOF
10247
10248
10249         if test $ol_enable_dnssrv != no ; then
10250                 ol_link_dnssrv=yes
10251         fi
10252 fi
10253
10254 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10255         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10256 fi
10257
10258 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10259 do
10260 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10261 echo "configure:10262: checking for $ac_func" >&5
10262 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10263   echo $ac_n "(cached) $ac_c" 1>&6
10264 else
10265   cat > conftest.$ac_ext <<EOF
10266 #line 10267 "configure"
10267 #include "confdefs.h"
10268 /* System header to define __stub macros and hopefully few prototypes,
10269     which can conflict with char $ac_func(); below.  */
10270 #include <assert.h>
10271 /* Override any gcc2 internal prototype to avoid an error.  */
10272 /* We use char because int might match the return type of a gcc2
10273     builtin and then its argument prototype would still apply.  */
10274 char $ac_func();
10275 char (*f)();
10276
10277 int main() {
10278
10279 /* The GNU C library defines this for functions which it implements
10280     to always fail with ENOSYS.  Some functions are actually named
10281     something starting with __ and the normal name is an alias.  */
10282 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10283 choke me
10284 #else
10285 f = $ac_func;
10286 #endif
10287
10288 ; return 0; }
10289 EOF
10290 if { (eval echo configure:10291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10291   rm -rf conftest*
10292   eval "ac_cv_func_$ac_func=yes"
10293 else
10294   echo "configure: failed program was:" >&5
10295   cat conftest.$ac_ext >&5
10296   rm -rf conftest*
10297   eval "ac_cv_func_$ac_func=no"
10298 fi
10299 rm -f conftest*
10300 fi
10301
10302 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10303   echo "$ac_t""yes" 1>&6
10304     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10305   cat >> confdefs.h <<EOF
10306 #define $ac_tr_func 1
10307 EOF
10308  
10309 else
10310   echo "$ac_t""no" 1>&6
10311 fi
10312 done
10313
10314
10315 ol_link_ipv6=no
10316 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10317         if test $ol_enable_ipv6 = yes ; then
10318                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10319         fi
10320 elif test $ol_enable_ipv6 != no ; then
10321         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10322 echo "configure:10323: checking INET6_ADDRSTRLEN" >&5
10323 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10324   echo $ac_n "(cached) $ac_c" 1>&6
10325 else
10326   
10327                 cat > conftest.$ac_ext <<EOF
10328 #line 10329 "configure"
10329 #include "confdefs.h"
10330
10331 #                       include <netinet/in.h>
10332 #                       ifdef INET6_ADDRSTRLEN
10333                                 __has_inet6_addrstrlen__;
10334 #                       endif
10335                 
10336 EOF
10337 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10338   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10339   rm -rf conftest*
10340   ol_cv_inet6_addrstrlen=yes
10341 else
10342   rm -rf conftest*
10343   ol_cv_inet6_addrstrlen=no
10344 fi
10345 rm -f conftest*
10346
10347 fi
10348
10349 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10350
10351
10352         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10353 echo "configure:10354: checking struct sockaddr_storage" >&5
10354 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10355   echo $ac_n "(cached) $ac_c" 1>&6
10356 else
10357   
10358                 cat > conftest.$ac_ext <<EOF
10359 #line 10360 "configure"
10360 #include "confdefs.h"
10361
10362 #include <sys/types.h>
10363 #include <sys/socket.h>
10364
10365 int main() {
10366
10367                         struct sockaddr_storage ss;
10368
10369 ; return 0; }
10370 EOF
10371 if { (eval echo configure:10372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10372   rm -rf conftest*
10373   ol_cv_struct_sockaddr_storage=yes
10374 else
10375   echo "configure: failed program was:" >&5
10376   cat conftest.$ac_ext >&5
10377   rm -rf conftest*
10378   ol_cv_struct_sockaddr_storage=no
10379 fi
10380 rm -f conftest*
10381 fi
10382
10383 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10384
10385         if test $ol_cv_inet6_addrstrlen = yes \
10386                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10387                 ol_link_ipv6=yes
10388         elif test $ol_enable_ipv6 = yes \
10389                         -a $ol_cv_inet6_addrstrlen = no ; then
10390                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10391         elif test $ol_enable_ipv6 = yes \
10392                         -a $ol_cv_struct_sockaddr_storage = no ; then
10393                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10394         fi
10395 fi
10396
10397 if test $ol_enable_local != no ; then
10398         for ac_hdr in sys/un.h 
10399 do
10400 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10401 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10402 echo "configure:10403: checking for $ac_hdr" >&5
10403 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10404   echo $ac_n "(cached) $ac_c" 1>&6
10405 else
10406   cat > conftest.$ac_ext <<EOF
10407 #line 10408 "configure"
10408 #include "confdefs.h"
10409 #include <$ac_hdr>
10410 EOF
10411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10412 { (eval echo configure:10413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10414 if test -z "$ac_err"; then
10415   rm -rf conftest*
10416   eval "ac_cv_header_$ac_safe=yes"
10417 else
10418   echo "$ac_err" >&5
10419   echo "configure: failed program was:" >&5
10420   cat conftest.$ac_ext >&5
10421   rm -rf conftest*
10422   eval "ac_cv_header_$ac_safe=no"
10423 fi
10424 rm -f conftest*
10425 fi
10426 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10427   echo "$ac_t""yes" 1>&6
10428     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10429   cat >> confdefs.h <<EOF
10430 #define $ac_tr_hdr 1
10431 EOF
10432  
10433 else
10434   echo "$ac_t""no" 1>&6
10435 fi
10436 done
10437
10438
10439         if test $ol_enable_local = auto ; then
10440                 ol_enable_local=$ac_cv_header_sys_un_h
10441         elif test $ac_cv_header_sys_un_h = no ; then
10442                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10443         fi
10444 fi
10445
10446 ol_link_kbind=no
10447 ol_link_kpasswd=no
10448 ol_link_krb5=no
10449 ol_link_krb4=no
10450
10451 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10452         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10453         -o $ol_with_kerberos = k425 ; then
10454
10455         for ac_hdr in krb5.h
10456 do
10457 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10458 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10459 echo "configure:10460: checking for $ac_hdr" >&5
10460 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10461   echo $ac_n "(cached) $ac_c" 1>&6
10462 else
10463   cat > conftest.$ac_ext <<EOF
10464 #line 10465 "configure"
10465 #include "confdefs.h"
10466 #include <$ac_hdr>
10467 EOF
10468 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10469 { (eval echo configure:10470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10470 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10471 if test -z "$ac_err"; then
10472   rm -rf conftest*
10473   eval "ac_cv_header_$ac_safe=yes"
10474 else
10475   echo "$ac_err" >&5
10476   echo "configure: failed program was:" >&5
10477   cat conftest.$ac_ext >&5
10478   rm -rf conftest*
10479   eval "ac_cv_header_$ac_safe=no"
10480 fi
10481 rm -f conftest*
10482 fi
10483 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10484   echo "$ac_t""yes" 1>&6
10485     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10486   cat >> confdefs.h <<EOF
10487 #define $ac_tr_hdr 1
10488 EOF
10489  
10490 else
10491   echo "$ac_t""no" 1>&6
10492 fi
10493 done
10494
10495
10496         if test $ac_cv_header_krb5_h = yes ; then
10497                                 for ac_hdr in heim_err.h
10498 do
10499 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10500 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10501 echo "configure:10502: checking for $ac_hdr" >&5
10502 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10503   echo $ac_n "(cached) $ac_c" 1>&6
10504 else
10505   cat > conftest.$ac_ext <<EOF
10506 #line 10507 "configure"
10507 #include "confdefs.h"
10508 #include <$ac_hdr>
10509 EOF
10510 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10511 { (eval echo configure:10512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10512 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10513 if test -z "$ac_err"; then
10514   rm -rf conftest*
10515   eval "ac_cv_header_$ac_safe=yes"
10516 else
10517   echo "$ac_err" >&5
10518   echo "configure: failed program was:" >&5
10519   cat conftest.$ac_ext >&5
10520   rm -rf conftest*
10521   eval "ac_cv_header_$ac_safe=no"
10522 fi
10523 rm -f conftest*
10524 fi
10525 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10526   echo "$ac_t""yes" 1>&6
10527     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10528   cat >> confdefs.h <<EOF
10529 #define $ac_tr_hdr 1
10530 EOF
10531  
10532 else
10533   echo "$ac_t""no" 1>&6
10534 fi
10535 done
10536
10537                 if test $ac_cv_header_heim_err_h = yes ; then
10538                         krb5_impl=heimdal
10539                 else
10540                         krb5_impl=mit
10541                 fi
10542
10543                 if test $krb5_impl = mit; then
10544                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10545 echo "configure:10546: checking for main in -lk5crypto" >&5
10546 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10547 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10548   echo $ac_n "(cached) $ac_c" 1>&6
10549 else
10550   ac_save_LIBS="$LIBS"
10551 LIBS="-lk5crypto  $LIBS"
10552 cat > conftest.$ac_ext <<EOF
10553 #line 10554 "configure"
10554 #include "confdefs.h"
10555
10556 int main() {
10557 main()
10558 ; return 0; }
10559 EOF
10560 if { (eval echo configure:10561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10561   rm -rf conftest*
10562   eval "ac_cv_lib_$ac_lib_var=yes"
10563 else
10564   echo "configure: failed program was:" >&5
10565   cat conftest.$ac_ext >&5
10566   rm -rf conftest*
10567   eval "ac_cv_lib_$ac_lib_var=no"
10568 fi
10569 rm -f conftest*
10570 LIBS="$ac_save_LIBS"
10571
10572 fi
10573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10574   echo "$ac_t""yes" 1>&6
10575   krb5crypto=k5crypto
10576 else
10577   echo "$ac_t""no" 1>&6
10578 krb5crypto=crypto
10579 fi
10580
10581
10582                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10583 echo "configure:10584: checking for main in -lkrb5" >&5
10584 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10585 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10586   echo $ac_n "(cached) $ac_c" 1>&6
10587 else
10588   ac_save_LIBS="$LIBS"
10589 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10590 cat > conftest.$ac_ext <<EOF
10591 #line 10592 "configure"
10592 #include "confdefs.h"
10593
10594 int main() {
10595 main()
10596 ; return 0; }
10597 EOF
10598 if { (eval echo configure:10599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10599   rm -rf conftest*
10600   eval "ac_cv_lib_$ac_lib_var=yes"
10601 else
10602   echo "configure: failed program was:" >&5
10603   cat conftest.$ac_ext >&5
10604   rm -rf conftest*
10605   eval "ac_cv_lib_$ac_lib_var=no"
10606 fi
10607 rm -f conftest*
10608 LIBS="$ac_save_LIBS"
10609
10610 fi
10611 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10612   echo "$ac_t""yes" 1>&6
10613   have_krb5=yes
10614                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10615 else
10616   echo "$ac_t""no" 1>&6
10617 have_krb5=no
10618 fi
10619
10620
10621                 elif test $krb5_impl = heimdal; then
10622                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10623 echo "configure:10624: checking for main in -ldes" >&5
10624 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10625 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10626   echo $ac_n "(cached) $ac_c" 1>&6
10627 else
10628   ac_save_LIBS="$LIBS"
10629 LIBS="-ldes  $LIBS"
10630 cat > conftest.$ac_ext <<EOF
10631 #line 10632 "configure"
10632 #include "confdefs.h"
10633
10634 int main() {
10635 main()
10636 ; return 0; }
10637 EOF
10638 if { (eval echo configure:10639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10639   rm -rf conftest*
10640   eval "ac_cv_lib_$ac_lib_var=yes"
10641 else
10642   echo "configure: failed program was:" >&5
10643   cat conftest.$ac_ext >&5
10644   rm -rf conftest*
10645   eval "ac_cv_lib_$ac_lib_var=no"
10646 fi
10647 rm -f conftest*
10648 LIBS="$ac_save_LIBS"
10649
10650 fi
10651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10652   echo "$ac_t""yes" 1>&6
10653   krb5crypto=des
10654 else
10655   echo "$ac_t""no" 1>&6
10656 krb5crypto=crypto
10657 fi
10658
10659
10660                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10661 echo "configure:10662: checking for main in -lkrb5" >&5
10662 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10663 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10664   echo $ac_n "(cached) $ac_c" 1>&6
10665 else
10666   ac_save_LIBS="$LIBS"
10667 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10668 cat > conftest.$ac_ext <<EOF
10669 #line 10670 "configure"
10670 #include "confdefs.h"
10671
10672 int main() {
10673 main()
10674 ; return 0; }
10675 EOF
10676 if { (eval echo configure:10677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10677   rm -rf conftest*
10678   eval "ac_cv_lib_$ac_lib_var=yes"
10679 else
10680   echo "configure: failed program was:" >&5
10681   cat conftest.$ac_ext >&5
10682   rm -rf conftest*
10683   eval "ac_cv_lib_$ac_lib_var=no"
10684 fi
10685 rm -f conftest*
10686 LIBS="$ac_save_LIBS"
10687
10688 fi
10689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10690   echo "$ac_t""yes" 1>&6
10691   have_krb5=yes
10692                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10693 else
10694   echo "$ac_t""no" 1>&6
10695 have_krb5=no
10696 fi
10697
10698
10699                         cat >> confdefs.h <<\EOF
10700 #define HAVE_HEIMDAL_KERBEROS 1
10701 EOF
10702
10703
10704                 else
10705                         have_krb5=no
10706                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10707                 fi
10708
10709                 if test $have_krb5 = yes ; then
10710                         ol_link_krb5=yes
10711
10712                         cat >> confdefs.h <<\EOF
10713 #define HAVE_KRB5 1
10714 EOF
10715
10716
10717                         if test $ol_enable_kpasswd != no ; then
10718                                 ol_link_kpasswd=yes;
10719                         fi
10720
10721                         if test $ol_with_kerberos = k5only ; then
10722                                 ol_with_kerberos=found
10723                         fi
10724
10725                 elif test $ol_with_kerberos != auto ; then
10726                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10727                 fi
10728
10729         fi
10730 fi
10731
10732 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10733         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10734
10735         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10736 do
10737 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10738 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10739 echo "configure:10740: checking for $ac_hdr" >&5
10740 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10741   echo $ac_n "(cached) $ac_c" 1>&6
10742 else
10743   cat > conftest.$ac_ext <<EOF
10744 #line 10745 "configure"
10745 #include "confdefs.h"
10746 #include <$ac_hdr>
10747 EOF
10748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10749 { (eval echo configure:10750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10751 if test -z "$ac_err"; then
10752   rm -rf conftest*
10753   eval "ac_cv_header_$ac_safe=yes"
10754 else
10755   echo "$ac_err" >&5
10756   echo "configure: failed program was:" >&5
10757   cat conftest.$ac_ext >&5
10758   rm -rf conftest*
10759   eval "ac_cv_header_$ac_safe=no"
10760 fi
10761 rm -f conftest*
10762 fi
10763 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10764   echo "$ac_t""yes" 1>&6
10765     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10766   cat >> confdefs.h <<EOF
10767 #define $ac_tr_hdr 1
10768 EOF
10769  
10770 else
10771   echo "$ac_t""no" 1>&6
10772 fi
10773 done
10774
10775
10776         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10777                 if test $krb5_impl = mit; then
10778                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10779 echo "configure:10780: checking for main in -lkrb4" >&5
10780 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10781 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10782   echo $ac_n "(cached) $ac_c" 1>&6
10783 else
10784   ac_save_LIBS="$LIBS"
10785 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10786 cat > conftest.$ac_ext <<EOF
10787 #line 10788 "configure"
10788 #include "confdefs.h"
10789
10790 int main() {
10791 main()
10792 ; return 0; }
10793 EOF
10794 if { (eval echo configure:10795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10795   rm -rf conftest*
10796   eval "ac_cv_lib_$ac_lib_var=yes"
10797 else
10798   echo "configure: failed program was:" >&5
10799   cat conftest.$ac_ext >&5
10800   rm -rf conftest*
10801   eval "ac_cv_lib_$ac_lib_var=no"
10802 fi
10803 rm -f conftest*
10804 LIBS="$ac_save_LIBS"
10805
10806 fi
10807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10808   echo "$ac_t""yes" 1>&6
10809   have_k425=yes
10810                                 KRB4_LIBS="-lkrb4 -ldes425"
10811 else
10812   echo "$ac_t""no" 1>&6
10813 have_k425=no
10814 fi
10815
10816
10817                 elif test $krb5_impl = heimdal; then
10818                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10819 echo "configure:10820: checking for main in -lkrb4" >&5
10820 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10821 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10822   echo $ac_n "(cached) $ac_c" 1>&6
10823 else
10824   ac_save_LIBS="$LIBS"
10825 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10826 cat > conftest.$ac_ext <<EOF
10827 #line 10828 "configure"
10828 #include "confdefs.h"
10829
10830 int main() {
10831 main()
10832 ; return 0; }
10833 EOF
10834 if { (eval echo configure:10835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10835   rm -rf conftest*
10836   eval "ac_cv_lib_$ac_lib_var=yes"
10837 else
10838   echo "configure: failed program was:" >&5
10839   cat conftest.$ac_ext >&5
10840   rm -rf conftest*
10841   eval "ac_cv_lib_$ac_lib_var=no"
10842 fi
10843 rm -f conftest*
10844 LIBS="$ac_save_LIBS"
10845
10846 fi
10847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10848   echo "$ac_t""yes" 1>&6
10849   have_k425=yes
10850                                 KRB4_LIBS="-lkrb4"
10851 else
10852   echo "$ac_t""no" 1>&6
10853 have_k425=no
10854 fi
10855
10856
10857                 else
10858                         have_425=no
10859                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10860                 fi
10861
10862                 if test $have_k425 = yes ; then
10863                         ol_with_kerberos=found
10864                         ol_link_krb4=yes
10865
10866                         cat >> confdefs.h <<\EOF
10867 #define HAVE_KRB425 1
10868 EOF
10869
10870                         cat >> confdefs.h <<\EOF
10871 #define HAVE_KRB4 1
10872 EOF
10873
10874
10875                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10876 echo "configure:10877: checking for des_debug in Kerberos libraries" >&5
10877 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10878   echo $ac_n "(cached) $ac_c" 1>&6
10879 else
10880   
10881                                                                 save_LIBS="$LIBS"
10882                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10883                                 cat > conftest.$ac_ext <<EOF
10884 #line 10885 "configure"
10885 #include "confdefs.h"
10886
10887 #include <kerberosIV/krb.h>
10888 #include <kerberosIV/des.h>
10889 extern int des_debug;
10890
10891 int main() {
10892
10893 des_debug = 1;
10894
10895 ; return 0; }
10896 EOF
10897 if { (eval echo configure:10898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10898   rm -rf conftest*
10899   ol_cv_var_des_debug=yes
10900 else
10901   echo "configure: failed program was:" >&5
10902   cat conftest.$ac_ext >&5
10903   rm -rf conftest*
10904   ol_cv_var_des_debug=no
10905 fi
10906 rm -f conftest*
10907                                                                 LIBS="$save_LIBS"
10908                         
10909 fi
10910
10911 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10912
10913                         if test $ol_cv_var_des_debug = yes ; then
10914                                 cat >> confdefs.h <<\EOF
10915 #define HAVE_DES_DEBUG 1
10916 EOF
10917
10918                         fi
10919
10920                         LIBS="$save_LIBS"
10921                 fi
10922         fi
10923 fi
10924
10925 if test $ol_link_krb5 = yes ; then
10926         ol_with_kerberos=found
10927 fi
10928
10929 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10930         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10931
10932         for ac_hdr in krb.h des.h krb-archaeology.h 
10933 do
10934 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10935 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10936 echo "configure:10937: checking for $ac_hdr" >&5
10937 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10938   echo $ac_n "(cached) $ac_c" 1>&6
10939 else
10940   cat > conftest.$ac_ext <<EOF
10941 #line 10942 "configure"
10942 #include "confdefs.h"
10943 #include <$ac_hdr>
10944 EOF
10945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10946 { (eval echo configure:10947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10947 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10948 if test -z "$ac_err"; then
10949   rm -rf conftest*
10950   eval "ac_cv_header_$ac_safe=yes"
10951 else
10952   echo "$ac_err" >&5
10953   echo "configure: failed program was:" >&5
10954   cat conftest.$ac_ext >&5
10955   rm -rf conftest*
10956   eval "ac_cv_header_$ac_safe=no"
10957 fi
10958 rm -f conftest*
10959 fi
10960 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10961   echo "$ac_t""yes" 1>&6
10962     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10963   cat >> confdefs.h <<EOF
10964 #define $ac_tr_hdr 1
10965 EOF
10966  
10967 else
10968   echo "$ac_t""no" 1>&6
10969 fi
10970 done
10971
10972
10973         if test $ac_cv_header_krb_h = yes ; then
10974                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10975 echo "configure:10976: checking for main in -lkrb" >&5
10976 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10977 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10978   echo $ac_n "(cached) $ac_c" 1>&6
10979 else
10980   ac_save_LIBS="$LIBS"
10981 LIBS="-lkrb -ldes $LIBS"
10982 cat > conftest.$ac_ext <<EOF
10983 #line 10984 "configure"
10984 #include "confdefs.h"
10985
10986 int main() {
10987 main()
10988 ; return 0; }
10989 EOF
10990 if { (eval echo configure:10991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10991   rm -rf conftest*
10992   eval "ac_cv_lib_$ac_lib_var=yes"
10993 else
10994   echo "configure: failed program was:" >&5
10995   cat conftest.$ac_ext >&5
10996   rm -rf conftest*
10997   eval "ac_cv_lib_$ac_lib_var=no"
10998 fi
10999 rm -f conftest*
11000 LIBS="$ac_save_LIBS"
11001
11002 fi
11003 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11004   echo "$ac_t""yes" 1>&6
11005   have_k4=yes
11006 else
11007   echo "$ac_t""no" 1>&6
11008 have_k4=no
11009 fi
11010
11011
11012                 if test $have_k4 = yes ; then
11013                         ol_with_kerberos=found
11014                         ol_link_krb4=yes
11015
11016                         cat >> confdefs.h <<\EOF
11017 #define HAVE_KRB4 1
11018 EOF
11019
11020
11021                         KRB4_LIBS="-lkrb -ldes"
11022
11023                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11024                                 cat >> confdefs.h <<\EOF
11025 #define HAVE_KTH_KERBEROS 1
11026 EOF
11027
11028                         fi
11029                 fi
11030         fi
11031 fi
11032
11033 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
11034         ol_link_kpasswd=yes
11035 fi
11036
11037 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11038         ol_link_kbind=yes
11039
11040 elif test $ol_enable_kbind = yes ; then
11041         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11042 fi
11043
11044 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11045         cat >> confdefs.h <<\EOF
11046 #define HAVE_KERBEROS 1
11047 EOF
11048
11049
11050 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11051         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11052 fi
11053
11054 ol_link_tls=no
11055 if test $ol_with_tls != no ; then
11056         for ac_hdr in openssl/ssl.h ssl.h
11057 do
11058 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11059 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11060 echo "configure:11061: checking for $ac_hdr" >&5
11061 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11062   echo $ac_n "(cached) $ac_c" 1>&6
11063 else
11064   cat > conftest.$ac_ext <<EOF
11065 #line 11066 "configure"
11066 #include "confdefs.h"
11067 #include <$ac_hdr>
11068 EOF
11069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11070 { (eval echo configure:11071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11072 if test -z "$ac_err"; then
11073   rm -rf conftest*
11074   eval "ac_cv_header_$ac_safe=yes"
11075 else
11076   echo "$ac_err" >&5
11077   echo "configure: failed program was:" >&5
11078   cat conftest.$ac_ext >&5
11079   rm -rf conftest*
11080   eval "ac_cv_header_$ac_safe=no"
11081 fi
11082 rm -f conftest*
11083 fi
11084 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11085   echo "$ac_t""yes" 1>&6
11086     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11087   cat >> confdefs.h <<EOF
11088 #define $ac_tr_hdr 1
11089 EOF
11090  
11091 else
11092   echo "$ac_t""no" 1>&6
11093 fi
11094 done
11095
11096         
11097         if test $ac_cv_header_openssl_ssl_h = yes \
11098                 -o $ac_cv_header_ssl_h = yes ; then
11099                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11100 echo "configure:11101: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11101 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11102 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11103   echo $ac_n "(cached) $ac_c" 1>&6
11104 else
11105   ac_save_LIBS="$LIBS"
11106 LIBS="-lssl -lcrypto $LIBS"
11107 cat > conftest.$ac_ext <<EOF
11108 #line 11109 "configure"
11109 #include "confdefs.h"
11110 /* Override any gcc2 internal prototype to avoid an error.  */
11111 /* We use char because int might match the return type of a gcc2
11112     builtin and then its argument prototype would still apply.  */
11113 char SSLeay_add_ssl_algorithms();
11114
11115 int main() {
11116 SSLeay_add_ssl_algorithms()
11117 ; return 0; }
11118 EOF
11119 if { (eval echo configure:11120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11120   rm -rf conftest*
11121   eval "ac_cv_lib_$ac_lib_var=yes"
11122 else
11123   echo "configure: failed program was:" >&5
11124   cat conftest.$ac_ext >&5
11125   rm -rf conftest*
11126   eval "ac_cv_lib_$ac_lib_var=no"
11127 fi
11128 rm -f conftest*
11129 LIBS="$ac_save_LIBS"
11130
11131 fi
11132 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11133   echo "$ac_t""yes" 1>&6
11134   have_ssleay=yes
11135                         need_rsaref=no
11136 else
11137   echo "$ac_t""no" 1>&6
11138 have_ssleay=no
11139 fi
11140
11141                         
11142                 if test $have_ssleay = no ; then
11143                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11144 echo "configure:11145: checking for SSL_library_init in -lssl" >&5
11145 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11146 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11147   echo $ac_n "(cached) $ac_c" 1>&6
11148 else
11149   ac_save_LIBS="$LIBS"
11150 LIBS="-lssl -lcrypto $LIBS"
11151 cat > conftest.$ac_ext <<EOF
11152 #line 11153 "configure"
11153 #include "confdefs.h"
11154 /* Override any gcc2 internal prototype to avoid an error.  */
11155 /* We use char because int might match the return type of a gcc2
11156     builtin and then its argument prototype would still apply.  */
11157 char SSL_library_init();
11158
11159 int main() {
11160 SSL_library_init()
11161 ; return 0; }
11162 EOF
11163 if { (eval echo configure:11164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11164   rm -rf conftest*
11165   eval "ac_cv_lib_$ac_lib_var=yes"
11166 else
11167   echo "configure: failed program was:" >&5
11168   cat conftest.$ac_ext >&5
11169   rm -rf conftest*
11170   eval "ac_cv_lib_$ac_lib_var=no"
11171 fi
11172 rm -f conftest*
11173 LIBS="$ac_save_LIBS"
11174
11175 fi
11176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11177   echo "$ac_t""yes" 1>&6
11178   have_ssleay=yes
11179                                 need_rsaref=no
11180 else
11181   echo "$ac_t""no" 1>&6
11182 have_ssleay=no
11183 fi
11184
11185                 fi
11186
11187                 if test $have_ssleay = no ; then
11188                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11189 echo "configure:11190: checking for ssl3_accept in -lssl" >&5
11190 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11191 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11192   echo $ac_n "(cached) $ac_c" 1>&6
11193 else
11194   ac_save_LIBS="$LIBS"
11195 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11196 cat > conftest.$ac_ext <<EOF
11197 #line 11198 "configure"
11198 #include "confdefs.h"
11199 /* Override any gcc2 internal prototype to avoid an error.  */
11200 /* We use char because int might match the return type of a gcc2
11201     builtin and then its argument prototype would still apply.  */
11202 char ssl3_accept();
11203
11204 int main() {
11205 ssl3_accept()
11206 ; return 0; }
11207 EOF
11208 if { (eval echo configure:11209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11209   rm -rf conftest*
11210   eval "ac_cv_lib_$ac_lib_var=yes"
11211 else
11212   echo "configure: failed program was:" >&5
11213   cat conftest.$ac_ext >&5
11214   rm -rf conftest*
11215   eval "ac_cv_lib_$ac_lib_var=no"
11216 fi
11217 rm -f conftest*
11218 LIBS="$ac_save_LIBS"
11219
11220 fi
11221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11222   echo "$ac_t""yes" 1>&6
11223   have_ssleay=yes
11224                                 need_rsaref=yes
11225 else
11226   echo "$ac_t""no" 1>&6
11227 have_ssleay=no
11228 fi
11229
11230                 fi
11231
11232                 if test $have_ssleay = yes ; then
11233                         ol_with_tls=found
11234                         ol_link_tls=yes
11235
11236                         cat >> confdefs.h <<\EOF
11237 #define HAVE_SSLEAY 1
11238 EOF
11239
11240
11241                         if test $need_rsaref = yes; then
11242                                 cat >> confdefs.h <<\EOF
11243 #define HAVE_RSAREF 1
11244 EOF
11245
11246
11247                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11248                         else
11249                                 TLS_LIBS="-lssl -lcrypto"
11250                         fi
11251                 fi
11252         fi
11253
11254 else
11255         echo "configure: warning: TLS data protection not supported!" 1>&2
11256 fi
11257
11258 if test $ol_link_tls = yes ; then
11259         cat >> confdefs.h <<\EOF
11260 #define HAVE_TLS 1
11261 EOF
11262
11263
11264 elif test $ol_with_tls = auto ; then
11265         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11266         echo "configure: warning: TLS data protection not supported!" 1>&2
11267
11268 elif test $ol_with_tls != no ; then
11269         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11270 fi
11271
11272 if test $ol_enable_lmpasswd != no; then
11273         if test $ol_link_tls != yes ; then
11274                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11275         fi
11276
11277         cat >> confdefs.h <<\EOF
11278 #define SLAPD_LMHASH 1
11279 EOF
11280
11281 fi
11282
11283 ol_link_threads=no
11284
11285 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11286         -o $ol_with_threads = nt ; then
11287
11288         
11289         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11290 echo "configure:11291: checking for _beginthread" >&5
11291 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11292   echo $ac_n "(cached) $ac_c" 1>&6
11293 else
11294   cat > conftest.$ac_ext <<EOF
11295 #line 11296 "configure"
11296 #include "confdefs.h"
11297 /* System header to define __stub macros and hopefully few prototypes,
11298     which can conflict with char _beginthread(); below.  */
11299 #include <assert.h>
11300 /* Override any gcc2 internal prototype to avoid an error.  */
11301 /* We use char because int might match the return type of a gcc2
11302     builtin and then its argument prototype would still apply.  */
11303 char _beginthread();
11304 char (*f)();
11305
11306 int main() {
11307
11308 /* The GNU C library defines this for functions which it implements
11309     to always fail with ENOSYS.  Some functions are actually named
11310     something starting with __ and the normal name is an alias.  */
11311 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11312 choke me
11313 #else
11314 f = _beginthread;
11315 #endif
11316
11317 ; return 0; }
11318 EOF
11319 if { (eval echo configure:11320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11320   rm -rf conftest*
11321   eval "ac_cv_func__beginthread=yes"
11322 else
11323   echo "configure: failed program was:" >&5
11324   cat conftest.$ac_ext >&5
11325   rm -rf conftest*
11326   eval "ac_cv_func__beginthread=no"
11327 fi
11328 rm -f conftest*
11329 fi
11330
11331 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11332   echo "$ac_t""yes" 1>&6
11333   :
11334 else
11335   echo "$ac_t""no" 1>&6
11336 fi
11337
11338
11339         if test $ac_cv_func__beginthread = yes ; then
11340                 cat >> confdefs.h <<\EOF
11341 #define HAVE_NT_THREADS 1
11342 EOF
11343
11344                 ol_cv_nt_threads=yes
11345         fi
11346
11347
11348         if test "$ol_cv_nt_threads" = yes ; then
11349                 ol_link_threads=nt
11350                 ol_with_threads=found
11351                 ol_with_yielding_select=yes
11352
11353                 cat >> confdefs.h <<\EOF
11354 #define HAVE_NT_SERVICE_MANAGER 1
11355 EOF
11356
11357                 cat >> confdefs.h <<\EOF
11358 #define HAVE_NT_EVENT_LOG 1
11359 EOF
11360
11361         fi
11362
11363         if test $ol_with_threads = nt ; then
11364                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11365         fi
11366 fi
11367
11368 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11369         -o $ol_with_threads = posix ; then
11370
11371         for ac_hdr in pthread.h
11372 do
11373 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11374 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11375 echo "configure:11376: checking for $ac_hdr" >&5
11376 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11377   echo $ac_n "(cached) $ac_c" 1>&6
11378 else
11379   cat > conftest.$ac_ext <<EOF
11380 #line 11381 "configure"
11381 #include "confdefs.h"
11382 #include <$ac_hdr>
11383 EOF
11384 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11385 { (eval echo configure:11386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11386 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11387 if test -z "$ac_err"; then
11388   rm -rf conftest*
11389   eval "ac_cv_header_$ac_safe=yes"
11390 else
11391   echo "$ac_err" >&5
11392   echo "configure: failed program was:" >&5
11393   cat conftest.$ac_ext >&5
11394   rm -rf conftest*
11395   eval "ac_cv_header_$ac_safe=no"
11396 fi
11397 rm -f conftest*
11398 fi
11399 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11400   echo "$ac_t""yes" 1>&6
11401     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11402   cat >> confdefs.h <<EOF
11403 #define $ac_tr_hdr 1
11404 EOF
11405  
11406 else
11407   echo "$ac_t""no" 1>&6
11408 fi
11409 done
11410
11411
11412         if test $ac_cv_header_pthread_h = yes ; then
11413                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11414 echo "configure:11415: checking POSIX thread version" >&5
11415 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11416   echo $ac_n "(cached) $ac_c" 1>&6
11417 else
11418   
11419         cat > conftest.$ac_ext <<EOF
11420 #line 11421 "configure"
11421 #include "confdefs.h"
11422
11423 #               include <pthread.h>
11424         
11425 int main() {
11426
11427                 int i = PTHREAD_CREATE_JOINABLE;
11428         
11429 ; return 0; }
11430 EOF
11431 if { (eval echo configure:11432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11432   rm -rf conftest*
11433   
11434         cat > conftest.$ac_ext <<EOF
11435 #line 11436 "configure"
11436 #include "confdefs.h"
11437 #include <pthread.h>
11438 EOF
11439 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11440   egrep "pthread_detach" >/dev/null 2>&1; then
11441   rm -rf conftest*
11442   ol_cv_pthread_version=10
11443 else
11444   rm -rf conftest*
11445   ol_cv_pthread_version=8
11446 fi
11447 rm -f conftest*
11448
11449 else
11450   echo "configure: failed program was:" >&5
11451   cat conftest.$ac_ext >&5
11452   rm -rf conftest*
11453   
11454         cat > conftest.$ac_ext <<EOF
11455 #line 11456 "configure"
11456 #include "confdefs.h"
11457
11458 #               include <pthread.h>
11459 #               ifdef PTHREAD_CREATE_UNDETACHED
11460                 draft7
11461 #               endif
11462         
11463 EOF
11464 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11465   egrep "draft7" >/dev/null 2>&1; then
11466   rm -rf conftest*
11467   ol_cv_pthread_version=7
11468 else
11469   rm -rf conftest*
11470   
11471         cat > conftest.$ac_ext <<EOF
11472 #line 11473 "configure"
11473 #include "confdefs.h"
11474 #include <pthread.h>
11475 EOF
11476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11477   egrep "pthread_attr_init" >/dev/null 2>&1; then
11478   rm -rf conftest*
11479   ol_cv_pthread_version=6
11480 else
11481   rm -rf conftest*
11482   
11483         cat > conftest.$ac_ext <<EOF
11484 #line 11485 "configure"
11485 #include "confdefs.h"
11486
11487 #               include <pthread.h>
11488 #ifdef          PTHREAD_MUTEX_INITIALIZER
11489                 draft5
11490 #endif
11491         
11492 EOF
11493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11494   egrep "draft5" >/dev/null 2>&1; then
11495   rm -rf conftest*
11496   ol_cv_pthread_version=5
11497 else
11498   rm -rf conftest*
11499   ol_cv_pthread_version=4
11500 fi
11501 rm -f conftest*
11502  
11503 fi
11504 rm -f conftest*
11505  
11506 fi
11507 rm -f conftest*
11508  
11509 fi
11510 rm -f conftest*
11511
11512 fi
11513
11514 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11515
11516
11517                 if test $ol_cv_pthread_version != 0 ; then
11518                         cat >> confdefs.h <<EOF
11519 #define HAVE_PTHREADS $ol_cv_pthread_version
11520 EOF
11521
11522                 else
11523                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11524                 fi
11525
11526                 # consider threads found
11527                 ol_with_threads=found
11528
11529                 
11530         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11531 echo "configure:11532: checking for LinuxThreads pthread.h" >&5
11532 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11533   echo $ac_n "(cached) $ac_c" 1>&6
11534 else
11535   cat > conftest.$ac_ext <<EOF
11536 #line 11537 "configure"
11537 #include "confdefs.h"
11538 #include <pthread.h>
11539 EOF
11540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11541   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11542   rm -rf conftest*
11543   ol_cv_header_linux_threads=yes
11544 else
11545   rm -rf conftest*
11546   ol_cv_header_linux_threads=no
11547 fi
11548 rm -f conftest*
11549
11550                 
11551 fi
11552
11553 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11554         if test $ol_cv_header_linux_threads = yes; then
11555                 cat >> confdefs.h <<\EOF
11556 #define HAVE_LINUX_THREADS 1
11557 EOF
11558
11559         fi
11560
11561                 
11562         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11563 echo "configure:11564: checking for GNU Pth pthread.h" >&5
11564 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11565   echo $ac_n "(cached) $ac_c" 1>&6
11566 else
11567   cat > conftest.$ac_ext <<EOF
11568 #line 11569 "configure"
11569 #include "confdefs.h"
11570 #include <pthread.h>
11571 #ifdef _POSIX_THREAD_IS_GNU_PTH
11572         __gnu_pth__;
11573 #endif
11574
11575 EOF
11576 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11577   egrep "__gnu_pth__" >/dev/null 2>&1; then
11578   rm -rf conftest*
11579   ol_cv_header_gnu_pth_pthread_h=yes
11580 else
11581   rm -rf conftest*
11582   ol_cv_header_gnu_pth_pthread_h=no
11583 fi
11584 rm -f conftest*
11585
11586                 
11587 fi
11588
11589 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11590
11591
11592                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11593                         for ac_hdr in sched.h
11594 do
11595 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11596 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11597 echo "configure:11598: checking for $ac_hdr" >&5
11598 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11599   echo $ac_n "(cached) $ac_c" 1>&6
11600 else
11601   cat > conftest.$ac_ext <<EOF
11602 #line 11603 "configure"
11603 #include "confdefs.h"
11604 #include <$ac_hdr>
11605 EOF
11606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11607 { (eval echo configure:11608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11609 if test -z "$ac_err"; then
11610   rm -rf conftest*
11611   eval "ac_cv_header_$ac_safe=yes"
11612 else
11613   echo "$ac_err" >&5
11614   echo "configure: failed program was:" >&5
11615   cat conftest.$ac_ext >&5
11616   rm -rf conftest*
11617   eval "ac_cv_header_$ac_safe=no"
11618 fi
11619 rm -f conftest*
11620 fi
11621 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11622   echo "$ac_t""yes" 1>&6
11623     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11624   cat >> confdefs.h <<EOF
11625 #define $ac_tr_hdr 1
11626 EOF
11627  
11628 else
11629   echo "$ac_t""no" 1>&6
11630 fi
11631 done
11632
11633                 fi
11634
11635                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11636                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11637 echo "configure:11638: checking for pthread_create in default libraries" >&5
11638 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11639   echo $ac_n "(cached) $ac_c" 1>&6
11640 else
11641   
11642                 if test "$cross_compiling" = yes; then
11643   cat > conftest.$ac_ext <<EOF
11644 #line 11645 "configure"
11645 #include "confdefs.h"
11646 /* pthread test headers */
11647 #include <pthread.h>
11648 #if HAVE_PTHREADS < 7
11649 #include <errno.h>
11650 #endif
11651 #ifndef NULL
11652 #define NULL (void*)0
11653 #endif
11654
11655 static void *task(p)
11656         void *p;
11657 {
11658         return (void *) (p == NULL);
11659 }
11660
11661 int main() {
11662
11663         /* pthread test function */
11664 #ifndef PTHREAD_CREATE_DETACHED
11665 #define PTHREAD_CREATE_DETACHED 1
11666 #endif
11667         pthread_t t;
11668         int status;
11669         int detach = PTHREAD_CREATE_DETACHED;
11670
11671 #if HAVE_PTHREADS > 4
11672         /* Final pthreads */
11673         pthread_attr_t attr;
11674
11675         status = pthread_attr_init(&attr);
11676         if( status ) return status;
11677
11678 #if HAVE_PTHREADS < 7
11679         status = pthread_attr_setdetachstate(&attr, &detach);
11680         if( status < 0 ) status = errno;
11681 #else
11682         status = pthread_attr_setdetachstate(&attr, detach);
11683 #endif
11684         if( status ) return status;
11685         status = pthread_create( &t, &attr, task, NULL );
11686 #if HAVE_PTHREADS < 7
11687         if( status < 0 ) status = errno;
11688 #endif
11689         if( status ) return status;
11690 #else
11691         /* Draft 4 pthreads */
11692         status = pthread_create( &t, pthread_attr_default, task, NULL );
11693         if( status ) return errno;
11694
11695         /* give thread a chance to complete */
11696         /* it should remain joinable and hence detachable */
11697         sleep( 1 );
11698
11699         status = pthread_detach( &t );
11700         if( status ) return errno;
11701 #endif
11702
11703 #ifdef HAVE_LINUX_THREADS
11704         pthread_kill_other_threads_np();
11705 #endif
11706
11707         return 0;
11708
11709 ; return 0; }
11710 EOF
11711 if { (eval echo configure:11712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11712   rm -rf conftest*
11713   ol_cv_pthread_create=yes
11714 else
11715   echo "configure: failed program was:" >&5
11716   cat conftest.$ac_ext >&5
11717   rm -rf conftest*
11718   ol_cv_pthread_create=no
11719 fi
11720 rm -f conftest*
11721 else
11722   cat > conftest.$ac_ext <<EOF
11723 #line 11724 "configure"
11724 #include "confdefs.h"
11725 /* pthread test headers */
11726 #include <pthread.h>
11727 #if HAVE_PTHREADS < 7
11728 #include <errno.h>
11729 #endif
11730 #ifndef NULL
11731 #define NULL (void*)0
11732 #endif
11733
11734 static void *task(p)
11735         void *p;
11736 {
11737         return (void *) (p == NULL);
11738 }
11739
11740
11741 int main(argc, argv)
11742         int argc;
11743         char **argv;
11744 {
11745
11746         /* pthread test function */
11747 #ifndef PTHREAD_CREATE_DETACHED
11748 #define PTHREAD_CREATE_DETACHED 1
11749 #endif
11750         pthread_t t;
11751         int status;
11752         int detach = PTHREAD_CREATE_DETACHED;
11753
11754 #if HAVE_PTHREADS > 4
11755         /* Final pthreads */
11756         pthread_attr_t attr;
11757
11758         status = pthread_attr_init(&attr);
11759         if( status ) return status;
11760
11761 #if HAVE_PTHREADS < 7
11762         status = pthread_attr_setdetachstate(&attr, &detach);
11763         if( status < 0 ) status = errno;
11764 #else
11765         status = pthread_attr_setdetachstate(&attr, detach);
11766 #endif
11767         if( status ) return status;
11768         status = pthread_create( &t, &attr, task, NULL );
11769 #if HAVE_PTHREADS < 7
11770         if( status < 0 ) status = errno;
11771 #endif
11772         if( status ) return status;
11773 #else
11774         /* Draft 4 pthreads */
11775         status = pthread_create( &t, pthread_attr_default, task, NULL );
11776         if( status ) return errno;
11777
11778         /* give thread a chance to complete */
11779         /* it should remain joinable and hence detachable */
11780         sleep( 1 );
11781
11782         status = pthread_detach( &t );
11783         if( status ) return errno;
11784 #endif
11785
11786 #ifdef HAVE_LINUX_THREADS
11787         pthread_kill_other_threads_np();
11788 #endif
11789
11790         return 0;
11791
11792 }
11793
11794 EOF
11795 if { (eval echo configure:11796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11796 then
11797   ol_cv_pthread_create=yes
11798 else
11799   echo "configure: failed program was:" >&5
11800   cat conftest.$ac_ext >&5
11801   rm -fr conftest*
11802   ol_cv_pthread_create=no
11803 fi
11804 rm -fr conftest*
11805 fi
11806
11807 fi
11808
11809 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11810
11811                 if test $ol_cv_pthread_create != no ; then
11812                         ol_link_threads=posix
11813                         ol_link_pthreads=""
11814                 fi
11815                 
11816                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11817 if test "$ol_link_threads" = no ; then
11818         # try -kthread
11819         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11820 echo "configure:11821: checking for pthread link with -kthread" >&5
11821 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11822   echo $ac_n "(cached) $ac_c" 1>&6
11823 else
11824   
11825                 # save the flags
11826                 ol_LIBS="$LIBS"
11827                 LIBS="-kthread $LIBS"
11828
11829                 if test "$cross_compiling" = yes; then
11830   cat > conftest.$ac_ext <<EOF
11831 #line 11832 "configure"
11832 #include "confdefs.h"
11833 /* pthread test headers */
11834 #include <pthread.h>
11835 #if HAVE_PTHREADS < 7
11836 #include <errno.h>
11837 #endif
11838 #ifndef NULL
11839 #define NULL (void*)0
11840 #endif
11841
11842 static void *task(p)
11843         void *p;
11844 {
11845         return (void *) (p == NULL);
11846 }
11847
11848 int main() {
11849
11850         /* pthread test function */
11851 #ifndef PTHREAD_CREATE_DETACHED
11852 #define PTHREAD_CREATE_DETACHED 1
11853 #endif
11854         pthread_t t;
11855         int status;
11856         int detach = PTHREAD_CREATE_DETACHED;
11857
11858 #if HAVE_PTHREADS > 4
11859         /* Final pthreads */
11860         pthread_attr_t attr;
11861
11862         status = pthread_attr_init(&attr);
11863         if( status ) return status;
11864
11865 #if HAVE_PTHREADS < 7
11866         status = pthread_attr_setdetachstate(&attr, &detach);
11867         if( status < 0 ) status = errno;
11868 #else
11869         status = pthread_attr_setdetachstate(&attr, detach);
11870 #endif
11871         if( status ) return status;
11872         status = pthread_create( &t, &attr, task, NULL );
11873 #if HAVE_PTHREADS < 7
11874         if( status < 0 ) status = errno;
11875 #endif
11876         if( status ) return status;
11877 #else
11878         /* Draft 4 pthreads */
11879         status = pthread_create( &t, pthread_attr_default, task, NULL );
11880         if( status ) return errno;
11881
11882         /* give thread a chance to complete */
11883         /* it should remain joinable and hence detachable */
11884         sleep( 1 );
11885
11886         status = pthread_detach( &t );
11887         if( status ) return errno;
11888 #endif
11889
11890 #ifdef HAVE_LINUX_THREADS
11891         pthread_kill_other_threads_np();
11892 #endif
11893
11894         return 0;
11895
11896 ; return 0; }
11897 EOF
11898 if { (eval echo configure:11899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11899   rm -rf conftest*
11900   ol_cv_pthread_kthread=yes
11901 else
11902   echo "configure: failed program was:" >&5
11903   cat conftest.$ac_ext >&5
11904   rm -rf conftest*
11905   ol_cv_pthread_kthread=no
11906 fi
11907 rm -f conftest*
11908 else
11909   cat > conftest.$ac_ext <<EOF
11910 #line 11911 "configure"
11911 #include "confdefs.h"
11912 /* pthread test headers */
11913 #include <pthread.h>
11914 #if HAVE_PTHREADS < 7
11915 #include <errno.h>
11916 #endif
11917 #ifndef NULL
11918 #define NULL (void*)0
11919 #endif
11920
11921 static void *task(p)
11922         void *p;
11923 {
11924         return (void *) (p == NULL);
11925 }
11926
11927
11928 int main(argc, argv)
11929         int argc;
11930         char **argv;
11931 {
11932
11933         /* pthread test function */
11934 #ifndef PTHREAD_CREATE_DETACHED
11935 #define PTHREAD_CREATE_DETACHED 1
11936 #endif
11937         pthread_t t;
11938         int status;
11939         int detach = PTHREAD_CREATE_DETACHED;
11940
11941 #if HAVE_PTHREADS > 4
11942         /* Final pthreads */
11943         pthread_attr_t attr;
11944
11945         status = pthread_attr_init(&attr);
11946         if( status ) return status;
11947
11948 #if HAVE_PTHREADS < 7
11949         status = pthread_attr_setdetachstate(&attr, &detach);
11950         if( status < 0 ) status = errno;
11951 #else
11952         status = pthread_attr_setdetachstate(&attr, detach);
11953 #endif
11954         if( status ) return status;
11955         status = pthread_create( &t, &attr, task, NULL );
11956 #if HAVE_PTHREADS < 7
11957         if( status < 0 ) status = errno;
11958 #endif
11959         if( status ) return status;
11960 #else
11961         /* Draft 4 pthreads */
11962         status = pthread_create( &t, pthread_attr_default, task, NULL );
11963         if( status ) return errno;
11964
11965         /* give thread a chance to complete */
11966         /* it should remain joinable and hence detachable */
11967         sleep( 1 );
11968
11969         status = pthread_detach( &t );
11970         if( status ) return errno;
11971 #endif
11972
11973 #ifdef HAVE_LINUX_THREADS
11974         pthread_kill_other_threads_np();
11975 #endif
11976
11977         return 0;
11978
11979 }
11980
11981 EOF
11982 if { (eval echo configure:11983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11983 then
11984   ol_cv_pthread_kthread=yes
11985 else
11986   echo "configure: failed program was:" >&5
11987   cat conftest.$ac_ext >&5
11988   rm -fr conftest*
11989   ol_cv_pthread_kthread=no
11990 fi
11991 rm -fr conftest*
11992 fi
11993
11994
11995                 # restore the LIBS
11996                 LIBS="$ol_LIBS"
11997         
11998 fi
11999
12000 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12001
12002         if test $ol_cv_pthread_kthread = yes ; then
12003                 ol_link_pthreads="-kthread"
12004                 ol_link_threads=posix
12005         fi
12006 fi
12007
12008                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12009 if test "$ol_link_threads" = no ; then
12010         # try -pthread
12011         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12012 echo "configure:12013: checking for pthread link with -pthread" >&5
12013 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12014   echo $ac_n "(cached) $ac_c" 1>&6
12015 else
12016   
12017                 # save the flags
12018                 ol_LIBS="$LIBS"
12019                 LIBS="-pthread $LIBS"
12020
12021                 if test "$cross_compiling" = yes; then
12022   cat > conftest.$ac_ext <<EOF
12023 #line 12024 "configure"
12024 #include "confdefs.h"
12025 /* pthread test headers */
12026 #include <pthread.h>
12027 #if HAVE_PTHREADS < 7
12028 #include <errno.h>
12029 #endif
12030 #ifndef NULL
12031 #define NULL (void*)0
12032 #endif
12033
12034 static void *task(p)
12035         void *p;
12036 {
12037         return (void *) (p == NULL);
12038 }
12039
12040 int main() {
12041
12042         /* pthread test function */
12043 #ifndef PTHREAD_CREATE_DETACHED
12044 #define PTHREAD_CREATE_DETACHED 1
12045 #endif
12046         pthread_t t;
12047         int status;
12048         int detach = PTHREAD_CREATE_DETACHED;
12049
12050 #if HAVE_PTHREADS > 4
12051         /* Final pthreads */
12052         pthread_attr_t attr;
12053
12054         status = pthread_attr_init(&attr);
12055         if( status ) return status;
12056
12057 #if HAVE_PTHREADS < 7
12058         status = pthread_attr_setdetachstate(&attr, &detach);
12059         if( status < 0 ) status = errno;
12060 #else
12061         status = pthread_attr_setdetachstate(&attr, detach);
12062 #endif
12063         if( status ) return status;
12064         status = pthread_create( &t, &attr, task, NULL );
12065 #if HAVE_PTHREADS < 7
12066         if( status < 0 ) status = errno;
12067 #endif
12068         if( status ) return status;
12069 #else
12070         /* Draft 4 pthreads */
12071         status = pthread_create( &t, pthread_attr_default, task, NULL );
12072         if( status ) return errno;
12073
12074         /* give thread a chance to complete */
12075         /* it should remain joinable and hence detachable */
12076         sleep( 1 );
12077
12078         status = pthread_detach( &t );
12079         if( status ) return errno;
12080 #endif
12081
12082 #ifdef HAVE_LINUX_THREADS
12083         pthread_kill_other_threads_np();
12084 #endif
12085
12086         return 0;
12087
12088 ; return 0; }
12089 EOF
12090 if { (eval echo configure:12091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12091   rm -rf conftest*
12092   ol_cv_pthread_pthread=yes
12093 else
12094   echo "configure: failed program was:" >&5
12095   cat conftest.$ac_ext >&5
12096   rm -rf conftest*
12097   ol_cv_pthread_pthread=no
12098 fi
12099 rm -f conftest*
12100 else
12101   cat > conftest.$ac_ext <<EOF
12102 #line 12103 "configure"
12103 #include "confdefs.h"
12104 /* pthread test headers */
12105 #include <pthread.h>
12106 #if HAVE_PTHREADS < 7
12107 #include <errno.h>
12108 #endif
12109 #ifndef NULL
12110 #define NULL (void*)0
12111 #endif
12112
12113 static void *task(p)
12114         void *p;
12115 {
12116         return (void *) (p == NULL);
12117 }
12118
12119
12120 int main(argc, argv)
12121         int argc;
12122         char **argv;
12123 {
12124
12125         /* pthread test function */
12126 #ifndef PTHREAD_CREATE_DETACHED
12127 #define PTHREAD_CREATE_DETACHED 1
12128 #endif
12129         pthread_t t;
12130         int status;
12131         int detach = PTHREAD_CREATE_DETACHED;
12132
12133 #if HAVE_PTHREADS > 4
12134         /* Final pthreads */
12135         pthread_attr_t attr;
12136
12137         status = pthread_attr_init(&attr);
12138         if( status ) return status;
12139
12140 #if HAVE_PTHREADS < 7
12141         status = pthread_attr_setdetachstate(&attr, &detach);
12142         if( status < 0 ) status = errno;
12143 #else
12144         status = pthread_attr_setdetachstate(&attr, detach);
12145 #endif
12146         if( status ) return status;
12147         status = pthread_create( &t, &attr, task, NULL );
12148 #if HAVE_PTHREADS < 7
12149         if( status < 0 ) status = errno;
12150 #endif
12151         if( status ) return status;
12152 #else
12153         /* Draft 4 pthreads */
12154         status = pthread_create( &t, pthread_attr_default, task, NULL );
12155         if( status ) return errno;
12156
12157         /* give thread a chance to complete */
12158         /* it should remain joinable and hence detachable */
12159         sleep( 1 );
12160
12161         status = pthread_detach( &t );
12162         if( status ) return errno;
12163 #endif
12164
12165 #ifdef HAVE_LINUX_THREADS
12166         pthread_kill_other_threads_np();
12167 #endif
12168
12169         return 0;
12170
12171 }
12172
12173 EOF
12174 if { (eval echo configure:12175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12175 then
12176   ol_cv_pthread_pthread=yes
12177 else
12178   echo "configure: failed program was:" >&5
12179   cat conftest.$ac_ext >&5
12180   rm -fr conftest*
12181   ol_cv_pthread_pthread=no
12182 fi
12183 rm -fr conftest*
12184 fi
12185
12186
12187                 # restore the LIBS
12188                 LIBS="$ol_LIBS"
12189         
12190 fi
12191
12192 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12193
12194         if test $ol_cv_pthread_pthread = yes ; then
12195                 ol_link_pthreads="-pthread"
12196                 ol_link_threads=posix
12197         fi
12198 fi
12199
12200                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12201 if test "$ol_link_threads" = no ; then
12202         # try -pthreads
12203         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12204 echo "configure:12205: checking for pthread link with -pthreads" >&5
12205 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12206   echo $ac_n "(cached) $ac_c" 1>&6
12207 else
12208   
12209                 # save the flags
12210                 ol_LIBS="$LIBS"
12211                 LIBS="-pthreads $LIBS"
12212
12213                 if test "$cross_compiling" = yes; then
12214   cat > conftest.$ac_ext <<EOF
12215 #line 12216 "configure"
12216 #include "confdefs.h"
12217 /* pthread test headers */
12218 #include <pthread.h>
12219 #if HAVE_PTHREADS < 7
12220 #include <errno.h>
12221 #endif
12222 #ifndef NULL
12223 #define NULL (void*)0
12224 #endif
12225
12226 static void *task(p)
12227         void *p;
12228 {
12229         return (void *) (p == NULL);
12230 }
12231
12232 int main() {
12233
12234         /* pthread test function */
12235 #ifndef PTHREAD_CREATE_DETACHED
12236 #define PTHREAD_CREATE_DETACHED 1
12237 #endif
12238         pthread_t t;
12239         int status;
12240         int detach = PTHREAD_CREATE_DETACHED;
12241
12242 #if HAVE_PTHREADS > 4
12243         /* Final pthreads */
12244         pthread_attr_t attr;
12245
12246         status = pthread_attr_init(&attr);
12247         if( status ) return status;
12248
12249 #if HAVE_PTHREADS < 7
12250         status = pthread_attr_setdetachstate(&attr, &detach);
12251         if( status < 0 ) status = errno;
12252 #else
12253         status = pthread_attr_setdetachstate(&attr, detach);
12254 #endif
12255         if( status ) return status;
12256         status = pthread_create( &t, &attr, task, NULL );
12257 #if HAVE_PTHREADS < 7
12258         if( status < 0 ) status = errno;
12259 #endif
12260         if( status ) return status;
12261 #else
12262         /* Draft 4 pthreads */
12263         status = pthread_create( &t, pthread_attr_default, task, NULL );
12264         if( status ) return errno;
12265
12266         /* give thread a chance to complete */
12267         /* it should remain joinable and hence detachable */
12268         sleep( 1 );
12269
12270         status = pthread_detach( &t );
12271         if( status ) return errno;
12272 #endif
12273
12274 #ifdef HAVE_LINUX_THREADS
12275         pthread_kill_other_threads_np();
12276 #endif
12277
12278         return 0;
12279
12280 ; return 0; }
12281 EOF
12282 if { (eval echo configure:12283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12283   rm -rf conftest*
12284   ol_cv_pthread_pthreads=yes
12285 else
12286   echo "configure: failed program was:" >&5
12287   cat conftest.$ac_ext >&5
12288   rm -rf conftest*
12289   ol_cv_pthread_pthreads=no
12290 fi
12291 rm -f conftest*
12292 else
12293   cat > conftest.$ac_ext <<EOF
12294 #line 12295 "configure"
12295 #include "confdefs.h"
12296 /* pthread test headers */
12297 #include <pthread.h>
12298 #if HAVE_PTHREADS < 7
12299 #include <errno.h>
12300 #endif
12301 #ifndef NULL
12302 #define NULL (void*)0
12303 #endif
12304
12305 static void *task(p)
12306         void *p;
12307 {
12308         return (void *) (p == NULL);
12309 }
12310
12311
12312 int main(argc, argv)
12313         int argc;
12314         char **argv;
12315 {
12316
12317         /* pthread test function */
12318 #ifndef PTHREAD_CREATE_DETACHED
12319 #define PTHREAD_CREATE_DETACHED 1
12320 #endif
12321         pthread_t t;
12322         int status;
12323         int detach = PTHREAD_CREATE_DETACHED;
12324
12325 #if HAVE_PTHREADS > 4
12326         /* Final pthreads */
12327         pthread_attr_t attr;
12328
12329         status = pthread_attr_init(&attr);
12330         if( status ) return status;
12331
12332 #if HAVE_PTHREADS < 7
12333         status = pthread_attr_setdetachstate(&attr, &detach);
12334         if( status < 0 ) status = errno;
12335 #else
12336         status = pthread_attr_setdetachstate(&attr, detach);
12337 #endif
12338         if( status ) return status;
12339         status = pthread_create( &t, &attr, task, NULL );
12340 #if HAVE_PTHREADS < 7
12341         if( status < 0 ) status = errno;
12342 #endif
12343         if( status ) return status;
12344 #else
12345         /* Draft 4 pthreads */
12346         status = pthread_create( &t, pthread_attr_default, task, NULL );
12347         if( status ) return errno;
12348
12349         /* give thread a chance to complete */
12350         /* it should remain joinable and hence detachable */
12351         sleep( 1 );
12352
12353         status = pthread_detach( &t );
12354         if( status ) return errno;
12355 #endif
12356
12357 #ifdef HAVE_LINUX_THREADS
12358         pthread_kill_other_threads_np();
12359 #endif
12360
12361         return 0;
12362
12363 }
12364
12365 EOF
12366 if { (eval echo configure:12367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12367 then
12368   ol_cv_pthread_pthreads=yes
12369 else
12370   echo "configure: failed program was:" >&5
12371   cat conftest.$ac_ext >&5
12372   rm -fr conftest*
12373   ol_cv_pthread_pthreads=no
12374 fi
12375 rm -fr conftest*
12376 fi
12377
12378
12379                 # restore the LIBS
12380                 LIBS="$ol_LIBS"
12381         
12382 fi
12383
12384 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12385
12386         if test $ol_cv_pthread_pthreads = yes ; then
12387                 ol_link_pthreads="-pthreads"
12388                 ol_link_threads=posix
12389         fi
12390 fi
12391
12392                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12393 if test "$ol_link_threads" = no ; then
12394         # try -mthreads
12395         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12396 echo "configure:12397: checking for pthread link with -mthreads" >&5
12397 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12398   echo $ac_n "(cached) $ac_c" 1>&6
12399 else
12400   
12401                 # save the flags
12402                 ol_LIBS="$LIBS"
12403                 LIBS="-mthreads $LIBS"
12404
12405                 if test "$cross_compiling" = yes; then
12406   cat > conftest.$ac_ext <<EOF
12407 #line 12408 "configure"
12408 #include "confdefs.h"
12409 /* pthread test headers */
12410 #include <pthread.h>
12411 #if HAVE_PTHREADS < 7
12412 #include <errno.h>
12413 #endif
12414 #ifndef NULL
12415 #define NULL (void*)0
12416 #endif
12417
12418 static void *task(p)
12419         void *p;
12420 {
12421         return (void *) (p == NULL);
12422 }
12423
12424 int main() {
12425
12426         /* pthread test function */
12427 #ifndef PTHREAD_CREATE_DETACHED
12428 #define PTHREAD_CREATE_DETACHED 1
12429 #endif
12430         pthread_t t;
12431         int status;
12432         int detach = PTHREAD_CREATE_DETACHED;
12433
12434 #if HAVE_PTHREADS > 4
12435         /* Final pthreads */
12436         pthread_attr_t attr;
12437
12438         status = pthread_attr_init(&attr);
12439         if( status ) return status;
12440
12441 #if HAVE_PTHREADS < 7
12442         status = pthread_attr_setdetachstate(&attr, &detach);
12443         if( status < 0 ) status = errno;
12444 #else
12445         status = pthread_attr_setdetachstate(&attr, detach);
12446 #endif
12447         if( status ) return status;
12448         status = pthread_create( &t, &attr, task, NULL );
12449 #if HAVE_PTHREADS < 7
12450         if( status < 0 ) status = errno;
12451 #endif
12452         if( status ) return status;
12453 #else
12454         /* Draft 4 pthreads */
12455         status = pthread_create( &t, pthread_attr_default, task, NULL );
12456         if( status ) return errno;
12457
12458         /* give thread a chance to complete */
12459         /* it should remain joinable and hence detachable */
12460         sleep( 1 );
12461
12462         status = pthread_detach( &t );
12463         if( status ) return errno;
12464 #endif
12465
12466 #ifdef HAVE_LINUX_THREADS
12467         pthread_kill_other_threads_np();
12468 #endif
12469
12470         return 0;
12471
12472 ; return 0; }
12473 EOF
12474 if { (eval echo configure:12475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12475   rm -rf conftest*
12476   ol_cv_pthread_mthreads=yes
12477 else
12478   echo "configure: failed program was:" >&5
12479   cat conftest.$ac_ext >&5
12480   rm -rf conftest*
12481   ol_cv_pthread_mthreads=no
12482 fi
12483 rm -f conftest*
12484 else
12485   cat > conftest.$ac_ext <<EOF
12486 #line 12487 "configure"
12487 #include "confdefs.h"
12488 /* pthread test headers */
12489 #include <pthread.h>
12490 #if HAVE_PTHREADS < 7
12491 #include <errno.h>
12492 #endif
12493 #ifndef NULL
12494 #define NULL (void*)0
12495 #endif
12496
12497 static void *task(p)
12498         void *p;
12499 {
12500         return (void *) (p == NULL);
12501 }
12502
12503
12504 int main(argc, argv)
12505         int argc;
12506         char **argv;
12507 {
12508
12509         /* pthread test function */
12510 #ifndef PTHREAD_CREATE_DETACHED
12511 #define PTHREAD_CREATE_DETACHED 1
12512 #endif
12513         pthread_t t;
12514         int status;
12515         int detach = PTHREAD_CREATE_DETACHED;
12516
12517 #if HAVE_PTHREADS > 4
12518         /* Final pthreads */
12519         pthread_attr_t attr;
12520
12521         status = pthread_attr_init(&attr);
12522         if( status ) return status;
12523
12524 #if HAVE_PTHREADS < 7
12525         status = pthread_attr_setdetachstate(&attr, &detach);
12526         if( status < 0 ) status = errno;
12527 #else
12528         status = pthread_attr_setdetachstate(&attr, detach);
12529 #endif
12530         if( status ) return status;
12531         status = pthread_create( &t, &attr, task, NULL );
12532 #if HAVE_PTHREADS < 7
12533         if( status < 0 ) status = errno;
12534 #endif
12535         if( status ) return status;
12536 #else
12537         /* Draft 4 pthreads */
12538         status = pthread_create( &t, pthread_attr_default, task, NULL );
12539         if( status ) return errno;
12540
12541         /* give thread a chance to complete */
12542         /* it should remain joinable and hence detachable */
12543         sleep( 1 );
12544
12545         status = pthread_detach( &t );
12546         if( status ) return errno;
12547 #endif
12548
12549 #ifdef HAVE_LINUX_THREADS
12550         pthread_kill_other_threads_np();
12551 #endif
12552
12553         return 0;
12554
12555 }
12556
12557 EOF
12558 if { (eval echo configure:12559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12559 then
12560   ol_cv_pthread_mthreads=yes
12561 else
12562   echo "configure: failed program was:" >&5
12563   cat conftest.$ac_ext >&5
12564   rm -fr conftest*
12565   ol_cv_pthread_mthreads=no
12566 fi
12567 rm -fr conftest*
12568 fi
12569
12570
12571                 # restore the LIBS
12572                 LIBS="$ol_LIBS"
12573         
12574 fi
12575
12576 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12577
12578         if test $ol_cv_pthread_mthreads = yes ; then
12579                 ol_link_pthreads="-mthreads"
12580                 ol_link_threads=posix
12581         fi
12582 fi
12583
12584                 # Pthread try link: -thread (ol_cv_pthread_thread)
12585 if test "$ol_link_threads" = no ; then
12586         # try -thread
12587         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12588 echo "configure:12589: checking for pthread link with -thread" >&5
12589 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12590   echo $ac_n "(cached) $ac_c" 1>&6
12591 else
12592   
12593                 # save the flags
12594                 ol_LIBS="$LIBS"
12595                 LIBS="-thread $LIBS"
12596
12597                 if test "$cross_compiling" = yes; then
12598   cat > conftest.$ac_ext <<EOF
12599 #line 12600 "configure"
12600 #include "confdefs.h"
12601 /* pthread test headers */
12602 #include <pthread.h>
12603 #if HAVE_PTHREADS < 7
12604 #include <errno.h>
12605 #endif
12606 #ifndef NULL
12607 #define NULL (void*)0
12608 #endif
12609
12610 static void *task(p)
12611         void *p;
12612 {
12613         return (void *) (p == NULL);
12614 }
12615
12616 int main() {
12617
12618         /* pthread test function */
12619 #ifndef PTHREAD_CREATE_DETACHED
12620 #define PTHREAD_CREATE_DETACHED 1
12621 #endif
12622         pthread_t t;
12623         int status;
12624         int detach = PTHREAD_CREATE_DETACHED;
12625
12626 #if HAVE_PTHREADS > 4
12627         /* Final pthreads */
12628         pthread_attr_t attr;
12629
12630         status = pthread_attr_init(&attr);
12631         if( status ) return status;
12632
12633 #if HAVE_PTHREADS < 7
12634         status = pthread_attr_setdetachstate(&attr, &detach);
12635         if( status < 0 ) status = errno;
12636 #else
12637         status = pthread_attr_setdetachstate(&attr, detach);
12638 #endif
12639         if( status ) return status;
12640         status = pthread_create( &t, &attr, task, NULL );
12641 #if HAVE_PTHREADS < 7
12642         if( status < 0 ) status = errno;
12643 #endif
12644         if( status ) return status;
12645 #else
12646         /* Draft 4 pthreads */
12647         status = pthread_create( &t, pthread_attr_default, task, NULL );
12648         if( status ) return errno;
12649
12650         /* give thread a chance to complete */
12651         /* it should remain joinable and hence detachable */
12652         sleep( 1 );
12653
12654         status = pthread_detach( &t );
12655         if( status ) return errno;
12656 #endif
12657
12658 #ifdef HAVE_LINUX_THREADS
12659         pthread_kill_other_threads_np();
12660 #endif
12661
12662         return 0;
12663
12664 ; return 0; }
12665 EOF
12666 if { (eval echo configure:12667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12667   rm -rf conftest*
12668   ol_cv_pthread_thread=yes
12669 else
12670   echo "configure: failed program was:" >&5
12671   cat conftest.$ac_ext >&5
12672   rm -rf conftest*
12673   ol_cv_pthread_thread=no
12674 fi
12675 rm -f conftest*
12676 else
12677   cat > conftest.$ac_ext <<EOF
12678 #line 12679 "configure"
12679 #include "confdefs.h"
12680 /* pthread test headers */
12681 #include <pthread.h>
12682 #if HAVE_PTHREADS < 7
12683 #include <errno.h>
12684 #endif
12685 #ifndef NULL
12686 #define NULL (void*)0
12687 #endif
12688
12689 static void *task(p)
12690         void *p;
12691 {
12692         return (void *) (p == NULL);
12693 }
12694
12695
12696 int main(argc, argv)
12697         int argc;
12698         char **argv;
12699 {
12700
12701         /* pthread test function */
12702 #ifndef PTHREAD_CREATE_DETACHED
12703 #define PTHREAD_CREATE_DETACHED 1
12704 #endif
12705         pthread_t t;
12706         int status;
12707         int detach = PTHREAD_CREATE_DETACHED;
12708
12709 #if HAVE_PTHREADS > 4
12710         /* Final pthreads */
12711         pthread_attr_t attr;
12712
12713         status = pthread_attr_init(&attr);
12714         if( status ) return status;
12715
12716 #if HAVE_PTHREADS < 7
12717         status = pthread_attr_setdetachstate(&attr, &detach);
12718         if( status < 0 ) status = errno;
12719 #else
12720         status = pthread_attr_setdetachstate(&attr, detach);
12721 #endif
12722         if( status ) return status;
12723         status = pthread_create( &t, &attr, task, NULL );
12724 #if HAVE_PTHREADS < 7
12725         if( status < 0 ) status = errno;
12726 #endif
12727         if( status ) return status;
12728 #else
12729         /* Draft 4 pthreads */
12730         status = pthread_create( &t, pthread_attr_default, task, NULL );
12731         if( status ) return errno;
12732
12733         /* give thread a chance to complete */
12734         /* it should remain joinable and hence detachable */
12735         sleep( 1 );
12736
12737         status = pthread_detach( &t );
12738         if( status ) return errno;
12739 #endif
12740
12741 #ifdef HAVE_LINUX_THREADS
12742         pthread_kill_other_threads_np();
12743 #endif
12744
12745         return 0;
12746
12747 }
12748
12749 EOF
12750 if { (eval echo configure:12751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12751 then
12752   ol_cv_pthread_thread=yes
12753 else
12754   echo "configure: failed program was:" >&5
12755   cat conftest.$ac_ext >&5
12756   rm -fr conftest*
12757   ol_cv_pthread_thread=no
12758 fi
12759 rm -fr conftest*
12760 fi
12761
12762
12763                 # restore the LIBS
12764                 LIBS="$ol_LIBS"
12765         
12766 fi
12767
12768 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12769
12770         if test $ol_cv_pthread_thread = yes ; then
12771                 ol_link_pthreads="-thread"
12772                 ol_link_threads=posix
12773         fi
12774 fi
12775
12776
12777                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12778 if test "$ol_link_threads" = no ; then
12779         # try -lpthread -lmach -lexc -lc_r
12780         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12781 echo "configure:12782: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12782 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12783   echo $ac_n "(cached) $ac_c" 1>&6
12784 else
12785   
12786                 # save the flags
12787                 ol_LIBS="$LIBS"
12788                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12789
12790                 if test "$cross_compiling" = yes; then
12791   cat > conftest.$ac_ext <<EOF
12792 #line 12793 "configure"
12793 #include "confdefs.h"
12794 /* pthread test headers */
12795 #include <pthread.h>
12796 #if HAVE_PTHREADS < 7
12797 #include <errno.h>
12798 #endif
12799 #ifndef NULL
12800 #define NULL (void*)0
12801 #endif
12802
12803 static void *task(p)
12804         void *p;
12805 {
12806         return (void *) (p == NULL);
12807 }
12808
12809 int main() {
12810
12811         /* pthread test function */
12812 #ifndef PTHREAD_CREATE_DETACHED
12813 #define PTHREAD_CREATE_DETACHED 1
12814 #endif
12815         pthread_t t;
12816         int status;
12817         int detach = PTHREAD_CREATE_DETACHED;
12818
12819 #if HAVE_PTHREADS > 4
12820         /* Final pthreads */
12821         pthread_attr_t attr;
12822
12823         status = pthread_attr_init(&attr);
12824         if( status ) return status;
12825
12826 #if HAVE_PTHREADS < 7
12827         status = pthread_attr_setdetachstate(&attr, &detach);
12828         if( status < 0 ) status = errno;
12829 #else
12830         status = pthread_attr_setdetachstate(&attr, detach);
12831 #endif
12832         if( status ) return status;
12833         status = pthread_create( &t, &attr, task, NULL );
12834 #if HAVE_PTHREADS < 7
12835         if( status < 0 ) status = errno;
12836 #endif
12837         if( status ) return status;
12838 #else
12839         /* Draft 4 pthreads */
12840         status = pthread_create( &t, pthread_attr_default, task, NULL );
12841         if( status ) return errno;
12842
12843         /* give thread a chance to complete */
12844         /* it should remain joinable and hence detachable */
12845         sleep( 1 );
12846
12847         status = pthread_detach( &t );
12848         if( status ) return errno;
12849 #endif
12850
12851 #ifdef HAVE_LINUX_THREADS
12852         pthread_kill_other_threads_np();
12853 #endif
12854
12855         return 0;
12856
12857 ; return 0; }
12858 EOF
12859 if { (eval echo configure:12860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12860   rm -rf conftest*
12861   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12862 else
12863   echo "configure: failed program was:" >&5
12864   cat conftest.$ac_ext >&5
12865   rm -rf conftest*
12866   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12867 fi
12868 rm -f conftest*
12869 else
12870   cat > conftest.$ac_ext <<EOF
12871 #line 12872 "configure"
12872 #include "confdefs.h"
12873 /* pthread test headers */
12874 #include <pthread.h>
12875 #if HAVE_PTHREADS < 7
12876 #include <errno.h>
12877 #endif
12878 #ifndef NULL
12879 #define NULL (void*)0
12880 #endif
12881
12882 static void *task(p)
12883         void *p;
12884 {
12885         return (void *) (p == NULL);
12886 }
12887
12888
12889 int main(argc, argv)
12890         int argc;
12891         char **argv;
12892 {
12893
12894         /* pthread test function */
12895 #ifndef PTHREAD_CREATE_DETACHED
12896 #define PTHREAD_CREATE_DETACHED 1
12897 #endif
12898         pthread_t t;
12899         int status;
12900         int detach = PTHREAD_CREATE_DETACHED;
12901
12902 #if HAVE_PTHREADS > 4
12903         /* Final pthreads */
12904         pthread_attr_t attr;
12905
12906         status = pthread_attr_init(&attr);
12907         if( status ) return status;
12908
12909 #if HAVE_PTHREADS < 7
12910         status = pthread_attr_setdetachstate(&attr, &detach);
12911         if( status < 0 ) status = errno;
12912 #else
12913         status = pthread_attr_setdetachstate(&attr, detach);
12914 #endif
12915         if( status ) return status;
12916         status = pthread_create( &t, &attr, task, NULL );
12917 #if HAVE_PTHREADS < 7
12918         if( status < 0 ) status = errno;
12919 #endif
12920         if( status ) return status;
12921 #else
12922         /* Draft 4 pthreads */
12923         status = pthread_create( &t, pthread_attr_default, task, NULL );
12924         if( status ) return errno;
12925
12926         /* give thread a chance to complete */
12927         /* it should remain joinable and hence detachable */
12928         sleep( 1 );
12929
12930         status = pthread_detach( &t );
12931         if( status ) return errno;
12932 #endif
12933
12934 #ifdef HAVE_LINUX_THREADS
12935         pthread_kill_other_threads_np();
12936 #endif
12937
12938         return 0;
12939
12940 }
12941
12942 EOF
12943 if { (eval echo configure:12944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12944 then
12945   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12946 else
12947   echo "configure: failed program was:" >&5
12948   cat conftest.$ac_ext >&5
12949   rm -fr conftest*
12950   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12951 fi
12952 rm -fr conftest*
12953 fi
12954
12955
12956                 # restore the LIBS
12957                 LIBS="$ol_LIBS"
12958         
12959 fi
12960
12961 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12962
12963         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12964                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12965                 ol_link_threads=posix
12966         fi
12967 fi
12968
12969                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12970 if test "$ol_link_threads" = no ; then
12971         # try -lpthread -lmach -lexc
12972         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12973 echo "configure:12974: checking for pthread link with -lpthread -lmach -lexc" >&5
12974 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12975   echo $ac_n "(cached) $ac_c" 1>&6
12976 else
12977   
12978                 # save the flags
12979                 ol_LIBS="$LIBS"
12980                 LIBS="-lpthread -lmach -lexc $LIBS"
12981
12982                 if test "$cross_compiling" = yes; then
12983   cat > conftest.$ac_ext <<EOF
12984 #line 12985 "configure"
12985 #include "confdefs.h"
12986 /* pthread test headers */
12987 #include <pthread.h>
12988 #if HAVE_PTHREADS < 7
12989 #include <errno.h>
12990 #endif
12991 #ifndef NULL
12992 #define NULL (void*)0
12993 #endif
12994
12995 static void *task(p)
12996         void *p;
12997 {
12998         return (void *) (p == NULL);
12999 }
13000
13001 int main() {
13002
13003         /* pthread test function */
13004 #ifndef PTHREAD_CREATE_DETACHED
13005 #define PTHREAD_CREATE_DETACHED 1
13006 #endif
13007         pthread_t t;
13008         int status;
13009         int detach = PTHREAD_CREATE_DETACHED;
13010
13011 #if HAVE_PTHREADS > 4
13012         /* Final pthreads */
13013         pthread_attr_t attr;
13014
13015         status = pthread_attr_init(&attr);
13016         if( status ) return status;
13017
13018 #if HAVE_PTHREADS < 7
13019         status = pthread_attr_setdetachstate(&attr, &detach);
13020         if( status < 0 ) status = errno;
13021 #else
13022         status = pthread_attr_setdetachstate(&attr, detach);
13023 #endif
13024         if( status ) return status;
13025         status = pthread_create( &t, &attr, task, NULL );
13026 #if HAVE_PTHREADS < 7
13027         if( status < 0 ) status = errno;
13028 #endif
13029         if( status ) return status;
13030 #else
13031         /* Draft 4 pthreads */
13032         status = pthread_create( &t, pthread_attr_default, task, NULL );
13033         if( status ) return errno;
13034
13035         /* give thread a chance to complete */
13036         /* it should remain joinable and hence detachable */
13037         sleep( 1 );
13038
13039         status = pthread_detach( &t );
13040         if( status ) return errno;
13041 #endif
13042
13043 #ifdef HAVE_LINUX_THREADS
13044         pthread_kill_other_threads_np();
13045 #endif
13046
13047         return 0;
13048
13049 ; return 0; }
13050 EOF
13051 if { (eval echo configure:13052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13052   rm -rf conftest*
13053   ol_cv_pthread_lpthread_lmach_lexc=yes
13054 else
13055   echo "configure: failed program was:" >&5
13056   cat conftest.$ac_ext >&5
13057   rm -rf conftest*
13058   ol_cv_pthread_lpthread_lmach_lexc=no
13059 fi
13060 rm -f conftest*
13061 else
13062   cat > conftest.$ac_ext <<EOF
13063 #line 13064 "configure"
13064 #include "confdefs.h"
13065 /* pthread test headers */
13066 #include <pthread.h>
13067 #if HAVE_PTHREADS < 7
13068 #include <errno.h>
13069 #endif
13070 #ifndef NULL
13071 #define NULL (void*)0
13072 #endif
13073
13074 static void *task(p)
13075         void *p;
13076 {
13077         return (void *) (p == NULL);
13078 }
13079
13080
13081 int main(argc, argv)
13082         int argc;
13083         char **argv;
13084 {
13085
13086         /* pthread test function */
13087 #ifndef PTHREAD_CREATE_DETACHED
13088 #define PTHREAD_CREATE_DETACHED 1
13089 #endif
13090         pthread_t t;
13091         int status;
13092         int detach = PTHREAD_CREATE_DETACHED;
13093
13094 #if HAVE_PTHREADS > 4
13095         /* Final pthreads */
13096         pthread_attr_t attr;
13097
13098         status = pthread_attr_init(&attr);
13099         if( status ) return status;
13100
13101 #if HAVE_PTHREADS < 7
13102         status = pthread_attr_setdetachstate(&attr, &detach);
13103         if( status < 0 ) status = errno;
13104 #else
13105         status = pthread_attr_setdetachstate(&attr, detach);
13106 #endif
13107         if( status ) return status;
13108         status = pthread_create( &t, &attr, task, NULL );
13109 #if HAVE_PTHREADS < 7
13110         if( status < 0 ) status = errno;
13111 #endif
13112         if( status ) return status;
13113 #else
13114         /* Draft 4 pthreads */
13115         status = pthread_create( &t, pthread_attr_default, task, NULL );
13116         if( status ) return errno;
13117
13118         /* give thread a chance to complete */
13119         /* it should remain joinable and hence detachable */
13120         sleep( 1 );
13121
13122         status = pthread_detach( &t );
13123         if( status ) return errno;
13124 #endif
13125
13126 #ifdef HAVE_LINUX_THREADS
13127         pthread_kill_other_threads_np();
13128 #endif
13129
13130         return 0;
13131
13132 }
13133
13134 EOF
13135 if { (eval echo configure:13136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13136 then
13137   ol_cv_pthread_lpthread_lmach_lexc=yes
13138 else
13139   echo "configure: failed program was:" >&5
13140   cat conftest.$ac_ext >&5
13141   rm -fr conftest*
13142   ol_cv_pthread_lpthread_lmach_lexc=no
13143 fi
13144 rm -fr conftest*
13145 fi
13146
13147
13148                 # restore the LIBS
13149                 LIBS="$ol_LIBS"
13150         
13151 fi
13152
13153 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13154
13155         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13156                 ol_link_pthreads="-lpthread -lmach -lexc"
13157                 ol_link_threads=posix
13158         fi
13159 fi
13160
13161
13162                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13163 if test "$ol_link_threads" = no ; then
13164         # try -lpthread -Wl,-woff,85
13165         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13166 echo "configure:13167: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13167 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13168   echo $ac_n "(cached) $ac_c" 1>&6
13169 else
13170   
13171                 # save the flags
13172                 ol_LIBS="$LIBS"
13173                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13174
13175                 if test "$cross_compiling" = yes; then
13176   cat > conftest.$ac_ext <<EOF
13177 #line 13178 "configure"
13178 #include "confdefs.h"
13179 /* pthread test headers */
13180 #include <pthread.h>
13181 #if HAVE_PTHREADS < 7
13182 #include <errno.h>
13183 #endif
13184 #ifndef NULL
13185 #define NULL (void*)0
13186 #endif
13187
13188 static void *task(p)
13189         void *p;
13190 {
13191         return (void *) (p == NULL);
13192 }
13193
13194 int main() {
13195
13196         /* pthread test function */
13197 #ifndef PTHREAD_CREATE_DETACHED
13198 #define PTHREAD_CREATE_DETACHED 1
13199 #endif
13200         pthread_t t;
13201         int status;
13202         int detach = PTHREAD_CREATE_DETACHED;
13203
13204 #if HAVE_PTHREADS > 4
13205         /* Final pthreads */
13206         pthread_attr_t attr;
13207
13208         status = pthread_attr_init(&attr);
13209         if( status ) return status;
13210
13211 #if HAVE_PTHREADS < 7
13212         status = pthread_attr_setdetachstate(&attr, &detach);
13213         if( status < 0 ) status = errno;
13214 #else
13215         status = pthread_attr_setdetachstate(&attr, detach);
13216 #endif
13217         if( status ) return status;
13218         status = pthread_create( &t, &attr, task, NULL );
13219 #if HAVE_PTHREADS < 7
13220         if( status < 0 ) status = errno;
13221 #endif
13222         if( status ) return status;
13223 #else
13224         /* Draft 4 pthreads */
13225         status = pthread_create( &t, pthread_attr_default, task, NULL );
13226         if( status ) return errno;
13227
13228         /* give thread a chance to complete */
13229         /* it should remain joinable and hence detachable */
13230         sleep( 1 );
13231
13232         status = pthread_detach( &t );
13233         if( status ) return errno;
13234 #endif
13235
13236 #ifdef HAVE_LINUX_THREADS
13237         pthread_kill_other_threads_np();
13238 #endif
13239
13240         return 0;
13241
13242 ; return 0; }
13243 EOF
13244 if { (eval echo configure:13245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13245   rm -rf conftest*
13246   ol_cv_pthread_lib_lpthread_woff=yes
13247 else
13248   echo "configure: failed program was:" >&5
13249   cat conftest.$ac_ext >&5
13250   rm -rf conftest*
13251   ol_cv_pthread_lib_lpthread_woff=no
13252 fi
13253 rm -f conftest*
13254 else
13255   cat > conftest.$ac_ext <<EOF
13256 #line 13257 "configure"
13257 #include "confdefs.h"
13258 /* pthread test headers */
13259 #include <pthread.h>
13260 #if HAVE_PTHREADS < 7
13261 #include <errno.h>
13262 #endif
13263 #ifndef NULL
13264 #define NULL (void*)0
13265 #endif
13266
13267 static void *task(p)
13268         void *p;
13269 {
13270         return (void *) (p == NULL);
13271 }
13272
13273
13274 int main(argc, argv)
13275         int argc;
13276         char **argv;
13277 {
13278
13279         /* pthread test function */
13280 #ifndef PTHREAD_CREATE_DETACHED
13281 #define PTHREAD_CREATE_DETACHED 1
13282 #endif
13283         pthread_t t;
13284         int status;
13285         int detach = PTHREAD_CREATE_DETACHED;
13286
13287 #if HAVE_PTHREADS > 4
13288         /* Final pthreads */
13289         pthread_attr_t attr;
13290
13291         status = pthread_attr_init(&attr);
13292         if( status ) return status;
13293
13294 #if HAVE_PTHREADS < 7
13295         status = pthread_attr_setdetachstate(&attr, &detach);
13296         if( status < 0 ) status = errno;
13297 #else
13298         status = pthread_attr_setdetachstate(&attr, detach);
13299 #endif
13300         if( status ) return status;
13301         status = pthread_create( &t, &attr, task, NULL );
13302 #if HAVE_PTHREADS < 7
13303         if( status < 0 ) status = errno;
13304 #endif
13305         if( status ) return status;
13306 #else
13307         /* Draft 4 pthreads */
13308         status = pthread_create( &t, pthread_attr_default, task, NULL );
13309         if( status ) return errno;
13310
13311         /* give thread a chance to complete */
13312         /* it should remain joinable and hence detachable */
13313         sleep( 1 );
13314
13315         status = pthread_detach( &t );
13316         if( status ) return errno;
13317 #endif
13318
13319 #ifdef HAVE_LINUX_THREADS
13320         pthread_kill_other_threads_np();
13321 #endif
13322
13323         return 0;
13324
13325 }
13326
13327 EOF
13328 if { (eval echo configure:13329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13329 then
13330   ol_cv_pthread_lib_lpthread_woff=yes
13331 else
13332   echo "configure: failed program was:" >&5
13333   cat conftest.$ac_ext >&5
13334   rm -fr conftest*
13335   ol_cv_pthread_lib_lpthread_woff=no
13336 fi
13337 rm -fr conftest*
13338 fi
13339
13340
13341                 # restore the LIBS
13342                 LIBS="$ol_LIBS"
13343         
13344 fi
13345
13346 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13347
13348         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13349                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13350                 ol_link_threads=posix
13351         fi
13352 fi
13353
13354
13355                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13356 if test "$ol_link_threads" = no ; then
13357         # try -lpthread
13358         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13359 echo "configure:13360: checking for pthread link with -lpthread" >&5
13360 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13361   echo $ac_n "(cached) $ac_c" 1>&6
13362 else
13363   
13364                 # save the flags
13365                 ol_LIBS="$LIBS"
13366                 LIBS="-lpthread $LIBS"
13367
13368                 if test "$cross_compiling" = yes; then
13369   cat > conftest.$ac_ext <<EOF
13370 #line 13371 "configure"
13371 #include "confdefs.h"
13372 /* pthread test headers */
13373 #include <pthread.h>
13374 #if HAVE_PTHREADS < 7
13375 #include <errno.h>
13376 #endif
13377 #ifndef NULL
13378 #define NULL (void*)0
13379 #endif
13380
13381 static void *task(p)
13382         void *p;
13383 {
13384         return (void *) (p == NULL);
13385 }
13386
13387 int main() {
13388
13389         /* pthread test function */
13390 #ifndef PTHREAD_CREATE_DETACHED
13391 #define PTHREAD_CREATE_DETACHED 1
13392 #endif
13393         pthread_t t;
13394         int status;
13395         int detach = PTHREAD_CREATE_DETACHED;
13396
13397 #if HAVE_PTHREADS > 4
13398         /* Final pthreads */
13399         pthread_attr_t attr;
13400
13401         status = pthread_attr_init(&attr);
13402         if( status ) return status;
13403
13404 #if HAVE_PTHREADS < 7
13405         status = pthread_attr_setdetachstate(&attr, &detach);
13406         if( status < 0 ) status = errno;
13407 #else
13408         status = pthread_attr_setdetachstate(&attr, detach);
13409 #endif
13410         if( status ) return status;
13411         status = pthread_create( &t, &attr, task, NULL );
13412 #if HAVE_PTHREADS < 7
13413         if( status < 0 ) status = errno;
13414 #endif
13415         if( status ) return status;
13416 #else
13417         /* Draft 4 pthreads */
13418         status = pthread_create( &t, pthread_attr_default, task, NULL );
13419         if( status ) return errno;
13420
13421         /* give thread a chance to complete */
13422         /* it should remain joinable and hence detachable */
13423         sleep( 1 );
13424
13425         status = pthread_detach( &t );
13426         if( status ) return errno;
13427 #endif
13428
13429 #ifdef HAVE_LINUX_THREADS
13430         pthread_kill_other_threads_np();
13431 #endif
13432
13433         return 0;
13434
13435 ; return 0; }
13436 EOF
13437 if { (eval echo configure:13438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13438   rm -rf conftest*
13439   ol_cv_pthread_lpthread=yes
13440 else
13441   echo "configure: failed program was:" >&5
13442   cat conftest.$ac_ext >&5
13443   rm -rf conftest*
13444   ol_cv_pthread_lpthread=no
13445 fi
13446 rm -f conftest*
13447 else
13448   cat > conftest.$ac_ext <<EOF
13449 #line 13450 "configure"
13450 #include "confdefs.h"
13451 /* pthread test headers */
13452 #include <pthread.h>
13453 #if HAVE_PTHREADS < 7
13454 #include <errno.h>
13455 #endif
13456 #ifndef NULL
13457 #define NULL (void*)0
13458 #endif
13459
13460 static void *task(p)
13461         void *p;
13462 {
13463         return (void *) (p == NULL);
13464 }
13465
13466
13467 int main(argc, argv)
13468         int argc;
13469         char **argv;
13470 {
13471
13472         /* pthread test function */
13473 #ifndef PTHREAD_CREATE_DETACHED
13474 #define PTHREAD_CREATE_DETACHED 1
13475 #endif
13476         pthread_t t;
13477         int status;
13478         int detach = PTHREAD_CREATE_DETACHED;
13479
13480 #if HAVE_PTHREADS > 4
13481         /* Final pthreads */
13482         pthread_attr_t attr;
13483
13484         status = pthread_attr_init(&attr);
13485         if( status ) return status;
13486
13487 #if HAVE_PTHREADS < 7
13488         status = pthread_attr_setdetachstate(&attr, &detach);
13489         if( status < 0 ) status = errno;
13490 #else
13491         status = pthread_attr_setdetachstate(&attr, detach);
13492 #endif
13493         if( status ) return status;
13494         status = pthread_create( &t, &attr, task, NULL );
13495 #if HAVE_PTHREADS < 7
13496         if( status < 0 ) status = errno;
13497 #endif
13498         if( status ) return status;
13499 #else
13500         /* Draft 4 pthreads */
13501         status = pthread_create( &t, pthread_attr_default, task, NULL );
13502         if( status ) return errno;
13503
13504         /* give thread a chance to complete */
13505         /* it should remain joinable and hence detachable */
13506         sleep( 1 );
13507
13508         status = pthread_detach( &t );
13509         if( status ) return errno;
13510 #endif
13511
13512 #ifdef HAVE_LINUX_THREADS
13513         pthread_kill_other_threads_np();
13514 #endif
13515
13516         return 0;
13517
13518 }
13519
13520 EOF
13521 if { (eval echo configure:13522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13522 then
13523   ol_cv_pthread_lpthread=yes
13524 else
13525   echo "configure: failed program was:" >&5
13526   cat conftest.$ac_ext >&5
13527   rm -fr conftest*
13528   ol_cv_pthread_lpthread=no
13529 fi
13530 rm -fr conftest*
13531 fi
13532
13533
13534                 # restore the LIBS
13535                 LIBS="$ol_LIBS"
13536         
13537 fi
13538
13539 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13540
13541         if test $ol_cv_pthread_lpthread = yes ; then
13542                 ol_link_pthreads="-lpthread"
13543                 ol_link_threads=posix
13544         fi
13545 fi
13546
13547                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13548 if test "$ol_link_threads" = no ; then
13549         # try -lc_r
13550         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13551 echo "configure:13552: checking for pthread link with -lc_r" >&5
13552 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13553   echo $ac_n "(cached) $ac_c" 1>&6
13554 else
13555   
13556                 # save the flags
13557                 ol_LIBS="$LIBS"
13558                 LIBS="-lc_r $LIBS"
13559
13560                 if test "$cross_compiling" = yes; then
13561   cat > conftest.$ac_ext <<EOF
13562 #line 13563 "configure"
13563 #include "confdefs.h"
13564 /* pthread test headers */
13565 #include <pthread.h>
13566 #if HAVE_PTHREADS < 7
13567 #include <errno.h>
13568 #endif
13569 #ifndef NULL
13570 #define NULL (void*)0
13571 #endif
13572
13573 static void *task(p)
13574         void *p;
13575 {
13576         return (void *) (p == NULL);
13577 }
13578
13579 int main() {
13580
13581         /* pthread test function */
13582 #ifndef PTHREAD_CREATE_DETACHED
13583 #define PTHREAD_CREATE_DETACHED 1
13584 #endif
13585         pthread_t t;
13586         int status;
13587         int detach = PTHREAD_CREATE_DETACHED;
13588
13589 #if HAVE_PTHREADS > 4
13590         /* Final pthreads */
13591         pthread_attr_t attr;
13592
13593         status = pthread_attr_init(&attr);
13594         if( status ) return status;
13595
13596 #if HAVE_PTHREADS < 7
13597         status = pthread_attr_setdetachstate(&attr, &detach);
13598         if( status < 0 ) status = errno;
13599 #else
13600         status = pthread_attr_setdetachstate(&attr, detach);
13601 #endif
13602         if( status ) return status;
13603         status = pthread_create( &t, &attr, task, NULL );
13604 #if HAVE_PTHREADS < 7
13605         if( status < 0 ) status = errno;
13606 #endif
13607         if( status ) return status;
13608 #else
13609         /* Draft 4 pthreads */
13610         status = pthread_create( &t, pthread_attr_default, task, NULL );
13611         if( status ) return errno;
13612
13613         /* give thread a chance to complete */
13614         /* it should remain joinable and hence detachable */
13615         sleep( 1 );
13616
13617         status = pthread_detach( &t );
13618         if( status ) return errno;
13619 #endif
13620
13621 #ifdef HAVE_LINUX_THREADS
13622         pthread_kill_other_threads_np();
13623 #endif
13624
13625         return 0;
13626
13627 ; return 0; }
13628 EOF
13629 if { (eval echo configure:13630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13630   rm -rf conftest*
13631   ol_cv_pthread_lc_r=yes
13632 else
13633   echo "configure: failed program was:" >&5
13634   cat conftest.$ac_ext >&5
13635   rm -rf conftest*
13636   ol_cv_pthread_lc_r=no
13637 fi
13638 rm -f conftest*
13639 else
13640   cat > conftest.$ac_ext <<EOF
13641 #line 13642 "configure"
13642 #include "confdefs.h"
13643 /* pthread test headers */
13644 #include <pthread.h>
13645 #if HAVE_PTHREADS < 7
13646 #include <errno.h>
13647 #endif
13648 #ifndef NULL
13649 #define NULL (void*)0
13650 #endif
13651
13652 static void *task(p)
13653         void *p;
13654 {
13655         return (void *) (p == NULL);
13656 }
13657
13658
13659 int main(argc, argv)
13660         int argc;
13661         char **argv;
13662 {
13663
13664         /* pthread test function */
13665 #ifndef PTHREAD_CREATE_DETACHED
13666 #define PTHREAD_CREATE_DETACHED 1
13667 #endif
13668         pthread_t t;
13669         int status;
13670         int detach = PTHREAD_CREATE_DETACHED;
13671
13672 #if HAVE_PTHREADS > 4
13673         /* Final pthreads */
13674         pthread_attr_t attr;
13675
13676         status = pthread_attr_init(&attr);
13677         if( status ) return status;
13678
13679 #if HAVE_PTHREADS < 7
13680         status = pthread_attr_setdetachstate(&attr, &detach);
13681         if( status < 0 ) status = errno;
13682 #else
13683         status = pthread_attr_setdetachstate(&attr, detach);
13684 #endif
13685         if( status ) return status;
13686         status = pthread_create( &t, &attr, task, NULL );
13687 #if HAVE_PTHREADS < 7
13688         if( status < 0 ) status = errno;
13689 #endif
13690         if( status ) return status;
13691 #else
13692         /* Draft 4 pthreads */
13693         status = pthread_create( &t, pthread_attr_default, task, NULL );
13694         if( status ) return errno;
13695
13696         /* give thread a chance to complete */
13697         /* it should remain joinable and hence detachable */
13698         sleep( 1 );
13699
13700         status = pthread_detach( &t );
13701         if( status ) return errno;
13702 #endif
13703
13704 #ifdef HAVE_LINUX_THREADS
13705         pthread_kill_other_threads_np();
13706 #endif
13707
13708         return 0;
13709
13710 }
13711
13712 EOF
13713 if { (eval echo configure:13714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13714 then
13715   ol_cv_pthread_lc_r=yes
13716 else
13717   echo "configure: failed program was:" >&5
13718   cat conftest.$ac_ext >&5
13719   rm -fr conftest*
13720   ol_cv_pthread_lc_r=no
13721 fi
13722 rm -fr conftest*
13723 fi
13724
13725
13726                 # restore the LIBS
13727                 LIBS="$ol_LIBS"
13728         
13729 fi
13730
13731 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13732
13733         if test $ol_cv_pthread_lc_r = yes ; then
13734                 ol_link_pthreads="-lc_r"
13735                 ol_link_threads=posix
13736         fi
13737 fi
13738
13739
13740                 # Pthread try link: -threads (ol_cv_pthread_threads)
13741 if test "$ol_link_threads" = no ; then
13742         # try -threads
13743         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13744 echo "configure:13745: checking for pthread link with -threads" >&5
13745 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13746   echo $ac_n "(cached) $ac_c" 1>&6
13747 else
13748   
13749                 # save the flags
13750                 ol_LIBS="$LIBS"
13751                 LIBS="-threads $LIBS"
13752
13753                 if test "$cross_compiling" = yes; then
13754   cat > conftest.$ac_ext <<EOF
13755 #line 13756 "configure"
13756 #include "confdefs.h"
13757 /* pthread test headers */
13758 #include <pthread.h>
13759 #if HAVE_PTHREADS < 7
13760 #include <errno.h>
13761 #endif
13762 #ifndef NULL
13763 #define NULL (void*)0
13764 #endif
13765
13766 static void *task(p)
13767         void *p;
13768 {
13769         return (void *) (p == NULL);
13770 }
13771
13772 int main() {
13773
13774         /* pthread test function */
13775 #ifndef PTHREAD_CREATE_DETACHED
13776 #define PTHREAD_CREATE_DETACHED 1
13777 #endif
13778         pthread_t t;
13779         int status;
13780         int detach = PTHREAD_CREATE_DETACHED;
13781
13782 #if HAVE_PTHREADS > 4
13783         /* Final pthreads */
13784         pthread_attr_t attr;
13785
13786         status = pthread_attr_init(&attr);
13787         if( status ) return status;
13788
13789 #if HAVE_PTHREADS < 7
13790         status = pthread_attr_setdetachstate(&attr, &detach);
13791         if( status < 0 ) status = errno;
13792 #else
13793         status = pthread_attr_setdetachstate(&attr, detach);
13794 #endif
13795         if( status ) return status;
13796         status = pthread_create( &t, &attr, task, NULL );
13797 #if HAVE_PTHREADS < 7
13798         if( status < 0 ) status = errno;
13799 #endif
13800         if( status ) return status;
13801 #else
13802         /* Draft 4 pthreads */
13803         status = pthread_create( &t, pthread_attr_default, task, NULL );
13804         if( status ) return errno;
13805
13806         /* give thread a chance to complete */
13807         /* it should remain joinable and hence detachable */
13808         sleep( 1 );
13809
13810         status = pthread_detach( &t );
13811         if( status ) return errno;
13812 #endif
13813
13814 #ifdef HAVE_LINUX_THREADS
13815         pthread_kill_other_threads_np();
13816 #endif
13817
13818         return 0;
13819
13820 ; return 0; }
13821 EOF
13822 if { (eval echo configure:13823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13823   rm -rf conftest*
13824   ol_cv_pthread_threads=yes
13825 else
13826   echo "configure: failed program was:" >&5
13827   cat conftest.$ac_ext >&5
13828   rm -rf conftest*
13829   ol_cv_pthread_threads=no
13830 fi
13831 rm -f conftest*
13832 else
13833   cat > conftest.$ac_ext <<EOF
13834 #line 13835 "configure"
13835 #include "confdefs.h"
13836 /* pthread test headers */
13837 #include <pthread.h>
13838 #if HAVE_PTHREADS < 7
13839 #include <errno.h>
13840 #endif
13841 #ifndef NULL
13842 #define NULL (void*)0
13843 #endif
13844
13845 static void *task(p)
13846         void *p;
13847 {
13848         return (void *) (p == NULL);
13849 }
13850
13851
13852 int main(argc, argv)
13853         int argc;
13854         char **argv;
13855 {
13856
13857         /* pthread test function */
13858 #ifndef PTHREAD_CREATE_DETACHED
13859 #define PTHREAD_CREATE_DETACHED 1
13860 #endif
13861         pthread_t t;
13862         int status;
13863         int detach = PTHREAD_CREATE_DETACHED;
13864
13865 #if HAVE_PTHREADS > 4
13866         /* Final pthreads */
13867         pthread_attr_t attr;
13868
13869         status = pthread_attr_init(&attr);
13870         if( status ) return status;
13871
13872 #if HAVE_PTHREADS < 7
13873         status = pthread_attr_setdetachstate(&attr, &detach);
13874         if( status < 0 ) status = errno;
13875 #else
13876         status = pthread_attr_setdetachstate(&attr, detach);
13877 #endif
13878         if( status ) return status;
13879         status = pthread_create( &t, &attr, task, NULL );
13880 #if HAVE_PTHREADS < 7
13881         if( status < 0 ) status = errno;
13882 #endif
13883         if( status ) return status;
13884 #else
13885         /* Draft 4 pthreads */
13886         status = pthread_create( &t, pthread_attr_default, task, NULL );
13887         if( status ) return errno;
13888
13889         /* give thread a chance to complete */
13890         /* it should remain joinable and hence detachable */
13891         sleep( 1 );
13892
13893         status = pthread_detach( &t );
13894         if( status ) return errno;
13895 #endif
13896
13897 #ifdef HAVE_LINUX_THREADS
13898         pthread_kill_other_threads_np();
13899 #endif
13900
13901         return 0;
13902
13903 }
13904
13905 EOF
13906 if { (eval echo configure:13907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13907 then
13908   ol_cv_pthread_threads=yes
13909 else
13910   echo "configure: failed program was:" >&5
13911   cat conftest.$ac_ext >&5
13912   rm -fr conftest*
13913   ol_cv_pthread_threads=no
13914 fi
13915 rm -fr conftest*
13916 fi
13917
13918
13919                 # restore the LIBS
13920                 LIBS="$ol_LIBS"
13921         
13922 fi
13923
13924 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13925
13926         if test $ol_cv_pthread_threads = yes ; then
13927                 ol_link_pthreads="-threads"
13928                 ol_link_threads=posix
13929         fi
13930 fi
13931
13932
13933                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13934 if test "$ol_link_threads" = no ; then
13935         # try -lpthreads -lmach -lexc -lc_r
13936         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13937 echo "configure:13938: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13938 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13939   echo $ac_n "(cached) $ac_c" 1>&6
13940 else
13941   
13942                 # save the flags
13943                 ol_LIBS="$LIBS"
13944                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13945
13946                 if test "$cross_compiling" = yes; then
13947   cat > conftest.$ac_ext <<EOF
13948 #line 13949 "configure"
13949 #include "confdefs.h"
13950 /* pthread test headers */
13951 #include <pthread.h>
13952 #if HAVE_PTHREADS < 7
13953 #include <errno.h>
13954 #endif
13955 #ifndef NULL
13956 #define NULL (void*)0
13957 #endif
13958
13959 static void *task(p)
13960         void *p;
13961 {
13962         return (void *) (p == NULL);
13963 }
13964
13965 int main() {
13966
13967         /* pthread test function */
13968 #ifndef PTHREAD_CREATE_DETACHED
13969 #define PTHREAD_CREATE_DETACHED 1
13970 #endif
13971         pthread_t t;
13972         int status;
13973         int detach = PTHREAD_CREATE_DETACHED;
13974
13975 #if HAVE_PTHREADS > 4
13976         /* Final pthreads */
13977         pthread_attr_t attr;
13978
13979         status = pthread_attr_init(&attr);
13980         if( status ) return status;
13981
13982 #if HAVE_PTHREADS < 7
13983         status = pthread_attr_setdetachstate(&attr, &detach);
13984         if( status < 0 ) status = errno;
13985 #else
13986         status = pthread_attr_setdetachstate(&attr, detach);
13987 #endif
13988         if( status ) return status;
13989         status = pthread_create( &t, &attr, task, NULL );
13990 #if HAVE_PTHREADS < 7
13991         if( status < 0 ) status = errno;
13992 #endif
13993         if( status ) return status;
13994 #else
13995         /* Draft 4 pthreads */
13996         status = pthread_create( &t, pthread_attr_default, task, NULL );
13997         if( status ) return errno;
13998
13999         /* give thread a chance to complete */
14000         /* it should remain joinable and hence detachable */
14001         sleep( 1 );
14002
14003         status = pthread_detach( &t );
14004         if( status ) return errno;
14005 #endif
14006
14007 #ifdef HAVE_LINUX_THREADS
14008         pthread_kill_other_threads_np();
14009 #endif
14010
14011         return 0;
14012
14013 ; return 0; }
14014 EOF
14015 if { (eval echo configure:14016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14016   rm -rf conftest*
14017   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14018 else
14019   echo "configure: failed program was:" >&5
14020   cat conftest.$ac_ext >&5
14021   rm -rf conftest*
14022   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14023 fi
14024 rm -f conftest*
14025 else
14026   cat > conftest.$ac_ext <<EOF
14027 #line 14028 "configure"
14028 #include "confdefs.h"
14029 /* pthread test headers */
14030 #include <pthread.h>
14031 #if HAVE_PTHREADS < 7
14032 #include <errno.h>
14033 #endif
14034 #ifndef NULL
14035 #define NULL (void*)0
14036 #endif
14037
14038 static void *task(p)
14039         void *p;
14040 {
14041         return (void *) (p == NULL);
14042 }
14043
14044
14045 int main(argc, argv)
14046         int argc;
14047         char **argv;
14048 {
14049
14050         /* pthread test function */
14051 #ifndef PTHREAD_CREATE_DETACHED
14052 #define PTHREAD_CREATE_DETACHED 1
14053 #endif
14054         pthread_t t;
14055         int status;
14056         int detach = PTHREAD_CREATE_DETACHED;
14057
14058 #if HAVE_PTHREADS > 4
14059         /* Final pthreads */
14060         pthread_attr_t attr;
14061
14062         status = pthread_attr_init(&attr);
14063         if( status ) return status;
14064
14065 #if HAVE_PTHREADS < 7
14066         status = pthread_attr_setdetachstate(&attr, &detach);
14067         if( status < 0 ) status = errno;
14068 #else
14069         status = pthread_attr_setdetachstate(&attr, detach);
14070 #endif
14071         if( status ) return status;
14072         status = pthread_create( &t, &attr, task, NULL );
14073 #if HAVE_PTHREADS < 7
14074         if( status < 0 ) status = errno;
14075 #endif
14076         if( status ) return status;
14077 #else
14078         /* Draft 4 pthreads */
14079         status = pthread_create( &t, pthread_attr_default, task, NULL );
14080         if( status ) return errno;
14081
14082         /* give thread a chance to complete */
14083         /* it should remain joinable and hence detachable */
14084         sleep( 1 );
14085
14086         status = pthread_detach( &t );
14087         if( status ) return errno;
14088 #endif
14089
14090 #ifdef HAVE_LINUX_THREADS
14091         pthread_kill_other_threads_np();
14092 #endif
14093
14094         return 0;
14095
14096 }
14097
14098 EOF
14099 if { (eval echo configure:14100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14100 then
14101   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14102 else
14103   echo "configure: failed program was:" >&5
14104   cat conftest.$ac_ext >&5
14105   rm -fr conftest*
14106   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14107 fi
14108 rm -fr conftest*
14109 fi
14110
14111
14112                 # restore the LIBS
14113                 LIBS="$ol_LIBS"
14114         
14115 fi
14116
14117 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14118
14119         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14120                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14121                 ol_link_threads=posix
14122         fi
14123 fi
14124
14125                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14126 if test "$ol_link_threads" = no ; then
14127         # try -lpthreads -lmach -lexc
14128         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14129 echo "configure:14130: checking for pthread link with -lpthreads -lmach -lexc" >&5
14130 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14131   echo $ac_n "(cached) $ac_c" 1>&6
14132 else
14133   
14134                 # save the flags
14135                 ol_LIBS="$LIBS"
14136                 LIBS="-lpthreads -lmach -lexc $LIBS"
14137
14138                 if test "$cross_compiling" = yes; then
14139   cat > conftest.$ac_ext <<EOF
14140 #line 14141 "configure"
14141 #include "confdefs.h"
14142 /* pthread test headers */
14143 #include <pthread.h>
14144 #if HAVE_PTHREADS < 7
14145 #include <errno.h>
14146 #endif
14147 #ifndef NULL
14148 #define NULL (void*)0
14149 #endif
14150
14151 static void *task(p)
14152         void *p;
14153 {
14154         return (void *) (p == NULL);
14155 }
14156
14157 int main() {
14158
14159         /* pthread test function */
14160 #ifndef PTHREAD_CREATE_DETACHED
14161 #define PTHREAD_CREATE_DETACHED 1
14162 #endif
14163         pthread_t t;
14164         int status;
14165         int detach = PTHREAD_CREATE_DETACHED;
14166
14167 #if HAVE_PTHREADS > 4
14168         /* Final pthreads */
14169         pthread_attr_t attr;
14170
14171         status = pthread_attr_init(&attr);
14172         if( status ) return status;
14173
14174 #if HAVE_PTHREADS < 7
14175         status = pthread_attr_setdetachstate(&attr, &detach);
14176         if( status < 0 ) status = errno;
14177 #else
14178         status = pthread_attr_setdetachstate(&attr, detach);
14179 #endif
14180         if( status ) return status;
14181         status = pthread_create( &t, &attr, task, NULL );
14182 #if HAVE_PTHREADS < 7
14183         if( status < 0 ) status = errno;
14184 #endif
14185         if( status ) return status;
14186 #else
14187         /* Draft 4 pthreads */
14188         status = pthread_create( &t, pthread_attr_default, task, NULL );
14189         if( status ) return errno;
14190
14191         /* give thread a chance to complete */
14192         /* it should remain joinable and hence detachable */
14193         sleep( 1 );
14194
14195         status = pthread_detach( &t );
14196         if( status ) return errno;
14197 #endif
14198
14199 #ifdef HAVE_LINUX_THREADS
14200         pthread_kill_other_threads_np();
14201 #endif
14202
14203         return 0;
14204
14205 ; return 0; }
14206 EOF
14207 if { (eval echo configure:14208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14208   rm -rf conftest*
14209   ol_cv_pthread_lpthreads_lmach_lexc=yes
14210 else
14211   echo "configure: failed program was:" >&5
14212   cat conftest.$ac_ext >&5
14213   rm -rf conftest*
14214   ol_cv_pthread_lpthreads_lmach_lexc=no
14215 fi
14216 rm -f conftest*
14217 else
14218   cat > conftest.$ac_ext <<EOF
14219 #line 14220 "configure"
14220 #include "confdefs.h"
14221 /* pthread test headers */
14222 #include <pthread.h>
14223 #if HAVE_PTHREADS < 7
14224 #include <errno.h>
14225 #endif
14226 #ifndef NULL
14227 #define NULL (void*)0
14228 #endif
14229
14230 static void *task(p)
14231         void *p;
14232 {
14233         return (void *) (p == NULL);
14234 }
14235
14236
14237 int main(argc, argv)
14238         int argc;
14239         char **argv;
14240 {
14241
14242         /* pthread test function */
14243 #ifndef PTHREAD_CREATE_DETACHED
14244 #define PTHREAD_CREATE_DETACHED 1
14245 #endif
14246         pthread_t t;
14247         int status;
14248         int detach = PTHREAD_CREATE_DETACHED;
14249
14250 #if HAVE_PTHREADS > 4
14251         /* Final pthreads */
14252         pthread_attr_t attr;
14253
14254         status = pthread_attr_init(&attr);
14255         if( status ) return status;
14256
14257 #if HAVE_PTHREADS < 7
14258         status = pthread_attr_setdetachstate(&attr, &detach);
14259         if( status < 0 ) status = errno;
14260 #else
14261         status = pthread_attr_setdetachstate(&attr, detach);
14262 #endif
14263         if( status ) return status;
14264         status = pthread_create( &t, &attr, task, NULL );
14265 #if HAVE_PTHREADS < 7
14266         if( status < 0 ) status = errno;
14267 #endif
14268         if( status ) return status;
14269 #else
14270         /* Draft 4 pthreads */
14271         status = pthread_create( &t, pthread_attr_default, task, NULL );
14272         if( status ) return errno;
14273
14274         /* give thread a chance to complete */
14275         /* it should remain joinable and hence detachable */
14276         sleep( 1 );
14277
14278         status = pthread_detach( &t );
14279         if( status ) return errno;
14280 #endif
14281
14282 #ifdef HAVE_LINUX_THREADS
14283         pthread_kill_other_threads_np();
14284 #endif
14285
14286         return 0;
14287
14288 }
14289
14290 EOF
14291 if { (eval echo configure:14292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14292 then
14293   ol_cv_pthread_lpthreads_lmach_lexc=yes
14294 else
14295   echo "configure: failed program was:" >&5
14296   cat conftest.$ac_ext >&5
14297   rm -fr conftest*
14298   ol_cv_pthread_lpthreads_lmach_lexc=no
14299 fi
14300 rm -fr conftest*
14301 fi
14302
14303
14304                 # restore the LIBS
14305                 LIBS="$ol_LIBS"
14306         
14307 fi
14308
14309 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14310
14311         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14312                 ol_link_pthreads="-lpthreads -lmach -lexc"
14313                 ol_link_threads=posix
14314         fi
14315 fi
14316
14317                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14318 if test "$ol_link_threads" = no ; then
14319         # try -lpthreads -lexc
14320         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14321 echo "configure:14322: checking for pthread link with -lpthreads -lexc" >&5
14322 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14323   echo $ac_n "(cached) $ac_c" 1>&6
14324 else
14325   
14326                 # save the flags
14327                 ol_LIBS="$LIBS"
14328                 LIBS="-lpthreads -lexc $LIBS"
14329
14330                 if test "$cross_compiling" = yes; then
14331   cat > conftest.$ac_ext <<EOF
14332 #line 14333 "configure"
14333 #include "confdefs.h"
14334 /* pthread test headers */
14335 #include <pthread.h>
14336 #if HAVE_PTHREADS < 7
14337 #include <errno.h>
14338 #endif
14339 #ifndef NULL
14340 #define NULL (void*)0
14341 #endif
14342
14343 static void *task(p)
14344         void *p;
14345 {
14346         return (void *) (p == NULL);
14347 }
14348
14349 int main() {
14350
14351         /* pthread test function */
14352 #ifndef PTHREAD_CREATE_DETACHED
14353 #define PTHREAD_CREATE_DETACHED 1
14354 #endif
14355         pthread_t t;
14356         int status;
14357         int detach = PTHREAD_CREATE_DETACHED;
14358
14359 #if HAVE_PTHREADS > 4
14360         /* Final pthreads */
14361         pthread_attr_t attr;
14362
14363         status = pthread_attr_init(&attr);
14364         if( status ) return status;
14365
14366 #if HAVE_PTHREADS < 7
14367         status = pthread_attr_setdetachstate(&attr, &detach);
14368         if( status < 0 ) status = errno;
14369 #else
14370         status = pthread_attr_setdetachstate(&attr, detach);
14371 #endif
14372         if( status ) return status;
14373         status = pthread_create( &t, &attr, task, NULL );
14374 #if HAVE_PTHREADS < 7
14375         if( status < 0 ) status = errno;
14376 #endif
14377         if( status ) return status;
14378 #else
14379         /* Draft 4 pthreads */
14380         status = pthread_create( &t, pthread_attr_default, task, NULL );
14381         if( status ) return errno;
14382
14383         /* give thread a chance to complete */
14384         /* it should remain joinable and hence detachable */
14385         sleep( 1 );
14386
14387         status = pthread_detach( &t );
14388         if( status ) return errno;
14389 #endif
14390
14391 #ifdef HAVE_LINUX_THREADS
14392         pthread_kill_other_threads_np();
14393 #endif
14394
14395         return 0;
14396
14397 ; return 0; }
14398 EOF
14399 if { (eval echo configure:14400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14400   rm -rf conftest*
14401   ol_cv_pthread_lpthreads_lexc=yes
14402 else
14403   echo "configure: failed program was:" >&5
14404   cat conftest.$ac_ext >&5
14405   rm -rf conftest*
14406   ol_cv_pthread_lpthreads_lexc=no
14407 fi
14408 rm -f conftest*
14409 else
14410   cat > conftest.$ac_ext <<EOF
14411 #line 14412 "configure"
14412 #include "confdefs.h"
14413 /* pthread test headers */
14414 #include <pthread.h>
14415 #if HAVE_PTHREADS < 7
14416 #include <errno.h>
14417 #endif
14418 #ifndef NULL
14419 #define NULL (void*)0
14420 #endif
14421
14422 static void *task(p)
14423         void *p;
14424 {
14425         return (void *) (p == NULL);
14426 }
14427
14428
14429 int main(argc, argv)
14430         int argc;
14431         char **argv;
14432 {
14433
14434         /* pthread test function */
14435 #ifndef PTHREAD_CREATE_DETACHED
14436 #define PTHREAD_CREATE_DETACHED 1
14437 #endif
14438         pthread_t t;
14439         int status;
14440         int detach = PTHREAD_CREATE_DETACHED;
14441
14442 #if HAVE_PTHREADS > 4
14443         /* Final pthreads */
14444         pthread_attr_t attr;
14445
14446         status = pthread_attr_init(&attr);
14447         if( status ) return status;
14448
14449 #if HAVE_PTHREADS < 7
14450         status = pthread_attr_setdetachstate(&attr, &detach);
14451         if( status < 0 ) status = errno;
14452 #else
14453         status = pthread_attr_setdetachstate(&attr, detach);
14454 #endif
14455         if( status ) return status;
14456         status = pthread_create( &t, &attr, task, NULL );
14457 #if HAVE_PTHREADS < 7
14458         if( status < 0 ) status = errno;
14459 #endif
14460         if( status ) return status;
14461 #else
14462         /* Draft 4 pthreads */
14463         status = pthread_create( &t, pthread_attr_default, task, NULL );
14464         if( status ) return errno;
14465
14466         /* give thread a chance to complete */
14467         /* it should remain joinable and hence detachable */
14468         sleep( 1 );
14469
14470         status = pthread_detach( &t );
14471         if( status ) return errno;
14472 #endif
14473
14474 #ifdef HAVE_LINUX_THREADS
14475         pthread_kill_other_threads_np();
14476 #endif
14477
14478         return 0;
14479
14480 }
14481
14482 EOF
14483 if { (eval echo configure:14484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14484 then
14485   ol_cv_pthread_lpthreads_lexc=yes
14486 else
14487   echo "configure: failed program was:" >&5
14488   cat conftest.$ac_ext >&5
14489   rm -fr conftest*
14490   ol_cv_pthread_lpthreads_lexc=no
14491 fi
14492 rm -fr conftest*
14493 fi
14494
14495
14496                 # restore the LIBS
14497                 LIBS="$ol_LIBS"
14498         
14499 fi
14500
14501 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14502
14503         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14504                 ol_link_pthreads="-lpthreads -lexc"
14505                 ol_link_threads=posix
14506         fi
14507 fi
14508
14509
14510                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14511 if test "$ol_link_threads" = no ; then
14512         # try -lpthreads
14513         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14514 echo "configure:14515: checking for pthread link with -lpthreads" >&5
14515 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14516   echo $ac_n "(cached) $ac_c" 1>&6
14517 else
14518   
14519                 # save the flags
14520                 ol_LIBS="$LIBS"
14521                 LIBS="-lpthreads $LIBS"
14522
14523                 if test "$cross_compiling" = yes; then
14524   cat > conftest.$ac_ext <<EOF
14525 #line 14526 "configure"
14526 #include "confdefs.h"
14527 /* pthread test headers */
14528 #include <pthread.h>
14529 #if HAVE_PTHREADS < 7
14530 #include <errno.h>
14531 #endif
14532 #ifndef NULL
14533 #define NULL (void*)0
14534 #endif
14535
14536 static void *task(p)
14537         void *p;
14538 {
14539         return (void *) (p == NULL);
14540 }
14541
14542 int main() {
14543
14544         /* pthread test function */
14545 #ifndef PTHREAD_CREATE_DETACHED
14546 #define PTHREAD_CREATE_DETACHED 1
14547 #endif
14548         pthread_t t;
14549         int status;
14550         int detach = PTHREAD_CREATE_DETACHED;
14551
14552 #if HAVE_PTHREADS > 4
14553         /* Final pthreads */
14554         pthread_attr_t attr;
14555
14556         status = pthread_attr_init(&attr);
14557         if( status ) return status;
14558
14559 #if HAVE_PTHREADS < 7
14560         status = pthread_attr_setdetachstate(&attr, &detach);
14561         if( status < 0 ) status = errno;
14562 #else
14563         status = pthread_attr_setdetachstate(&attr, detach);
14564 #endif
14565         if( status ) return status;
14566         status = pthread_create( &t, &attr, task, NULL );
14567 #if HAVE_PTHREADS < 7
14568         if( status < 0 ) status = errno;
14569 #endif
14570         if( status ) return status;
14571 #else
14572         /* Draft 4 pthreads */
14573         status = pthread_create( &t, pthread_attr_default, task, NULL );
14574         if( status ) return errno;
14575
14576         /* give thread a chance to complete */
14577         /* it should remain joinable and hence detachable */
14578         sleep( 1 );
14579
14580         status = pthread_detach( &t );
14581         if( status ) return errno;
14582 #endif
14583
14584 #ifdef HAVE_LINUX_THREADS
14585         pthread_kill_other_threads_np();
14586 #endif
14587
14588         return 0;
14589
14590 ; return 0; }
14591 EOF
14592 if { (eval echo configure:14593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14593   rm -rf conftest*
14594   ol_cv_pthread_lib_lpthreads=yes
14595 else
14596   echo "configure: failed program was:" >&5
14597   cat conftest.$ac_ext >&5
14598   rm -rf conftest*
14599   ol_cv_pthread_lib_lpthreads=no
14600 fi
14601 rm -f conftest*
14602 else
14603   cat > conftest.$ac_ext <<EOF
14604 #line 14605 "configure"
14605 #include "confdefs.h"
14606 /* pthread test headers */
14607 #include <pthread.h>
14608 #if HAVE_PTHREADS < 7
14609 #include <errno.h>
14610 #endif
14611 #ifndef NULL
14612 #define NULL (void*)0
14613 #endif
14614
14615 static void *task(p)
14616         void *p;
14617 {
14618         return (void *) (p == NULL);
14619 }
14620
14621
14622 int main(argc, argv)
14623         int argc;
14624         char **argv;
14625 {
14626
14627         /* pthread test function */
14628 #ifndef PTHREAD_CREATE_DETACHED
14629 #define PTHREAD_CREATE_DETACHED 1
14630 #endif
14631         pthread_t t;
14632         int status;
14633         int detach = PTHREAD_CREATE_DETACHED;
14634
14635 #if HAVE_PTHREADS > 4
14636         /* Final pthreads */
14637         pthread_attr_t attr;
14638
14639         status = pthread_attr_init(&attr);
14640         if( status ) return status;
14641
14642 #if HAVE_PTHREADS < 7
14643         status = pthread_attr_setdetachstate(&attr, &detach);
14644         if( status < 0 ) status = errno;
14645 #else
14646         status = pthread_attr_setdetachstate(&attr, detach);
14647 #endif
14648         if( status ) return status;
14649         status = pthread_create( &t, &attr, task, NULL );
14650 #if HAVE_PTHREADS < 7
14651         if( status < 0 ) status = errno;
14652 #endif
14653         if( status ) return status;
14654 #else
14655         /* Draft 4 pthreads */
14656         status = pthread_create( &t, pthread_attr_default, task, NULL );
14657         if( status ) return errno;
14658
14659         /* give thread a chance to complete */
14660         /* it should remain joinable and hence detachable */
14661         sleep( 1 );
14662
14663         status = pthread_detach( &t );
14664         if( status ) return errno;
14665 #endif
14666
14667 #ifdef HAVE_LINUX_THREADS
14668         pthread_kill_other_threads_np();
14669 #endif
14670
14671         return 0;
14672
14673 }
14674
14675 EOF
14676 if { (eval echo configure:14677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14677 then
14678   ol_cv_pthread_lib_lpthreads=yes
14679 else
14680   echo "configure: failed program was:" >&5
14681   cat conftest.$ac_ext >&5
14682   rm -fr conftest*
14683   ol_cv_pthread_lib_lpthreads=no
14684 fi
14685 rm -fr conftest*
14686 fi
14687
14688
14689                 # restore the LIBS
14690                 LIBS="$ol_LIBS"
14691         
14692 fi
14693
14694 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14695
14696         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14697                 ol_link_pthreads="-lpthreads"
14698                 ol_link_threads=posix
14699         fi
14700 fi
14701
14702
14703                 if test $ol_link_threads != no ; then
14704                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14705
14706                                                 save_CPPFLAGS="$CPPFLAGS"
14707                         save_LIBS="$LIBS"
14708                         LIBS="$LTHREAD_LIBS $LIBS"
14709
14710                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14711 do
14712 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14713 echo "configure:14714: checking for $ac_func" >&5
14714 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14715   echo $ac_n "(cached) $ac_c" 1>&6
14716 else
14717   cat > conftest.$ac_ext <<EOF
14718 #line 14719 "configure"
14719 #include "confdefs.h"
14720 /* System header to define __stub macros and hopefully few prototypes,
14721     which can conflict with char $ac_func(); below.  */
14722 #include <assert.h>
14723 /* Override any gcc2 internal prototype to avoid an error.  */
14724 /* We use char because int might match the return type of a gcc2
14725     builtin and then its argument prototype would still apply.  */
14726 char $ac_func();
14727 char (*f)();
14728
14729 int main() {
14730
14731 /* The GNU C library defines this for functions which it implements
14732     to always fail with ENOSYS.  Some functions are actually named
14733     something starting with __ and the normal name is an alias.  */
14734 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14735 choke me
14736 #else
14737 f = $ac_func;
14738 #endif
14739
14740 ; return 0; }
14741 EOF
14742 if { (eval echo configure:14743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14743   rm -rf conftest*
14744   eval "ac_cv_func_$ac_func=yes"
14745 else
14746   echo "configure: failed program was:" >&5
14747   cat conftest.$ac_ext >&5
14748   rm -rf conftest*
14749   eval "ac_cv_func_$ac_func=no"
14750 fi
14751 rm -f conftest*
14752 fi
14753
14754 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14755   echo "$ac_t""yes" 1>&6
14756     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14757   cat >> confdefs.h <<EOF
14758 #define $ac_tr_func 1
14759 EOF
14760  
14761 else
14762   echo "$ac_t""no" 1>&6
14763 fi
14764 done
14765
14766
14767                         if test $ac_cv_func_sched_yield = no -a \
14768                                 $ac_cv_func_pthread_yield = no -a \
14769                                 $ac_cv_func_thr_yield = no ; then
14770                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14771 echo "configure:14772: checking for sched_yield in -lrt" >&5
14772 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14773 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14774   echo $ac_n "(cached) $ac_c" 1>&6
14775 else
14776   ac_save_LIBS="$LIBS"
14777 LIBS="-lrt  $LIBS"
14778 cat > conftest.$ac_ext <<EOF
14779 #line 14780 "configure"
14780 #include "confdefs.h"
14781 /* Override any gcc2 internal prototype to avoid an error.  */
14782 /* We use char because int might match the return type of a gcc2
14783     builtin and then its argument prototype would still apply.  */
14784 char sched_yield();
14785
14786 int main() {
14787 sched_yield()
14788 ; return 0; }
14789 EOF
14790 if { (eval echo configure:14791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14791   rm -rf conftest*
14792   eval "ac_cv_lib_$ac_lib_var=yes"
14793 else
14794   echo "configure: failed program was:" >&5
14795   cat conftest.$ac_ext >&5
14796   rm -rf conftest*
14797   eval "ac_cv_lib_$ac_lib_var=no"
14798 fi
14799 rm -f conftest*
14800 LIBS="$ac_save_LIBS"
14801
14802 fi
14803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14804   echo "$ac_t""yes" 1>&6
14805   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14806                                         cat >> confdefs.h <<\EOF
14807 #define HAVE_SCHED_YIELD 1
14808 EOF
14809
14810                                         ac_cv_func_sched_yield=yes
14811 else
14812   echo "$ac_t""no" 1>&6
14813 ac_cv_func_sched_yield=no
14814 fi
14815
14816                         fi
14817                         if test $ac_cv_func_sched_yield = no -a \
14818                                 $ac_cv_func_pthread_yield = no -a \
14819                                 "$ac_cv_func_thr_yield" = no ; then
14820                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14821                         fi
14822
14823                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14824 do
14825 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14826 echo "configure:14827: checking for $ac_func" >&5
14827 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14828   echo $ac_n "(cached) $ac_c" 1>&6
14829 else
14830   cat > conftest.$ac_ext <<EOF
14831 #line 14832 "configure"
14832 #include "confdefs.h"
14833 /* System header to define __stub macros and hopefully few prototypes,
14834     which can conflict with char $ac_func(); below.  */
14835 #include <assert.h>
14836 /* Override any gcc2 internal prototype to avoid an error.  */
14837 /* We use char because int might match the return type of a gcc2
14838     builtin and then its argument prototype would still apply.  */
14839 char $ac_func();
14840 char (*f)();
14841
14842 int main() {
14843
14844 /* The GNU C library defines this for functions which it implements
14845     to always fail with ENOSYS.  Some functions are actually named
14846     something starting with __ and the normal name is an alias.  */
14847 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14848 choke me
14849 #else
14850 f = $ac_func;
14851 #endif
14852
14853 ; return 0; }
14854 EOF
14855 if { (eval echo configure:14856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14856   rm -rf conftest*
14857   eval "ac_cv_func_$ac_func=yes"
14858 else
14859   echo "configure: failed program was:" >&5
14860   cat conftest.$ac_ext >&5
14861   rm -rf conftest*
14862   eval "ac_cv_func_$ac_func=no"
14863 fi
14864 rm -f conftest*
14865 fi
14866
14867 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14868   echo "$ac_t""yes" 1>&6
14869     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14870   cat >> confdefs.h <<EOF
14871 #define $ac_tr_func 1
14872 EOF
14873  
14874 else
14875   echo "$ac_t""no" 1>&6
14876 fi
14877 done
14878
14879
14880                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14881 echo "configure:14882: checking for pthread_detach with <pthread.h>" >&5
14882 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14883   echo $ac_n "(cached) $ac_c" 1>&6
14884 else
14885   
14886                                                                 cat > conftest.$ac_ext <<EOF
14887 #line 14888 "configure"
14888 #include "confdefs.h"
14889
14890 #include <pthread.h>
14891 #ifndef NULL
14892 #define NULL (void*)0
14893 #endif
14894
14895 int main() {
14896 pthread_detach(NULL);
14897 ; return 0; }
14898 EOF
14899 if { (eval echo configure:14900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14900   rm -rf conftest*
14901   ol_cv_func_pthread_detach=yes
14902 else
14903   echo "configure: failed program was:" >&5
14904   cat conftest.$ac_ext >&5
14905   rm -rf conftest*
14906   ol_cv_func_pthread_detach=no
14907 fi
14908 rm -f conftest*
14909                         
14910 fi
14911
14912 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14913
14914                         if test $ol_cv_func_pthread_detach = no ; then
14915                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14916                         fi
14917
14918                         cat >> confdefs.h <<\EOF
14919 #define HAVE_PTHREAD_DETACH 1
14920 EOF
14921
14922
14923                                                 for ac_func in \
14924                                 pthread_setconcurrency \
14925                                 pthread_getconcurrency \
14926                                 thr_setconcurrency \
14927                                 thr_getconcurrency \
14928                         
14929 do
14930 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14931 echo "configure:14932: checking for $ac_func" >&5
14932 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14933   echo $ac_n "(cached) $ac_c" 1>&6
14934 else
14935   cat > conftest.$ac_ext <<EOF
14936 #line 14937 "configure"
14937 #include "confdefs.h"
14938 /* System header to define __stub macros and hopefully few prototypes,
14939     which can conflict with char $ac_func(); below.  */
14940 #include <assert.h>
14941 /* Override any gcc2 internal prototype to avoid an error.  */
14942 /* We use char because int might match the return type of a gcc2
14943     builtin and then its argument prototype would still apply.  */
14944 char $ac_func();
14945 char (*f)();
14946
14947 int main() {
14948
14949 /* The GNU C library defines this for functions which it implements
14950     to always fail with ENOSYS.  Some functions are actually named
14951     something starting with __ and the normal name is an alias.  */
14952 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14953 choke me
14954 #else
14955 f = $ac_func;
14956 #endif
14957
14958 ; return 0; }
14959 EOF
14960 if { (eval echo configure:14961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14961   rm -rf conftest*
14962   eval "ac_cv_func_$ac_func=yes"
14963 else
14964   echo "configure: failed program was:" >&5
14965   cat conftest.$ac_ext >&5
14966   rm -rf conftest*
14967   eval "ac_cv_func_$ac_func=no"
14968 fi
14969 rm -f conftest*
14970 fi
14971
14972 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14973   echo "$ac_t""yes" 1>&6
14974     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14975   cat >> confdefs.h <<EOF
14976 #define $ac_tr_func 1
14977 EOF
14978  
14979 else
14980   echo "$ac_t""no" 1>&6
14981 fi
14982 done
14983
14984
14985                         
14986         for ac_func in pthread_kill_other_threads_np
14987 do
14988 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14989 echo "configure:14990: checking for $ac_func" >&5
14990 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14991   echo $ac_n "(cached) $ac_c" 1>&6
14992 else
14993   cat > conftest.$ac_ext <<EOF
14994 #line 14995 "configure"
14995 #include "confdefs.h"
14996 /* System header to define __stub macros and hopefully few prototypes,
14997     which can conflict with char $ac_func(); below.  */
14998 #include <assert.h>
14999 /* Override any gcc2 internal prototype to avoid an error.  */
15000 /* We use char because int might match the return type of a gcc2
15001     builtin and then its argument prototype would still apply.  */
15002 char $ac_func();
15003 char (*f)();
15004
15005 int main() {
15006
15007 /* The GNU C library defines this for functions which it implements
15008     to always fail with ENOSYS.  Some functions are actually named
15009     something starting with __ and the normal name is an alias.  */
15010 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15011 choke me
15012 #else
15013 f = $ac_func;
15014 #endif
15015
15016 ; return 0; }
15017 EOF
15018 if { (eval echo configure:15019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15019   rm -rf conftest*
15020   eval "ac_cv_func_$ac_func=yes"
15021 else
15022   echo "configure: failed program was:" >&5
15023   cat conftest.$ac_ext >&5
15024   rm -rf conftest*
15025   eval "ac_cv_func_$ac_func=no"
15026 fi
15027 rm -f conftest*
15028 fi
15029
15030 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15031   echo "$ac_t""yes" 1>&6
15032     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15033   cat >> confdefs.h <<EOF
15034 #define $ac_tr_func 1
15035 EOF
15036  
15037 else
15038   echo "$ac_t""no" 1>&6
15039 fi
15040 done
15041
15042         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15043 echo "configure:15044: checking for LinuxThreads implementation" >&5
15044 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15045   echo $ac_n "(cached) $ac_c" 1>&6
15046 else
15047   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15048 fi
15049
15050 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15051
15052                         
15053         
15054         
15055         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15056 echo "configure:15057: checking for LinuxThreads consistency" >&5
15057 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15058   echo $ac_n "(cached) $ac_c" 1>&6
15059 else
15060   
15061                 if test $ol_cv_header_linux_threads = yes -a \
15062                         $ol_cv_sys_linux_threads = yes; then
15063                         ol_cv_linux_threads=yes
15064                 elif test $ol_cv_header_linux_threads = no -a \
15065                         $ol_cv_sys_linux_threads = no; then
15066                         ol_cv_linux_threads=no
15067                 else
15068                         ol_cv_linux_threads=error
15069                 fi
15070         
15071 fi
15072
15073 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15074
15075
15076                         if test $ol_cv_linux_threads = error; then
15077                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15078                         fi
15079
15080                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15081 echo "configure:15082: checking if pthread_create() works" >&5
15082 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15083   echo $ac_n "(cached) $ac_c" 1>&6
15084 else
15085   
15086                         if test "$cross_compiling" = yes; then
15087                                 ol_cv_pthread_create_works=yes
15088 else
15089   cat > conftest.$ac_ext <<EOF
15090 #line 15091 "configure"
15091 #include "confdefs.h"
15092 /* pthread test headers */
15093 #include <pthread.h>
15094 #if HAVE_PTHREADS < 7
15095 #include <errno.h>
15096 #endif
15097 #ifndef NULL
15098 #define NULL (void*)0
15099 #endif
15100
15101 static void *task(p)
15102         void *p;
15103 {
15104         return (void *) (p == NULL);
15105 }
15106
15107
15108 int main(argc, argv)
15109         int argc;
15110         char **argv;
15111 {
15112
15113         /* pthread test function */
15114 #ifndef PTHREAD_CREATE_DETACHED
15115 #define PTHREAD_CREATE_DETACHED 1
15116 #endif
15117         pthread_t t;
15118         int status;
15119         int detach = PTHREAD_CREATE_DETACHED;
15120
15121 #if HAVE_PTHREADS > 4
15122         /* Final pthreads */
15123         pthread_attr_t attr;
15124
15125         status = pthread_attr_init(&attr);
15126         if( status ) return status;
15127
15128 #if HAVE_PTHREADS < 7
15129         status = pthread_attr_setdetachstate(&attr, &detach);
15130         if( status < 0 ) status = errno;
15131 #else
15132         status = pthread_attr_setdetachstate(&attr, detach);
15133 #endif
15134         if( status ) return status;
15135         status = pthread_create( &t, &attr, task, NULL );
15136 #if HAVE_PTHREADS < 7
15137         if( status < 0 ) status = errno;
15138 #endif
15139         if( status ) return status;
15140 #else
15141         /* Draft 4 pthreads */
15142         status = pthread_create( &t, pthread_attr_default, task, NULL );
15143         if( status ) return errno;
15144
15145         /* give thread a chance to complete */
15146         /* it should remain joinable and hence detachable */
15147         sleep( 1 );
15148
15149         status = pthread_detach( &t );
15150         if( status ) return errno;
15151 #endif
15152
15153 #ifdef HAVE_LINUX_THREADS
15154         pthread_kill_other_threads_np();
15155 #endif
15156
15157         return 0;
15158
15159 }
15160
15161 EOF
15162 if { (eval echo configure:15163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15163 then
15164   ol_cv_pthread_create_works=yes
15165 else
15166   echo "configure: failed program was:" >&5
15167   cat conftest.$ac_ext >&5
15168   rm -fr conftest*
15169   ol_cv_pthread_create_works=no
15170 fi
15171 rm -fr conftest*
15172 fi
15173
15174 fi
15175
15176 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15177
15178                         if test $ol_cv_pthread_create_works = no ; then
15179                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15180                         fi
15181
15182                                                 if test $ol_with_yielding_select = auto ; then
15183                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15184 echo "configure:15185: checking if select yields when using pthreads" >&5
15185 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15186   echo $ac_n "(cached) $ac_c" 1>&6
15187 else
15188   
15189                                 if test "$cross_compiling" = yes; then
15190   ol_cv_pthread_select_yields=cross
15191 else
15192   cat > conftest.$ac_ext <<EOF
15193 #line 15194 "configure"
15194 #include "confdefs.h"
15195
15196 #include <sys/types.h>
15197 #include <sys/time.h>
15198 #include <unistd.h>
15199 #include <pthread.h>
15200 #ifndef NULL
15201 #define NULL (void*) 0
15202 #endif
15203
15204 static int fildes[2];
15205
15206 static void *task(p)
15207         void *p;
15208 {
15209         int i;
15210         struct timeval tv;
15211
15212         fd_set rfds;
15213
15214         tv.tv_sec=10;
15215         tv.tv_usec=0;
15216
15217         FD_ZERO(&rfds);
15218         FD_SET(fildes[0], &rfds);
15219
15220         /* we're not interested in any fds */
15221         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15222
15223         if(i < 0) {
15224                 perror("select");
15225                 exit(10);
15226         }
15227
15228         exit(0); /* if we exit here, the select blocked the whole process */
15229 }
15230
15231 int main(argc, argv)
15232         int argc;
15233         char **argv;
15234 {
15235         pthread_t t;
15236
15237         /* create a pipe to select */
15238         if(pipe(&fildes[0])) {
15239                 perror("select");
15240                 exit(1);
15241         }
15242
15243 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15244         (void) pthread_setconcurrency(2);
15245 #else
15246 #ifdef HAVE_THR_SETCONCURRENCY
15247         /* Set Solaris LWP concurrency to 2 */
15248         thr_setconcurrency(2);
15249 #endif
15250 #endif
15251
15252 #if HAVE_PTHREADS < 6
15253         pthread_create(&t, pthread_attr_default, task, NULL);
15254 #else
15255         pthread_create(&t, NULL, task, NULL);
15256 #endif
15257
15258         /* make sure task runs first */
15259 #if HAVE_THR_YIELD
15260         thr_yield();
15261 #elif defined( HAVE_SCHED_YIELD )
15262         sched_yield();
15263 #elif defined( HAVE_PTHREAD_YIELD )
15264         pthread_yield();
15265 #endif
15266
15267         exit(2);
15268 }
15269 EOF
15270 if { (eval echo configure:15271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15271 then
15272   ol_cv_pthread_select_yields=no
15273 else
15274   echo "configure: failed program was:" >&5
15275   cat conftest.$ac_ext >&5
15276   rm -fr conftest*
15277   ol_cv_pthread_select_yields=yes
15278 fi
15279 rm -fr conftest*
15280 fi
15281
15282 fi
15283
15284 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15285
15286                                 if test $ol_cv_pthread_select_yields = cross ; then
15287                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15288                                 fi
15289
15290                                 if test $ol_cv_pthread_select_yields = yes ; then
15291                                         ol_with_yielding_select=yes
15292                                 fi
15293                         fi
15294
15295                                                 CPPFLAGS="$save_CPPFLAGS"
15296                         LIBS="$save_LIBS"
15297                 else
15298                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15299                 fi
15300         fi
15301
15302         if test $ol_with_threads = posix ; then
15303                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15304         fi
15305 fi
15306
15307 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15308         -o $ol_with_threads = mach ; then
15309
15310                 for ac_hdr in mach/cthreads.h cthreads.h
15311 do
15312 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15313 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15314 echo "configure:15315: checking for $ac_hdr" >&5
15315 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15316   echo $ac_n "(cached) $ac_c" 1>&6
15317 else
15318   cat > conftest.$ac_ext <<EOF
15319 #line 15320 "configure"
15320 #include "confdefs.h"
15321 #include <$ac_hdr>
15322 EOF
15323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15324 { (eval echo configure:15325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15326 if test -z "$ac_err"; then
15327   rm -rf conftest*
15328   eval "ac_cv_header_$ac_safe=yes"
15329 else
15330   echo "$ac_err" >&5
15331   echo "configure: failed program was:" >&5
15332   cat conftest.$ac_ext >&5
15333   rm -rf conftest*
15334   eval "ac_cv_header_$ac_safe=no"
15335 fi
15336 rm -f conftest*
15337 fi
15338 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15339   echo "$ac_t""yes" 1>&6
15340     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15341   cat >> confdefs.h <<EOF
15342 #define $ac_tr_hdr 1
15343 EOF
15344  
15345 else
15346   echo "$ac_t""no" 1>&6
15347 fi
15348 done
15349
15350         if test $ac_cv_header_mach_cthreads_h = yes ; then
15351                 ol_with_threads=found
15352
15353                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15354 echo "configure:15355: checking for cthread_fork" >&5
15355 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15356   echo $ac_n "(cached) $ac_c" 1>&6
15357 else
15358   cat > conftest.$ac_ext <<EOF
15359 #line 15360 "configure"
15360 #include "confdefs.h"
15361 /* System header to define __stub macros and hopefully few prototypes,
15362     which can conflict with char cthread_fork(); below.  */
15363 #include <assert.h>
15364 /* Override any gcc2 internal prototype to avoid an error.  */
15365 /* We use char because int might match the return type of a gcc2
15366     builtin and then its argument prototype would still apply.  */
15367 char cthread_fork();
15368 char (*f)();
15369
15370 int main() {
15371
15372 /* The GNU C library defines this for functions which it implements
15373     to always fail with ENOSYS.  Some functions are actually named
15374     something starting with __ and the normal name is an alias.  */
15375 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15376 choke me
15377 #else
15378 f = cthread_fork;
15379 #endif
15380
15381 ; return 0; }
15382 EOF
15383 if { (eval echo configure:15384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15384   rm -rf conftest*
15385   eval "ac_cv_func_cthread_fork=yes"
15386 else
15387   echo "configure: failed program was:" >&5
15388   cat conftest.$ac_ext >&5
15389   rm -rf conftest*
15390   eval "ac_cv_func_cthread_fork=no"
15391 fi
15392 rm -f conftest*
15393 fi
15394
15395 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15396   echo "$ac_t""yes" 1>&6
15397   ol_link_threads=yes
15398 else
15399   echo "$ac_t""no" 1>&6
15400 fi
15401
15402
15403                 if test $ol_link_threads = no ; then
15404                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15405 echo "configure:15406: checking for cthread_fork with -all_load" >&5
15406 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15407   echo $ac_n "(cached) $ac_c" 1>&6
15408 else
15409   
15410                                                                 save_LIBS="$LIBS"
15411                                 LIBS="-all_load $LIBS"
15412                                 cat > conftest.$ac_ext <<EOF
15413 #line 15414 "configure"
15414 #include "confdefs.h"
15415 #include <mach/cthreads.h>
15416 int main() {
15417
15418                                         cthread_fork((void *)0, (void *)0);
15419                                         
15420 ; return 0; }
15421 EOF
15422 if { (eval echo configure:15423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15423   rm -rf conftest*
15424   ol_cv_cthread_all_load=yes
15425 else
15426   echo "configure: failed program was:" >&5
15427   cat conftest.$ac_ext >&5
15428   rm -rf conftest*
15429   ol_cv_cthread_all_load=no
15430 fi
15431 rm -f conftest*
15432                                                                 LIBS="$save_LIBS"
15433                         
15434 fi
15435
15436 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15437
15438                         if test $ol_cv_cthread_all_load = yes ; then
15439                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15440                                 ol_link_threads=mach
15441                                 ol_with_threads=found
15442                         fi
15443                 fi
15444
15445         elif test $ac_cv_header_cthreads_h = yes ; then
15446                                 
15447                 ol_with_threads=found
15448  
15449                                 save_LIBS="$LIBS"
15450                 LIBS="$LIBS -lthreads"
15451                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15452 echo "configure:15453: checking for cthread_fork" >&5
15453 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15454   echo $ac_n "(cached) $ac_c" 1>&6
15455 else
15456   cat > conftest.$ac_ext <<EOF
15457 #line 15458 "configure"
15458 #include "confdefs.h"
15459 /* System header to define __stub macros and hopefully few prototypes,
15460     which can conflict with char cthread_fork(); below.  */
15461 #include <assert.h>
15462 /* Override any gcc2 internal prototype to avoid an error.  */
15463 /* We use char because int might match the return type of a gcc2
15464     builtin and then its argument prototype would still apply.  */
15465 char cthread_fork();
15466 char (*f)();
15467
15468 int main() {
15469
15470 /* The GNU C library defines this for functions which it implements
15471     to always fail with ENOSYS.  Some functions are actually named
15472     something starting with __ and the normal name is an alias.  */
15473 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15474 choke me
15475 #else
15476 f = cthread_fork;
15477 #endif
15478
15479 ; return 0; }
15480 EOF
15481 if { (eval echo configure:15482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15482   rm -rf conftest*
15483   eval "ac_cv_func_cthread_fork=yes"
15484 else
15485   echo "configure: failed program was:" >&5
15486   cat conftest.$ac_ext >&5
15487   rm -rf conftest*
15488   eval "ac_cv_func_cthread_fork=no"
15489 fi
15490 rm -f conftest*
15491 fi
15492
15493 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15494   echo "$ac_t""yes" 1>&6
15495   ol_link_threads=yes
15496 else
15497   echo "$ac_t""no" 1>&6
15498 fi
15499
15500                 LIBS="$save_LIBS"
15501
15502                 if test $ol_link_threads = yes ; then
15503                         LTHREAD_LIBS="-lthreads"
15504                         ol_link_threads=mach
15505                         ol_with_threads=found
15506                 else
15507                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15508                 fi
15509
15510         elif test $ol_with_threads = mach ; then
15511                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15512         fi
15513
15514         if test $ol_link_threads = mach ; then
15515                 cat >> confdefs.h <<\EOF
15516 #define HAVE_MACH_CTHREADS 1
15517 EOF
15518
15519         elif test $ol_with_threads = found ; then
15520                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15521         fi
15522 fi
15523
15524 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15525         -o $ol_with_threads = pth ; then
15526
15527         for ac_hdr in pth.h
15528 do
15529 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15530 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15531 echo "configure:15532: checking for $ac_hdr" >&5
15532 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15533   echo $ac_n "(cached) $ac_c" 1>&6
15534 else
15535   cat > conftest.$ac_ext <<EOF
15536 #line 15537 "configure"
15537 #include "confdefs.h"
15538 #include <$ac_hdr>
15539 EOF
15540 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15541 { (eval echo configure:15542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15542 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15543 if test -z "$ac_err"; then
15544   rm -rf conftest*
15545   eval "ac_cv_header_$ac_safe=yes"
15546 else
15547   echo "$ac_err" >&5
15548   echo "configure: failed program was:" >&5
15549   cat conftest.$ac_ext >&5
15550   rm -rf conftest*
15551   eval "ac_cv_header_$ac_safe=no"
15552 fi
15553 rm -f conftest*
15554 fi
15555 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15556   echo "$ac_t""yes" 1>&6
15557     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15558   cat >> confdefs.h <<EOF
15559 #define $ac_tr_hdr 1
15560 EOF
15561  
15562 else
15563   echo "$ac_t""no" 1>&6
15564 fi
15565 done
15566
15567
15568         if test $ac_cv_header_pth_h = yes ; then
15569                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15570 echo "configure:15571: checking for pth_version in -lpth" >&5
15571 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15572 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15573   echo $ac_n "(cached) $ac_c" 1>&6
15574 else
15575   ac_save_LIBS="$LIBS"
15576 LIBS="-lpth  $LIBS"
15577 cat > conftest.$ac_ext <<EOF
15578 #line 15579 "configure"
15579 #include "confdefs.h"
15580 /* Override any gcc2 internal prototype to avoid an error.  */
15581 /* We use char because int might match the return type of a gcc2
15582     builtin and then its argument prototype would still apply.  */
15583 char pth_version();
15584
15585 int main() {
15586 pth_version()
15587 ; return 0; }
15588 EOF
15589 if { (eval echo configure:15590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15590   rm -rf conftest*
15591   eval "ac_cv_lib_$ac_lib_var=yes"
15592 else
15593   echo "configure: failed program was:" >&5
15594   cat conftest.$ac_ext >&5
15595   rm -rf conftest*
15596   eval "ac_cv_lib_$ac_lib_var=no"
15597 fi
15598 rm -f conftest*
15599 LIBS="$ac_save_LIBS"
15600
15601 fi
15602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15603   echo "$ac_t""yes" 1>&6
15604   have_pth=yes
15605 else
15606   echo "$ac_t""no" 1>&6
15607 have_pth=no
15608 fi
15609
15610
15611                 if test $have_pth = yes ; then
15612                         cat >> confdefs.h <<\EOF
15613 #define HAVE_GNU_PTH 1
15614 EOF
15615
15616                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15617                         ol_link_threads=pth
15618                         ol_with_threads=found
15619
15620                         if test $ol_with_yielding_select = auto ; then
15621                                 ol_with_yielding_select=yes
15622                         fi
15623                 fi
15624         fi
15625 fi
15626
15627 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15628         -o $ol_with_threads = lwp ; then
15629
15630                 for ac_hdr in thread.h synch.h
15631 do
15632 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15633 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15634 echo "configure:15635: checking for $ac_hdr" >&5
15635 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15636   echo $ac_n "(cached) $ac_c" 1>&6
15637 else
15638   cat > conftest.$ac_ext <<EOF
15639 #line 15640 "configure"
15640 #include "confdefs.h"
15641 #include <$ac_hdr>
15642 EOF
15643 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15644 { (eval echo configure:15645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15645 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15646 if test -z "$ac_err"; then
15647   rm -rf conftest*
15648   eval "ac_cv_header_$ac_safe=yes"
15649 else
15650   echo "$ac_err" >&5
15651   echo "configure: failed program was:" >&5
15652   cat conftest.$ac_ext >&5
15653   rm -rf conftest*
15654   eval "ac_cv_header_$ac_safe=no"
15655 fi
15656 rm -f conftest*
15657 fi
15658 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15659   echo "$ac_t""yes" 1>&6
15660     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15661   cat >> confdefs.h <<EOF
15662 #define $ac_tr_hdr 1
15663 EOF
15664  
15665 else
15666   echo "$ac_t""no" 1>&6
15667 fi
15668 done
15669
15670         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15671                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15672 echo "configure:15673: checking for thr_create in -lthread" >&5
15673 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15674 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15675   echo $ac_n "(cached) $ac_c" 1>&6
15676 else
15677   ac_save_LIBS="$LIBS"
15678 LIBS="-lthread  $LIBS"
15679 cat > conftest.$ac_ext <<EOF
15680 #line 15681 "configure"
15681 #include "confdefs.h"
15682 /* Override any gcc2 internal prototype to avoid an error.  */
15683 /* We use char because int might match the return type of a gcc2
15684     builtin and then its argument prototype would still apply.  */
15685 char thr_create();
15686
15687 int main() {
15688 thr_create()
15689 ; return 0; }
15690 EOF
15691 if { (eval echo configure:15692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15692   rm -rf conftest*
15693   eval "ac_cv_lib_$ac_lib_var=yes"
15694 else
15695   echo "configure: failed program was:" >&5
15696   cat conftest.$ac_ext >&5
15697   rm -rf conftest*
15698   eval "ac_cv_lib_$ac_lib_var=no"
15699 fi
15700 rm -f conftest*
15701 LIBS="$ac_save_LIBS"
15702
15703 fi
15704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15705   echo "$ac_t""yes" 1>&6
15706   have_thr=yes
15707 else
15708   echo "$ac_t""no" 1>&6
15709 have_thr=no
15710 fi
15711
15712
15713                 if test $have_thr = yes ; then
15714                         cat >> confdefs.h <<\EOF
15715 #define HAVE_THR 1
15716 EOF
15717
15718                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15719                         ol_link_threads=thr
15720
15721                         if test $ol_with_yielding_select = auto ; then
15722                                 ol_with_yielding_select=yes
15723                         fi
15724
15725                                                 for ac_func in \
15726                                 thr_setconcurrency \
15727                                 thr_getconcurrency \
15728                         
15729 do
15730 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15731 echo "configure:15732: checking for $ac_func" >&5
15732 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15733   echo $ac_n "(cached) $ac_c" 1>&6
15734 else
15735   cat > conftest.$ac_ext <<EOF
15736 #line 15737 "configure"
15737 #include "confdefs.h"
15738 /* System header to define __stub macros and hopefully few prototypes,
15739     which can conflict with char $ac_func(); below.  */
15740 #include <assert.h>
15741 /* Override any gcc2 internal prototype to avoid an error.  */
15742 /* We use char because int might match the return type of a gcc2
15743     builtin and then its argument prototype would still apply.  */
15744 char $ac_func();
15745 char (*f)();
15746
15747 int main() {
15748
15749 /* The GNU C library defines this for functions which it implements
15750     to always fail with ENOSYS.  Some functions are actually named
15751     something starting with __ and the normal name is an alias.  */
15752 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15753 choke me
15754 #else
15755 f = $ac_func;
15756 #endif
15757
15758 ; return 0; }
15759 EOF
15760 if { (eval echo configure:15761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15761   rm -rf conftest*
15762   eval "ac_cv_func_$ac_func=yes"
15763 else
15764   echo "configure: failed program was:" >&5
15765   cat conftest.$ac_ext >&5
15766   rm -rf conftest*
15767   eval "ac_cv_func_$ac_func=no"
15768 fi
15769 rm -f conftest*
15770 fi
15771
15772 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15773   echo "$ac_t""yes" 1>&6
15774     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15775   cat >> confdefs.h <<EOF
15776 #define $ac_tr_func 1
15777 EOF
15778  
15779 else
15780   echo "$ac_t""no" 1>&6
15781 fi
15782 done
15783
15784                 fi
15785         fi
15786
15787                 for ac_hdr in lwp/lwp.h
15788 do
15789 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15790 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15791 echo "configure:15792: checking for $ac_hdr" >&5
15792 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15793   echo $ac_n "(cached) $ac_c" 1>&6
15794 else
15795   cat > conftest.$ac_ext <<EOF
15796 #line 15797 "configure"
15797 #include "confdefs.h"
15798 #include <$ac_hdr>
15799 EOF
15800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15801 { (eval echo configure:15802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15803 if test -z "$ac_err"; then
15804   rm -rf conftest*
15805   eval "ac_cv_header_$ac_safe=yes"
15806 else
15807   echo "$ac_err" >&5
15808   echo "configure: failed program was:" >&5
15809   cat conftest.$ac_ext >&5
15810   rm -rf conftest*
15811   eval "ac_cv_header_$ac_safe=no"
15812 fi
15813 rm -f conftest*
15814 fi
15815 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15816   echo "$ac_t""yes" 1>&6
15817     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15818   cat >> confdefs.h <<EOF
15819 #define $ac_tr_hdr 1
15820 EOF
15821  
15822 else
15823   echo "$ac_t""no" 1>&6
15824 fi
15825 done
15826
15827         if test $ac_cv_header_lwp_lwp_h = yes ; then
15828                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15829 echo "configure:15830: checking for lwp_create in -llwp" >&5
15830 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15831 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15832   echo $ac_n "(cached) $ac_c" 1>&6
15833 else
15834   ac_save_LIBS="$LIBS"
15835 LIBS="-llwp  $LIBS"
15836 cat > conftest.$ac_ext <<EOF
15837 #line 15838 "configure"
15838 #include "confdefs.h"
15839 /* Override any gcc2 internal prototype to avoid an error.  */
15840 /* We use char because int might match the return type of a gcc2
15841     builtin and then its argument prototype would still apply.  */
15842 char lwp_create();
15843
15844 int main() {
15845 lwp_create()
15846 ; return 0; }
15847 EOF
15848 if { (eval echo configure:15849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15849   rm -rf conftest*
15850   eval "ac_cv_lib_$ac_lib_var=yes"
15851 else
15852   echo "configure: failed program was:" >&5
15853   cat conftest.$ac_ext >&5
15854   rm -rf conftest*
15855   eval "ac_cv_lib_$ac_lib_var=no"
15856 fi
15857 rm -f conftest*
15858 LIBS="$ac_save_LIBS"
15859
15860 fi
15861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15862   echo "$ac_t""yes" 1>&6
15863   have_lwp=yes
15864 else
15865   echo "$ac_t""no" 1>&6
15866 have_lwp=no
15867 fi
15868
15869
15870                 if test $have_lwp = yes ; then
15871                         cat >> confdefs.h <<\EOF
15872 #define HAVE_LWP 1
15873 EOF
15874
15875                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15876                         ol_link_threads=lwp
15877
15878                         if test $ol_with_yielding_select = auto ; then
15879                                 ol_with_yielding_select=no
15880                         fi
15881                 fi
15882         fi
15883 fi
15884
15885 if test $ol_with_yielding_select = yes ; then
15886         cat >> confdefs.h <<\EOF
15887 #define HAVE_YIELDING_SELECT 1
15888 EOF
15889
15890 fi
15891
15892 if test $ol_with_threads = manual ; then
15893                 ol_link_threads=yes
15894
15895         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15896
15897         for ac_hdr in pthread.h sched.h
15898 do
15899 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15900 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15901 echo "configure:15902: checking for $ac_hdr" >&5
15902 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15903   echo $ac_n "(cached) $ac_c" 1>&6
15904 else
15905   cat > conftest.$ac_ext <<EOF
15906 #line 15907 "configure"
15907 #include "confdefs.h"
15908 #include <$ac_hdr>
15909 EOF
15910 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15911 { (eval echo configure:15912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15912 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15913 if test -z "$ac_err"; then
15914   rm -rf conftest*
15915   eval "ac_cv_header_$ac_safe=yes"
15916 else
15917   echo "$ac_err" >&5
15918   echo "configure: failed program was:" >&5
15919   cat conftest.$ac_ext >&5
15920   rm -rf conftest*
15921   eval "ac_cv_header_$ac_safe=no"
15922 fi
15923 rm -f conftest*
15924 fi
15925 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15926   echo "$ac_t""yes" 1>&6
15927     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15928   cat >> confdefs.h <<EOF
15929 #define $ac_tr_hdr 1
15930 EOF
15931  
15932 else
15933   echo "$ac_t""no" 1>&6
15934 fi
15935 done
15936
15937         for ac_func in sched_yield pthread_yield
15938 do
15939 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15940 echo "configure:15941: checking for $ac_func" >&5
15941 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15942   echo $ac_n "(cached) $ac_c" 1>&6
15943 else
15944   cat > conftest.$ac_ext <<EOF
15945 #line 15946 "configure"
15946 #include "confdefs.h"
15947 /* System header to define __stub macros and hopefully few prototypes,
15948     which can conflict with char $ac_func(); below.  */
15949 #include <assert.h>
15950 /* Override any gcc2 internal prototype to avoid an error.  */
15951 /* We use char because int might match the return type of a gcc2
15952     builtin and then its argument prototype would still apply.  */
15953 char $ac_func();
15954 char (*f)();
15955
15956 int main() {
15957
15958 /* The GNU C library defines this for functions which it implements
15959     to always fail with ENOSYS.  Some functions are actually named
15960     something starting with __ and the normal name is an alias.  */
15961 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15962 choke me
15963 #else
15964 f = $ac_func;
15965 #endif
15966
15967 ; return 0; }
15968 EOF
15969 if { (eval echo configure:15970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15970   rm -rf conftest*
15971   eval "ac_cv_func_$ac_func=yes"
15972 else
15973   echo "configure: failed program was:" >&5
15974   cat conftest.$ac_ext >&5
15975   rm -rf conftest*
15976   eval "ac_cv_func_$ac_func=no"
15977 fi
15978 rm -f conftest*
15979 fi
15980
15981 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15982   echo "$ac_t""yes" 1>&6
15983     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15984   cat >> confdefs.h <<EOF
15985 #define $ac_tr_func 1
15986 EOF
15987  
15988 else
15989   echo "$ac_t""no" 1>&6
15990 fi
15991 done
15992
15993         
15994         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15995 echo "configure:15996: checking for LinuxThreads pthread.h" >&5
15996 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15997   echo $ac_n "(cached) $ac_c" 1>&6
15998 else
15999   cat > conftest.$ac_ext <<EOF
16000 #line 16001 "configure"
16001 #include "confdefs.h"
16002 #include <pthread.h>
16003 EOF
16004 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16005   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16006   rm -rf conftest*
16007   ol_cv_header_linux_threads=yes
16008 else
16009   rm -rf conftest*
16010   ol_cv_header_linux_threads=no
16011 fi
16012 rm -f conftest*
16013
16014                 
16015 fi
16016
16017 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16018         if test $ol_cv_header_linux_threads = yes; then
16019                 cat >> confdefs.h <<\EOF
16020 #define HAVE_LINUX_THREADS 1
16021 EOF
16022
16023         fi
16024
16025
16026         for ac_hdr in mach/cthreads.h
16027 do
16028 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16029 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16030 echo "configure:16031: checking for $ac_hdr" >&5
16031 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16032   echo $ac_n "(cached) $ac_c" 1>&6
16033 else
16034   cat > conftest.$ac_ext <<EOF
16035 #line 16036 "configure"
16036 #include "confdefs.h"
16037 #include <$ac_hdr>
16038 EOF
16039 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16040 { (eval echo configure:16041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16041 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16042 if test -z "$ac_err"; then
16043   rm -rf conftest*
16044   eval "ac_cv_header_$ac_safe=yes"
16045 else
16046   echo "$ac_err" >&5
16047   echo "configure: failed program was:" >&5
16048   cat conftest.$ac_ext >&5
16049   rm -rf conftest*
16050   eval "ac_cv_header_$ac_safe=no"
16051 fi
16052 rm -f conftest*
16053 fi
16054 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16055   echo "$ac_t""yes" 1>&6
16056     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16057   cat >> confdefs.h <<EOF
16058 #define $ac_tr_hdr 1
16059 EOF
16060  
16061 else
16062   echo "$ac_t""no" 1>&6
16063 fi
16064 done
16065
16066         for ac_hdr in lwp/lwp.h
16067 do
16068 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16069 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16070 echo "configure:16071: checking for $ac_hdr" >&5
16071 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16072   echo $ac_n "(cached) $ac_c" 1>&6
16073 else
16074   cat > conftest.$ac_ext <<EOF
16075 #line 16076 "configure"
16076 #include "confdefs.h"
16077 #include <$ac_hdr>
16078 EOF
16079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16080 { (eval echo configure:16081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16081 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16082 if test -z "$ac_err"; then
16083   rm -rf conftest*
16084   eval "ac_cv_header_$ac_safe=yes"
16085 else
16086   echo "$ac_err" >&5
16087   echo "configure: failed program was:" >&5
16088   cat conftest.$ac_ext >&5
16089   rm -rf conftest*
16090   eval "ac_cv_header_$ac_safe=no"
16091 fi
16092 rm -f conftest*
16093 fi
16094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16095   echo "$ac_t""yes" 1>&6
16096     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16097   cat >> confdefs.h <<EOF
16098 #define $ac_tr_hdr 1
16099 EOF
16100  
16101 else
16102   echo "$ac_t""no" 1>&6
16103 fi
16104 done
16105
16106         for ac_hdr in thread.h synch.h
16107 do
16108 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16109 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16110 echo "configure:16111: checking for $ac_hdr" >&5
16111 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16112   echo $ac_n "(cached) $ac_c" 1>&6
16113 else
16114   cat > conftest.$ac_ext <<EOF
16115 #line 16116 "configure"
16116 #include "confdefs.h"
16117 #include <$ac_hdr>
16118 EOF
16119 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16120 { (eval echo configure:16121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16121 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16122 if test -z "$ac_err"; then
16123   rm -rf conftest*
16124   eval "ac_cv_header_$ac_safe=yes"
16125 else
16126   echo "$ac_err" >&5
16127   echo "configure: failed program was:" >&5
16128   cat conftest.$ac_ext >&5
16129   rm -rf conftest*
16130   eval "ac_cv_header_$ac_safe=no"
16131 fi
16132 rm -f conftest*
16133 fi
16134 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16135   echo "$ac_t""yes" 1>&6
16136     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16137   cat >> confdefs.h <<EOF
16138 #define $ac_tr_hdr 1
16139 EOF
16140  
16141 else
16142   echo "$ac_t""no" 1>&6
16143 fi
16144 done
16145
16146 fi
16147
16148 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16149                         cat >> confdefs.h <<\EOF
16150 #define REENTRANT 1
16151 EOF
16152
16153         cat >> confdefs.h <<\EOF
16154 #define _REENTRANT 1
16155 EOF
16156
16157         cat >> confdefs.h <<\EOF
16158 #define THREAD_SAFE 1
16159 EOF
16160
16161         cat >> confdefs.h <<\EOF
16162 #define _THREAD_SAFE 1
16163 EOF
16164
16165         cat >> confdefs.h <<\EOF
16166 #define THREADSAFE 1
16167 EOF
16168
16169         cat >> confdefs.h <<\EOF
16170 #define _THREADSAFE 1
16171 EOF
16172
16173         cat >> confdefs.h <<\EOF
16174 #define _SGI_MP_SOURCE 1
16175 EOF
16176
16177
16178                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16179 echo "configure:16180: checking for thread specific errno" >&5
16180 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16181   echo $ac_n "(cached) $ac_c" 1>&6
16182 else
16183   
16184                 cat > conftest.$ac_ext <<EOF
16185 #line 16186 "configure"
16186 #include "confdefs.h"
16187 #include <errno.h>
16188 int main() {
16189 errno = 0;
16190 ; return 0; }
16191 EOF
16192 if { (eval echo configure:16193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16193   rm -rf conftest*
16194   ol_cv_errno_thread_specific=yes
16195 else
16196   echo "configure: failed program was:" >&5
16197   cat conftest.$ac_ext >&5
16198   rm -rf conftest*
16199   ol_cv_errno_thread_specific=no
16200 fi
16201 rm -f conftest*
16202         
16203 fi
16204
16205 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16206
16207                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16208 echo "configure:16209: checking for thread specific h_errno" >&5
16209 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16210   echo $ac_n "(cached) $ac_c" 1>&6
16211 else
16212   
16213                 cat > conftest.$ac_ext <<EOF
16214 #line 16215 "configure"
16215 #include "confdefs.h"
16216 #include <netdb.h>
16217 int main() {
16218 h_errno = 0;
16219 ; return 0; }
16220 EOF
16221 if { (eval echo configure:16222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16222   rm -rf conftest*
16223   ol_cv_h_errno_thread_specific=yes
16224 else
16225   echo "configure: failed program was:" >&5
16226   cat conftest.$ac_ext >&5
16227   rm -rf conftest*
16228   ol_cv_h_errno_thread_specific=no
16229 fi
16230 rm -f conftest*
16231         
16232 fi
16233
16234 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16235
16236         if test $ol_cv_errno_thread_specific != yes \
16237                 -o $ol_cv_h_errno_thread_specific != yes ; then
16238                 LIBS="$LTHREAD_LIBS $LIBS"
16239                 LTHREAD_LIBS=""
16240         fi
16241
16242 fi  
16243
16244 if test $ol_link_threads = no ; then
16245         if test $ol_with_threads = yes ; then
16246                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16247         fi
16248
16249         if test $ol_with_threads = auto ; then
16250                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16251                 ol_with_threads=no
16252         fi
16253
16254         cat >> confdefs.h <<\EOF
16255 #define NO_THREADS 1
16256 EOF
16257
16258         LTHREAD_LIBS=""
16259 fi
16260
16261 if test $ol_link_threads != no ; then
16262         cat >> confdefs.h <<\EOF
16263 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16264 EOF
16265
16266 fi
16267
16268 for ac_func in \
16269         ctime_r                 \
16270         gethostbyname_r gethostbyaddr_r \
16271
16272 do
16273 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16274 echo "configure:16275: checking for $ac_func" >&5
16275 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16276   echo $ac_n "(cached) $ac_c" 1>&6
16277 else
16278   cat > conftest.$ac_ext <<EOF
16279 #line 16280 "configure"
16280 #include "confdefs.h"
16281 /* System header to define __stub macros and hopefully few prototypes,
16282     which can conflict with char $ac_func(); below.  */
16283 #include <assert.h>
16284 /* Override any gcc2 internal prototype to avoid an error.  */
16285 /* We use char because int might match the return type of a gcc2
16286     builtin and then its argument prototype would still apply.  */
16287 char $ac_func();
16288 char (*f)();
16289
16290 int main() {
16291
16292 /* The GNU C library defines this for functions which it implements
16293     to always fail with ENOSYS.  Some functions are actually named
16294     something starting with __ and the normal name is an alias.  */
16295 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16296 choke me
16297 #else
16298 f = $ac_func;
16299 #endif
16300
16301 ; return 0; }
16302 EOF
16303 if { (eval echo configure:16304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16304   rm -rf conftest*
16305   eval "ac_cv_func_$ac_func=yes"
16306 else
16307   echo "configure: failed program was:" >&5
16308   cat conftest.$ac_ext >&5
16309   rm -rf conftest*
16310   eval "ac_cv_func_$ac_func=no"
16311 fi
16312 rm -f conftest*
16313 fi
16314
16315 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16316   echo "$ac_t""yes" 1>&6
16317     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16318   cat >> confdefs.h <<EOF
16319 #define $ac_tr_func 1
16320 EOF
16321  
16322 else
16323   echo "$ac_t""no" 1>&6
16324 fi
16325 done
16326
16327
16328 if test "$ac_cv_func_ctime_r" = no ; then
16329         ol_cv_func_ctime_r_nargs=0
16330 else
16331         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16332 echo "configure:16333: checking number of arguments of ctime_r" >&5
16333 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16334   echo $ac_n "(cached) $ac_c" 1>&6
16335 else
16336   cat > conftest.$ac_ext <<EOF
16337 #line 16338 "configure"
16338 #include "confdefs.h"
16339 #include <time.h>
16340 int main() {
16341 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16342 ; return 0; }
16343 EOF
16344 if { (eval echo configure:16345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16345   rm -rf conftest*
16346   ol_cv_func_ctime_r_nargs3=yes
16347 else
16348   echo "configure: failed program was:" >&5
16349   cat conftest.$ac_ext >&5
16350   rm -rf conftest*
16351   ol_cv_func_ctime_r_nargs3=no
16352 fi
16353 rm -f conftest*
16354
16355         cat > conftest.$ac_ext <<EOF
16356 #line 16357 "configure"
16357 #include "confdefs.h"
16358 #include <time.h>
16359 int main() {
16360 time_t ti; char *buffer; ctime_r(&ti,buffer);
16361 ; return 0; }
16362 EOF
16363 if { (eval echo configure:16364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16364   rm -rf conftest*
16365   ol_cv_func_ctime_r_nargs2=yes
16366 else
16367   echo "configure: failed program was:" >&5
16368   cat conftest.$ac_ext >&5
16369   rm -rf conftest*
16370   ol_cv_func_ctime_r_nargs2=no
16371 fi
16372 rm -f conftest*
16373
16374         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16375                 $ol_cv_func_ctime_r_nargs2 = no ; then
16376
16377                 ol_cv_func_ctime_r_nargs=3
16378
16379         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16380                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16381
16382                 ol_cv_func_ctime_r_nargs=2
16383
16384         else
16385                 ol_cv_func_ctime_r_nargs=0
16386         fi
16387   
16388 fi
16389
16390 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16391
16392   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16393         cat >> confdefs.h <<EOF
16394 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16395 EOF
16396
16397   fi
16398
16399 fi
16400
16401 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16402         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16403 echo "configure:16404: checking number of arguments of gethostbyname_r" >&5
16404 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16405   echo $ac_n "(cached) $ac_c" 1>&6
16406 else
16407   cat > conftest.$ac_ext <<EOF
16408 #line 16409 "configure"
16409 #include "confdefs.h"
16410 #include <sys/types.h>
16411 #include <sys/socket.h>
16412 #include <netinet/in.h>
16413 #include <netdb.h>
16414 #define BUFSIZE (sizeof(struct hostent)+10)
16415 int main() {
16416 struct hostent hent; char buffer[BUFSIZE];
16417                 int bufsize=BUFSIZE;int h_errno;
16418                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16419                         buffer, bufsize, &h_errno);
16420 ; return 0; }
16421 EOF
16422 if { (eval echo configure:16423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16423   rm -rf conftest*
16424   ol_cv_func_gethostbyname_r_nargs5=yes
16425 else
16426   echo "configure: failed program was:" >&5
16427   cat conftest.$ac_ext >&5
16428   rm -rf conftest*
16429   ol_cv_func_gethostbyname_r_nargs5=no
16430 fi
16431 rm -f conftest*
16432
16433         cat > conftest.$ac_ext <<EOF
16434 #line 16435 "configure"
16435 #include "confdefs.h"
16436 #include <sys/types.h>
16437 #include <sys/socket.h>
16438 #include <netinet/in.h>
16439 #include <netdb.h>
16440 #define BUFSIZE (sizeof(struct hostent)+10)
16441 int main() {
16442 struct hostent hent;struct hostent *rhent;
16443                 char buffer[BUFSIZE];
16444                 int bufsize=BUFSIZE;int h_errno;
16445                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16446                         &rhent, &h_errno);
16447 ; return 0; }
16448 EOF
16449 if { (eval echo configure:16450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16450   rm -rf conftest*
16451   ol_cv_func_gethostbyname_r_nargs6=yes
16452 else
16453   echo "configure: failed program was:" >&5
16454   cat conftest.$ac_ext >&5
16455   rm -rf conftest*
16456   ol_cv_func_gethostbyname_r_nargs6=no
16457 fi
16458 rm -f conftest*
16459
16460         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16461                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16462
16463                 ol_cv_func_gethostbyname_r_nargs=5
16464
16465         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16466                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16467
16468                 ol_cv_func_gethostbyname_r_nargs=6
16469
16470         else
16471                 ol_cv_func_gethostbyname_r_nargs=0
16472         fi
16473   
16474 fi
16475
16476 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16477   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16478         cat >> confdefs.h <<EOF
16479 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16480 EOF
16481
16482   fi
16483
16484 else
16485         ol_cv_func_gethostbyname_r_nargs=0
16486 fi
16487  
16488 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16489         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16490 echo "configure:16491: checking number of arguments of gethostbyaddr_r" >&5
16491 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16492   echo $ac_n "(cached) $ac_c" 1>&6
16493 else
16494   cat > conftest.$ac_ext <<EOF
16495 #line 16496 "configure"
16496 #include "confdefs.h"
16497 #include <sys/types.h>
16498 #include <sys/socket.h>
16499 #include <netinet/in.h>
16500 #include <netdb.h>
16501 #define BUFSIZE (sizeof(struct hostent)+10)
16502 int main() {
16503 struct hostent hent; char buffer[BUFSIZE]; 
16504             struct in_addr add;
16505             size_t alen=sizeof(struct in_addr);
16506             int bufsize=BUFSIZE;int h_errno;
16507                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16508                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16509 ; return 0; }
16510 EOF
16511 if { (eval echo configure:16512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16512   rm -rf conftest*
16513   ol_cv_func_gethostbyaddr_r_nargs7=yes
16514 else
16515   echo "configure: failed program was:" >&5
16516   cat conftest.$ac_ext >&5
16517   rm -rf conftest*
16518   ol_cv_func_gethostbyaddr_r_nargs7=no
16519 fi
16520 rm -f conftest*
16521
16522         cat > conftest.$ac_ext <<EOF
16523 #line 16524 "configure"
16524 #include "confdefs.h"
16525 #include <sys/types.h>
16526 #include <sys/socket.h>
16527 #include <netinet/in.h>
16528 #include <netdb.h>
16529 #define BUFSIZE (sizeof(struct hostent)+10)
16530 int main() {
16531 struct hostent hent;
16532                 struct hostent *rhent; char buffer[BUFSIZE]; 
16533                 struct in_addr add;
16534                 size_t alen=sizeof(struct in_addr);
16535                 int bufsize=BUFSIZE;int h_errno;
16536                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16537                         alen, AF_INET, &hent, buffer, bufsize, 
16538                         &rhent, &h_errno);
16539 ; return 0; }
16540 EOF
16541 if { (eval echo configure:16542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16542   rm -rf conftest*
16543   ol_cv_func_gethostbyaddr_r_nargs8=yes
16544 else
16545   echo "configure: failed program was:" >&5
16546   cat conftest.$ac_ext >&5
16547   rm -rf conftest*
16548   ol_cv_func_gethostbyaddr_r_nargs8=no
16549 fi
16550 rm -f conftest*
16551
16552         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16553                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16554
16555                 ol_cv_func_gethostbyaddr_r_nargs=7
16556
16557         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16558                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16559
16560                 ol_cv_func_gethostbyaddr_r_nargs=8
16561
16562         else
16563                 ol_cv_func_gethostbyaddr_r_nargs=0
16564         fi
16565   
16566 fi
16567
16568 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16569   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16570     cat >> confdefs.h <<EOF
16571 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16572 EOF
16573
16574   fi
16575
16576 else
16577         ol_cv_func_gethostbyaddr_r_nargs=0
16578 fi
16579
16580 ol_link_ldbm=no 
16581
16582 if test $ol_with_ldbm_api = auto \
16583         -o $ol_with_ldbm_api = berkeley \
16584         -o $ol_with_ldbm_api = bcompat ; then
16585
16586         if test $ol_with_ldbm_api = bcompat; then \
16587                 for ac_hdr in db_185.h db.h
16588 do
16589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16591 echo "configure:16592: checking for $ac_hdr" >&5
16592 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16593   echo $ac_n "(cached) $ac_c" 1>&6
16594 else
16595   cat > conftest.$ac_ext <<EOF
16596 #line 16597 "configure"
16597 #include "confdefs.h"
16598 #include <$ac_hdr>
16599 EOF
16600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16601 { (eval echo configure:16602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16603 if test -z "$ac_err"; then
16604   rm -rf conftest*
16605   eval "ac_cv_header_$ac_safe=yes"
16606 else
16607   echo "$ac_err" >&5
16608   echo "configure: failed program was:" >&5
16609   cat conftest.$ac_ext >&5
16610   rm -rf conftest*
16611   eval "ac_cv_header_$ac_safe=no"
16612 fi
16613 rm -f conftest*
16614 fi
16615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16616   echo "$ac_t""yes" 1>&6
16617     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16618   cat >> confdefs.h <<EOF
16619 #define $ac_tr_hdr 1
16620 EOF
16621  
16622 else
16623   echo "$ac_t""no" 1>&6
16624 fi
16625 done
16626
16627 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16628         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16629 echo "configure:16630: checking if Berkeley DB header compatibility" >&5
16630 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16631   echo $ac_n "(cached) $ac_c" 1>&6
16632 else
16633   
16634                 cat > conftest.$ac_ext <<EOF
16635 #line 16636 "configure"
16636 #include "confdefs.h"
16637
16638 #if HAVE_DB_185_H
16639 #       include <db_185.h>
16640 #else
16641 #       include <db.h>
16642 #endif
16643
16644  /* this check could be improved */
16645 #ifndef DB_VERSION_MAJOR
16646 #       define DB_VERSION_MAJOR 1
16647 #endif
16648
16649 #if DB_VERSION_MAJOR == 1 
16650         __db_version_1
16651 #endif
16652
16653 EOF
16654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16655   egrep "__db_version_1" >/dev/null 2>&1; then
16656   rm -rf conftest*
16657   ol_cv_header_db1=yes
16658 else
16659   rm -rf conftest*
16660   ol_cv_header_db1=no
16661 fi
16662 rm -f conftest*
16663
16664 fi
16665
16666 echo "$ac_t""$ol_cv_header_db1" 1>&6
16667
16668         if test $ol_cv_header_db1 = yes ; then
16669                 ol_cv_lib_db=no
16670 if test $ol_cv_lib_db = no ; then
16671         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16672 echo "configure:16673: checking for Berkeley DB link (default)" >&5
16673 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16674   echo $ac_n "(cached) $ac_c" 1>&6
16675 else
16676   
16677         ol_DB_LIB=
16678         ol_LIBS=$LIBS
16679         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16680
16681         cat > conftest.$ac_ext <<EOF
16682 #line 16683 "configure"
16683 #include "confdefs.h"
16684
16685 #ifdef HAVE_DB_185_H
16686 # include <db_185.h>
16687 #else
16688 # include <db.h>
16689 #endif
16690
16691 #ifndef DB_VERSION_MAJOR
16692 # define DB_VERSION_MAJOR 1
16693 #endif
16694
16695 #ifndef NULL
16696 #define NULL ((void*)0)
16697 #endif
16698
16699 int main() {
16700
16701 #if DB_VERSION_MAJOR > 1
16702         {
16703                 char *version;
16704                 int major, minor, patch;
16705
16706                 version = db_version( &major, &minor, &patch );
16707
16708                 if( major != DB_VERSION_MAJOR ||
16709                         minor < DB_VERSION_MINOR )
16710                 {
16711                         printf("Berkeley DB version mismatch\n"
16712                                 "\texpected: %s\n\tgot: %s\n",
16713                                 DB_VERSION_STRING, version);
16714                         return 1;
16715                 }
16716         }
16717 #endif
16718
16719 #if DB_VERSION_MAJOR > 2
16720         db_env_create( NULL, 0 );
16721 #elif DB_VERSION_MAJOR > 1
16722         db_appexit( NULL );
16723 #else
16724         (void) dbopen( NULL, 0, 0, 0, NULL);
16725 #endif
16726
16727 ; return 0; }
16728 EOF
16729 if { (eval echo configure:16730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16730   rm -rf conftest*
16731   ol_cv_db_none=yes
16732 else
16733   echo "configure: failed program was:" >&5
16734   cat conftest.$ac_ext >&5
16735   rm -rf conftest*
16736   ol_cv_db_none=no
16737 fi
16738 rm -f conftest*
16739
16740         LIBS="$ol_LIBS"
16741
16742 fi
16743
16744 echo "$ac_t""$ol_cv_db_none" 1>&6
16745
16746         if test $ol_cv_db_none = yes ; then
16747                 ol_cv_lib_db=yes
16748         fi
16749 fi
16750
16751 if test $ol_cv_lib_db = no ; then
16752         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16753 echo "configure:16754: checking for Berkeley DB link (-ldb41)" >&5
16754 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16755   echo $ac_n "(cached) $ac_c" 1>&6
16756 else
16757   
16758         ol_DB_LIB=-ldb41
16759         ol_LIBS=$LIBS
16760         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16761
16762         cat > conftest.$ac_ext <<EOF
16763 #line 16764 "configure"
16764 #include "confdefs.h"
16765
16766 #ifdef HAVE_DB_185_H
16767 # include <db_185.h>
16768 #else
16769 # include <db.h>
16770 #endif
16771
16772 #ifndef DB_VERSION_MAJOR
16773 # define DB_VERSION_MAJOR 1
16774 #endif
16775
16776 #ifndef NULL
16777 #define NULL ((void*)0)
16778 #endif
16779
16780 int main() {
16781
16782 #if DB_VERSION_MAJOR > 1
16783         {
16784                 char *version;
16785                 int major, minor, patch;
16786
16787                 version = db_version( &major, &minor, &patch );
16788
16789                 if( major != DB_VERSION_MAJOR ||
16790                         minor < DB_VERSION_MINOR )
16791                 {
16792                         printf("Berkeley DB version mismatch\n"
16793                                 "\texpected: %s\n\tgot: %s\n",
16794                                 DB_VERSION_STRING, version);
16795                         return 1;
16796                 }
16797         }
16798 #endif
16799
16800 #if DB_VERSION_MAJOR > 2
16801         db_env_create( NULL, 0 );
16802 #elif DB_VERSION_MAJOR > 1
16803         db_appexit( NULL );
16804 #else
16805         (void) dbopen( NULL, 0, 0, 0, NULL);
16806 #endif
16807
16808 ; return 0; }
16809 EOF
16810 if { (eval echo configure:16811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16811   rm -rf conftest*
16812   ol_cv_db_db41=yes
16813 else
16814   echo "configure: failed program was:" >&5
16815   cat conftest.$ac_ext >&5
16816   rm -rf conftest*
16817   ol_cv_db_db41=no
16818 fi
16819 rm -f conftest*
16820
16821         LIBS="$ol_LIBS"
16822
16823 fi
16824
16825 echo "$ac_t""$ol_cv_db_db41" 1>&6
16826
16827         if test $ol_cv_db_db41 = yes ; then
16828                 ol_cv_lib_db=-ldb41
16829         fi
16830 fi
16831
16832 if test $ol_cv_lib_db = no ; then
16833         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16834 echo "configure:16835: checking for Berkeley DB link (-ldb-41)" >&5
16835 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16836   echo $ac_n "(cached) $ac_c" 1>&6
16837 else
16838   
16839         ol_DB_LIB=-ldb-41
16840         ol_LIBS=$LIBS
16841         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16842
16843         cat > conftest.$ac_ext <<EOF
16844 #line 16845 "configure"
16845 #include "confdefs.h"
16846
16847 #ifdef HAVE_DB_185_H
16848 # include <db_185.h>
16849 #else
16850 # include <db.h>
16851 #endif
16852
16853 #ifndef DB_VERSION_MAJOR
16854 # define DB_VERSION_MAJOR 1
16855 #endif
16856
16857 #ifndef NULL
16858 #define NULL ((void*)0)
16859 #endif
16860
16861 int main() {
16862
16863 #if DB_VERSION_MAJOR > 1
16864         {
16865                 char *version;
16866                 int major, minor, patch;
16867
16868                 version = db_version( &major, &minor, &patch );
16869
16870                 if( major != DB_VERSION_MAJOR ||
16871                         minor < DB_VERSION_MINOR )
16872                 {
16873                         printf("Berkeley DB version mismatch\n"
16874                                 "\texpected: %s\n\tgot: %s\n",
16875                                 DB_VERSION_STRING, version);
16876                         return 1;
16877                 }
16878         }
16879 #endif
16880
16881 #if DB_VERSION_MAJOR > 2
16882         db_env_create( NULL, 0 );
16883 #elif DB_VERSION_MAJOR > 1
16884         db_appexit( NULL );
16885 #else
16886         (void) dbopen( NULL, 0, 0, 0, NULL);
16887 #endif
16888
16889 ; return 0; }
16890 EOF
16891 if { (eval echo configure:16892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16892   rm -rf conftest*
16893   ol_cv_db_db_41=yes
16894 else
16895   echo "configure: failed program was:" >&5
16896   cat conftest.$ac_ext >&5
16897   rm -rf conftest*
16898   ol_cv_db_db_41=no
16899 fi
16900 rm -f conftest*
16901
16902         LIBS="$ol_LIBS"
16903
16904 fi
16905
16906 echo "$ac_t""$ol_cv_db_db_41" 1>&6
16907
16908         if test $ol_cv_db_db_41 = yes ; then
16909                 ol_cv_lib_db=-ldb-41
16910         fi
16911 fi
16912
16913 if test $ol_cv_lib_db = no ; then
16914         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
16915 echo "configure:16916: checking for Berkeley DB link (-ldb-4.1)" >&5
16916 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
16917   echo $ac_n "(cached) $ac_c" 1>&6
16918 else
16919   
16920         ol_DB_LIB=-ldb-4.1
16921         ol_LIBS=$LIBS
16922         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16923
16924         cat > conftest.$ac_ext <<EOF
16925 #line 16926 "configure"
16926 #include "confdefs.h"
16927
16928 #ifdef HAVE_DB_185_H
16929 # include <db_185.h>
16930 #else
16931 # include <db.h>
16932 #endif
16933
16934 #ifndef DB_VERSION_MAJOR
16935 # define DB_VERSION_MAJOR 1
16936 #endif
16937
16938 #ifndef NULL
16939 #define NULL ((void*)0)
16940 #endif
16941
16942 int main() {
16943
16944 #if DB_VERSION_MAJOR > 1
16945         {
16946                 char *version;
16947                 int major, minor, patch;
16948
16949                 version = db_version( &major, &minor, &patch );
16950
16951                 if( major != DB_VERSION_MAJOR ||
16952                         minor < DB_VERSION_MINOR )
16953                 {
16954                         printf("Berkeley DB version mismatch\n"
16955                                 "\texpected: %s\n\tgot: %s\n",
16956                                 DB_VERSION_STRING, version);
16957                         return 1;
16958                 }
16959         }
16960 #endif
16961
16962 #if DB_VERSION_MAJOR > 2
16963         db_env_create( NULL, 0 );
16964 #elif DB_VERSION_MAJOR > 1
16965         db_appexit( NULL );
16966 #else
16967         (void) dbopen( NULL, 0, 0, 0, NULL);
16968 #endif
16969
16970 ; return 0; }
16971 EOF
16972 if { (eval echo configure:16973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16973   rm -rf conftest*
16974   ol_cv_db_db_4_dot_1=yes
16975 else
16976   echo "configure: failed program was:" >&5
16977   cat conftest.$ac_ext >&5
16978   rm -rf conftest*
16979   ol_cv_db_db_4_dot_1=no
16980 fi
16981 rm -f conftest*
16982
16983         LIBS="$ol_LIBS"
16984
16985 fi
16986
16987 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
16988
16989         if test $ol_cv_db_db_4_dot_1 = yes ; then
16990                 ol_cv_lib_db=-ldb-4.1
16991         fi
16992 fi
16993
16994 if test $ol_cv_lib_db = no ; then
16995         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
16996 echo "configure:16997: checking for Berkeley DB link (-ldb-4-1)" >&5
16997 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
16998   echo $ac_n "(cached) $ac_c" 1>&6
16999 else
17000   
17001         ol_DB_LIB=-ldb-4-1
17002         ol_LIBS=$LIBS
17003         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17004
17005         cat > conftest.$ac_ext <<EOF
17006 #line 17007 "configure"
17007 #include "confdefs.h"
17008
17009 #ifdef HAVE_DB_185_H
17010 # include <db_185.h>
17011 #else
17012 # include <db.h>
17013 #endif
17014
17015 #ifndef DB_VERSION_MAJOR
17016 # define DB_VERSION_MAJOR 1
17017 #endif
17018
17019 #ifndef NULL
17020 #define NULL ((void*)0)
17021 #endif
17022
17023 int main() {
17024
17025 #if DB_VERSION_MAJOR > 1
17026         {
17027                 char *version;
17028                 int major, minor, patch;
17029
17030                 version = db_version( &major, &minor, &patch );
17031
17032                 if( major != DB_VERSION_MAJOR ||
17033                         minor < DB_VERSION_MINOR )
17034                 {
17035                         printf("Berkeley DB version mismatch\n"
17036                                 "\texpected: %s\n\tgot: %s\n",
17037                                 DB_VERSION_STRING, version);
17038                         return 1;
17039                 }
17040         }
17041 #endif
17042
17043 #if DB_VERSION_MAJOR > 2
17044         db_env_create( NULL, 0 );
17045 #elif DB_VERSION_MAJOR > 1
17046         db_appexit( NULL );
17047 #else
17048         (void) dbopen( NULL, 0, 0, 0, NULL);
17049 #endif
17050
17051 ; return 0; }
17052 EOF
17053 if { (eval echo configure:17054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17054   rm -rf conftest*
17055   ol_cv_db_db_4_1=yes
17056 else
17057   echo "configure: failed program was:" >&5
17058   cat conftest.$ac_ext >&5
17059   rm -rf conftest*
17060   ol_cv_db_db_4_1=no
17061 fi
17062 rm -f conftest*
17063
17064         LIBS="$ol_LIBS"
17065
17066 fi
17067
17068 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17069
17070         if test $ol_cv_db_db_4_1 = yes ; then
17071                 ol_cv_lib_db=-ldb-4-1
17072         fi
17073 fi
17074
17075 if test $ol_cv_lib_db = no ; then
17076         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17077 echo "configure:17078: checking for Berkeley DB link (-ldb-4)" >&5
17078 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17079   echo $ac_n "(cached) $ac_c" 1>&6
17080 else
17081   
17082         ol_DB_LIB=-ldb-4
17083         ol_LIBS=$LIBS
17084         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17085
17086         cat > conftest.$ac_ext <<EOF
17087 #line 17088 "configure"
17088 #include "confdefs.h"
17089
17090 #ifdef HAVE_DB_185_H
17091 # include <db_185.h>
17092 #else
17093 # include <db.h>
17094 #endif
17095
17096 #ifndef DB_VERSION_MAJOR
17097 # define DB_VERSION_MAJOR 1
17098 #endif
17099
17100 #ifndef NULL
17101 #define NULL ((void*)0)
17102 #endif
17103
17104 int main() {
17105
17106 #if DB_VERSION_MAJOR > 1
17107         {
17108                 char *version;
17109                 int major, minor, patch;
17110
17111                 version = db_version( &major, &minor, &patch );
17112
17113                 if( major != DB_VERSION_MAJOR ||
17114                         minor < DB_VERSION_MINOR )
17115                 {
17116                         printf("Berkeley DB version mismatch\n"
17117                                 "\texpected: %s\n\tgot: %s\n",
17118                                 DB_VERSION_STRING, version);
17119                         return 1;
17120                 }
17121         }
17122 #endif
17123
17124 #if DB_VERSION_MAJOR > 2
17125         db_env_create( NULL, 0 );
17126 #elif DB_VERSION_MAJOR > 1
17127         db_appexit( NULL );
17128 #else
17129         (void) dbopen( NULL, 0, 0, 0, NULL);
17130 #endif
17131
17132 ; return 0; }
17133 EOF
17134 if { (eval echo configure:17135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17135   rm -rf conftest*
17136   ol_cv_db_db_4=yes
17137 else
17138   echo "configure: failed program was:" >&5
17139   cat conftest.$ac_ext >&5
17140   rm -rf conftest*
17141   ol_cv_db_db_4=no
17142 fi
17143 rm -f conftest*
17144
17145         LIBS="$ol_LIBS"
17146
17147 fi
17148
17149 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17150
17151         if test $ol_cv_db_db_4 = yes ; then
17152                 ol_cv_lib_db=-ldb-4
17153         fi
17154 fi
17155
17156 if test $ol_cv_lib_db = no ; then
17157         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17158 echo "configure:17159: checking for Berkeley DB link (-ldb4)" >&5
17159 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17160   echo $ac_n "(cached) $ac_c" 1>&6
17161 else
17162   
17163         ol_DB_LIB=-ldb4
17164         ol_LIBS=$LIBS
17165         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17166
17167         cat > conftest.$ac_ext <<EOF
17168 #line 17169 "configure"
17169 #include "confdefs.h"
17170
17171 #ifdef HAVE_DB_185_H
17172 # include <db_185.h>
17173 #else
17174 # include <db.h>
17175 #endif
17176
17177 #ifndef DB_VERSION_MAJOR
17178 # define DB_VERSION_MAJOR 1
17179 #endif
17180
17181 #ifndef NULL
17182 #define NULL ((void*)0)
17183 #endif
17184
17185 int main() {
17186
17187 #if DB_VERSION_MAJOR > 1
17188         {
17189                 char *version;
17190                 int major, minor, patch;
17191
17192                 version = db_version( &major, &minor, &patch );
17193
17194                 if( major != DB_VERSION_MAJOR ||
17195                         minor < DB_VERSION_MINOR )
17196                 {
17197                         printf("Berkeley DB version mismatch\n"
17198                                 "\texpected: %s\n\tgot: %s\n",
17199                                 DB_VERSION_STRING, version);
17200                         return 1;
17201                 }
17202         }
17203 #endif
17204
17205 #if DB_VERSION_MAJOR > 2
17206         db_env_create( NULL, 0 );
17207 #elif DB_VERSION_MAJOR > 1
17208         db_appexit( NULL );
17209 #else
17210         (void) dbopen( NULL, 0, 0, 0, NULL);
17211 #endif
17212
17213 ; return 0; }
17214 EOF
17215 if { (eval echo configure:17216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17216   rm -rf conftest*
17217   ol_cv_db_db4=yes
17218 else
17219   echo "configure: failed program was:" >&5
17220   cat conftest.$ac_ext >&5
17221   rm -rf conftest*
17222   ol_cv_db_db4=no
17223 fi
17224 rm -f conftest*
17225
17226         LIBS="$ol_LIBS"
17227
17228 fi
17229
17230 echo "$ac_t""$ol_cv_db_db4" 1>&6
17231
17232         if test $ol_cv_db_db4 = yes ; then
17233                 ol_cv_lib_db=-ldb4
17234         fi
17235 fi
17236
17237 if test $ol_cv_lib_db = no ; then
17238         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17239 echo "configure:17240: checking for Berkeley DB link (-ldb)" >&5
17240 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17241   echo $ac_n "(cached) $ac_c" 1>&6
17242 else
17243   
17244         ol_DB_LIB=-ldb
17245         ol_LIBS=$LIBS
17246         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17247
17248         cat > conftest.$ac_ext <<EOF
17249 #line 17250 "configure"
17250 #include "confdefs.h"
17251
17252 #ifdef HAVE_DB_185_H
17253 # include <db_185.h>
17254 #else
17255 # include <db.h>
17256 #endif
17257
17258 #ifndef DB_VERSION_MAJOR
17259 # define DB_VERSION_MAJOR 1
17260 #endif
17261
17262 #ifndef NULL
17263 #define NULL ((void*)0)
17264 #endif
17265
17266 int main() {
17267
17268 #if DB_VERSION_MAJOR > 1
17269         {
17270                 char *version;
17271                 int major, minor, patch;
17272
17273                 version = db_version( &major, &minor, &patch );
17274
17275                 if( major != DB_VERSION_MAJOR ||
17276                         minor < DB_VERSION_MINOR )
17277                 {
17278                         printf("Berkeley DB version mismatch\n"
17279                                 "\texpected: %s\n\tgot: %s\n",
17280                                 DB_VERSION_STRING, version);
17281                         return 1;
17282                 }
17283         }
17284 #endif
17285
17286 #if DB_VERSION_MAJOR > 2
17287         db_env_create( NULL, 0 );
17288 #elif DB_VERSION_MAJOR > 1
17289         db_appexit( NULL );
17290 #else
17291         (void) dbopen( NULL, 0, 0, 0, NULL);
17292 #endif
17293
17294 ; return 0; }
17295 EOF
17296 if { (eval echo configure:17297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17297   rm -rf conftest*
17298   ol_cv_db_db=yes
17299 else
17300   echo "configure: failed program was:" >&5
17301   cat conftest.$ac_ext >&5
17302   rm -rf conftest*
17303   ol_cv_db_db=no
17304 fi
17305 rm -f conftest*
17306
17307         LIBS="$ol_LIBS"
17308
17309 fi
17310
17311 echo "$ac_t""$ol_cv_db_db" 1>&6
17312
17313         if test $ol_cv_db_db = yes ; then
17314                 ol_cv_lib_db=-ldb
17315         fi
17316 fi
17317
17318 if test $ol_cv_lib_db = no ; then
17319         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17320 echo "configure:17321: checking for Berkeley DB link (-ldb3)" >&5
17321 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17322   echo $ac_n "(cached) $ac_c" 1>&6
17323 else
17324   
17325         ol_DB_LIB=-ldb3
17326         ol_LIBS=$LIBS
17327         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17328
17329         cat > conftest.$ac_ext <<EOF
17330 #line 17331 "configure"
17331 #include "confdefs.h"
17332
17333 #ifdef HAVE_DB_185_H
17334 # include <db_185.h>
17335 #else
17336 # include <db.h>
17337 #endif
17338
17339 #ifndef DB_VERSION_MAJOR
17340 # define DB_VERSION_MAJOR 1
17341 #endif
17342
17343 #ifndef NULL
17344 #define NULL ((void*)0)
17345 #endif
17346
17347 int main() {
17348
17349 #if DB_VERSION_MAJOR > 1
17350         {
17351                 char *version;
17352                 int major, minor, patch;
17353
17354                 version = db_version( &major, &minor, &patch );
17355
17356                 if( major != DB_VERSION_MAJOR ||
17357                         minor < DB_VERSION_MINOR )
17358                 {
17359                         printf("Berkeley DB version mismatch\n"
17360                                 "\texpected: %s\n\tgot: %s\n",
17361                                 DB_VERSION_STRING, version);
17362                         return 1;
17363                 }
17364         }
17365 #endif
17366
17367 #if DB_VERSION_MAJOR > 2
17368         db_env_create( NULL, 0 );
17369 #elif DB_VERSION_MAJOR > 1
17370         db_appexit( NULL );
17371 #else
17372         (void) dbopen( NULL, 0, 0, 0, NULL);
17373 #endif
17374
17375 ; return 0; }
17376 EOF
17377 if { (eval echo configure:17378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17378   rm -rf conftest*
17379   ol_cv_db_db3=yes
17380 else
17381   echo "configure: failed program was:" >&5
17382   cat conftest.$ac_ext >&5
17383   rm -rf conftest*
17384   ol_cv_db_db3=no
17385 fi
17386 rm -f conftest*
17387
17388         LIBS="$ol_LIBS"
17389
17390 fi
17391
17392 echo "$ac_t""$ol_cv_db_db3" 1>&6
17393
17394         if test $ol_cv_db_db3 = yes ; then
17395                 ol_cv_lib_db=-ldb3
17396         fi
17397 fi
17398
17399 if test $ol_cv_lib_db = no ; then
17400         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17401 echo "configure:17402: checking for Berkeley DB link (-ldb-3)" >&5
17402 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17403   echo $ac_n "(cached) $ac_c" 1>&6
17404 else
17405   
17406         ol_DB_LIB=-ldb-3
17407         ol_LIBS=$LIBS
17408         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17409
17410         cat > conftest.$ac_ext <<EOF
17411 #line 17412 "configure"
17412 #include "confdefs.h"
17413
17414 #ifdef HAVE_DB_185_H
17415 # include <db_185.h>
17416 #else
17417 # include <db.h>
17418 #endif
17419
17420 #ifndef DB_VERSION_MAJOR
17421 # define DB_VERSION_MAJOR 1
17422 #endif
17423
17424 #ifndef NULL
17425 #define NULL ((void*)0)
17426 #endif
17427
17428 int main() {
17429
17430 #if DB_VERSION_MAJOR > 1
17431         {
17432                 char *version;
17433                 int major, minor, patch;
17434
17435                 version = db_version( &major, &minor, &patch );
17436
17437                 if( major != DB_VERSION_MAJOR ||
17438                         minor < DB_VERSION_MINOR )
17439                 {
17440                         printf("Berkeley DB version mismatch\n"
17441                                 "\texpected: %s\n\tgot: %s\n",
17442                                 DB_VERSION_STRING, version);
17443                         return 1;
17444                 }
17445         }
17446 #endif
17447
17448 #if DB_VERSION_MAJOR > 2
17449         db_env_create( NULL, 0 );
17450 #elif DB_VERSION_MAJOR > 1
17451         db_appexit( NULL );
17452 #else
17453         (void) dbopen( NULL, 0, 0, 0, NULL);
17454 #endif
17455
17456 ; return 0; }
17457 EOF
17458 if { (eval echo configure:17459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17459   rm -rf conftest*
17460   ol_cv_db_db_3=yes
17461 else
17462   echo "configure: failed program was:" >&5
17463   cat conftest.$ac_ext >&5
17464   rm -rf conftest*
17465   ol_cv_db_db_3=no
17466 fi
17467 rm -f conftest*
17468
17469         LIBS="$ol_LIBS"
17470
17471 fi
17472
17473 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17474
17475         if test $ol_cv_db_db_3 = yes ; then
17476                 ol_cv_lib_db=-ldb-3
17477         fi
17478 fi
17479
17480 if test $ol_cv_lib_db = no ; then
17481         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17482 echo "configure:17483: checking for Berkeley DB link (-ldb2)" >&5
17483 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17484   echo $ac_n "(cached) $ac_c" 1>&6
17485 else
17486   
17487         ol_DB_LIB=-ldb2
17488         ol_LIBS=$LIBS
17489         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17490
17491         cat > conftest.$ac_ext <<EOF
17492 #line 17493 "configure"
17493 #include "confdefs.h"
17494
17495 #ifdef HAVE_DB_185_H
17496 # include <db_185.h>
17497 #else
17498 # include <db.h>
17499 #endif
17500
17501 #ifndef DB_VERSION_MAJOR
17502 # define DB_VERSION_MAJOR 1
17503 #endif
17504
17505 #ifndef NULL
17506 #define NULL ((void*)0)
17507 #endif
17508
17509 int main() {
17510
17511 #if DB_VERSION_MAJOR > 1
17512         {
17513                 char *version;
17514                 int major, minor, patch;
17515
17516                 version = db_version( &major, &minor, &patch );
17517
17518                 if( major != DB_VERSION_MAJOR ||
17519                         minor < DB_VERSION_MINOR )
17520                 {
17521                         printf("Berkeley DB version mismatch\n"
17522                                 "\texpected: %s\n\tgot: %s\n",
17523                                 DB_VERSION_STRING, version);
17524                         return 1;
17525                 }
17526         }
17527 #endif
17528
17529 #if DB_VERSION_MAJOR > 2
17530         db_env_create( NULL, 0 );
17531 #elif DB_VERSION_MAJOR > 1
17532         db_appexit( NULL );
17533 #else
17534         (void) dbopen( NULL, 0, 0, 0, NULL);
17535 #endif
17536
17537 ; return 0; }
17538 EOF
17539 if { (eval echo configure:17540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17540   rm -rf conftest*
17541   ol_cv_db_db2=yes
17542 else
17543   echo "configure: failed program was:" >&5
17544   cat conftest.$ac_ext >&5
17545   rm -rf conftest*
17546   ol_cv_db_db2=no
17547 fi
17548 rm -f conftest*
17549
17550         LIBS="$ol_LIBS"
17551
17552 fi
17553
17554 echo "$ac_t""$ol_cv_db_db2" 1>&6
17555
17556         if test $ol_cv_db_db2 = yes ; then
17557                 ol_cv_lib_db=-ldb2
17558         fi
17559 fi
17560
17561 if test $ol_cv_lib_db = no ; then
17562         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17563 echo "configure:17564: checking for Berkeley DB link (-ldb-2)" >&5
17564 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17565   echo $ac_n "(cached) $ac_c" 1>&6
17566 else
17567   
17568         ol_DB_LIB=-ldb-2
17569         ol_LIBS=$LIBS
17570         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17571
17572         cat > conftest.$ac_ext <<EOF
17573 #line 17574 "configure"
17574 #include "confdefs.h"
17575
17576 #ifdef HAVE_DB_185_H
17577 # include <db_185.h>
17578 #else
17579 # include <db.h>
17580 #endif
17581
17582 #ifndef DB_VERSION_MAJOR
17583 # define DB_VERSION_MAJOR 1
17584 #endif
17585
17586 #ifndef NULL
17587 #define NULL ((void*)0)
17588 #endif
17589
17590 int main() {
17591
17592 #if DB_VERSION_MAJOR > 1
17593         {
17594                 char *version;
17595                 int major, minor, patch;
17596
17597                 version = db_version( &major, &minor, &patch );
17598
17599                 if( major != DB_VERSION_MAJOR ||
17600                         minor < DB_VERSION_MINOR )
17601                 {
17602                         printf("Berkeley DB version mismatch\n"
17603                                 "\texpected: %s\n\tgot: %s\n",
17604                                 DB_VERSION_STRING, version);
17605                         return 1;
17606                 }
17607         }
17608 #endif
17609
17610 #if DB_VERSION_MAJOR > 2
17611         db_env_create( NULL, 0 );
17612 #elif DB_VERSION_MAJOR > 1
17613         db_appexit( NULL );
17614 #else
17615         (void) dbopen( NULL, 0, 0, 0, NULL);
17616 #endif
17617
17618 ; return 0; }
17619 EOF
17620 if { (eval echo configure:17621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17621   rm -rf conftest*
17622   ol_cv_db_db_2=yes
17623 else
17624   echo "configure: failed program was:" >&5
17625   cat conftest.$ac_ext >&5
17626   rm -rf conftest*
17627   ol_cv_db_db_2=no
17628 fi
17629 rm -f conftest*
17630
17631         LIBS="$ol_LIBS"
17632
17633 fi
17634
17635 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17636
17637         if test $ol_cv_db_db_2 = yes ; then
17638                 ol_cv_lib_db=-ldb-2
17639         fi
17640 fi
17641
17642 if test $ol_cv_lib_db = no ; then
17643         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17644 echo "configure:17645: checking for Berkeley DB link (-ldb1)" >&5
17645 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17646   echo $ac_n "(cached) $ac_c" 1>&6
17647 else
17648   
17649         ol_DB_LIB=-ldb1
17650         ol_LIBS=$LIBS
17651         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17652
17653         cat > conftest.$ac_ext <<EOF
17654 #line 17655 "configure"
17655 #include "confdefs.h"
17656
17657 #ifdef HAVE_DB_185_H
17658 # include <db_185.h>
17659 #else
17660 # include <db.h>
17661 #endif
17662
17663 #ifndef DB_VERSION_MAJOR
17664 # define DB_VERSION_MAJOR 1
17665 #endif
17666
17667 #ifndef NULL
17668 #define NULL ((void*)0)
17669 #endif
17670
17671 int main() {
17672
17673 #if DB_VERSION_MAJOR > 1
17674         {
17675                 char *version;
17676                 int major, minor, patch;
17677
17678                 version = db_version( &major, &minor, &patch );
17679
17680                 if( major != DB_VERSION_MAJOR ||
17681                         minor < DB_VERSION_MINOR )
17682                 {
17683                         printf("Berkeley DB version mismatch\n"
17684                                 "\texpected: %s\n\tgot: %s\n",
17685                                 DB_VERSION_STRING, version);
17686                         return 1;
17687                 }
17688         }
17689 #endif
17690
17691 #if DB_VERSION_MAJOR > 2
17692         db_env_create( NULL, 0 );
17693 #elif DB_VERSION_MAJOR > 1
17694         db_appexit( NULL );
17695 #else
17696         (void) dbopen( NULL, 0, 0, 0, NULL);
17697 #endif
17698
17699 ; return 0; }
17700 EOF
17701 if { (eval echo configure:17702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17702   rm -rf conftest*
17703   ol_cv_db_db1=yes
17704 else
17705   echo "configure: failed program was:" >&5
17706   cat conftest.$ac_ext >&5
17707   rm -rf conftest*
17708   ol_cv_db_db1=no
17709 fi
17710 rm -f conftest*
17711
17712         LIBS="$ol_LIBS"
17713
17714 fi
17715
17716 echo "$ac_t""$ol_cv_db_db1" 1>&6
17717
17718         if test $ol_cv_db_db1 = yes ; then
17719                 ol_cv_lib_db=-ldb1
17720         fi
17721 fi
17722
17723 if test $ol_cv_lib_db = no ; then
17724         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17725 echo "configure:17726: checking for Berkeley DB link (-ldb-1)" >&5
17726 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17727   echo $ac_n "(cached) $ac_c" 1>&6
17728 else
17729   
17730         ol_DB_LIB=-ldb-1
17731         ol_LIBS=$LIBS
17732         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17733
17734         cat > conftest.$ac_ext <<EOF
17735 #line 17736 "configure"
17736 #include "confdefs.h"
17737
17738 #ifdef HAVE_DB_185_H
17739 # include <db_185.h>
17740 #else
17741 # include <db.h>
17742 #endif
17743
17744 #ifndef DB_VERSION_MAJOR
17745 # define DB_VERSION_MAJOR 1
17746 #endif
17747
17748 #ifndef NULL
17749 #define NULL ((void*)0)
17750 #endif
17751
17752 int main() {
17753
17754 #if DB_VERSION_MAJOR > 1
17755         {
17756                 char *version;
17757                 int major, minor, patch;
17758
17759                 version = db_version( &major, &minor, &patch );
17760
17761                 if( major != DB_VERSION_MAJOR ||
17762                         minor < DB_VERSION_MINOR )
17763                 {
17764                         printf("Berkeley DB version mismatch\n"
17765                                 "\texpected: %s\n\tgot: %s\n",
17766                                 DB_VERSION_STRING, version);
17767                         return 1;
17768                 }
17769         }
17770 #endif
17771
17772 #if DB_VERSION_MAJOR > 2
17773         db_env_create( NULL, 0 );
17774 #elif DB_VERSION_MAJOR > 1
17775         db_appexit( NULL );
17776 #else
17777         (void) dbopen( NULL, 0, 0, 0, NULL);
17778 #endif
17779
17780 ; return 0; }
17781 EOF
17782 if { (eval echo configure:17783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17783   rm -rf conftest*
17784   ol_cv_db_db_1=yes
17785 else
17786   echo "configure: failed program was:" >&5
17787   cat conftest.$ac_ext >&5
17788   rm -rf conftest*
17789   ol_cv_db_db_1=no
17790 fi
17791 rm -f conftest*
17792
17793         LIBS="$ol_LIBS"
17794
17795 fi
17796
17797 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17798
17799         if test $ol_cv_db_db_1 = yes ; then
17800                 ol_cv_lib_db=-ldb-1
17801         fi
17802 fi
17803
17804
17805                 if test "$ol_cv_lib_db" != no ; then
17806                         ol_cv_berkeley_db=yes
17807                 fi
17808         fi
17809 fi
17810
17811         else
17812                 ol_cv_berkeley_db=no
17813 for ac_hdr in db.h
17814 do
17815 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17816 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17817 echo "configure:17818: checking for $ac_hdr" >&5
17818 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17819   echo $ac_n "(cached) $ac_c" 1>&6
17820 else
17821   cat > conftest.$ac_ext <<EOF
17822 #line 17823 "configure"
17823 #include "confdefs.h"
17824 #include <$ac_hdr>
17825 EOF
17826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17827 { (eval echo configure:17828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17829 if test -z "$ac_err"; then
17830   rm -rf conftest*
17831   eval "ac_cv_header_$ac_safe=yes"
17832 else
17833   echo "$ac_err" >&5
17834   echo "configure: failed program was:" >&5
17835   cat conftest.$ac_ext >&5
17836   rm -rf conftest*
17837   eval "ac_cv_header_$ac_safe=no"
17838 fi
17839 rm -f conftest*
17840 fi
17841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17842   echo "$ac_t""yes" 1>&6
17843     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17844   cat >> confdefs.h <<EOF
17845 #define $ac_tr_hdr 1
17846 EOF
17847  
17848 else
17849   echo "$ac_t""no" 1>&6
17850 fi
17851 done
17852
17853 if test $ac_cv_header_db_h = yes; then
17854         ol_cv_lib_db=no
17855 if test $ol_cv_lib_db = no ; then
17856         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17857 echo "configure:17858: checking for Berkeley DB link (default)" >&5
17858 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17859   echo $ac_n "(cached) $ac_c" 1>&6
17860 else
17861   
17862         ol_DB_LIB=
17863         ol_LIBS=$LIBS
17864         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17865
17866         cat > conftest.$ac_ext <<EOF
17867 #line 17868 "configure"
17868 #include "confdefs.h"
17869
17870 #ifdef HAVE_DB_185_H
17871 # include <db_185.h>
17872 #else
17873 # include <db.h>
17874 #endif
17875
17876 #ifndef DB_VERSION_MAJOR
17877 # define DB_VERSION_MAJOR 1
17878 #endif
17879
17880 #ifndef NULL
17881 #define NULL ((void*)0)
17882 #endif
17883
17884 int main() {
17885
17886 #if DB_VERSION_MAJOR > 1
17887         {
17888                 char *version;
17889                 int major, minor, patch;
17890
17891                 version = db_version( &major, &minor, &patch );
17892
17893                 if( major != DB_VERSION_MAJOR ||
17894                         minor < DB_VERSION_MINOR )
17895                 {
17896                         printf("Berkeley DB version mismatch\n"
17897                                 "\texpected: %s\n\tgot: %s\n",
17898                                 DB_VERSION_STRING, version);
17899                         return 1;
17900                 }
17901         }
17902 #endif
17903
17904 #if DB_VERSION_MAJOR > 2
17905         db_env_create( NULL, 0 );
17906 #elif DB_VERSION_MAJOR > 1
17907         db_appexit( NULL );
17908 #else
17909         (void) dbopen( NULL, 0, 0, 0, NULL);
17910 #endif
17911
17912 ; return 0; }
17913 EOF
17914 if { (eval echo configure:17915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17915   rm -rf conftest*
17916   ol_cv_db_none=yes
17917 else
17918   echo "configure: failed program was:" >&5
17919   cat conftest.$ac_ext >&5
17920   rm -rf conftest*
17921   ol_cv_db_none=no
17922 fi
17923 rm -f conftest*
17924
17925         LIBS="$ol_LIBS"
17926
17927 fi
17928
17929 echo "$ac_t""$ol_cv_db_none" 1>&6
17930
17931         if test $ol_cv_db_none = yes ; then
17932                 ol_cv_lib_db=yes
17933         fi
17934 fi
17935
17936 if test $ol_cv_lib_db = no ; then
17937         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17938 echo "configure:17939: checking for Berkeley DB link (-ldb41)" >&5
17939 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17940   echo $ac_n "(cached) $ac_c" 1>&6
17941 else
17942   
17943         ol_DB_LIB=-ldb41
17944         ol_LIBS=$LIBS
17945         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17946
17947         cat > conftest.$ac_ext <<EOF
17948 #line 17949 "configure"
17949 #include "confdefs.h"
17950
17951 #ifdef HAVE_DB_185_H
17952 # include <db_185.h>
17953 #else
17954 # include <db.h>
17955 #endif
17956
17957 #ifndef DB_VERSION_MAJOR
17958 # define DB_VERSION_MAJOR 1
17959 #endif
17960
17961 #ifndef NULL
17962 #define NULL ((void*)0)
17963 #endif
17964
17965 int main() {
17966
17967 #if DB_VERSION_MAJOR > 1
17968         {
17969                 char *version;
17970                 int major, minor, patch;
17971
17972                 version = db_version( &major, &minor, &patch );
17973
17974                 if( major != DB_VERSION_MAJOR ||
17975                         minor < DB_VERSION_MINOR )
17976                 {
17977                         printf("Berkeley DB version mismatch\n"
17978                                 "\texpected: %s\n\tgot: %s\n",
17979                                 DB_VERSION_STRING, version);
17980                         return 1;
17981                 }
17982         }
17983 #endif
17984
17985 #if DB_VERSION_MAJOR > 2
17986         db_env_create( NULL, 0 );
17987 #elif DB_VERSION_MAJOR > 1
17988         db_appexit( NULL );
17989 #else
17990         (void) dbopen( NULL, 0, 0, 0, NULL);
17991 #endif
17992
17993 ; return 0; }
17994 EOF
17995 if { (eval echo configure:17996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17996   rm -rf conftest*
17997   ol_cv_db_db41=yes
17998 else
17999   echo "configure: failed program was:" >&5
18000   cat conftest.$ac_ext >&5
18001   rm -rf conftest*
18002   ol_cv_db_db41=no
18003 fi
18004 rm -f conftest*
18005
18006         LIBS="$ol_LIBS"
18007
18008 fi
18009
18010 echo "$ac_t""$ol_cv_db_db41" 1>&6
18011
18012         if test $ol_cv_db_db41 = yes ; then
18013                 ol_cv_lib_db=-ldb41
18014         fi
18015 fi
18016
18017 if test $ol_cv_lib_db = no ; then
18018         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18019 echo "configure:18020: checking for Berkeley DB link (-ldb-41)" >&5
18020 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18021   echo $ac_n "(cached) $ac_c" 1>&6
18022 else
18023   
18024         ol_DB_LIB=-ldb-41
18025         ol_LIBS=$LIBS
18026         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18027
18028         cat > conftest.$ac_ext <<EOF
18029 #line 18030 "configure"
18030 #include "confdefs.h"
18031
18032 #ifdef HAVE_DB_185_H
18033 # include <db_185.h>
18034 #else
18035 # include <db.h>
18036 #endif
18037
18038 #ifndef DB_VERSION_MAJOR
18039 # define DB_VERSION_MAJOR 1
18040 #endif
18041
18042 #ifndef NULL
18043 #define NULL ((void*)0)
18044 #endif
18045
18046 int main() {
18047
18048 #if DB_VERSION_MAJOR > 1
18049         {
18050                 char *version;
18051                 int major, minor, patch;
18052
18053                 version = db_version( &major, &minor, &patch );
18054
18055                 if( major != DB_VERSION_MAJOR ||
18056                         minor < DB_VERSION_MINOR )
18057                 {
18058                         printf("Berkeley DB version mismatch\n"
18059                                 "\texpected: %s\n\tgot: %s\n",
18060                                 DB_VERSION_STRING, version);
18061                         return 1;
18062                 }
18063         }
18064 #endif
18065
18066 #if DB_VERSION_MAJOR > 2
18067         db_env_create( NULL, 0 );
18068 #elif DB_VERSION_MAJOR > 1
18069         db_appexit( NULL );
18070 #else
18071         (void) dbopen( NULL, 0, 0, 0, NULL);
18072 #endif
18073
18074 ; return 0; }
18075 EOF
18076 if { (eval echo configure:18077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18077   rm -rf conftest*
18078   ol_cv_db_db_41=yes
18079 else
18080   echo "configure: failed program was:" >&5
18081   cat conftest.$ac_ext >&5
18082   rm -rf conftest*
18083   ol_cv_db_db_41=no
18084 fi
18085 rm -f conftest*
18086
18087         LIBS="$ol_LIBS"
18088
18089 fi
18090
18091 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18092
18093         if test $ol_cv_db_db_41 = yes ; then
18094                 ol_cv_lib_db=-ldb-41
18095         fi
18096 fi
18097
18098 if test $ol_cv_lib_db = no ; then
18099         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18100 echo "configure:18101: checking for Berkeley DB link (-ldb-4.1)" >&5
18101 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18102   echo $ac_n "(cached) $ac_c" 1>&6
18103 else
18104   
18105         ol_DB_LIB=-ldb-4.1
18106         ol_LIBS=$LIBS
18107         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18108
18109         cat > conftest.$ac_ext <<EOF
18110 #line 18111 "configure"
18111 #include "confdefs.h"
18112
18113 #ifdef HAVE_DB_185_H
18114 # include <db_185.h>
18115 #else
18116 # include <db.h>
18117 #endif
18118
18119 #ifndef DB_VERSION_MAJOR
18120 # define DB_VERSION_MAJOR 1
18121 #endif
18122
18123 #ifndef NULL
18124 #define NULL ((void*)0)
18125 #endif
18126
18127 int main() {
18128
18129 #if DB_VERSION_MAJOR > 1
18130         {
18131                 char *version;
18132                 int major, minor, patch;
18133
18134                 version = db_version( &major, &minor, &patch );
18135
18136                 if( major != DB_VERSION_MAJOR ||
18137                         minor < DB_VERSION_MINOR )
18138                 {
18139                         printf("Berkeley DB version mismatch\n"
18140                                 "\texpected: %s\n\tgot: %s\n",
18141                                 DB_VERSION_STRING, version);
18142                         return 1;
18143                 }
18144         }
18145 #endif
18146
18147 #if DB_VERSION_MAJOR > 2
18148         db_env_create( NULL, 0 );
18149 #elif DB_VERSION_MAJOR > 1
18150         db_appexit( NULL );
18151 #else
18152         (void) dbopen( NULL, 0, 0, 0, NULL);
18153 #endif
18154
18155 ; return 0; }
18156 EOF
18157 if { (eval echo configure:18158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18158   rm -rf conftest*
18159   ol_cv_db_db_4_dot_1=yes
18160 else
18161   echo "configure: failed program was:" >&5
18162   cat conftest.$ac_ext >&5
18163   rm -rf conftest*
18164   ol_cv_db_db_4_dot_1=no
18165 fi
18166 rm -f conftest*
18167
18168         LIBS="$ol_LIBS"
18169
18170 fi
18171
18172 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18173
18174         if test $ol_cv_db_db_4_dot_1 = yes ; then
18175                 ol_cv_lib_db=-ldb-4.1
18176         fi
18177 fi
18178
18179 if test $ol_cv_lib_db = no ; then
18180         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18181 echo "configure:18182: checking for Berkeley DB link (-ldb-4-1)" >&5
18182 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18183   echo $ac_n "(cached) $ac_c" 1>&6
18184 else
18185   
18186         ol_DB_LIB=-ldb-4-1
18187         ol_LIBS=$LIBS
18188         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18189
18190         cat > conftest.$ac_ext <<EOF
18191 #line 18192 "configure"
18192 #include "confdefs.h"
18193
18194 #ifdef HAVE_DB_185_H
18195 # include <db_185.h>
18196 #else
18197 # include <db.h>
18198 #endif
18199
18200 #ifndef DB_VERSION_MAJOR
18201 # define DB_VERSION_MAJOR 1
18202 #endif
18203
18204 #ifndef NULL
18205 #define NULL ((void*)0)
18206 #endif
18207
18208 int main() {
18209
18210 #if DB_VERSION_MAJOR > 1
18211         {
18212                 char *version;
18213                 int major, minor, patch;
18214
18215                 version = db_version( &major, &minor, &patch );
18216
18217                 if( major != DB_VERSION_MAJOR ||
18218                         minor < DB_VERSION_MINOR )
18219                 {
18220                         printf("Berkeley DB version mismatch\n"
18221                                 "\texpected: %s\n\tgot: %s\n",
18222                                 DB_VERSION_STRING, version);
18223                         return 1;
18224                 }
18225         }
18226 #endif
18227
18228 #if DB_VERSION_MAJOR > 2
18229         db_env_create( NULL, 0 );
18230 #elif DB_VERSION_MAJOR > 1
18231         db_appexit( NULL );
18232 #else
18233         (void) dbopen( NULL, 0, 0, 0, NULL);
18234 #endif
18235
18236 ; return 0; }
18237 EOF
18238 if { (eval echo configure:18239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18239   rm -rf conftest*
18240   ol_cv_db_db_4_1=yes
18241 else
18242   echo "configure: failed program was:" >&5
18243   cat conftest.$ac_ext >&5
18244   rm -rf conftest*
18245   ol_cv_db_db_4_1=no
18246 fi
18247 rm -f conftest*
18248
18249         LIBS="$ol_LIBS"
18250
18251 fi
18252
18253 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18254
18255         if test $ol_cv_db_db_4_1 = yes ; then
18256                 ol_cv_lib_db=-ldb-4-1
18257         fi
18258 fi
18259
18260 if test $ol_cv_lib_db = no ; then
18261         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18262 echo "configure:18263: checking for Berkeley DB link (-ldb-4)" >&5
18263 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18264   echo $ac_n "(cached) $ac_c" 1>&6
18265 else
18266   
18267         ol_DB_LIB=-ldb-4
18268         ol_LIBS=$LIBS
18269         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18270
18271         cat > conftest.$ac_ext <<EOF
18272 #line 18273 "configure"
18273 #include "confdefs.h"
18274
18275 #ifdef HAVE_DB_185_H
18276 # include <db_185.h>
18277 #else
18278 # include <db.h>
18279 #endif
18280
18281 #ifndef DB_VERSION_MAJOR
18282 # define DB_VERSION_MAJOR 1
18283 #endif
18284
18285 #ifndef NULL
18286 #define NULL ((void*)0)
18287 #endif
18288
18289 int main() {
18290
18291 #if DB_VERSION_MAJOR > 1
18292         {
18293                 char *version;
18294                 int major, minor, patch;
18295
18296                 version = db_version( &major, &minor, &patch );
18297
18298                 if( major != DB_VERSION_MAJOR ||
18299                         minor < DB_VERSION_MINOR )
18300                 {
18301                         printf("Berkeley DB version mismatch\n"
18302                                 "\texpected: %s\n\tgot: %s\n",
18303                                 DB_VERSION_STRING, version);
18304                         return 1;
18305                 }
18306         }
18307 #endif
18308
18309 #if DB_VERSION_MAJOR > 2
18310         db_env_create( NULL, 0 );
18311 #elif DB_VERSION_MAJOR > 1
18312         db_appexit( NULL );
18313 #else
18314         (void) dbopen( NULL, 0, 0, 0, NULL);
18315 #endif
18316
18317 ; return 0; }
18318 EOF
18319 if { (eval echo configure:18320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18320   rm -rf conftest*
18321   ol_cv_db_db_4=yes
18322 else
18323   echo "configure: failed program was:" >&5
18324   cat conftest.$ac_ext >&5
18325   rm -rf conftest*
18326   ol_cv_db_db_4=no
18327 fi
18328 rm -f conftest*
18329
18330         LIBS="$ol_LIBS"
18331
18332 fi
18333
18334 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18335
18336         if test $ol_cv_db_db_4 = yes ; then
18337                 ol_cv_lib_db=-ldb-4
18338         fi
18339 fi
18340
18341 if test $ol_cv_lib_db = no ; then
18342         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18343 echo "configure:18344: checking for Berkeley DB link (-ldb4)" >&5
18344 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18345   echo $ac_n "(cached) $ac_c" 1>&6
18346 else
18347   
18348         ol_DB_LIB=-ldb4
18349         ol_LIBS=$LIBS
18350         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18351
18352         cat > conftest.$ac_ext <<EOF
18353 #line 18354 "configure"
18354 #include "confdefs.h"
18355
18356 #ifdef HAVE_DB_185_H
18357 # include <db_185.h>
18358 #else
18359 # include <db.h>
18360 #endif
18361
18362 #ifndef DB_VERSION_MAJOR
18363 # define DB_VERSION_MAJOR 1
18364 #endif
18365
18366 #ifndef NULL
18367 #define NULL ((void*)0)
18368 #endif
18369
18370 int main() {
18371
18372 #if DB_VERSION_MAJOR > 1
18373         {
18374                 char *version;
18375                 int major, minor, patch;
18376
18377                 version = db_version( &major, &minor, &patch );
18378
18379                 if( major != DB_VERSION_MAJOR ||
18380                         minor < DB_VERSION_MINOR )
18381                 {
18382                         printf("Berkeley DB version mismatch\n"
18383                                 "\texpected: %s\n\tgot: %s\n",
18384                                 DB_VERSION_STRING, version);
18385                         return 1;
18386                 }
18387         }
18388 #endif
18389
18390 #if DB_VERSION_MAJOR > 2
18391         db_env_create( NULL, 0 );
18392 #elif DB_VERSION_MAJOR > 1
18393         db_appexit( NULL );
18394 #else
18395         (void) dbopen( NULL, 0, 0, 0, NULL);
18396 #endif
18397
18398 ; return 0; }
18399 EOF
18400 if { (eval echo configure:18401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18401   rm -rf conftest*
18402   ol_cv_db_db4=yes
18403 else
18404   echo "configure: failed program was:" >&5
18405   cat conftest.$ac_ext >&5
18406   rm -rf conftest*
18407   ol_cv_db_db4=no
18408 fi
18409 rm -f conftest*
18410
18411         LIBS="$ol_LIBS"
18412
18413 fi
18414
18415 echo "$ac_t""$ol_cv_db_db4" 1>&6
18416
18417         if test $ol_cv_db_db4 = yes ; then
18418                 ol_cv_lib_db=-ldb4
18419         fi
18420 fi
18421
18422 if test $ol_cv_lib_db = no ; then
18423         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18424 echo "configure:18425: checking for Berkeley DB link (-ldb)" >&5
18425 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18426   echo $ac_n "(cached) $ac_c" 1>&6
18427 else
18428   
18429         ol_DB_LIB=-ldb
18430         ol_LIBS=$LIBS
18431         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18432
18433         cat > conftest.$ac_ext <<EOF
18434 #line 18435 "configure"
18435 #include "confdefs.h"
18436
18437 #ifdef HAVE_DB_185_H
18438 # include <db_185.h>
18439 #else
18440 # include <db.h>
18441 #endif
18442
18443 #ifndef DB_VERSION_MAJOR
18444 # define DB_VERSION_MAJOR 1
18445 #endif
18446
18447 #ifndef NULL
18448 #define NULL ((void*)0)
18449 #endif
18450
18451 int main() {
18452
18453 #if DB_VERSION_MAJOR > 1
18454         {
18455                 char *version;
18456                 int major, minor, patch;
18457
18458                 version = db_version( &major, &minor, &patch );
18459
18460                 if( major != DB_VERSION_MAJOR ||
18461                         minor < DB_VERSION_MINOR )
18462                 {
18463                         printf("Berkeley DB version mismatch\n"
18464                                 "\texpected: %s\n\tgot: %s\n",
18465                                 DB_VERSION_STRING, version);
18466                         return 1;
18467                 }
18468         }
18469 #endif
18470
18471 #if DB_VERSION_MAJOR > 2
18472         db_env_create( NULL, 0 );
18473 #elif DB_VERSION_MAJOR > 1
18474         db_appexit( NULL );
18475 #else
18476         (void) dbopen( NULL, 0, 0, 0, NULL);
18477 #endif
18478
18479 ; return 0; }
18480 EOF
18481 if { (eval echo configure:18482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18482   rm -rf conftest*
18483   ol_cv_db_db=yes
18484 else
18485   echo "configure: failed program was:" >&5
18486   cat conftest.$ac_ext >&5
18487   rm -rf conftest*
18488   ol_cv_db_db=no
18489 fi
18490 rm -f conftest*
18491
18492         LIBS="$ol_LIBS"
18493
18494 fi
18495
18496 echo "$ac_t""$ol_cv_db_db" 1>&6
18497
18498         if test $ol_cv_db_db = yes ; then
18499                 ol_cv_lib_db=-ldb
18500         fi
18501 fi
18502
18503 if test $ol_cv_lib_db = no ; then
18504         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18505 echo "configure:18506: checking for Berkeley DB link (-ldb3)" >&5
18506 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18507   echo $ac_n "(cached) $ac_c" 1>&6
18508 else
18509   
18510         ol_DB_LIB=-ldb3
18511         ol_LIBS=$LIBS
18512         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18513
18514         cat > conftest.$ac_ext <<EOF
18515 #line 18516 "configure"
18516 #include "confdefs.h"
18517
18518 #ifdef HAVE_DB_185_H
18519 # include <db_185.h>
18520 #else
18521 # include <db.h>
18522 #endif
18523
18524 #ifndef DB_VERSION_MAJOR
18525 # define DB_VERSION_MAJOR 1
18526 #endif
18527
18528 #ifndef NULL
18529 #define NULL ((void*)0)
18530 #endif
18531
18532 int main() {
18533
18534 #if DB_VERSION_MAJOR > 1
18535         {
18536                 char *version;
18537                 int major, minor, patch;
18538
18539                 version = db_version( &major, &minor, &patch );
18540
18541                 if( major != DB_VERSION_MAJOR ||
18542                         minor < DB_VERSION_MINOR )
18543                 {
18544                         printf("Berkeley DB version mismatch\n"
18545                                 "\texpected: %s\n\tgot: %s\n",
18546                                 DB_VERSION_STRING, version);
18547                         return 1;
18548                 }
18549         }
18550 #endif
18551
18552 #if DB_VERSION_MAJOR > 2
18553         db_env_create( NULL, 0 );
18554 #elif DB_VERSION_MAJOR > 1
18555         db_appexit( NULL );
18556 #else
18557         (void) dbopen( NULL, 0, 0, 0, NULL);
18558 #endif
18559
18560 ; return 0; }
18561 EOF
18562 if { (eval echo configure:18563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18563   rm -rf conftest*
18564   ol_cv_db_db3=yes
18565 else
18566   echo "configure: failed program was:" >&5
18567   cat conftest.$ac_ext >&5
18568   rm -rf conftest*
18569   ol_cv_db_db3=no
18570 fi
18571 rm -f conftest*
18572
18573         LIBS="$ol_LIBS"
18574
18575 fi
18576
18577 echo "$ac_t""$ol_cv_db_db3" 1>&6
18578
18579         if test $ol_cv_db_db3 = yes ; then
18580                 ol_cv_lib_db=-ldb3
18581         fi
18582 fi
18583
18584 if test $ol_cv_lib_db = no ; then
18585         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18586 echo "configure:18587: checking for Berkeley DB link (-ldb-3)" >&5
18587 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18588   echo $ac_n "(cached) $ac_c" 1>&6
18589 else
18590   
18591         ol_DB_LIB=-ldb-3
18592         ol_LIBS=$LIBS
18593         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18594
18595         cat > conftest.$ac_ext <<EOF
18596 #line 18597 "configure"
18597 #include "confdefs.h"
18598
18599 #ifdef HAVE_DB_185_H
18600 # include <db_185.h>
18601 #else
18602 # include <db.h>
18603 #endif
18604
18605 #ifndef DB_VERSION_MAJOR
18606 # define DB_VERSION_MAJOR 1
18607 #endif
18608
18609 #ifndef NULL
18610 #define NULL ((void*)0)
18611 #endif
18612
18613 int main() {
18614
18615 #if DB_VERSION_MAJOR > 1
18616         {
18617                 char *version;
18618                 int major, minor, patch;
18619
18620                 version = db_version( &major, &minor, &patch );
18621
18622                 if( major != DB_VERSION_MAJOR ||
18623                         minor < DB_VERSION_MINOR )
18624                 {
18625                         printf("Berkeley DB version mismatch\n"
18626                                 "\texpected: %s\n\tgot: %s\n",
18627                                 DB_VERSION_STRING, version);
18628                         return 1;
18629                 }
18630         }
18631 #endif
18632
18633 #if DB_VERSION_MAJOR > 2
18634         db_env_create( NULL, 0 );
18635 #elif DB_VERSION_MAJOR > 1
18636         db_appexit( NULL );
18637 #else
18638         (void) dbopen( NULL, 0, 0, 0, NULL);
18639 #endif
18640
18641 ; return 0; }
18642 EOF
18643 if { (eval echo configure:18644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18644   rm -rf conftest*
18645   ol_cv_db_db_3=yes
18646 else
18647   echo "configure: failed program was:" >&5
18648   cat conftest.$ac_ext >&5
18649   rm -rf conftest*
18650   ol_cv_db_db_3=no
18651 fi
18652 rm -f conftest*
18653
18654         LIBS="$ol_LIBS"
18655
18656 fi
18657
18658 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18659
18660         if test $ol_cv_db_db_3 = yes ; then
18661                 ol_cv_lib_db=-ldb-3
18662         fi
18663 fi
18664
18665 if test $ol_cv_lib_db = no ; then
18666         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18667 echo "configure:18668: checking for Berkeley DB link (-ldb2)" >&5
18668 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18669   echo $ac_n "(cached) $ac_c" 1>&6
18670 else
18671   
18672         ol_DB_LIB=-ldb2
18673         ol_LIBS=$LIBS
18674         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18675
18676         cat > conftest.$ac_ext <<EOF
18677 #line 18678 "configure"
18678 #include "confdefs.h"
18679
18680 #ifdef HAVE_DB_185_H
18681 # include <db_185.h>
18682 #else
18683 # include <db.h>
18684 #endif
18685
18686 #ifndef DB_VERSION_MAJOR
18687 # define DB_VERSION_MAJOR 1
18688 #endif
18689
18690 #ifndef NULL
18691 #define NULL ((void*)0)
18692 #endif
18693
18694 int main() {
18695
18696 #if DB_VERSION_MAJOR > 1
18697         {
18698                 char *version;
18699                 int major, minor, patch;
18700
18701                 version = db_version( &major, &minor, &patch );
18702
18703                 if( major != DB_VERSION_MAJOR ||
18704                         minor < DB_VERSION_MINOR )
18705                 {
18706                         printf("Berkeley DB version mismatch\n"
18707                                 "\texpected: %s\n\tgot: %s\n",
18708                                 DB_VERSION_STRING, version);
18709                         return 1;
18710                 }
18711         }
18712 #endif
18713
18714 #if DB_VERSION_MAJOR > 2
18715         db_env_create( NULL, 0 );
18716 #elif DB_VERSION_MAJOR > 1
18717         db_appexit( NULL );
18718 #else
18719         (void) dbopen( NULL, 0, 0, 0, NULL);
18720 #endif
18721
18722 ; return 0; }
18723 EOF
18724 if { (eval echo configure:18725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18725   rm -rf conftest*
18726   ol_cv_db_db2=yes
18727 else
18728   echo "configure: failed program was:" >&5
18729   cat conftest.$ac_ext >&5
18730   rm -rf conftest*
18731   ol_cv_db_db2=no
18732 fi
18733 rm -f conftest*
18734
18735         LIBS="$ol_LIBS"
18736
18737 fi
18738
18739 echo "$ac_t""$ol_cv_db_db2" 1>&6
18740
18741         if test $ol_cv_db_db2 = yes ; then
18742                 ol_cv_lib_db=-ldb2
18743         fi
18744 fi
18745
18746 if test $ol_cv_lib_db = no ; then
18747         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18748 echo "configure:18749: checking for Berkeley DB link (-ldb-2)" >&5
18749 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18750   echo $ac_n "(cached) $ac_c" 1>&6
18751 else
18752   
18753         ol_DB_LIB=-ldb-2
18754         ol_LIBS=$LIBS
18755         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18756
18757         cat > conftest.$ac_ext <<EOF
18758 #line 18759 "configure"
18759 #include "confdefs.h"
18760
18761 #ifdef HAVE_DB_185_H
18762 # include <db_185.h>
18763 #else
18764 # include <db.h>
18765 #endif
18766
18767 #ifndef DB_VERSION_MAJOR
18768 # define DB_VERSION_MAJOR 1
18769 #endif
18770
18771 #ifndef NULL
18772 #define NULL ((void*)0)
18773 #endif
18774
18775 int main() {
18776
18777 #if DB_VERSION_MAJOR > 1
18778         {
18779                 char *version;
18780                 int major, minor, patch;
18781
18782                 version = db_version( &major, &minor, &patch );
18783
18784                 if( major != DB_VERSION_MAJOR ||
18785                         minor < DB_VERSION_MINOR )
18786                 {
18787                         printf("Berkeley DB version mismatch\n"
18788                                 "\texpected: %s\n\tgot: %s\n",
18789                                 DB_VERSION_STRING, version);
18790                         return 1;
18791                 }
18792         }
18793 #endif
18794
18795 #if DB_VERSION_MAJOR > 2
18796         db_env_create( NULL, 0 );
18797 #elif DB_VERSION_MAJOR > 1
18798         db_appexit( NULL );
18799 #else
18800         (void) dbopen( NULL, 0, 0, 0, NULL);
18801 #endif
18802
18803 ; return 0; }
18804 EOF
18805 if { (eval echo configure:18806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18806   rm -rf conftest*
18807   ol_cv_db_db_2=yes
18808 else
18809   echo "configure: failed program was:" >&5
18810   cat conftest.$ac_ext >&5
18811   rm -rf conftest*
18812   ol_cv_db_db_2=no
18813 fi
18814 rm -f conftest*
18815
18816         LIBS="$ol_LIBS"
18817
18818 fi
18819
18820 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18821
18822         if test $ol_cv_db_db_2 = yes ; then
18823                 ol_cv_lib_db=-ldb-2
18824         fi
18825 fi
18826
18827 if test $ol_cv_lib_db = no ; then
18828         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18829 echo "configure:18830: checking for Berkeley DB link (-ldb1)" >&5
18830 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18831   echo $ac_n "(cached) $ac_c" 1>&6
18832 else
18833   
18834         ol_DB_LIB=-ldb1
18835         ol_LIBS=$LIBS
18836         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18837
18838         cat > conftest.$ac_ext <<EOF
18839 #line 18840 "configure"
18840 #include "confdefs.h"
18841
18842 #ifdef HAVE_DB_185_H
18843 # include <db_185.h>
18844 #else
18845 # include <db.h>
18846 #endif
18847
18848 #ifndef DB_VERSION_MAJOR
18849 # define DB_VERSION_MAJOR 1
18850 #endif
18851
18852 #ifndef NULL
18853 #define NULL ((void*)0)
18854 #endif
18855
18856 int main() {
18857
18858 #if DB_VERSION_MAJOR > 1
18859         {
18860                 char *version;
18861                 int major, minor, patch;
18862
18863                 version = db_version( &major, &minor, &patch );
18864
18865                 if( major != DB_VERSION_MAJOR ||
18866                         minor < DB_VERSION_MINOR )
18867                 {
18868                         printf("Berkeley DB version mismatch\n"
18869                                 "\texpected: %s\n\tgot: %s\n",
18870                                 DB_VERSION_STRING, version);
18871                         return 1;
18872                 }
18873         }
18874 #endif
18875
18876 #if DB_VERSION_MAJOR > 2
18877         db_env_create( NULL, 0 );
18878 #elif DB_VERSION_MAJOR > 1
18879         db_appexit( NULL );
18880 #else
18881         (void) dbopen( NULL, 0, 0, 0, NULL);
18882 #endif
18883
18884 ; return 0; }
18885 EOF
18886 if { (eval echo configure:18887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18887   rm -rf conftest*
18888   ol_cv_db_db1=yes
18889 else
18890   echo "configure: failed program was:" >&5
18891   cat conftest.$ac_ext >&5
18892   rm -rf conftest*
18893   ol_cv_db_db1=no
18894 fi
18895 rm -f conftest*
18896
18897         LIBS="$ol_LIBS"
18898
18899 fi
18900
18901 echo "$ac_t""$ol_cv_db_db1" 1>&6
18902
18903         if test $ol_cv_db_db1 = yes ; then
18904                 ol_cv_lib_db=-ldb1
18905         fi
18906 fi
18907
18908 if test $ol_cv_lib_db = no ; then
18909         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18910 echo "configure:18911: checking for Berkeley DB link (-ldb-1)" >&5
18911 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18912   echo $ac_n "(cached) $ac_c" 1>&6
18913 else
18914   
18915         ol_DB_LIB=-ldb-1
18916         ol_LIBS=$LIBS
18917         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18918
18919         cat > conftest.$ac_ext <<EOF
18920 #line 18921 "configure"
18921 #include "confdefs.h"
18922
18923 #ifdef HAVE_DB_185_H
18924 # include <db_185.h>
18925 #else
18926 # include <db.h>
18927 #endif
18928
18929 #ifndef DB_VERSION_MAJOR
18930 # define DB_VERSION_MAJOR 1
18931 #endif
18932
18933 #ifndef NULL
18934 #define NULL ((void*)0)
18935 #endif
18936
18937 int main() {
18938
18939 #if DB_VERSION_MAJOR > 1
18940         {
18941                 char *version;
18942                 int major, minor, patch;
18943
18944                 version = db_version( &major, &minor, &patch );
18945
18946                 if( major != DB_VERSION_MAJOR ||
18947                         minor < DB_VERSION_MINOR )
18948                 {
18949                         printf("Berkeley DB version mismatch\n"
18950                                 "\texpected: %s\n\tgot: %s\n",
18951                                 DB_VERSION_STRING, version);
18952                         return 1;
18953                 }
18954         }
18955 #endif
18956
18957 #if DB_VERSION_MAJOR > 2
18958         db_env_create( NULL, 0 );
18959 #elif DB_VERSION_MAJOR > 1
18960         db_appexit( NULL );
18961 #else
18962         (void) dbopen( NULL, 0, 0, 0, NULL);
18963 #endif
18964
18965 ; return 0; }
18966 EOF
18967 if { (eval echo configure:18968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18968   rm -rf conftest*
18969   ol_cv_db_db_1=yes
18970 else
18971   echo "configure: failed program was:" >&5
18972   cat conftest.$ac_ext >&5
18973   rm -rf conftest*
18974   ol_cv_db_db_1=no
18975 fi
18976 rm -f conftest*
18977
18978         LIBS="$ol_LIBS"
18979
18980 fi
18981
18982 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18983
18984         if test $ol_cv_db_db_1 = yes ; then
18985                 ol_cv_lib_db=-ldb-1
18986         fi
18987 fi
18988
18989
18990         if test "$ol_cv_lib_db" != no ; then
18991                 ol_cv_berkeley_db=yes
18992                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18993 echo "configure:18994: checking for Berkeley DB thread support" >&5
18994 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18995   echo $ac_n "(cached) $ac_c" 1>&6
18996 else
18997   
18998         ol_LIBS="$LIBS"
18999         LIBS="$LTHREAD_LIBS $LIBS"
19000         if test $ol_cv_lib_db != yes ; then
19001                 LIBS="$ol_cv_lib_db $LIBS"
19002         fi
19003
19004         if test "$cross_compiling" = yes; then
19005   ol_cv_berkeley_db_thread=cross
19006 else
19007   cat > conftest.$ac_ext <<EOF
19008 #line 19009 "configure"
19009 #include "confdefs.h"
19010
19011 #ifdef HAVE_DB_185_H
19012         choke me;
19013 #else
19014 #include <db.h>
19015 #endif
19016 #ifndef NULL
19017 #define NULL ((void *)0)
19018 #endif
19019 main()
19020 {
19021         int rc;
19022         u_int32_t flags = DB_CREATE |
19023 #ifdef DB_PRIVATE
19024                 DB_PRIVATE |
19025 #endif
19026                 DB_THREAD;
19027
19028 #if DB_VERSION_MAJOR > 2
19029         DB_ENV *env = NULL;
19030
19031         rc = db_env_create( &env, 0 );
19032
19033         flags |= DB_INIT_MPOOL;
19034 #ifdef DB_MPOOL_PRIVATE
19035         flags |= DB_MPOOL_PRIVATE;
19036 #endif
19037
19038         if( rc ) {
19039                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19040                 return rc;
19041         }
19042
19043 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19044         rc = env->open( env, NULL, flags, 0 );
19045 #else
19046         rc = env->open( env, NULL, NULL, flags, 0 );
19047 #endif
19048
19049         if ( rc == 0 ) {
19050                 rc = env->close( env, 0 );
19051         }
19052
19053         if( rc ) {
19054                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19055                 return rc;
19056         }
19057
19058 #else
19059         DB_ENV env;
19060         memset( &env, '\0', sizeof(env) );
19061
19062         rc = db_appinit( NULL, NULL, &env, flags );
19063
19064         if( rc == 0 ) {
19065                 db_appexit( &env );
19066         }
19067
19068         unlink("__db_mpool.share");
19069         unlink("__db_lock.share");
19070 #endif
19071
19072         return rc;
19073 }
19074 EOF
19075 if { (eval echo configure:19076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19076 then
19077   ol_cv_berkeley_db_thread=yes
19078 else
19079   echo "configure: failed program was:" >&5
19080   cat conftest.$ac_ext >&5
19081   rm -fr conftest*
19082   ol_cv_berkeley_db_thread=no
19083 fi
19084 rm -fr conftest*
19085 fi
19086
19087
19088         LIBS="$ol_LIBS"
19089
19090 fi
19091
19092 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19093
19094         if test $ol_cv_berkeley_db_thread != no ; then
19095                 cat >> confdefs.h <<\EOF
19096 #define HAVE_BERKELEY_DB_THREAD 1
19097 EOF
19098
19099         fi
19100
19101         fi
19102 fi
19103
19104         fi
19105
19106         if test $ol_cv_berkeley_db != no ; then
19107                 cat >> confdefs.h <<\EOF
19108 #define HAVE_BERKELEY_DB 1
19109 EOF
19110
19111
19112                 ol_link_ldbm=berkeley
19113                 ol_with_ldbm_api=berkeley
19114
19115                 if test $ol_with_ldbm_type = hash ; then
19116                         cat >> confdefs.h <<\EOF
19117 #define LDBM_USE_DBHASH 1
19118 EOF
19119
19120                 else
19121                         cat >> confdefs.h <<\EOF
19122 #define LDBM_USE_DBBTREE 1
19123 EOF
19124
19125                 fi
19126
19127                                                 if test $ol_cv_lib_db != yes ; then
19128                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19129                 fi
19130         fi
19131 fi
19132
19133 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19134         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19135 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19136         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19137 echo "configure:19138: checking Berkeley DB version for BDB backend" >&5
19138 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19139   echo $ac_n "(cached) $ac_c" 1>&6
19140 else
19141   
19142         cat > conftest.$ac_ext <<EOF
19143 #line 19144 "configure"
19144 #include "confdefs.h"
19145
19146 #include <db.h>
19147
19148  /* this check could be improved */
19149 #ifndef DB_VERSION_MAJOR
19150 #       define DB_VERSION_MAJOR 1
19151 #endif
19152 #ifndef DB_VERSION_MINOR
19153 #       define DB_VERSION_MINOR 0
19154 #endif
19155
19156 /* require 4.1 or later */
19157 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
19158         __db_version_compat
19159 #endif
19160         
19161 EOF
19162 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19163   egrep "__db_version_compat" >/dev/null 2>&1; then
19164   rm -rf conftest*
19165   ol_cv_bdb_compat=yes
19166 else
19167   rm -rf conftest*
19168   ol_cv_bdb_compat=no
19169 fi
19170 rm -f conftest*
19171
19172 fi
19173
19174 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19175
19176
19177         if test $ol_cv_bdb_compat = yes ; then
19178                 ol_enable_bdb=yes
19179         elif test $ol_enable_bdb = yes ; then
19180                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19181         else
19182                 ol_enable_bdb=no
19183         fi
19184 fi
19185 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19186         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19187 fi
19188
19189 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19190         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19191         ol_with_ldbm_api=none
19192 fi
19193
19194 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19195         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19196 echo "configure:19197: checking for MDBM library" >&5
19197 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19198   echo $ac_n "(cached) $ac_c" 1>&6
19199 else
19200         ol_LIBS="$LIBS"
19201         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19202 echo "configure:19203: checking for mdbm_set_chain" >&5
19203 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19204   echo $ac_n "(cached) $ac_c" 1>&6
19205 else
19206   cat > conftest.$ac_ext <<EOF
19207 #line 19208 "configure"
19208 #include "confdefs.h"
19209 /* System header to define __stub macros and hopefully few prototypes,
19210     which can conflict with char mdbm_set_chain(); below.  */
19211 #include <assert.h>
19212 /* Override any gcc2 internal prototype to avoid an error.  */
19213 /* We use char because int might match the return type of a gcc2
19214     builtin and then its argument prototype would still apply.  */
19215 char mdbm_set_chain();
19216 char (*f)();
19217
19218 int main() {
19219
19220 /* The GNU C library defines this for functions which it implements
19221     to always fail with ENOSYS.  Some functions are actually named
19222     something starting with __ and the normal name is an alias.  */
19223 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19224 choke me
19225 #else
19226 f = mdbm_set_chain;
19227 #endif
19228
19229 ; return 0; }
19230 EOF
19231 if { (eval echo configure:19232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19232   rm -rf conftest*
19233   eval "ac_cv_func_mdbm_set_chain=yes"
19234 else
19235   echo "configure: failed program was:" >&5
19236   cat conftest.$ac_ext >&5
19237   rm -rf conftest*
19238   eval "ac_cv_func_mdbm_set_chain=no"
19239 fi
19240 rm -f conftest*
19241 fi
19242
19243 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19244   echo "$ac_t""yes" 1>&6
19245   ol_cv_lib_mdbm=yes
19246 else
19247   echo "$ac_t""no" 1>&6
19248
19249                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19250 echo "configure:19251: checking for mdbm_set_chain in -lmdbm" >&5
19251 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19253   echo $ac_n "(cached) $ac_c" 1>&6
19254 else
19255   ac_save_LIBS="$LIBS"
19256 LIBS="-lmdbm  $LIBS"
19257 cat > conftest.$ac_ext <<EOF
19258 #line 19259 "configure"
19259 #include "confdefs.h"
19260 /* Override any gcc2 internal prototype to avoid an error.  */
19261 /* We use char because int might match the return type of a gcc2
19262     builtin and then its argument prototype would still apply.  */
19263 char mdbm_set_chain();
19264
19265 int main() {
19266 mdbm_set_chain()
19267 ; return 0; }
19268 EOF
19269 if { (eval echo configure:19270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19270   rm -rf conftest*
19271   eval "ac_cv_lib_$ac_lib_var=yes"
19272 else
19273   echo "configure: failed program was:" >&5
19274   cat conftest.$ac_ext >&5
19275   rm -rf conftest*
19276   eval "ac_cv_lib_$ac_lib_var=no"
19277 fi
19278 rm -f conftest*
19279 LIBS="$ac_save_LIBS"
19280
19281 fi
19282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19283   echo "$ac_t""yes" 1>&6
19284   ol_cv_lib_mdbm=-lmdbm
19285 else
19286   echo "$ac_t""no" 1>&6
19287 ol_cv_lib_mdbm=no
19288 fi
19289
19290         
19291 fi
19292
19293         LIBS="$ol_LIBS"
19294
19295 fi
19296
19297 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19298
19299
19300  for ac_hdr in mdbm.h
19301 do
19302 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19303 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19304 echo "configure:19305: checking for $ac_hdr" >&5
19305 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19306   echo $ac_n "(cached) $ac_c" 1>&6
19307 else
19308   cat > conftest.$ac_ext <<EOF
19309 #line 19310 "configure"
19310 #include "confdefs.h"
19311 #include <$ac_hdr>
19312 EOF
19313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19314 { (eval echo configure:19315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19316 if test -z "$ac_err"; then
19317   rm -rf conftest*
19318   eval "ac_cv_header_$ac_safe=yes"
19319 else
19320   echo "$ac_err" >&5
19321   echo "configure: failed program was:" >&5
19322   cat conftest.$ac_ext >&5
19323   rm -rf conftest*
19324   eval "ac_cv_header_$ac_safe=no"
19325 fi
19326 rm -f conftest*
19327 fi
19328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19329   echo "$ac_t""yes" 1>&6
19330     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19331   cat >> confdefs.h <<EOF
19332 #define $ac_tr_hdr 1
19333 EOF
19334  
19335 else
19336   echo "$ac_t""no" 1>&6
19337 fi
19338 done
19339
19340  echo $ac_n "checking for db""... $ac_c" 1>&6
19341 echo "configure:19342: checking for db" >&5
19342 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19343   echo $ac_n "(cached) $ac_c" 1>&6
19344 else
19345   
19346         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19347                 ol_cv_mdbm=no
19348         else
19349                 ol_cv_mdbm=yes
19350         fi
19351
19352 fi
19353
19354 echo "$ac_t""$ol_cv_mdbm" 1>&6
19355  if test $ol_cv_mdbm = yes ; then
19356         cat >> confdefs.h <<\EOF
19357 #define HAVE_MDBM 1
19358 EOF
19359
19360  fi
19361
19362
19363         if test $ol_cv_mdbm = yes ; then
19364                 ol_link_ldbm=mdbm
19365                 ol_with_ldbm_api=mdbm
19366                 if test $ol_cv_lib_mdbm != yes ; then
19367                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19368                 fi
19369         fi
19370 fi
19371
19372 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19373         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19374 echo "configure:19375: checking for GDBM library" >&5
19375 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19376   echo $ac_n "(cached) $ac_c" 1>&6
19377 else
19378         ol_LIBS="$LIBS"
19379         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19380 echo "configure:19381: checking for gdbm_open" >&5
19381 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19382   echo $ac_n "(cached) $ac_c" 1>&6
19383 else
19384   cat > conftest.$ac_ext <<EOF
19385 #line 19386 "configure"
19386 #include "confdefs.h"
19387 /* System header to define __stub macros and hopefully few prototypes,
19388     which can conflict with char gdbm_open(); below.  */
19389 #include <assert.h>
19390 /* Override any gcc2 internal prototype to avoid an error.  */
19391 /* We use char because int might match the return type of a gcc2
19392     builtin and then its argument prototype would still apply.  */
19393 char gdbm_open();
19394 char (*f)();
19395
19396 int main() {
19397
19398 /* The GNU C library defines this for functions which it implements
19399     to always fail with ENOSYS.  Some functions are actually named
19400     something starting with __ and the normal name is an alias.  */
19401 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19402 choke me
19403 #else
19404 f = gdbm_open;
19405 #endif
19406
19407 ; return 0; }
19408 EOF
19409 if { (eval echo configure:19410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19410   rm -rf conftest*
19411   eval "ac_cv_func_gdbm_open=yes"
19412 else
19413   echo "configure: failed program was:" >&5
19414   cat conftest.$ac_ext >&5
19415   rm -rf conftest*
19416   eval "ac_cv_func_gdbm_open=no"
19417 fi
19418 rm -f conftest*
19419 fi
19420
19421 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19422   echo "$ac_t""yes" 1>&6
19423   ol_cv_lib_gdbm=yes
19424 else
19425   echo "$ac_t""no" 1>&6
19426
19427                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19428 echo "configure:19429: checking for gdbm_open in -lgdbm" >&5
19429 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19430 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19431   echo $ac_n "(cached) $ac_c" 1>&6
19432 else
19433   ac_save_LIBS="$LIBS"
19434 LIBS="-lgdbm  $LIBS"
19435 cat > conftest.$ac_ext <<EOF
19436 #line 19437 "configure"
19437 #include "confdefs.h"
19438 /* Override any gcc2 internal prototype to avoid an error.  */
19439 /* We use char because int might match the return type of a gcc2
19440     builtin and then its argument prototype would still apply.  */
19441 char gdbm_open();
19442
19443 int main() {
19444 gdbm_open()
19445 ; return 0; }
19446 EOF
19447 if { (eval echo configure:19448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19448   rm -rf conftest*
19449   eval "ac_cv_lib_$ac_lib_var=yes"
19450 else
19451   echo "configure: failed program was:" >&5
19452   cat conftest.$ac_ext >&5
19453   rm -rf conftest*
19454   eval "ac_cv_lib_$ac_lib_var=no"
19455 fi
19456 rm -f conftest*
19457 LIBS="$ac_save_LIBS"
19458
19459 fi
19460 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19461   echo "$ac_t""yes" 1>&6
19462   ol_cv_lib_gdbm=-lgdbm
19463 else
19464   echo "$ac_t""no" 1>&6
19465 ol_cv_lib_gdbm=no
19466 fi
19467
19468         
19469 fi
19470
19471         LIBS="$ol_LIBS"
19472
19473 fi
19474
19475 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19476
19477
19478  for ac_hdr in gdbm.h
19479 do
19480 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19481 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19482 echo "configure:19483: checking for $ac_hdr" >&5
19483 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19484   echo $ac_n "(cached) $ac_c" 1>&6
19485 else
19486   cat > conftest.$ac_ext <<EOF
19487 #line 19488 "configure"
19488 #include "confdefs.h"
19489 #include <$ac_hdr>
19490 EOF
19491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19492 { (eval echo configure:19493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19493 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19494 if test -z "$ac_err"; then
19495   rm -rf conftest*
19496   eval "ac_cv_header_$ac_safe=yes"
19497 else
19498   echo "$ac_err" >&5
19499   echo "configure: failed program was:" >&5
19500   cat conftest.$ac_ext >&5
19501   rm -rf conftest*
19502   eval "ac_cv_header_$ac_safe=no"
19503 fi
19504 rm -f conftest*
19505 fi
19506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19507   echo "$ac_t""yes" 1>&6
19508     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19509   cat >> confdefs.h <<EOF
19510 #define $ac_tr_hdr 1
19511 EOF
19512  
19513 else
19514   echo "$ac_t""no" 1>&6
19515 fi
19516 done
19517
19518  echo $ac_n "checking for db""... $ac_c" 1>&6
19519 echo "configure:19520: checking for db" >&5
19520 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19521   echo $ac_n "(cached) $ac_c" 1>&6
19522 else
19523   
19524         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19525                 ol_cv_gdbm=no
19526         else
19527                 ol_cv_gdbm=yes
19528         fi
19529
19530 fi
19531
19532 echo "$ac_t""$ol_cv_gdbm" 1>&6
19533  if test $ol_cv_gdbm = yes ; then
19534         cat >> confdefs.h <<\EOF
19535 #define HAVE_GDBM 1
19536 EOF
19537
19538  fi
19539
19540
19541         if test $ol_cv_gdbm = yes ; then
19542                 ol_link_ldbm=gdbm
19543                 ol_with_ldbm_api=gdbm
19544
19545                 if test $ol_cv_lib_gdbm != yes ; then
19546                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19547                 fi
19548         fi
19549 fi
19550
19551 if test $ol_with_ldbm_api = ndbm ; then
19552         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19553 echo "configure:19554: checking for NDBM library" >&5
19554 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19555   echo $ac_n "(cached) $ac_c" 1>&6
19556 else
19557         ol_LIBS="$LIBS"
19558         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19559 echo "configure:19560: checking for dbm_open" >&5
19560 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19561   echo $ac_n "(cached) $ac_c" 1>&6
19562 else
19563   cat > conftest.$ac_ext <<EOF
19564 #line 19565 "configure"
19565 #include "confdefs.h"
19566 /* System header to define __stub macros and hopefully few prototypes,
19567     which can conflict with char dbm_open(); below.  */
19568 #include <assert.h>
19569 /* Override any gcc2 internal prototype to avoid an error.  */
19570 /* We use char because int might match the return type of a gcc2
19571     builtin and then its argument prototype would still apply.  */
19572 char dbm_open();
19573 char (*f)();
19574
19575 int main() {
19576
19577 /* The GNU C library defines this for functions which it implements
19578     to always fail with ENOSYS.  Some functions are actually named
19579     something starting with __ and the normal name is an alias.  */
19580 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19581 choke me
19582 #else
19583 f = dbm_open;
19584 #endif
19585
19586 ; return 0; }
19587 EOF
19588 if { (eval echo configure:19589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19589   rm -rf conftest*
19590   eval "ac_cv_func_dbm_open=yes"
19591 else
19592   echo "configure: failed program was:" >&5
19593   cat conftest.$ac_ext >&5
19594   rm -rf conftest*
19595   eval "ac_cv_func_dbm_open=no"
19596 fi
19597 rm -f conftest*
19598 fi
19599
19600 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19601   echo "$ac_t""yes" 1>&6
19602   ol_cv_lib_ndbm=yes
19603 else
19604   echo "$ac_t""no" 1>&6
19605
19606                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19607 echo "configure:19608: checking for dbm_open in -lndbm" >&5
19608 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19609 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19610   echo $ac_n "(cached) $ac_c" 1>&6
19611 else
19612   ac_save_LIBS="$LIBS"
19613 LIBS="-lndbm  $LIBS"
19614 cat > conftest.$ac_ext <<EOF
19615 #line 19616 "configure"
19616 #include "confdefs.h"
19617 /* Override any gcc2 internal prototype to avoid an error.  */
19618 /* We use char because int might match the return type of a gcc2
19619     builtin and then its argument prototype would still apply.  */
19620 char dbm_open();
19621
19622 int main() {
19623 dbm_open()
19624 ; return 0; }
19625 EOF
19626 if { (eval echo configure:19627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19627   rm -rf conftest*
19628   eval "ac_cv_lib_$ac_lib_var=yes"
19629 else
19630   echo "configure: failed program was:" >&5
19631   cat conftest.$ac_ext >&5
19632   rm -rf conftest*
19633   eval "ac_cv_lib_$ac_lib_var=no"
19634 fi
19635 rm -f conftest*
19636 LIBS="$ac_save_LIBS"
19637
19638 fi
19639 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19640   echo "$ac_t""yes" 1>&6
19641   ol_cv_lib_ndbm=-lndbm
19642 else
19643   echo "$ac_t""no" 1>&6
19644
19645                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19646 echo "configure:19647: checking for dbm_open in -ldbm" >&5
19647 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19648 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19649   echo $ac_n "(cached) $ac_c" 1>&6
19650 else
19651   ac_save_LIBS="$LIBS"
19652 LIBS="-ldbm  $LIBS"
19653 cat > conftest.$ac_ext <<EOF
19654 #line 19655 "configure"
19655 #include "confdefs.h"
19656 /* Override any gcc2 internal prototype to avoid an error.  */
19657 /* We use char because int might match the return type of a gcc2
19658     builtin and then its argument prototype would still apply.  */
19659 char dbm_open();
19660
19661 int main() {
19662 dbm_open()
19663 ; return 0; }
19664 EOF
19665 if { (eval echo configure:19666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19666   rm -rf conftest*
19667   eval "ac_cv_lib_$ac_lib_var=yes"
19668 else
19669   echo "configure: failed program was:" >&5
19670   cat conftest.$ac_ext >&5
19671   rm -rf conftest*
19672   eval "ac_cv_lib_$ac_lib_var=no"
19673 fi
19674 rm -f conftest*
19675 LIBS="$ac_save_LIBS"
19676
19677 fi
19678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19679   echo "$ac_t""yes" 1>&6
19680   ol_cv_lib_ndbm=-ldbm
19681 else
19682   echo "$ac_t""no" 1>&6
19683 ol_cv_lib_ndbm=no
19684 fi
19685                 
19686 fi
19687
19688         
19689 fi
19690
19691         LIBS="$ol_LIBS"
19692
19693 fi
19694
19695 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19696
19697
19698  for ac_hdr in ndbm.h
19699 do
19700 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19701 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19702 echo "configure:19703: checking for $ac_hdr" >&5
19703 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19704   echo $ac_n "(cached) $ac_c" 1>&6
19705 else
19706   cat > conftest.$ac_ext <<EOF
19707 #line 19708 "configure"
19708 #include "confdefs.h"
19709 #include <$ac_hdr>
19710 EOF
19711 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19712 { (eval echo configure:19713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19713 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19714 if test -z "$ac_err"; then
19715   rm -rf conftest*
19716   eval "ac_cv_header_$ac_safe=yes"
19717 else
19718   echo "$ac_err" >&5
19719   echo "configure: failed program was:" >&5
19720   cat conftest.$ac_ext >&5
19721   rm -rf conftest*
19722   eval "ac_cv_header_$ac_safe=no"
19723 fi
19724 rm -f conftest*
19725 fi
19726 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19727   echo "$ac_t""yes" 1>&6
19728     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19729   cat >> confdefs.h <<EOF
19730 #define $ac_tr_hdr 1
19731 EOF
19732  
19733 else
19734   echo "$ac_t""no" 1>&6
19735 fi
19736 done
19737
19738  echo $ac_n "checking for db""... $ac_c" 1>&6
19739 echo "configure:19740: checking for db" >&5
19740 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19741   echo $ac_n "(cached) $ac_c" 1>&6
19742 else
19743   
19744         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19745                 ol_cv_ndbm=no
19746         else
19747                 ol_cv_ndbm=yes
19748         fi
19749
19750 fi
19751
19752 echo "$ac_t""$ol_cv_ndbm" 1>&6
19753  if test $ol_cv_ndbm = yes ; then
19754         cat >> confdefs.h <<\EOF
19755 #define HAVE_NDBM 1
19756 EOF
19757
19758  fi
19759
19760
19761         if test $ol_cv_ndbm = yes ; then
19762                 ol_link_ldbm=ndbm
19763                 ol_with_ldbm_api=ndbm
19764
19765                 if test $ol_cv_lib_ndbm != yes ; then
19766                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19767                 fi
19768         fi
19769 fi
19770
19771 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19772         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19773         if test $ol_enable_ldbm = yes ; then
19774                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19775         fi
19776
19777         echo "configure: warning: disabling LDBM" 1>&2
19778         ol_enable_ldbm=no
19779 fi
19780
19781
19782 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19783         BUILD_LIBS_DYNAMIC=shared
19784         cat >> confdefs.h <<\EOF
19785 #define LDAP_LIBS_DYNAMIC 1
19786 EOF
19787
19788         LTSTATIC=""
19789 else
19790         BUILD_LIBS_DYNAMIC=static
19791         LTSTATIC="-static"
19792 fi
19793
19794 if test $ol_enable_wrappers != no ; then
19795         for ac_hdr in tcpd.h
19796 do
19797 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19798 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19799 echo "configure:19800: checking for $ac_hdr" >&5
19800 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19801   echo $ac_n "(cached) $ac_c" 1>&6
19802 else
19803   cat > conftest.$ac_ext <<EOF
19804 #line 19805 "configure"
19805 #include "confdefs.h"
19806 #include <$ac_hdr>
19807 EOF
19808 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19809 { (eval echo configure:19810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19810 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19811 if test -z "$ac_err"; then
19812   rm -rf conftest*
19813   eval "ac_cv_header_$ac_safe=yes"
19814 else
19815   echo "$ac_err" >&5
19816   echo "configure: failed program was:" >&5
19817   cat conftest.$ac_ext >&5
19818   rm -rf conftest*
19819   eval "ac_cv_header_$ac_safe=no"
19820 fi
19821 rm -f conftest*
19822 fi
19823 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19824   echo "$ac_t""yes" 1>&6
19825     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19826   cat >> confdefs.h <<EOF
19827 #define $ac_tr_hdr 1
19828 EOF
19829  
19830                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19831 echo "configure:19832: checking for TCP wrappers library" >&5
19832                 save_LIBS="$LIBS"
19833                 LIBS="$LIBS -lwrap"
19834                 cat > conftest.$ac_ext <<EOF
19835 #line 19836 "configure"
19836 #include "confdefs.h"
19837
19838 #include <tcpd.h>
19839 int allow_severity = 0;
19840 int deny_severity  = 0;
19841
19842 struct request_info *req;
19843                 
19844 int main() {
19845
19846 hosts_access(req)
19847                 
19848 ; return 0; }
19849 EOF
19850 if { (eval echo configure:19851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19851   rm -rf conftest*
19852   echo "$ac_t""-lwrap" 1>&6
19853                 have_wrappers=yes
19854                 LIBS="$save_LIBS"
19855 else
19856   echo "configure: failed program was:" >&5
19857   cat conftest.$ac_ext >&5
19858   rm -rf conftest*
19859   
19860                                 LIBS="$LIBS -lnsl"
19861                 cat > conftest.$ac_ext <<EOF
19862 #line 19863 "configure"
19863 #include "confdefs.h"
19864
19865 #include <tcpd.h>
19866 int allow_severity = 0;
19867 int deny_severity  = 0;
19868
19869 struct request_info *req;
19870                 
19871 int main() {
19872
19873 hosts_access(req)
19874                 
19875 ; return 0; }
19876 EOF
19877 if { (eval echo configure:19878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19878   rm -rf conftest*
19879   echo "$ac_t""-lwrap -lnsl" 1>&6
19880                 have_wrappers=yes
19881                 LIBS="$save_LIBS -lnsl"
19882 else
19883   echo "configure: failed program was:" >&5
19884   cat conftest.$ac_ext >&5
19885   rm -rf conftest*
19886   
19887                 echo "$ac_t""no" 1>&6
19888                 have_wrappers=no
19889                 LIBS=$save_LIBS
19890 fi
19891 rm -f conftest*
19892 fi
19893 rm -f conftest*
19894 else
19895   echo "$ac_t""no" 1>&6
19896 have_wrappers=no
19897 fi
19898 done
19899
19900
19901         if test $have_wrappers = yes ; then
19902                 cat >> confdefs.h <<\EOF
19903 #define HAVE_TCPD 1
19904 EOF
19905
19906                 WRAP_LIBS="-lwrap"
19907         elif test $ol_enable_wrappers = yes ; then
19908                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19909         else
19910                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19911                 WRAP_LIBS=""
19912         fi
19913 fi
19914
19915 if test $ol_enable_syslog != no ; then
19916         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19917 echo "configure:19918: checking for openlog" >&5
19918 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19919   echo $ac_n "(cached) $ac_c" 1>&6
19920 else
19921   cat > conftest.$ac_ext <<EOF
19922 #line 19923 "configure"
19923 #include "confdefs.h"
19924 /* System header to define __stub macros and hopefully few prototypes,
19925     which can conflict with char openlog(); below.  */
19926 #include <assert.h>
19927 /* Override any gcc2 internal prototype to avoid an error.  */
19928 /* We use char because int might match the return type of a gcc2
19929     builtin and then its argument prototype would still apply.  */
19930 char openlog();
19931 char (*f)();
19932
19933 int main() {
19934
19935 /* The GNU C library defines this for functions which it implements
19936     to always fail with ENOSYS.  Some functions are actually named
19937     something starting with __ and the normal name is an alias.  */
19938 #if defined (__stub_openlog) || defined (__stub___openlog)
19939 choke me
19940 #else
19941 f = openlog;
19942 #endif
19943
19944 ; return 0; }
19945 EOF
19946 if { (eval echo configure:19947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19947   rm -rf conftest*
19948   eval "ac_cv_func_openlog=yes"
19949 else
19950   echo "configure: failed program was:" >&5
19951   cat conftest.$ac_ext >&5
19952   rm -rf conftest*
19953   eval "ac_cv_func_openlog=no"
19954 fi
19955 rm -f conftest*
19956 fi
19957
19958 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19959   echo "$ac_t""yes" 1>&6
19960   :
19961 else
19962   echo "$ac_t""no" 1>&6
19963 fi
19964
19965         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19966                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19967         fi
19968         ol_enable_syslog=$ac_cv_func_openlog
19969 fi
19970
19971
19972 ol_link_sql=no
19973 if test $ol_enable_sql != no ; then
19974         for ac_hdr in sql.h sqlext.h
19975 do
19976 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19977 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19978 echo "configure:19979: checking for $ac_hdr" >&5
19979 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19980   echo $ac_n "(cached) $ac_c" 1>&6
19981 else
19982   cat > conftest.$ac_ext <<EOF
19983 #line 19984 "configure"
19984 #include "confdefs.h"
19985 #include <$ac_hdr>
19986 EOF
19987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19988 { (eval echo configure:19989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19990 if test -z "$ac_err"; then
19991   rm -rf conftest*
19992   eval "ac_cv_header_$ac_safe=yes"
19993 else
19994   echo "$ac_err" >&5
19995   echo "configure: failed program was:" >&5
19996   cat conftest.$ac_ext >&5
19997   rm -rf conftest*
19998   eval "ac_cv_header_$ac_safe=no"
19999 fi
20000 rm -f conftest*
20001 fi
20002 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20003   echo "$ac_t""yes" 1>&6
20004     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20005   cat >> confdefs.h <<EOF
20006 #define $ac_tr_hdr 1
20007 EOF
20008  
20009 else
20010   echo "$ac_t""no" 1>&6
20011 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20012         
20013 fi
20014 done
20015
20016
20017         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20018 echo "configure:20019: checking for SQLDriverConnect in -liodbc" >&5
20019 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20020 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20021   echo $ac_n "(cached) $ac_c" 1>&6
20022 else
20023   ac_save_LIBS="$LIBS"
20024 LIBS="-liodbc  $LIBS"
20025 cat > conftest.$ac_ext <<EOF
20026 #line 20027 "configure"
20027 #include "confdefs.h"
20028 /* Override any gcc2 internal prototype to avoid an error.  */
20029 /* We use char because int might match the return type of a gcc2
20030     builtin and then its argument prototype would still apply.  */
20031 char SQLDriverConnect();
20032
20033 int main() {
20034 SQLDriverConnect()
20035 ; return 0; }
20036 EOF
20037 if { (eval echo configure:20038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20038   rm -rf conftest*
20039   eval "ac_cv_lib_$ac_lib_var=yes"
20040 else
20041   echo "configure: failed program was:" >&5
20042   cat conftest.$ac_ext >&5
20043   rm -rf conftest*
20044   eval "ac_cv_lib_$ac_lib_var=no"
20045 fi
20046 rm -f conftest*
20047 LIBS="$ac_save_LIBS"
20048
20049 fi
20050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20051   echo "$ac_t""yes" 1>&6
20052   have_iodbc=yes
20053 else
20054   echo "$ac_t""no" 1>&6
20055 have_iodbc=no
20056 fi
20057
20058         if test $have_iodbc = yes ; then
20059                 ol_link_sql="-liodbc"
20060         else
20061                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20062 echo "configure:20063: checking for SQLDriverConnect in -lodbc" >&5
20063 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20065   echo $ac_n "(cached) $ac_c" 1>&6
20066 else
20067   ac_save_LIBS="$LIBS"
20068 LIBS="-lodbc  $LIBS"
20069 cat > conftest.$ac_ext <<EOF
20070 #line 20071 "configure"
20071 #include "confdefs.h"
20072 /* Override any gcc2 internal prototype to avoid an error.  */
20073 /* We use char because int might match the return type of a gcc2
20074     builtin and then its argument prototype would still apply.  */
20075 char SQLDriverConnect();
20076
20077 int main() {
20078 SQLDriverConnect()
20079 ; return 0; }
20080 EOF
20081 if { (eval echo configure:20082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20082   rm -rf conftest*
20083   eval "ac_cv_lib_$ac_lib_var=yes"
20084 else
20085   echo "configure: failed program was:" >&5
20086   cat conftest.$ac_ext >&5
20087   rm -rf conftest*
20088   eval "ac_cv_lib_$ac_lib_var=no"
20089 fi
20090 rm -f conftest*
20091 LIBS="$ac_save_LIBS"
20092
20093 fi
20094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20095   echo "$ac_t""yes" 1>&6
20096   have_odbc=yes
20097 else
20098   echo "$ac_t""no" 1>&6
20099 have_odbc=no
20100 fi
20101
20102                 if test $have_odbc = yes ; then
20103                         ol_link_sql="-lodbc"
20104                 fi
20105         fi
20106
20107         if test $ol_link_sql != no ; then
20108                 SLAPD_SQL_LIBS="$ol_link_sql"
20109
20110         elif test $ol_enable_sql != auto ; then
20111                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20112         fi
20113 fi
20114
20115 if test $ol_enable_tcl != no ; then
20116         for ac_hdr in tcl.h
20117 do
20118 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20119 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20120 echo "configure:20121: checking for $ac_hdr" >&5
20121 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20122   echo $ac_n "(cached) $ac_c" 1>&6
20123 else
20124   cat > conftest.$ac_ext <<EOF
20125 #line 20126 "configure"
20126 #include "confdefs.h"
20127 #include <$ac_hdr>
20128 EOF
20129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20130 { (eval echo configure:20131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20132 if test -z "$ac_err"; then
20133   rm -rf conftest*
20134   eval "ac_cv_header_$ac_safe=yes"
20135 else
20136   echo "$ac_err" >&5
20137   echo "configure: failed program was:" >&5
20138   cat conftest.$ac_ext >&5
20139   rm -rf conftest*
20140   eval "ac_cv_header_$ac_safe=no"
20141 fi
20142 rm -f conftest*
20143 fi
20144 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20145   echo "$ac_t""yes" 1>&6
20146     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20147   cat >> confdefs.h <<EOF
20148 #define $ac_tr_hdr 1
20149 EOF
20150  
20151 else
20152   echo "$ac_t""no" 1>&6
20153 fi
20154 done
20155
20156
20157         if test $ac_cv_header_tcl_h != yes ; then
20158                 have_tcl=no
20159         else
20160                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
20161                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
20162 echo "configure:20163: checking for main in -l$lib" >&5
20163 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
20164 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20165   echo $ac_n "(cached) $ac_c" 1>&6
20166 else
20167   ac_save_LIBS="$LIBS"
20168 LIBS="-l$lib  $LIBS"
20169 cat > conftest.$ac_ext <<EOF
20170 #line 20171 "configure"
20171 #include "confdefs.h"
20172
20173 int main() {
20174 main()
20175 ; return 0; }
20176 EOF
20177 if { (eval echo configure:20178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20178   rm -rf conftest*
20179   eval "ac_cv_lib_$ac_lib_var=yes"
20180 else
20181   echo "configure: failed program was:" >&5
20182   cat conftest.$ac_ext >&5
20183   rm -rf conftest*
20184   eval "ac_cv_lib_$ac_lib_var=no"
20185 fi
20186 rm -f conftest*
20187 LIBS="$ac_save_LIBS"
20188
20189 fi
20190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20191   echo "$ac_t""yes" 1>&6
20192   have_tcl=yes
20193                            if test x"$ol_with_tcl_module" = "xstatic" ; then
20194                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
20195                            else
20196                                         MOD_TCL_LIB="-l${lib}"
20197                            fi;break
20198 else
20199   echo "$ac_t""no" 1>&6
20200 have_tcl=no
20201 fi
20202
20203                 done
20204         fi
20205
20206         if test $have_tcl != yes ; then
20207                 echo "configure: warning: could not find -ltcl" 1>&2
20208                 if test $ol_enable_tcl = yes ; then
20209                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
20210                 fi
20211
20212                 ol_enable_tcl=no
20213         fi
20214 fi
20215
20216 ol_link_termcap=no
20217 for ac_hdr in termcap.h ncurses.h
20218 do
20219 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20220 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20221 echo "configure:20222: checking for $ac_hdr" >&5
20222 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20223   echo $ac_n "(cached) $ac_c" 1>&6
20224 else
20225   cat > conftest.$ac_ext <<EOF
20226 #line 20227 "configure"
20227 #include "confdefs.h"
20228 #include <$ac_hdr>
20229 EOF
20230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20231 { (eval echo configure:20232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20233 if test -z "$ac_err"; then
20234   rm -rf conftest*
20235   eval "ac_cv_header_$ac_safe=yes"
20236 else
20237   echo "$ac_err" >&5
20238   echo "configure: failed program was:" >&5
20239   cat conftest.$ac_ext >&5
20240   rm -rf conftest*
20241   eval "ac_cv_header_$ac_safe=no"
20242 fi
20243 rm -f conftest*
20244 fi
20245 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20246   echo "$ac_t""yes" 1>&6
20247     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20248   cat >> confdefs.h <<EOF
20249 #define $ac_tr_hdr 1
20250 EOF
20251  
20252 else
20253   echo "$ac_t""no" 1>&6
20254 fi
20255 done
20256
20257
20258 if test $ol_link_termcap = no ; then
20259         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
20260 echo "configure:20261: checking for tputs in -ltermcap" >&5
20261 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
20262 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20263   echo $ac_n "(cached) $ac_c" 1>&6
20264 else
20265   ac_save_LIBS="$LIBS"
20266 LIBS="-ltermcap  $LIBS"
20267 cat > conftest.$ac_ext <<EOF
20268 #line 20269 "configure"
20269 #include "confdefs.h"
20270 /* Override any gcc2 internal prototype to avoid an error.  */
20271 /* We use char because int might match the return type of a gcc2
20272     builtin and then its argument prototype would still apply.  */
20273 char tputs();
20274
20275 int main() {
20276 tputs()
20277 ; return 0; }
20278 EOF
20279 if { (eval echo configure:20280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20280   rm -rf conftest*
20281   eval "ac_cv_lib_$ac_lib_var=yes"
20282 else
20283   echo "configure: failed program was:" >&5
20284   cat conftest.$ac_ext >&5
20285   rm -rf conftest*
20286   eval "ac_cv_lib_$ac_lib_var=no"
20287 fi
20288 rm -f conftest*
20289 LIBS="$ac_save_LIBS"
20290
20291 fi
20292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20293   echo "$ac_t""yes" 1>&6
20294   have_termcap=yes
20295 else
20296   echo "$ac_t""no" 1>&6
20297 have_termcap=no
20298 fi
20299
20300         if test $have_termcap = yes ; then
20301                 cat >> confdefs.h <<\EOF
20302 #define HAVE_TERMCAP 1
20303 EOF
20304
20305                 ol_link_termcap=yes
20306                 TERMCAP_LIBS=-ltermcap
20307         fi
20308 fi
20309
20310 if test $ol_link_termcap = no ; then
20311         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20312 echo "configure:20313: checking for initscr in -lncurses" >&5
20313 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20314 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20315   echo $ac_n "(cached) $ac_c" 1>&6
20316 else
20317   ac_save_LIBS="$LIBS"
20318 LIBS="-lncurses  $LIBS"
20319 cat > conftest.$ac_ext <<EOF
20320 #line 20321 "configure"
20321 #include "confdefs.h"
20322 /* Override any gcc2 internal prototype to avoid an error.  */
20323 /* We use char because int might match the return type of a gcc2
20324     builtin and then its argument prototype would still apply.  */
20325 char initscr();
20326
20327 int main() {
20328 initscr()
20329 ; return 0; }
20330 EOF
20331 if { (eval echo configure:20332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20332   rm -rf conftest*
20333   eval "ac_cv_lib_$ac_lib_var=yes"
20334 else
20335   echo "configure: failed program was:" >&5
20336   cat conftest.$ac_ext >&5
20337   rm -rf conftest*
20338   eval "ac_cv_lib_$ac_lib_var=no"
20339 fi
20340 rm -f conftest*
20341 LIBS="$ac_save_LIBS"
20342
20343 fi
20344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20345   echo "$ac_t""yes" 1>&6
20346   have_ncurses=yes
20347 else
20348   echo "$ac_t""no" 1>&6
20349 have_ncurses=no
20350 fi
20351
20352         if test $have_ncurses = yes ; then
20353                 cat >> confdefs.h <<\EOF
20354 #define HAVE_NCURSES 1
20355 EOF
20356
20357                 ol_link_termcap=yes
20358                 TERMCAP_LIBS=-lncurses
20359         fi
20360 fi
20361
20362 if test $ol_link_termcap = no ; then
20363         cat >> confdefs.h <<\EOF
20364 #define NO_TERMCAP 1
20365 EOF
20366
20367         TERMCAP_LIBS=
20368 fi
20369
20370 ol_link_sasl=no
20371 ol_link_spasswd=no
20372 if test $ol_with_cyrus_sasl != no ; then
20373         for ac_hdr in sasl/sasl.h sasl.h
20374 do
20375 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20376 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20377 echo "configure:20378: checking for $ac_hdr" >&5
20378 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20379   echo $ac_n "(cached) $ac_c" 1>&6
20380 else
20381   cat > conftest.$ac_ext <<EOF
20382 #line 20383 "configure"
20383 #include "confdefs.h"
20384 #include <$ac_hdr>
20385 EOF
20386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20387 { (eval echo configure:20388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20389 if test -z "$ac_err"; then
20390   rm -rf conftest*
20391   eval "ac_cv_header_$ac_safe=yes"
20392 else
20393   echo "$ac_err" >&5
20394   echo "configure: failed program was:" >&5
20395   cat conftest.$ac_ext >&5
20396   rm -rf conftest*
20397   eval "ac_cv_header_$ac_safe=no"
20398 fi
20399 rm -f conftest*
20400 fi
20401 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20402   echo "$ac_t""yes" 1>&6
20403     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20404   cat >> confdefs.h <<EOF
20405 #define $ac_tr_hdr 1
20406 EOF
20407  
20408 else
20409   echo "$ac_t""no" 1>&6
20410 fi
20411 done
20412
20413
20414         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20415                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20416 echo "configure:20417: checking for sasl_client_init in -lsasl2" >&5
20417 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20418 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20419   echo $ac_n "(cached) $ac_c" 1>&6
20420 else
20421   ac_save_LIBS="$LIBS"
20422 LIBS="-lsasl2  $LIBS"
20423 cat > conftest.$ac_ext <<EOF
20424 #line 20425 "configure"
20425 #include "confdefs.h"
20426 /* Override any gcc2 internal prototype to avoid an error.  */
20427 /* We use char because int might match the return type of a gcc2
20428     builtin and then its argument prototype would still apply.  */
20429 char sasl_client_init();
20430
20431 int main() {
20432 sasl_client_init()
20433 ; return 0; }
20434 EOF
20435 if { (eval echo configure:20436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20436   rm -rf conftest*
20437   eval "ac_cv_lib_$ac_lib_var=yes"
20438 else
20439   echo "configure: failed program was:" >&5
20440   cat conftest.$ac_ext >&5
20441   rm -rf conftest*
20442   eval "ac_cv_lib_$ac_lib_var=no"
20443 fi
20444 rm -f conftest*
20445 LIBS="$ac_save_LIBS"
20446
20447 fi
20448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20449   echo "$ac_t""yes" 1>&6
20450   ol_link_sasl="-lsasl2"
20451 else
20452   echo "$ac_t""no" 1>&6
20453 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20454 echo "configure:20455: checking for sasl_client_init in -lsasl" >&5
20455 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20456 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20457   echo $ac_n "(cached) $ac_c" 1>&6
20458 else
20459   ac_save_LIBS="$LIBS"
20460 LIBS="-lsasl  $LIBS"
20461 cat > conftest.$ac_ext <<EOF
20462 #line 20463 "configure"
20463 #include "confdefs.h"
20464 /* Override any gcc2 internal prototype to avoid an error.  */
20465 /* We use char because int might match the return type of a gcc2
20466     builtin and then its argument prototype would still apply.  */
20467 char sasl_client_init();
20468
20469 int main() {
20470 sasl_client_init()
20471 ; return 0; }
20472 EOF
20473 if { (eval echo configure:20474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20474   rm -rf conftest*
20475   eval "ac_cv_lib_$ac_lib_var=yes"
20476 else
20477   echo "configure: failed program was:" >&5
20478   cat conftest.$ac_ext >&5
20479   rm -rf conftest*
20480   eval "ac_cv_lib_$ac_lib_var=no"
20481 fi
20482 rm -f conftest*
20483 LIBS="$ac_save_LIBS"
20484
20485 fi
20486 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20487   echo "$ac_t""yes" 1>&6
20488   ol_link_sasl="-lsasl"
20489 else
20490   echo "$ac_t""no" 1>&6
20491 fi
20492
20493 fi
20494
20495         fi
20496
20497         if test $ol_link_sasl = no ; then
20498                 if test $ol_with_cyrus_sasl != auto ; then
20499                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20500                 else
20501                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20502                         echo "configure: warning: SASL authentication not supported!" 1>&2
20503                         if test $ol_link_tls = no ; then
20504                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20505                         fi
20506                 fi
20507         else
20508                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20509 echo "configure:20510: checking Cyrus SASL library version" >&5
20510 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20511   echo $ac_n "(cached) $ac_c" 1>&6
20512 else
20513   
20514         cat > conftest.$ac_ext <<EOF
20515 #line 20516 "configure"
20516 #include "confdefs.h"
20517
20518 #ifdef HAVE_SASL_SASL_H
20519 #include <sasl/sasl.h>
20520 #else
20521 #include <sasl.h>
20522 #endif
20523
20524 /* require 2.1.3 or later */
20525 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20526         char *__sasl_compat = "1.5.x okay";
20527 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20528         __sasl_compat "2.2+ or better okay (we guess)";
20529 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20530         && SASL_VERSION_STEP >=3
20531         __sasl_compat = "2.1.3+ or better okay";
20532 #endif
20533         
20534 EOF
20535 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20536   egrep "__sasl_compat" >/dev/null 2>&1; then
20537   rm -rf conftest*
20538   ol_cv_sasl_compat=yes
20539 else
20540   rm -rf conftest*
20541   ol_cv_sasl_compat=no
20542 fi
20543 rm -f conftest*
20544
20545 fi
20546
20547 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20548
20549                 if test $ol_cv_sasl_compat = no ; then
20550                         ol_link_sasl=no
20551                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20552                 fi
20553
20554                 cat >> confdefs.h <<\EOF
20555 #define HAVE_CYRUS_SASL 1
20556 EOF
20557
20558                 SASL_LIBS="$ol_link_sasl"
20559                 if test $ol_enable_spasswd != no ; then
20560                         ol_link_spasswd=yes
20561                 fi
20562
20563                 ac_save_LIBS="$LIBS"
20564                 LIBS="$LIBS $ol_link_sasl"
20565                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20566 echo "configure:20567: checking for sasl_version" >&5
20567 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20568   echo $ac_n "(cached) $ac_c" 1>&6
20569 else
20570   cat > conftest.$ac_ext <<EOF
20571 #line 20572 "configure"
20572 #include "confdefs.h"
20573 /* System header to define __stub macros and hopefully few prototypes,
20574     which can conflict with char sasl_version(); below.  */
20575 #include <assert.h>
20576 /* Override any gcc2 internal prototype to avoid an error.  */
20577 /* We use char because int might match the return type of a gcc2
20578     builtin and then its argument prototype would still apply.  */
20579 char sasl_version();
20580 char (*f)();
20581
20582 int main() {
20583
20584 /* The GNU C library defines this for functions which it implements
20585     to always fail with ENOSYS.  Some functions are actually named
20586     something starting with __ and the normal name is an alias.  */
20587 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20588 choke me
20589 #else
20590 f = sasl_version;
20591 #endif
20592
20593 ; return 0; }
20594 EOF
20595 if { (eval echo configure:20596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20596   rm -rf conftest*
20597   eval "ac_cv_func_sasl_version=yes"
20598 else
20599   echo "configure: failed program was:" >&5
20600   cat conftest.$ac_ext >&5
20601   rm -rf conftest*
20602   eval "ac_cv_func_sasl_version=no"
20603 fi
20604 rm -f conftest*
20605 fi
20606
20607 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20608   echo "$ac_t""yes" 1>&6
20609   cat >> confdefs.h <<\EOF
20610 #define HAVE_SASL_VERSION 1
20611 EOF
20612
20613 else
20614   echo "$ac_t""no" 1>&6
20615 fi
20616
20617                 LIBS="$ac_save_LIBS"
20618         fi
20619
20620 else
20621         echo "configure: warning: SASL authentication not supported!" 1>&2
20622         if test $ol_link_tls = no ; then
20623                 echo "configure: warning: Strong authentication not supported!" 1>&2
20624         fi
20625 fi
20626
20627 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20628         dev=no
20629         if test -r /dev/urandom ; then
20630                 dev="/dev/urandom";
20631         elif test -r /idev/urandom ; then
20632                 dev="/idev/urandom";
20633         elif test -r /dev/srandom ; then
20634                 dev="/dev/srandom";
20635         elif test -r /dev/random ; then
20636                 dev="/dev/random";
20637         elif test -r /idev/random ; then
20638                 dev="/idev/random";
20639         fi
20640
20641         if test $dev != no ; then
20642                 cat >> confdefs.h <<EOF
20643 #define URANDOM_DEVICE "$dev"
20644 EOF
20645
20646         fi
20647 fi
20648
20649 ol_link_fetch=no
20650 if test $ol_with_fetch != no ; then
20651         ol_LIBS=$LIBS
20652 LIBS="-lfetch -lcom_err $LIBS"
20653 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20654 echo "configure:20655: checking fetch(3) library" >&5
20655 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20656   echo $ac_n "(cached) $ac_c" 1>&6
20657 else
20658   
20659         cat > conftest.$ac_ext <<EOF
20660 #line 20661 "configure"
20661 #include "confdefs.h"
20662
20663 #include <sys/param.h>
20664 #include <stdio.h>
20665 #include <fetch.h>
20666 int main() {
20667 struct url *u = fetchParseURL("file:///"); 
20668 ; return 0; }
20669 EOF
20670 if { (eval echo configure:20671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20671   rm -rf conftest*
20672   ol_cv_lib_fetch=yes
20673 else
20674   echo "configure: failed program was:" >&5
20675   cat conftest.$ac_ext >&5
20676   rm -rf conftest*
20677   ol_cv_lib_fetch=no
20678 fi
20679 rm -f conftest*
20680 fi
20681
20682 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20683 LIBS=$ol_LIBS
20684 if test $ol_cv_lib_fetch != no ; then
20685         ol_link_fetch="-lfetch -lcom_err"
20686         cat >> confdefs.h <<\EOF
20687 #define HAVE_FETCH 1
20688 EOF
20689
20690 fi
20691
20692
20693         if test $ol_cv_lib_fetch != no ; then
20694                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20695                 ol_link_fetch=freebsd
20696
20697         elif test $ol_with_fetch != auto ; then
20698                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20699         fi 
20700 fi
20701
20702 if test $ol_enable_crypt != no ; then
20703         save_LIBS="$LIBS"
20704         LIBS="$TLS_LIBS $LIBS"
20705
20706         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20707 echo "configure:20708: checking for crypt" >&5
20708 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20709   echo $ac_n "(cached) $ac_c" 1>&6
20710 else
20711   cat > conftest.$ac_ext <<EOF
20712 #line 20713 "configure"
20713 #include "confdefs.h"
20714 /* System header to define __stub macros and hopefully few prototypes,
20715     which can conflict with char crypt(); below.  */
20716 #include <assert.h>
20717 /* Override any gcc2 internal prototype to avoid an error.  */
20718 /* We use char because int might match the return type of a gcc2
20719     builtin and then its argument prototype would still apply.  */
20720 char crypt();
20721 char (*f)();
20722
20723 int main() {
20724
20725 /* The GNU C library defines this for functions which it implements
20726     to always fail with ENOSYS.  Some functions are actually named
20727     something starting with __ and the normal name is an alias.  */
20728 #if defined (__stub_crypt) || defined (__stub___crypt)
20729 choke me
20730 #else
20731 f = crypt;
20732 #endif
20733
20734 ; return 0; }
20735 EOF
20736 if { (eval echo configure:20737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20737   rm -rf conftest*
20738   eval "ac_cv_func_crypt=yes"
20739 else
20740   echo "configure: failed program was:" >&5
20741   cat conftest.$ac_ext >&5
20742   rm -rf conftest*
20743   eval "ac_cv_func_crypt=no"
20744 fi
20745 rm -f conftest*
20746 fi
20747
20748 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20749   echo "$ac_t""yes" 1>&6
20750   have_crypt=yes
20751 else
20752   echo "$ac_t""no" 1>&6
20753
20754                 LIBS="$save_LIBS"
20755                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20756 echo "configure:20757: checking for crypt in -lcrypt" >&5
20757 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20758 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20759   echo $ac_n "(cached) $ac_c" 1>&6
20760 else
20761   ac_save_LIBS="$LIBS"
20762 LIBS="-lcrypt  $LIBS"
20763 cat > conftest.$ac_ext <<EOF
20764 #line 20765 "configure"
20765 #include "confdefs.h"
20766 /* Override any gcc2 internal prototype to avoid an error.  */
20767 /* We use char because int might match the return type of a gcc2
20768     builtin and then its argument prototype would still apply.  */
20769 char crypt();
20770
20771 int main() {
20772 crypt()
20773 ; return 0; }
20774 EOF
20775 if { (eval echo configure:20776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20776   rm -rf conftest*
20777   eval "ac_cv_lib_$ac_lib_var=yes"
20778 else
20779   echo "configure: failed program was:" >&5
20780   cat conftest.$ac_ext >&5
20781   rm -rf conftest*
20782   eval "ac_cv_lib_$ac_lib_var=no"
20783 fi
20784 rm -f conftest*
20785 LIBS="$ac_save_LIBS"
20786
20787 fi
20788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20789   echo "$ac_t""yes" 1>&6
20790   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20791                         have_crypt=yes
20792 else
20793   echo "$ac_t""no" 1>&6
20794 have_crypt=no
20795 fi
20796
20797 fi
20798
20799
20800         LIBS="$save_LIBS"
20801
20802         if test $have_crypt = yes ; then
20803                 cat >> confdefs.h <<\EOF
20804 #define HAVE_CRYPT 1
20805 EOF
20806
20807         else
20808                 echo "configure: warning: could not find crypt" 1>&2
20809                 if test $ol_enable_crypt = yes ; then
20810                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20811                 fi
20812
20813                 echo "configure: warning: disabling crypt support" 1>&2
20814                 ol_enable_crypt=no
20815         fi
20816 fi
20817
20818 if test $ol_enable_proctitle != no ; then
20819         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20820 echo "configure:20821: checking for setproctitle" >&5
20821 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20822   echo $ac_n "(cached) $ac_c" 1>&6
20823 else
20824   cat > conftest.$ac_ext <<EOF
20825 #line 20826 "configure"
20826 #include "confdefs.h"
20827 /* System header to define __stub macros and hopefully few prototypes,
20828     which can conflict with char setproctitle(); below.  */
20829 #include <assert.h>
20830 /* Override any gcc2 internal prototype to avoid an error.  */
20831 /* We use char because int might match the return type of a gcc2
20832     builtin and then its argument prototype would still apply.  */
20833 char setproctitle();
20834 char (*f)();
20835
20836 int main() {
20837
20838 /* The GNU C library defines this for functions which it implements
20839     to always fail with ENOSYS.  Some functions are actually named
20840     something starting with __ and the normal name is an alias.  */
20841 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20842 choke me
20843 #else
20844 f = setproctitle;
20845 #endif
20846
20847 ; return 0; }
20848 EOF
20849 if { (eval echo configure:20850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20850   rm -rf conftest*
20851   eval "ac_cv_func_setproctitle=yes"
20852 else
20853   echo "configure: failed program was:" >&5
20854   cat conftest.$ac_ext >&5
20855   rm -rf conftest*
20856   eval "ac_cv_func_setproctitle=no"
20857 fi
20858 rm -f conftest*
20859 fi
20860
20861 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20862   echo "$ac_t""yes" 1>&6
20863   have_setproctitle=yes
20864 else
20865   echo "$ac_t""no" 1>&6
20866
20867                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20868 echo "configure:20869: checking for setproctitle in -lutil" >&5
20869 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20870 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20871   echo $ac_n "(cached) $ac_c" 1>&6
20872 else
20873   ac_save_LIBS="$LIBS"
20874 LIBS="-lutil  $LIBS"
20875 cat > conftest.$ac_ext <<EOF
20876 #line 20877 "configure"
20877 #include "confdefs.h"
20878 /* Override any gcc2 internal prototype to avoid an error.  */
20879 /* We use char because int might match the return type of a gcc2
20880     builtin and then its argument prototype would still apply.  */
20881 char setproctitle();
20882
20883 int main() {
20884 setproctitle()
20885 ; return 0; }
20886 EOF
20887 if { (eval echo configure:20888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20888   rm -rf conftest*
20889   eval "ac_cv_lib_$ac_lib_var=yes"
20890 else
20891   echo "configure: failed program was:" >&5
20892   cat conftest.$ac_ext >&5
20893   rm -rf conftest*
20894   eval "ac_cv_lib_$ac_lib_var=no"
20895 fi
20896 rm -f conftest*
20897 LIBS="$ac_save_LIBS"
20898
20899 fi
20900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20901   echo "$ac_t""yes" 1>&6
20902   have_setproctitle=yes
20903                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20904 else
20905   echo "$ac_t""no" 1>&6
20906 have_setproctitle=no
20907                         LIBOBJS="$LIBOBJS setproctitle.o"
20908                         LIBSRCS="$LIBSRCS setproctitle.c"
20909 fi
20910
20911 fi
20912
20913
20914         if test $have_setproctitle = yes ; then
20915                 cat >> confdefs.h <<\EOF
20916 #define HAVE_SETPROCTITLE 1
20917 EOF
20918
20919         fi
20920 fi
20921
20922 if test $ol_enable_slp != no ; then
20923         for ac_hdr in slp.h 
20924 do
20925 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20926 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20927 echo "configure:20928: checking for $ac_hdr" >&5
20928 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20929   echo $ac_n "(cached) $ac_c" 1>&6
20930 else
20931   cat > conftest.$ac_ext <<EOF
20932 #line 20933 "configure"
20933 #include "confdefs.h"
20934 #include <$ac_hdr>
20935 EOF
20936 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20937 { (eval echo configure:20938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20938 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20939 if test -z "$ac_err"; then
20940   rm -rf conftest*
20941   eval "ac_cv_header_$ac_safe=yes"
20942 else
20943   echo "$ac_err" >&5
20944   echo "configure: failed program was:" >&5
20945   cat conftest.$ac_ext >&5
20946   rm -rf conftest*
20947   eval "ac_cv_header_$ac_safe=no"
20948 fi
20949 rm -f conftest*
20950 fi
20951 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20952   echo "$ac_t""yes" 1>&6
20953     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20954   cat >> confdefs.h <<EOF
20955 #define $ac_tr_hdr 1
20956 EOF
20957  
20958 else
20959   echo "$ac_t""no" 1>&6
20960 fi
20961 done
20962
20963
20964         if test $ac_cv_header_slp_h = yes ; then
20965                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20966 echo "configure:20967: checking for SLPOpen in -lslp" >&5
20967 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20968 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20969   echo $ac_n "(cached) $ac_c" 1>&6
20970 else
20971   ac_save_LIBS="$LIBS"
20972 LIBS="-lslp  $LIBS"
20973 cat > conftest.$ac_ext <<EOF
20974 #line 20975 "configure"
20975 #include "confdefs.h"
20976 /* Override any gcc2 internal prototype to avoid an error.  */
20977 /* We use char because int might match the return type of a gcc2
20978     builtin and then its argument prototype would still apply.  */
20979 char SLPOpen();
20980
20981 int main() {
20982 SLPOpen()
20983 ; return 0; }
20984 EOF
20985 if { (eval echo configure:20986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20986   rm -rf conftest*
20987   eval "ac_cv_lib_$ac_lib_var=yes"
20988 else
20989   echo "configure: failed program was:" >&5
20990   cat conftest.$ac_ext >&5
20991   rm -rf conftest*
20992   eval "ac_cv_lib_$ac_lib_var=no"
20993 fi
20994 rm -f conftest*
20995 LIBS="$ac_save_LIBS"
20996
20997 fi
20998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20999   echo "$ac_t""yes" 1>&6
21000   have_slp=yes
21001 else
21002   echo "$ac_t""no" 1>&6
21003 have_slp=no
21004 fi
21005
21006                 if test $have_slp = yes ; then
21007                         cat >> confdefs.h <<\EOF
21008 #define HAVE_SLP 1
21009 EOF
21010
21011                         SLAPD_SLP_LIBS=-lslp
21012                 fi
21013
21014         elif test $ol_enable_slp = yes ; then
21015                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21016         fi
21017 fi
21018
21019
21020 echo $ac_n "checking long long""... $ac_c" 1>&6
21021 echo "configure:21022: checking long long" >&5
21022 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21023   echo $ac_n "(cached) $ac_c" 1>&6
21024 else
21025   
21026         cat > conftest.$ac_ext <<EOF
21027 #line 21028 "configure"
21028 #include "confdefs.h"
21029
21030 int main() {
21031 long long x;
21032 ; return 0; }
21033 EOF
21034 if { (eval echo configure:21035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21035   rm -rf conftest*
21036   ol_cv_type_long_long=yes
21037 else
21038   echo "configure: failed program was:" >&5
21039   cat conftest.$ac_ext >&5
21040   rm -rf conftest*
21041   ol_cv_type_long_long=no
21042 fi
21043 rm -f conftest*
21044 fi
21045
21046 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21047 if test $ol_cv_type_long_long = yes; then
21048         cat >> confdefs.h <<\EOF
21049 #define HAVE_LONG_LONG 1
21050 EOF
21051
21052 fi
21053
21054 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21055 echo "configure:21056: checking for ANSI C header files" >&5
21056 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21057   echo $ac_n "(cached) $ac_c" 1>&6
21058 else
21059   cat > conftest.$ac_ext <<EOF
21060 #line 21061 "configure"
21061 #include "confdefs.h"
21062 #include <stdlib.h>
21063 #include <stdarg.h>
21064 #include <string.h>
21065 #include <float.h>
21066 EOF
21067 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21068 { (eval echo configure:21069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21069 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21070 if test -z "$ac_err"; then
21071   rm -rf conftest*
21072   ac_cv_header_stdc=yes
21073 else
21074   echo "$ac_err" >&5
21075   echo "configure: failed program was:" >&5
21076   cat conftest.$ac_ext >&5
21077   rm -rf conftest*
21078   ac_cv_header_stdc=no
21079 fi
21080 rm -f conftest*
21081
21082 if test $ac_cv_header_stdc = yes; then
21083   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21084 cat > conftest.$ac_ext <<EOF
21085 #line 21086 "configure"
21086 #include "confdefs.h"
21087 #include <string.h>
21088 EOF
21089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21090   egrep "memchr" >/dev/null 2>&1; then
21091   :
21092 else
21093   rm -rf conftest*
21094   ac_cv_header_stdc=no
21095 fi
21096 rm -f conftest*
21097
21098 fi
21099
21100 if test $ac_cv_header_stdc = yes; then
21101   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21102 cat > conftest.$ac_ext <<EOF
21103 #line 21104 "configure"
21104 #include "confdefs.h"
21105 #include <stdlib.h>
21106 EOF
21107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21108   egrep "free" >/dev/null 2>&1; then
21109   :
21110 else
21111   rm -rf conftest*
21112   ac_cv_header_stdc=no
21113 fi
21114 rm -f conftest*
21115
21116 fi
21117
21118 if test $ac_cv_header_stdc = yes; then
21119   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21120 if test "$cross_compiling" = yes; then
21121   :
21122 else
21123   cat > conftest.$ac_ext <<EOF
21124 #line 21125 "configure"
21125 #include "confdefs.h"
21126 #include <ctype.h>
21127 #if ((' ' & 0x0FF) == 0x020)
21128 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21129 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21130 #else
21131 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21132  || ('j' <= (c) && (c) <= 'r') \
21133  || ('s' <= (c) && (c) <= 'z'))
21134 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21135 #endif
21136 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21137 int main () { int i; for (i = 0; i < 256; i++)
21138 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21139 exit (0); }
21140
21141 EOF
21142 if { (eval echo configure:21143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21143 then
21144   :
21145 else
21146   echo "configure: failed program was:" >&5
21147   cat conftest.$ac_ext >&5
21148   rm -fr conftest*
21149   ac_cv_header_stdc=no
21150 fi
21151 rm -fr conftest*
21152 fi
21153
21154 fi
21155 fi
21156
21157 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21158 if test $ac_cv_header_stdc = yes; then
21159   cat >> confdefs.h <<\EOF
21160 #define STDC_HEADERS 1
21161 EOF
21162
21163 fi
21164
21165 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21166 echo "configure:21167: checking for mode_t" >&5
21167 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21168   echo $ac_n "(cached) $ac_c" 1>&6
21169 else
21170   cat > conftest.$ac_ext <<EOF
21171 #line 21172 "configure"
21172 #include "confdefs.h"
21173 #include <sys/types.h>
21174 #if STDC_HEADERS
21175 #include <stdlib.h>
21176 #include <stddef.h>
21177 #endif
21178
21179 EOF
21180 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21181   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21182   rm -rf conftest*
21183   eval "ac_cv_type_mode_t=yes"
21184 else
21185   rm -rf conftest*
21186   eval "ac_cv_type_mode_t=no"
21187 fi
21188 rm -f conftest*
21189
21190 fi
21191 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21192   echo "$ac_t""yes" 1>&6
21193 else
21194   echo "$ac_t""no" 1>&6
21195   cat >> confdefs.h <<EOF
21196 #define mode_t int
21197 EOF
21198
21199 fi
21200
21201 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21202 echo "configure:21203: checking for off_t" >&5
21203 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21204   echo $ac_n "(cached) $ac_c" 1>&6
21205 else
21206   cat > conftest.$ac_ext <<EOF
21207 #line 21208 "configure"
21208 #include "confdefs.h"
21209 #include <sys/types.h>
21210 #if STDC_HEADERS
21211 #include <stdlib.h>
21212 #include <stddef.h>
21213 #endif
21214
21215 EOF
21216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21217   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21218   rm -rf conftest*
21219   eval "ac_cv_type_off_t=yes"
21220 else
21221   rm -rf conftest*
21222   eval "ac_cv_type_off_t=no"
21223 fi
21224 rm -f conftest*
21225
21226 fi
21227 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21228   echo "$ac_t""yes" 1>&6
21229 else
21230   echo "$ac_t""no" 1>&6
21231   cat >> confdefs.h <<EOF
21232 #define off_t long
21233 EOF
21234
21235 fi
21236
21237 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21238 echo "configure:21239: checking for pid_t" >&5
21239 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21240   echo $ac_n "(cached) $ac_c" 1>&6
21241 else
21242   cat > conftest.$ac_ext <<EOF
21243 #line 21244 "configure"
21244 #include "confdefs.h"
21245 #include <sys/types.h>
21246 #if STDC_HEADERS
21247 #include <stdlib.h>
21248 #include <stddef.h>
21249 #endif
21250
21251 EOF
21252 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21253   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21254   rm -rf conftest*
21255   eval "ac_cv_type_pid_t=yes"
21256 else
21257   rm -rf conftest*
21258   eval "ac_cv_type_pid_t=no"
21259 fi
21260 rm -f conftest*
21261
21262 fi
21263 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21264   echo "$ac_t""yes" 1>&6
21265 else
21266   echo "$ac_t""no" 1>&6
21267   cat >> confdefs.h <<EOF
21268 #define pid_t int
21269 EOF
21270
21271 fi
21272
21273 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21274 echo "configure:21275: checking for ptrdiff_t" >&5
21275 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21276   echo $ac_n "(cached) $ac_c" 1>&6
21277 else
21278   cat > conftest.$ac_ext <<EOF
21279 #line 21280 "configure"
21280 #include "confdefs.h"
21281 #include <stddef.h>
21282 int main() {
21283 ptrdiff_t p
21284 ; return 0; }
21285 EOF
21286 if { (eval echo configure:21287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21287   rm -rf conftest*
21288   am_cv_type_ptrdiff_t=yes
21289 else
21290   echo "configure: failed program was:" >&5
21291   cat conftest.$ac_ext >&5
21292   rm -rf conftest*
21293   am_cv_type_ptrdiff_t=no
21294 fi
21295 rm -f conftest*
21296 fi
21297
21298 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21299    if test $am_cv_type_ptrdiff_t = yes; then
21300      cat >> confdefs.h <<\EOF
21301 #define HAVE_PTRDIFF_T 1
21302 EOF
21303
21304    fi
21305
21306 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21307 echo "configure:21308: checking return type of signal handlers" >&5
21308 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21309   echo $ac_n "(cached) $ac_c" 1>&6
21310 else
21311   cat > conftest.$ac_ext <<EOF
21312 #line 21313 "configure"
21313 #include "confdefs.h"
21314 #include <sys/types.h>
21315 #include <signal.h>
21316 #ifdef signal
21317 #undef signal
21318 #endif
21319 #ifdef __cplusplus
21320 extern "C" void (*signal (int, void (*)(int)))(int);
21321 #else
21322 void (*signal ()) ();
21323 #endif
21324
21325 int main() {
21326 int i;
21327 ; return 0; }
21328 EOF
21329 if { (eval echo configure:21330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21330   rm -rf conftest*
21331   ac_cv_type_signal=void
21332 else
21333   echo "configure: failed program was:" >&5
21334   cat conftest.$ac_ext >&5
21335   rm -rf conftest*
21336   ac_cv_type_signal=int
21337 fi
21338 rm -f conftest*
21339 fi
21340
21341 echo "$ac_t""$ac_cv_type_signal" 1>&6
21342 cat >> confdefs.h <<EOF
21343 #define RETSIGTYPE $ac_cv_type_signal
21344 EOF
21345
21346
21347 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21348 echo "configure:21349: checking for size_t" >&5
21349 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21350   echo $ac_n "(cached) $ac_c" 1>&6
21351 else
21352   cat > conftest.$ac_ext <<EOF
21353 #line 21354 "configure"
21354 #include "confdefs.h"
21355 #include <sys/types.h>
21356 #if STDC_HEADERS
21357 #include <stdlib.h>
21358 #include <stddef.h>
21359 #endif
21360
21361 EOF
21362 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21363   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21364   rm -rf conftest*
21365   eval "ac_cv_type_size_t=yes"
21366 else
21367   rm -rf conftest*
21368   eval "ac_cv_type_size_t=no"
21369 fi
21370 rm -f conftest*
21371
21372 fi
21373 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21374   echo "$ac_t""yes" 1>&6
21375 else
21376   echo "$ac_t""no" 1>&6
21377   cat >> confdefs.h <<EOF
21378 #define size_t unsigned
21379 EOF
21380
21381 fi
21382
21383
21384 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21385 echo "configure:21386: checking for ssize_t" >&5
21386 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21387   echo $ac_n "(cached) $ac_c" 1>&6
21388 else
21389   cat > conftest.$ac_ext <<EOF
21390 #line 21391 "configure"
21391 #include "confdefs.h"
21392 #include <sys/types.h>
21393 #if STDC_HEADERS
21394 #include <stdlib.h>
21395 #include <stddef.h>
21396 #endif
21397
21398 EOF
21399 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21400   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21401   rm -rf conftest*
21402   eval "ac_cv_type_ssize_t=yes"
21403 else
21404   rm -rf conftest*
21405   eval "ac_cv_type_ssize_t=no"
21406 fi
21407 rm -f conftest*
21408
21409 fi
21410 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21411   echo "$ac_t""yes" 1>&6
21412 else
21413   echo "$ac_t""no" 1>&6
21414   cat >> confdefs.h <<EOF
21415 #define ssize_t signed int
21416 EOF
21417
21418 fi
21419
21420 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21421 echo "configure:21422: checking for caddr_t" >&5
21422 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21423   echo $ac_n "(cached) $ac_c" 1>&6
21424 else
21425   cat > conftest.$ac_ext <<EOF
21426 #line 21427 "configure"
21427 #include "confdefs.h"
21428 #include <sys/types.h>
21429 #if STDC_HEADERS
21430 #include <stdlib.h>
21431 #include <stddef.h>
21432 #endif
21433
21434 EOF
21435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21436   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21437   rm -rf conftest*
21438   eval "ac_cv_type_caddr_t=yes"
21439 else
21440   rm -rf conftest*
21441   eval "ac_cv_type_caddr_t=no"
21442 fi
21443 rm -f conftest*
21444
21445 fi
21446 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21447   echo "$ac_t""yes" 1>&6
21448 else
21449   echo "$ac_t""no" 1>&6
21450   cat >> confdefs.h <<EOF
21451 #define caddr_t char *
21452 EOF
21453
21454 fi
21455
21456
21457 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21458 echo "configure:21459: checking for socklen_t" >&5
21459 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21460   echo $ac_n "(cached) $ac_c" 1>&6
21461 else
21462   cat > conftest.$ac_ext <<EOF
21463 #line 21464 "configure"
21464 #include "confdefs.h"
21465
21466 #ifdef HAVE_SYS_TYPES_H
21467 #include <sys/types.h>
21468 #endif
21469 #ifdef HAVE_SYS_SOCKET_H
21470 #include <sys/socket.h>
21471 #endif
21472
21473 int main() {
21474 socklen_t len;
21475 ; return 0; }
21476 EOF
21477 if { (eval echo configure:21478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21478   rm -rf conftest*
21479   ol_cv_type_socklen_t=yes
21480 else
21481   echo "configure: failed program was:" >&5
21482   cat conftest.$ac_ext >&5
21483   rm -rf conftest*
21484   ol_cv_type_socklen_t=no
21485 fi
21486 rm -f conftest*
21487 fi
21488
21489 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21490   if test $ol_cv_type_socklen_t = no; then
21491     cat >> confdefs.h <<\EOF
21492 #define socklen_t int
21493 EOF
21494
21495   fi
21496  
21497 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21498 echo "configure:21499: checking for member st_blksize in aggregate type struct stat" >&5
21499 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21500   echo $ac_n "(cached) $ac_c" 1>&6
21501 else
21502   cat > conftest.$ac_ext <<EOF
21503 #line 21504 "configure"
21504 #include "confdefs.h"
21505 #include <sys/types.h>
21506 #include <sys/stat.h>
21507 int main() {
21508 struct stat foo; foo.st_blksize;
21509 ; return 0; }
21510 EOF
21511 if { (eval echo configure:21512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21512   rm -rf conftest*
21513   ac_cv_c_struct_member_st_blksize=yes
21514 else
21515   echo "configure: failed program was:" >&5
21516   cat conftest.$ac_ext >&5
21517   rm -rf conftest*
21518   ac_cv_c_struct_member_st_blksize=no
21519 fi
21520 rm -f conftest*
21521 fi
21522
21523 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21524 st_blksize="$ac_cv_c_struct_member_st_blksize"
21525 if test $ac_cv_c_struct_member_st_blksize = yes; then
21526   cat >> confdefs.h <<\EOF
21527 #define HAVE_ST_BLKSIZE 1
21528 EOF
21529
21530 fi
21531
21532 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21533 echo "configure:21534: checking whether time.h and sys/time.h may both be included" >&5
21534 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21535   echo $ac_n "(cached) $ac_c" 1>&6
21536 else
21537   cat > conftest.$ac_ext <<EOF
21538 #line 21539 "configure"
21539 #include "confdefs.h"
21540 #include <sys/types.h>
21541 #include <sys/time.h>
21542 #include <time.h>
21543 int main() {
21544 struct tm *tp;
21545 ; return 0; }
21546 EOF
21547 if { (eval echo configure:21548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21548   rm -rf conftest*
21549   ac_cv_header_time=yes
21550 else
21551   echo "configure: failed program was:" >&5
21552   cat conftest.$ac_ext >&5
21553   rm -rf conftest*
21554   ac_cv_header_time=no
21555 fi
21556 rm -f conftest*
21557 fi
21558
21559 echo "$ac_t""$ac_cv_header_time" 1>&6
21560 if test $ac_cv_header_time = yes; then
21561   cat >> confdefs.h <<\EOF
21562 #define TIME_WITH_SYS_TIME 1
21563 EOF
21564
21565 fi
21566
21567 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21568 echo "configure:21569: checking whether struct tm is in sys/time.h or time.h" >&5
21569 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21570   echo $ac_n "(cached) $ac_c" 1>&6
21571 else
21572   cat > conftest.$ac_ext <<EOF
21573 #line 21574 "configure"
21574 #include "confdefs.h"
21575 #include <sys/types.h>
21576 #include <time.h>
21577 int main() {
21578 struct tm *tp; tp->tm_sec;
21579 ; return 0; }
21580 EOF
21581 if { (eval echo configure:21582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21582   rm -rf conftest*
21583   ac_cv_struct_tm=time.h
21584 else
21585   echo "configure: failed program was:" >&5
21586   cat conftest.$ac_ext >&5
21587   rm -rf conftest*
21588   ac_cv_struct_tm=sys/time.h
21589 fi
21590 rm -f conftest*
21591 fi
21592
21593 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21594 if test $ac_cv_struct_tm = sys/time.h; then
21595   cat >> confdefs.h <<\EOF
21596 #define TM_IN_SYS_TIME 1
21597 EOF
21598
21599 fi
21600
21601 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21602 echo "configure:21603: checking for uid_t in sys/types.h" >&5
21603 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21604   echo $ac_n "(cached) $ac_c" 1>&6
21605 else
21606   cat > conftest.$ac_ext <<EOF
21607 #line 21608 "configure"
21608 #include "confdefs.h"
21609 #include <sys/types.h>
21610 EOF
21611 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21612   egrep "uid_t" >/dev/null 2>&1; then
21613   rm -rf conftest*
21614   ac_cv_type_uid_t=yes
21615 else
21616   rm -rf conftest*
21617   ac_cv_type_uid_t=no
21618 fi
21619 rm -f conftest*
21620
21621 fi
21622
21623 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21624 if test $ac_cv_type_uid_t = no; then
21625   cat >> confdefs.h <<\EOF
21626 #define uid_t int
21627 EOF
21628
21629   cat >> confdefs.h <<\EOF
21630 #define gid_t int
21631 EOF
21632
21633 fi
21634
21635 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21636 echo "configure:21637: checking for sig_atomic_t" >&5
21637 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21638   echo $ac_n "(cached) $ac_c" 1>&6
21639 else
21640   cat > conftest.$ac_ext <<EOF
21641 #line 21642 "configure"
21642 #include "confdefs.h"
21643 #include <signal.h>
21644 int main() {
21645 sig_atomic_t atomic;
21646 ; return 0; }
21647 EOF
21648 if { (eval echo configure:21649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21649   rm -rf conftest*
21650   ol_cv_type_sig_atomic_t=yes
21651 else
21652   echo "configure: failed program was:" >&5
21653   cat conftest.$ac_ext >&5
21654   rm -rf conftest*
21655   ol_cv_type_sig_atomic_t=no
21656 fi
21657 rm -f conftest*
21658 fi
21659
21660 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21661   if test $ol_cv_type_sig_atomic_t = no; then
21662     cat >> confdefs.h <<\EOF
21663 #define sig_atomic_t int
21664 EOF
21665
21666   fi
21667  
21668
21669
21670 # test for pw_gecos in struct passwd
21671 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21672 echo "configure:21673: checking struct passwd for pw_gecos" >&5
21673 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21674   echo $ac_n "(cached) $ac_c" 1>&6
21675 else
21676   
21677         cat > conftest.$ac_ext <<EOF
21678 #line 21679 "configure"
21679 #include "confdefs.h"
21680 #include <pwd.h>
21681 int main() {
21682
21683         struct passwd pwd;
21684         pwd.pw_gecos = pwd.pw_name;
21685
21686 ; return 0; }
21687 EOF
21688 if { (eval echo configure:21689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21689   rm -rf conftest*
21690   ol_cv_struct_passwd_pw_gecos=yes
21691 else
21692   echo "configure: failed program was:" >&5
21693   cat conftest.$ac_ext >&5
21694   rm -rf conftest*
21695   ol_cv_struct_passwd_pw_gecos=no
21696 fi
21697 rm -f conftest*
21698 fi
21699
21700 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21701 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21702         cat >> confdefs.h <<\EOF
21703 #define HAVE_PW_GECOS 1
21704 EOF
21705
21706 fi
21707
21708 # test for pw_passwd in struct passwd
21709 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21710 echo "configure:21711: checking struct passwd for pw_passwd" >&5
21711 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21712   echo $ac_n "(cached) $ac_c" 1>&6
21713 else
21714   
21715         cat > conftest.$ac_ext <<EOF
21716 #line 21717 "configure"
21717 #include "confdefs.h"
21718 #include <pwd.h>
21719 int main() {
21720
21721         struct passwd pwd;
21722         pwd.pw_passwd = pwd.pw_name;
21723
21724 ; return 0; }
21725 EOF
21726 if { (eval echo configure:21727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21727   rm -rf conftest*
21728   ol_cv_struct_passwd_pw_passwd=yes
21729 else
21730   echo "configure: failed program was:" >&5
21731   cat conftest.$ac_ext >&5
21732   rm -rf conftest*
21733   ol_cv_struct_passwd_pw_passwd=no
21734 fi
21735 rm -f conftest*
21736 fi
21737
21738 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21739 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21740         cat >> confdefs.h <<\EOF
21741 #define HAVE_PW_PASSWD 1
21742 EOF
21743
21744 fi
21745
21746
21747 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21748 echo "configure:21749: checking if toupper() requires islower()" >&5
21749 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21750   echo $ac_n "(cached) $ac_c" 1>&6
21751 else
21752   
21753         if test "$cross_compiling" = yes; then
21754   ol_cv_c_upper_lower=safe
21755 else
21756   cat > conftest.$ac_ext <<EOF
21757 #line 21758 "configure"
21758 #include "confdefs.h"
21759
21760 #include <ctype.h>
21761 main()
21762 {
21763         if ('C' == toupper('C'))
21764                 exit(0);
21765         else
21766                 exit(1);
21767 }
21768 EOF
21769 if { (eval echo configure:21770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21770 then
21771   ol_cv_c_upper_lower=no
21772 else
21773   echo "configure: failed program was:" >&5
21774   cat conftest.$ac_ext >&5
21775   rm -fr conftest*
21776   ol_cv_c_upper_lower=yes
21777 fi
21778 rm -fr conftest*
21779 fi
21780
21781 fi
21782
21783 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21784 if test $ol_cv_c_upper_lower != no ; then
21785         cat >> confdefs.h <<\EOF
21786 #define C_UPPER_LOWER 1
21787 EOF
21788
21789 fi
21790
21791 echo $ac_n "checking for working const""... $ac_c" 1>&6
21792 echo "configure:21793: checking for working const" >&5
21793 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21794   echo $ac_n "(cached) $ac_c" 1>&6
21795 else
21796   cat > conftest.$ac_ext <<EOF
21797 #line 21798 "configure"
21798 #include "confdefs.h"
21799
21800 int main() {
21801
21802 /* Ultrix mips cc rejects this.  */
21803 typedef int charset[2]; const charset x;
21804 /* SunOS 4.1.1 cc rejects this.  */
21805 char const *const *ccp;
21806 char **p;
21807 /* NEC SVR4.0.2 mips cc rejects this.  */
21808 struct point {int x, y;};
21809 static struct point const zero = {0,0};
21810 /* AIX XL C 1.02.0.0 rejects this.
21811    It does not let you subtract one const X* pointer from another in an arm
21812    of an if-expression whose if-part is not a constant expression */
21813 const char *g = "string";
21814 ccp = &g + (g ? g-g : 0);
21815 /* HPUX 7.0 cc rejects these. */
21816 ++ccp;
21817 p = (char**) ccp;
21818 ccp = (char const *const *) p;
21819 { /* SCO 3.2v4 cc rejects this.  */
21820   char *t;
21821   char const *s = 0 ? (char *) 0 : (char const *) 0;
21822
21823   *t++ = 0;
21824 }
21825 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21826   int x[] = {25, 17};
21827   const int *foo = &x[0];
21828   ++foo;
21829 }
21830 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21831   typedef const int *iptr;
21832   iptr p = 0;
21833   ++p;
21834 }
21835 { /* AIX XL C 1.02.0.0 rejects this saying
21836      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21837   struct s { int j; const int *ap[3]; };
21838   struct s *b; b->j = 5;
21839 }
21840 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21841   const int foo = 10;
21842 }
21843
21844 ; return 0; }
21845 EOF
21846 if { (eval echo configure:21847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21847   rm -rf conftest*
21848   ac_cv_c_const=yes
21849 else
21850   echo "configure: failed program was:" >&5
21851   cat conftest.$ac_ext >&5
21852   rm -rf conftest*
21853   ac_cv_c_const=no
21854 fi
21855 rm -f conftest*
21856 fi
21857
21858 echo "$ac_t""$ac_cv_c_const" 1>&6
21859 if test $ac_cv_c_const = no; then
21860   cat >> confdefs.h <<\EOF
21861 #define const 
21862 EOF
21863
21864 fi
21865
21866 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21867 echo "configure:21868: checking if compiler understands volatile" >&5
21868 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21869   echo $ac_n "(cached) $ac_c" 1>&6
21870 else
21871   cat > conftest.$ac_ext <<EOF
21872 #line 21873 "configure"
21873 #include "confdefs.h"
21874 int x, y, z;
21875 int main() {
21876 volatile int a; int * volatile b = x ? &y : &z;
21877       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21878       *b = 0;
21879 ; return 0; }
21880 EOF
21881 if { (eval echo configure:21882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21882   rm -rf conftest*
21883   ol_cv_c_volatile=yes
21884 else
21885   echo "configure: failed program was:" >&5
21886   cat conftest.$ac_ext >&5
21887   rm -rf conftest*
21888   ol_cv_c_volatile=no
21889 fi
21890 rm -f conftest*
21891 fi
21892
21893 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21894   if test $ol_cv_c_volatile = yes; then
21895     : 
21896   else
21897     cat >> confdefs.h <<\EOF
21898 #define volatile 
21899 EOF
21900
21901   fi
21902  
21903
21904 if test $cross_compiling = yes ; then
21905         cat >> confdefs.h <<\EOF
21906 #define CROSS_COMPILING 1
21907 EOF
21908
21909 else
21910         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21911 echo "configure:21912: checking whether byte ordering is bigendian" >&5
21912 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21913   echo $ac_n "(cached) $ac_c" 1>&6
21914 else
21915   ac_cv_c_bigendian=unknown
21916 # See if sys/param.h defines the BYTE_ORDER macro.
21917 cat > conftest.$ac_ext <<EOF
21918 #line 21919 "configure"
21919 #include "confdefs.h"
21920 #include <sys/types.h>
21921 #include <sys/param.h>
21922 int main() {
21923
21924 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21925  bogus endian macros
21926 #endif
21927 ; return 0; }
21928 EOF
21929 if { (eval echo configure:21930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21930   rm -rf conftest*
21931   # It does; now see whether it defined to BIG_ENDIAN or not.
21932 cat > conftest.$ac_ext <<EOF
21933 #line 21934 "configure"
21934 #include "confdefs.h"
21935 #include <sys/types.h>
21936 #include <sys/param.h>
21937 int main() {
21938
21939 #if BYTE_ORDER != BIG_ENDIAN
21940  not big endian
21941 #endif
21942 ; return 0; }
21943 EOF
21944 if { (eval echo configure:21945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21945   rm -rf conftest*
21946   ac_cv_c_bigendian=yes
21947 else
21948   echo "configure: failed program was:" >&5
21949   cat conftest.$ac_ext >&5
21950   rm -rf conftest*
21951   ac_cv_c_bigendian=no
21952 fi
21953 rm -f conftest*
21954 else
21955   echo "configure: failed program was:" >&5
21956   cat conftest.$ac_ext >&5
21957 fi
21958 rm -f conftest*
21959 if test $ac_cv_c_bigendian = unknown; then
21960 if test "$cross_compiling" = yes; then
21961     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21962 else
21963   cat > conftest.$ac_ext <<EOF
21964 #line 21965 "configure"
21965 #include "confdefs.h"
21966 main () {
21967   /* Are we little or big endian?  From Harbison&Steele.  */
21968   union
21969   {
21970     long l;
21971     char c[sizeof (long)];
21972   } u;
21973   u.l = 1;
21974   exit (u.c[sizeof (long) - 1] == 1);
21975 }
21976 EOF
21977 if { (eval echo configure:21978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21978 then
21979   ac_cv_c_bigendian=no
21980 else
21981   echo "configure: failed program was:" >&5
21982   cat conftest.$ac_ext >&5
21983   rm -fr conftest*
21984   ac_cv_c_bigendian=yes
21985 fi
21986 rm -fr conftest*
21987 fi
21988
21989 fi
21990 fi
21991
21992 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21993 if test $ac_cv_c_bigendian = yes; then
21994   cat >> confdefs.h <<\EOF
21995 #define WORDS_BIGENDIAN 1
21996 EOF
21997
21998 fi
21999
22000 fi
22001
22002 echo $ac_n "checking size of short""... $ac_c" 1>&6
22003 echo "configure:22004: checking size of short" >&5 
22004 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22005   echo $ac_n "(cached) $ac_c" 1>&6
22006 else
22007   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22008   cat > conftest.$ac_ext <<EOF
22009 #line 22010 "configure"
22010 #include "confdefs.h"
22011 #include "confdefs.h" 
22012 #include <sys/types.h> 
22013  
22014
22015 int main() {
22016 switch (0) case 0: case (sizeof (short) == $ac_size):;
22017 ; return 0; }
22018 EOF
22019 if { (eval echo configure:22020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22020   rm -rf conftest*
22021   ac_cv_sizeof_short=$ac_size
22022 else
22023   echo "configure: failed program was:" >&5
22024   cat conftest.$ac_ext >&5
22025 fi
22026 rm -f conftest* 
22027   if test x$ac_cv_sizeof_short != x ; then break; fi 
22028 done 
22029
22030 fi
22031  
22032 if test x$ac_cv_sizeof_short = x ; then 
22033   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22034 fi 
22035 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22036 cat >> confdefs.h <<EOF
22037 #define SIZEOF_SHORT $ac_cv_sizeof_short
22038 EOF
22039  
22040  
22041 echo $ac_n "checking size of int""... $ac_c" 1>&6
22042 echo "configure:22043: checking size of int" >&5 
22043 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22044   echo $ac_n "(cached) $ac_c" 1>&6
22045 else
22046   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22047   cat > conftest.$ac_ext <<EOF
22048 #line 22049 "configure"
22049 #include "confdefs.h"
22050 #include "confdefs.h" 
22051 #include <sys/types.h> 
22052  
22053
22054 int main() {
22055 switch (0) case 0: case (sizeof (int) == $ac_size):;
22056 ; return 0; }
22057 EOF
22058 if { (eval echo configure:22059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22059   rm -rf conftest*
22060   ac_cv_sizeof_int=$ac_size
22061 else
22062   echo "configure: failed program was:" >&5
22063   cat conftest.$ac_ext >&5
22064 fi
22065 rm -f conftest* 
22066   if test x$ac_cv_sizeof_int != x ; then break; fi 
22067 done 
22068
22069 fi
22070  
22071 if test x$ac_cv_sizeof_int = x ; then 
22072   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22073 fi 
22074 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22075 cat >> confdefs.h <<EOF
22076 #define SIZEOF_INT $ac_cv_sizeof_int
22077 EOF
22078  
22079  
22080 echo $ac_n "checking size of long""... $ac_c" 1>&6
22081 echo "configure:22082: checking size of long" >&5 
22082 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22083   echo $ac_n "(cached) $ac_c" 1>&6
22084 else
22085   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22086   cat > conftest.$ac_ext <<EOF
22087 #line 22088 "configure"
22088 #include "confdefs.h"
22089 #include "confdefs.h" 
22090 #include <sys/types.h> 
22091  
22092
22093 int main() {
22094 switch (0) case 0: case (sizeof (long) == $ac_size):;
22095 ; return 0; }
22096 EOF
22097 if { (eval echo configure:22098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22098   rm -rf conftest*
22099   ac_cv_sizeof_long=$ac_size
22100 else
22101   echo "configure: failed program was:" >&5
22102   cat conftest.$ac_ext >&5
22103 fi
22104 rm -f conftest* 
22105   if test x$ac_cv_sizeof_long != x ; then break; fi 
22106 done 
22107
22108 fi
22109  
22110 if test x$ac_cv_sizeof_long = x ; then 
22111   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22112 fi 
22113 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22114 cat >> confdefs.h <<EOF
22115 #define SIZEOF_LONG $ac_cv_sizeof_long
22116 EOF
22117  
22118
22119
22120 if test "$ac_cv_sizeof_int" -lt 4 ; then
22121         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22122
22123         cat >> confdefs.h <<\EOF
22124 #define LBER_INT_T long
22125 EOF
22126
22127 else
22128         cat >> confdefs.h <<\EOF
22129 #define LBER_INT_T int
22130 EOF
22131
22132 fi
22133
22134 cat >> confdefs.h <<\EOF
22135 #define LBER_LEN_T long
22136 EOF
22137
22138 cat >> confdefs.h <<\EOF
22139 #define LBER_SOCKET_T int
22140 EOF
22141
22142 cat >> confdefs.h <<\EOF
22143 #define LBER_TAG_T long
22144 EOF
22145
22146
22147 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22148 echo "configure:22149: checking for 8-bit clean memcmp" >&5
22149 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22150   echo $ac_n "(cached) $ac_c" 1>&6
22151 else
22152   if test "$cross_compiling" = yes; then
22153   ac_cv_func_memcmp_clean=no
22154 else
22155   cat > conftest.$ac_ext <<EOF
22156 #line 22157 "configure"
22157 #include "confdefs.h"
22158
22159 main()
22160 {
22161   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22162   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22163 }
22164
22165 EOF
22166 if { (eval echo configure:22167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22167 then
22168   ac_cv_func_memcmp_clean=yes
22169 else
22170   echo "configure: failed program was:" >&5
22171   cat conftest.$ac_ext >&5
22172   rm -fr conftest*
22173   ac_cv_func_memcmp_clean=no
22174 fi
22175 rm -fr conftest*
22176 fi
22177
22178 fi
22179
22180 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22181 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22182
22183 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22184 echo "configure:22185: checking for strftime" >&5
22185 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22186   echo $ac_n "(cached) $ac_c" 1>&6
22187 else
22188   cat > conftest.$ac_ext <<EOF
22189 #line 22190 "configure"
22190 #include "confdefs.h"
22191 /* System header to define __stub macros and hopefully few prototypes,
22192     which can conflict with char strftime(); below.  */
22193 #include <assert.h>
22194 /* Override any gcc2 internal prototype to avoid an error.  */
22195 /* We use char because int might match the return type of a gcc2
22196     builtin and then its argument prototype would still apply.  */
22197 char strftime();
22198 char (*f)();
22199
22200 int main() {
22201
22202 /* The GNU C library defines this for functions which it implements
22203     to always fail with ENOSYS.  Some functions are actually named
22204     something starting with __ and the normal name is an alias.  */
22205 #if defined (__stub_strftime) || defined (__stub___strftime)
22206 choke me
22207 #else
22208 f = strftime;
22209 #endif
22210
22211 ; return 0; }
22212 EOF
22213 if { (eval echo configure:22214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22214   rm -rf conftest*
22215   eval "ac_cv_func_strftime=yes"
22216 else
22217   echo "configure: failed program was:" >&5
22218   cat conftest.$ac_ext >&5
22219   rm -rf conftest*
22220   eval "ac_cv_func_strftime=no"
22221 fi
22222 rm -f conftest*
22223 fi
22224
22225 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22226   echo "$ac_t""yes" 1>&6
22227   cat >> confdefs.h <<\EOF
22228 #define HAVE_STRFTIME 1
22229 EOF
22230
22231 else
22232   echo "$ac_t""no" 1>&6
22233 # strftime is in -lintl on SCO UNIX.
22234 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22235 echo "configure:22236: checking for strftime in -lintl" >&5
22236 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22237 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22238   echo $ac_n "(cached) $ac_c" 1>&6
22239 else
22240   ac_save_LIBS="$LIBS"
22241 LIBS="-lintl  $LIBS"
22242 cat > conftest.$ac_ext <<EOF
22243 #line 22244 "configure"
22244 #include "confdefs.h"
22245 /* Override any gcc2 internal prototype to avoid an error.  */
22246 /* We use char because int might match the return type of a gcc2
22247     builtin and then its argument prototype would still apply.  */
22248 char strftime();
22249
22250 int main() {
22251 strftime()
22252 ; return 0; }
22253 EOF
22254 if { (eval echo configure:22255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22255   rm -rf conftest*
22256   eval "ac_cv_lib_$ac_lib_var=yes"
22257 else
22258   echo "configure: failed program was:" >&5
22259   cat conftest.$ac_ext >&5
22260   rm -rf conftest*
22261   eval "ac_cv_lib_$ac_lib_var=no"
22262 fi
22263 rm -f conftest*
22264 LIBS="$ac_save_LIBS"
22265
22266 fi
22267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22268   echo "$ac_t""yes" 1>&6
22269   cat >> confdefs.h <<\EOF
22270 #define HAVE_STRFTIME 1
22271 EOF
22272
22273 LIBS="-lintl $LIBS"
22274 else
22275   echo "$ac_t""no" 1>&6
22276 fi
22277
22278 fi
22279
22280
22281 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22282 echo "configure:22283: checking for inet_aton()" >&5
22283 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22284   echo $ac_n "(cached) $ac_c" 1>&6
22285 else
22286   cat > conftest.$ac_ext <<EOF
22287 #line 22288 "configure"
22288 #include "confdefs.h"
22289
22290 #ifdef HAVE_SYS_TYPES_H
22291 #       include <sys/types.h>
22292 #endif
22293 #ifdef HAVE_SYS_SOCKET_H
22294 #       include <sys/socket.h>
22295 #       ifdef HAVE_SYS_SELECT_H
22296 #               include <sys/select.h>
22297 #       endif
22298 #       include <netinet/in.h>
22299 #       ifdef HAVE_ARPA_INET_H
22300 #               include <arpa/inet.h>
22301 #       endif
22302 #endif
22303
22304 int main() {
22305 struct in_addr in;
22306 int rc = inet_aton( "255.255.255.255", &in );
22307 ; return 0; }
22308 EOF
22309 if { (eval echo configure:22310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22310   rm -rf conftest*
22311   ol_cv_func_inet_aton=yes
22312 else
22313   echo "configure: failed program was:" >&5
22314   cat conftest.$ac_ext >&5
22315   rm -rf conftest*
22316   ol_cv_func_inet_aton=no
22317 fi
22318 rm -f conftest*
22319 fi
22320
22321 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22322   if test $ol_cv_func_inet_aton != no; then
22323     cat >> confdefs.h <<\EOF
22324 #define HAVE_INET_ATON 1
22325 EOF
22326
22327   fi
22328  
22329
22330 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22331 echo "configure:22332: checking for _spawnlp" >&5
22332 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22333   echo $ac_n "(cached) $ac_c" 1>&6
22334 else
22335   cat > conftest.$ac_ext <<EOF
22336 #line 22337 "configure"
22337 #include "confdefs.h"
22338 /* System header to define __stub macros and hopefully few prototypes,
22339     which can conflict with char _spawnlp(); below.  */
22340 #include <assert.h>
22341 /* Override any gcc2 internal prototype to avoid an error.  */
22342 /* We use char because int might match the return type of a gcc2
22343     builtin and then its argument prototype would still apply.  */
22344 char _spawnlp();
22345 char (*f)();
22346
22347 int main() {
22348
22349 /* The GNU C library defines this for functions which it implements
22350     to always fail with ENOSYS.  Some functions are actually named
22351     something starting with __ and the normal name is an alias.  */
22352 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22353 choke me
22354 #else
22355 f = _spawnlp;
22356 #endif
22357
22358 ; return 0; }
22359 EOF
22360 if { (eval echo configure:22361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22361   rm -rf conftest*
22362   eval "ac_cv_func__spawnlp=yes"
22363 else
22364   echo "configure: failed program was:" >&5
22365   cat conftest.$ac_ext >&5
22366   rm -rf conftest*
22367   eval "ac_cv_func__spawnlp=no"
22368 fi
22369 rm -f conftest*
22370 fi
22371
22372 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22373   echo "$ac_t""yes" 1>&6
22374   cat >> confdefs.h <<\EOF
22375 #define HAVE_SPAWNLP 1
22376 EOF
22377
22378 else
22379   echo "$ac_t""no" 1>&6
22380 fi
22381
22382
22383 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22384 echo "configure:22385: checking for _snprintf" >&5
22385 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22386   echo $ac_n "(cached) $ac_c" 1>&6
22387 else
22388   cat > conftest.$ac_ext <<EOF
22389 #line 22390 "configure"
22390 #include "confdefs.h"
22391 /* System header to define __stub macros and hopefully few prototypes,
22392     which can conflict with char _snprintf(); below.  */
22393 #include <assert.h>
22394 /* Override any gcc2 internal prototype to avoid an error.  */
22395 /* We use char because int might match the return type of a gcc2
22396     builtin and then its argument prototype would still apply.  */
22397 char _snprintf();
22398 char (*f)();
22399
22400 int main() {
22401
22402 /* The GNU C library defines this for functions which it implements
22403     to always fail with ENOSYS.  Some functions are actually named
22404     something starting with __ and the normal name is an alias.  */
22405 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22406 choke me
22407 #else
22408 f = _snprintf;
22409 #endif
22410
22411 ; return 0; }
22412 EOF
22413 if { (eval echo configure:22414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22414   rm -rf conftest*
22415   eval "ac_cv_func__snprintf=yes"
22416 else
22417   echo "configure: failed program was:" >&5
22418   cat conftest.$ac_ext >&5
22419   rm -rf conftest*
22420   eval "ac_cv_func__snprintf=no"
22421 fi
22422 rm -f conftest*
22423 fi
22424
22425 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22426   echo "$ac_t""yes" 1>&6
22427   ac_cv_func_snprintf=yes
22428         cat >> confdefs.h <<\EOF
22429 #define snprintf _snprintf
22430 EOF
22431
22432
22433 else
22434   echo "$ac_t""no" 1>&6
22435 fi
22436
22437
22438 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22439 echo "configure:22440: checking for _vsnprintf" >&5
22440 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22441   echo $ac_n "(cached) $ac_c" 1>&6
22442 else
22443   cat > conftest.$ac_ext <<EOF
22444 #line 22445 "configure"
22445 #include "confdefs.h"
22446 /* System header to define __stub macros and hopefully few prototypes,
22447     which can conflict with char _vsnprintf(); below.  */
22448 #include <assert.h>
22449 /* Override any gcc2 internal prototype to avoid an error.  */
22450 /* We use char because int might match the return type of a gcc2
22451     builtin and then its argument prototype would still apply.  */
22452 char _vsnprintf();
22453 char (*f)();
22454
22455 int main() {
22456
22457 /* The GNU C library defines this for functions which it implements
22458     to always fail with ENOSYS.  Some functions are actually named
22459     something starting with __ and the normal name is an alias.  */
22460 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22461 choke me
22462 #else
22463 f = _vsnprintf;
22464 #endif
22465
22466 ; return 0; }
22467 EOF
22468 if { (eval echo configure:22469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22469   rm -rf conftest*
22470   eval "ac_cv_func__vsnprintf=yes"
22471 else
22472   echo "configure: failed program was:" >&5
22473   cat conftest.$ac_ext >&5
22474   rm -rf conftest*
22475   eval "ac_cv_func__vsnprintf=no"
22476 fi
22477 rm -f conftest*
22478 fi
22479
22480 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22481   echo "$ac_t""yes" 1>&6
22482   ac_cv_func_vsnprintf=yes
22483         cat >> confdefs.h <<\EOF
22484 #define vsnprintf _vsnprintf
22485 EOF
22486
22487
22488 else
22489   echo "$ac_t""no" 1>&6
22490 fi
22491
22492
22493 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22494 echo "configure:22495: checking for vprintf" >&5
22495 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22496   echo $ac_n "(cached) $ac_c" 1>&6
22497 else
22498   cat > conftest.$ac_ext <<EOF
22499 #line 22500 "configure"
22500 #include "confdefs.h"
22501 /* System header to define __stub macros and hopefully few prototypes,
22502     which can conflict with char vprintf(); below.  */
22503 #include <assert.h>
22504 /* Override any gcc2 internal prototype to avoid an error.  */
22505 /* We use char because int might match the return type of a gcc2
22506     builtin and then its argument prototype would still apply.  */
22507 char vprintf();
22508 char (*f)();
22509
22510 int main() {
22511
22512 /* The GNU C library defines this for functions which it implements
22513     to always fail with ENOSYS.  Some functions are actually named
22514     something starting with __ and the normal name is an alias.  */
22515 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22516 choke me
22517 #else
22518 f = vprintf;
22519 #endif
22520
22521 ; return 0; }
22522 EOF
22523 if { (eval echo configure:22524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22524   rm -rf conftest*
22525   eval "ac_cv_func_vprintf=yes"
22526 else
22527   echo "configure: failed program was:" >&5
22528   cat conftest.$ac_ext >&5
22529   rm -rf conftest*
22530   eval "ac_cv_func_vprintf=no"
22531 fi
22532 rm -f conftest*
22533 fi
22534
22535 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22536   echo "$ac_t""yes" 1>&6
22537   cat >> confdefs.h <<\EOF
22538 #define HAVE_VPRINTF 1
22539 EOF
22540
22541 else
22542   echo "$ac_t""no" 1>&6
22543 fi
22544
22545 if test "$ac_cv_func_vprintf" != yes; then
22546 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22547 echo "configure:22548: checking for _doprnt" >&5
22548 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22549   echo $ac_n "(cached) $ac_c" 1>&6
22550 else
22551   cat > conftest.$ac_ext <<EOF
22552 #line 22553 "configure"
22553 #include "confdefs.h"
22554 /* System header to define __stub macros and hopefully few prototypes,
22555     which can conflict with char _doprnt(); below.  */
22556 #include <assert.h>
22557 /* Override any gcc2 internal prototype to avoid an error.  */
22558 /* We use char because int might match the return type of a gcc2
22559     builtin and then its argument prototype would still apply.  */
22560 char _doprnt();
22561 char (*f)();
22562
22563 int main() {
22564
22565 /* The GNU C library defines this for functions which it implements
22566     to always fail with ENOSYS.  Some functions are actually named
22567     something starting with __ and the normal name is an alias.  */
22568 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22569 choke me
22570 #else
22571 f = _doprnt;
22572 #endif
22573
22574 ; return 0; }
22575 EOF
22576 if { (eval echo configure:22577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22577   rm -rf conftest*
22578   eval "ac_cv_func__doprnt=yes"
22579 else
22580   echo "configure: failed program was:" >&5
22581   cat conftest.$ac_ext >&5
22582   rm -rf conftest*
22583   eval "ac_cv_func__doprnt=no"
22584 fi
22585 rm -f conftest*
22586 fi
22587
22588 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22589   echo "$ac_t""yes" 1>&6
22590   cat >> confdefs.h <<\EOF
22591 #define HAVE_DOPRNT 1
22592 EOF
22593
22594 else
22595   echo "$ac_t""no" 1>&6
22596 fi
22597
22598 fi
22599
22600
22601 if test $ac_cv_func_vprintf = yes ; then
22602                 for ac_func in snprintf vsnprintf
22603 do
22604 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22605 echo "configure:22606: checking for $ac_func" >&5
22606 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22607   echo $ac_n "(cached) $ac_c" 1>&6
22608 else
22609   cat > conftest.$ac_ext <<EOF
22610 #line 22611 "configure"
22611 #include "confdefs.h"
22612 /* System header to define __stub macros and hopefully few prototypes,
22613     which can conflict with char $ac_func(); below.  */
22614 #include <assert.h>
22615 /* Override any gcc2 internal prototype to avoid an error.  */
22616 /* We use char because int might match the return type of a gcc2
22617     builtin and then its argument prototype would still apply.  */
22618 char $ac_func();
22619 char (*f)();
22620
22621 int main() {
22622
22623 /* The GNU C library defines this for functions which it implements
22624     to always fail with ENOSYS.  Some functions are actually named
22625     something starting with __ and the normal name is an alias.  */
22626 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22627 choke me
22628 #else
22629 f = $ac_func;
22630 #endif
22631
22632 ; return 0; }
22633 EOF
22634 if { (eval echo configure:22635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22635   rm -rf conftest*
22636   eval "ac_cv_func_$ac_func=yes"
22637 else
22638   echo "configure: failed program was:" >&5
22639   cat conftest.$ac_ext >&5
22640   rm -rf conftest*
22641   eval "ac_cv_func_$ac_func=no"
22642 fi
22643 rm -f conftest*
22644 fi
22645
22646 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22647   echo "$ac_t""yes" 1>&6
22648     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22649   cat >> confdefs.h <<EOF
22650 #define $ac_tr_func 1
22651 EOF
22652  
22653 else
22654   echo "$ac_t""no" 1>&6
22655 fi
22656 done
22657
22658 fi
22659
22660 for ac_func in \
22661         bcopy                   \
22662         closesocket             \
22663         chroot                  \
22664         endgrent                \
22665         endpwent                \
22666         fcntl                   \
22667         flock                   \
22668         fstat                   \
22669         getdtablesize   \
22670         getgrgid                \
22671         gethostname             \
22672         getpass                 \
22673         getpassphrase   \
22674         getpwuid                \
22675         getpwnam                \
22676         getspnam                \
22677         gettimeofday    \
22678         initgroups              \
22679         lockf                   \
22680         memcpy                  \
22681         memmove                 \
22682         mkstemp                 \
22683         mktemp                  \
22684         pipe                    \
22685         read                    \
22686         recv                    \
22687         recvfrom                \
22688         setpwfile               \
22689         setgid                  \
22690         setegid                 \
22691         setsid                  \
22692         setuid                  \
22693         seteuid                 \
22694         sigaction               \
22695         signal                  \
22696         sigset                  \
22697         strdup                  \
22698         strerror                \
22699         strpbrk                 \
22700         strrchr                 \
22701         strsep                  \
22702         strstr                  \
22703         strtol                  \
22704         strtoul                 \
22705         strspn                  \
22706         sysconf                 \
22707         usleep                  \
22708         waitpid                 \
22709         wait4                   \
22710         write                   \
22711         send                    \
22712         sendmsg                 \
22713         sendto                  \
22714
22715 do
22716 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22717 echo "configure:22718: checking for $ac_func" >&5
22718 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22719   echo $ac_n "(cached) $ac_c" 1>&6
22720 else
22721   cat > conftest.$ac_ext <<EOF
22722 #line 22723 "configure"
22723 #include "confdefs.h"
22724 /* System header to define __stub macros and hopefully few prototypes,
22725     which can conflict with char $ac_func(); below.  */
22726 #include <assert.h>
22727 /* Override any gcc2 internal prototype to avoid an error.  */
22728 /* We use char because int might match the return type of a gcc2
22729     builtin and then its argument prototype would still apply.  */
22730 char $ac_func();
22731 char (*f)();
22732
22733 int main() {
22734
22735 /* The GNU C library defines this for functions which it implements
22736     to always fail with ENOSYS.  Some functions are actually named
22737     something starting with __ and the normal name is an alias.  */
22738 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22739 choke me
22740 #else
22741 f = $ac_func;
22742 #endif
22743
22744 ; return 0; }
22745 EOF
22746 if { (eval echo configure:22747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22747   rm -rf conftest*
22748   eval "ac_cv_func_$ac_func=yes"
22749 else
22750   echo "configure: failed program was:" >&5
22751   cat conftest.$ac_ext >&5
22752   rm -rf conftest*
22753   eval "ac_cv_func_$ac_func=no"
22754 fi
22755 rm -f conftest*
22756 fi
22757
22758 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22759   echo "$ac_t""yes" 1>&6
22760     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22761   cat >> confdefs.h <<EOF
22762 #define $ac_tr_func 1
22763 EOF
22764  
22765 else
22766   echo "$ac_t""no" 1>&6
22767 fi
22768 done
22769
22770
22771 for ac_func in getopt getpeereid
22772 do
22773 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22774 echo "configure:22775: checking for $ac_func" >&5
22775 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22776   echo $ac_n "(cached) $ac_c" 1>&6
22777 else
22778   cat > conftest.$ac_ext <<EOF
22779 #line 22780 "configure"
22780 #include "confdefs.h"
22781 /* System header to define __stub macros and hopefully few prototypes,
22782     which can conflict with char $ac_func(); below.  */
22783 #include <assert.h>
22784 /* Override any gcc2 internal prototype to avoid an error.  */
22785 /* We use char because int might match the return type of a gcc2
22786     builtin and then its argument prototype would still apply.  */
22787 char $ac_func();
22788 char (*f)();
22789
22790 int main() {
22791
22792 /* The GNU C library defines this for functions which it implements
22793     to always fail with ENOSYS.  Some functions are actually named
22794     something starting with __ and the normal name is an alias.  */
22795 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22796 choke me
22797 #else
22798 f = $ac_func;
22799 #endif
22800
22801 ; return 0; }
22802 EOF
22803 if { (eval echo configure:22804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22804   rm -rf conftest*
22805   eval "ac_cv_func_$ac_func=yes"
22806 else
22807   echo "configure: failed program was:" >&5
22808   cat conftest.$ac_ext >&5
22809   rm -rf conftest*
22810   eval "ac_cv_func_$ac_func=no"
22811 fi
22812 rm -f conftest*
22813 fi
22814
22815 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22816   echo "$ac_t""yes" 1>&6
22817     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22818   cat >> confdefs.h <<EOF
22819 #define $ac_tr_func 1
22820 EOF
22821  
22822 else
22823   echo "$ac_t""no" 1>&6
22824 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22825 fi
22826 done
22827
22828
22829
22830 if test "$ac_cv_func_getopt" != yes; then
22831         LIBSRCS="$LIBSRCS getopt.c"
22832 fi
22833 if test "$ac_cv_func_getpeereid" != yes; then
22834         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
22835 echo "configure:22836: checking for msg_accrights in msghdr" >&5
22836 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
22837   echo $ac_n "(cached) $ac_c" 1>&6
22838 else
22839   cat > conftest.$ac_ext <<EOF
22840 #line 22841 "configure"
22841 #include "confdefs.h"
22842 #include <sys/socket.h>
22843 int main() {
22844 struct msghdr m; m.msg_accrightslen=0
22845 ; return 0; }
22846 EOF
22847 if { (eval echo configure:22848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22848   rm -rf conftest*
22849   ol_cv_msghdr_msg_accrights=yes
22850 else
22851   echo "configure: failed program was:" >&5
22852   cat conftest.$ac_ext >&5
22853   rm -rf conftest*
22854   ol_cv_msghdr_msg_accrights=no
22855 fi
22856 rm -f conftest*
22857         
22858 fi
22859
22860 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
22861   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
22862         cat >> confdefs.h <<\EOF
22863 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
22864 EOF
22865
22866   fi
22867
22868         LIBSRCS="$LIBSRCS getpeereid.c"
22869 fi
22870 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22871         if test "$ac_cv_func_snprintf" != yes; then
22872                 cat >> confdefs.h <<\EOF
22873 #define snprintf ber_pvt_snprintf
22874 EOF
22875
22876         fi
22877         if test "$ac_cv_func_vsnprintf" != yes; then
22878                 cat >> confdefs.h <<\EOF
22879 #define vsnprintf ber_pvt_vsnprintf
22880 EOF
22881
22882         fi
22883 fi
22884
22885 # Check Configuration
22886 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22887 echo "configure:22888: checking declaration of sys_errlist" >&5
22888 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22889   echo $ac_n "(cached) $ac_c" 1>&6
22890 else
22891   
22892         cat > conftest.$ac_ext <<EOF
22893 #line 22894 "configure"
22894 #include "confdefs.h"
22895
22896 #include <stdio.h>
22897 #include <sys/types.h>
22898 #include <errno.h>
22899 #ifdef WINNT
22900 #include <stdlib.h>
22901 #endif 
22902 int main() {
22903 char *c = (char *) *sys_errlist
22904 ; return 0; }
22905 EOF
22906 if { (eval echo configure:22907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22907   rm -rf conftest*
22908   ol_cv_dcl_sys_errlist=yes
22909         ol_cv_have_sys_errlist=yes
22910 else
22911   echo "configure: failed program was:" >&5
22912   cat conftest.$ac_ext >&5
22913   rm -rf conftest*
22914   ol_cv_dcl_sys_errlist=no
22915 fi
22916 rm -f conftest*
22917 fi
22918
22919 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22920 #
22921 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22922 if test $ol_cv_dcl_sys_errlist = no ; then
22923         cat >> confdefs.h <<\EOF
22924 #define DECL_SYS_ERRLIST 1
22925 EOF
22926
22927
22928         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22929 echo "configure:22930: checking existence of sys_errlist" >&5
22930 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22931   echo $ac_n "(cached) $ac_c" 1>&6
22932 else
22933   
22934                 cat > conftest.$ac_ext <<EOF
22935 #line 22936 "configure"
22936 #include "confdefs.h"
22937 #include <errno.h>
22938 int main() {
22939 char *c = (char *) *sys_errlist
22940 ; return 0; }
22941 EOF
22942 if { (eval echo configure:22943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22943   rm -rf conftest*
22944   ol_cv_have_sys_errlist=yes
22945 else
22946   echo "configure: failed program was:" >&5
22947   cat conftest.$ac_ext >&5
22948   rm -rf conftest*
22949   ol_cv_have_sys_errlist=no
22950 fi
22951 rm -f conftest*
22952 fi
22953
22954 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22955 fi
22956 if test $ol_cv_have_sys_errlist = yes ; then
22957         cat >> confdefs.h <<\EOF
22958 #define HAVE_SYS_ERRLIST 1
22959 EOF
22960
22961 fi
22962
22963
22964
22965 if test "$ol_enable_slapi" != no ; then
22966                         for ac_hdr in ltdl.h
22967 do
22968 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22969 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22970 echo "configure:22971: checking for $ac_hdr" >&5
22971 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22972   echo $ac_n "(cached) $ac_c" 1>&6
22973 else
22974   cat > conftest.$ac_ext <<EOF
22975 #line 22976 "configure"
22976 #include "confdefs.h"
22977 #include <$ac_hdr>
22978 EOF
22979 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22980 { (eval echo configure:22981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22981 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22982 if test -z "$ac_err"; then
22983   rm -rf conftest*
22984   eval "ac_cv_header_$ac_safe=yes"
22985 else
22986   echo "$ac_err" >&5
22987   echo "configure: failed program was:" >&5
22988   cat conftest.$ac_ext >&5
22989   rm -rf conftest*
22990   eval "ac_cv_header_$ac_safe=no"
22991 fi
22992 rm -f conftest*
22993 fi
22994 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22995   echo "$ac_t""yes" 1>&6
22996     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22997   cat >> confdefs.h <<EOF
22998 #define $ac_tr_hdr 1
22999 EOF
23000  
23001 else
23002   echo "$ac_t""no" 1>&6
23003 fi
23004 done
23005
23006
23007         if test $ac_cv_header_ltdl_h != yes ; then
23008                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23009         fi
23010         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23011 echo "configure:23012: checking for lt_dlinit in -lltdl" >&5
23012 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23013 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23014   echo $ac_n "(cached) $ac_c" 1>&6
23015 else
23016   ac_save_LIBS="$LIBS"
23017 LIBS="-lltdl  $LIBS"
23018 cat > conftest.$ac_ext <<EOF
23019 #line 23020 "configure"
23020 #include "confdefs.h"
23021 /* Override any gcc2 internal prototype to avoid an error.  */
23022 /* We use char because int might match the return type of a gcc2
23023     builtin and then its argument prototype would still apply.  */
23024 char lt_dlinit();
23025
23026 int main() {
23027 lt_dlinit()
23028 ; return 0; }
23029 EOF
23030 if { (eval echo configure:23031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23031   rm -rf conftest*
23032   eval "ac_cv_lib_$ac_lib_var=yes"
23033 else
23034   echo "configure: failed program was:" >&5
23035   cat conftest.$ac_ext >&5
23036   rm -rf conftest*
23037   eval "ac_cv_lib_$ac_lib_var=no"
23038 fi
23039 rm -f conftest*
23040 LIBS="$ac_save_LIBS"
23041
23042 fi
23043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23044   echo "$ac_t""yes" 1>&6
23045   
23046                 SLAPI_LIBS=-lltdl
23047                 LIBSLAPI=libslapi.a
23048                 LIBSLAPITOOLS=../libslapi.a
23049                 cat >> confdefs.h <<\EOF
23050 #define HAVE_LIBLTDL 1
23051 EOF
23052
23053         
23054 else
23055   echo "$ac_t""no" 1>&6
23056 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23057 fi
23058
23059
23060         cat >> confdefs.h <<\EOF
23061 #define LDAP_SLAPI 1
23062 EOF
23063
23064 fi
23065
23066 if test "$ol_enable_debug" != no ; then
23067         cat >> confdefs.h <<\EOF
23068 #define LDAP_DEBUG 1
23069 EOF
23070
23071 fi
23072 if test "$ol_enable_syslog" = yes ; then
23073         cat >> confdefs.h <<\EOF
23074 #define LDAP_SYSLOG 1
23075 EOF
23076
23077 fi
23078 if test "$ol_link_kbind" != no ; then
23079         cat >> confdefs.h <<\EOF
23080 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23081 EOF
23082
23083 fi
23084 if test "$ol_enable_proctitle" != no ; then
23085         cat >> confdefs.h <<\EOF
23086 #define LDAP_PROCTITLE 1
23087 EOF
23088
23089 fi
23090 if test "$ol_enable_referrals" != no ; then
23091         cat >> confdefs.h <<\EOF
23092 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23093 EOF
23094
23095 fi
23096 if test "$ol_enable_local" != no; then
23097         cat >> confdefs.h <<\EOF
23098 #define LDAP_PF_LOCAL 1
23099 EOF
23100
23101 fi
23102 if test "$ol_link_ipv6" != no; then
23103         cat >> confdefs.h <<\EOF
23104 #define LDAP_PF_INET6 1
23105 EOF
23106
23107 fi
23108 if test "$ol_enable_cleartext" != no ; then
23109         cat >> confdefs.h <<\EOF
23110 #define SLAPD_CLEARTEXT 1
23111 EOF
23112
23113 fi
23114 if test "$ol_enable_crypt" != no ; then
23115         cat >> confdefs.h <<\EOF
23116 #define SLAPD_CRYPT 1
23117 EOF
23118
23119 fi
23120 if test "$ol_link_kpasswd" != no ; then
23121         cat >> confdefs.h <<\EOF
23122 #define SLAPD_KPASSWD 1
23123 EOF
23124
23125 fi
23126 if test "$ol_link_spasswd" != no ; then
23127         cat >> confdefs.h <<\EOF
23128 #define SLAPD_SPASSWD 1
23129 EOF
23130
23131 fi
23132 if test "$ol_enable_multimaster" != no ; then
23133         cat >> confdefs.h <<\EOF
23134 #define SLAPD_MULTIMASTER 1
23135 EOF
23136
23137 fi
23138 if test "$ol_enable_rlookups" != no ; then
23139         cat >> confdefs.h <<\EOF
23140 #define SLAPD_RLOOKUPS 1
23141 EOF
23142
23143 fi
23144 if test "$ol_enable_aci" != no ; then
23145         cat >> confdefs.h <<\EOF
23146 #define SLAPD_ACI_ENABLED 1
23147 EOF
23148
23149 fi
23150
23151 if test "$ol_link_modules" != no ; then
23152         cat >> confdefs.h <<\EOF
23153 #define SLAPD_MODULES 1
23154 EOF
23155
23156         BUILD_SLAPD=yes
23157         SLAPD_MODULES_LDFLAGS="-dlopen self"
23158 fi
23159
23160 if test "$ol_enable_bdb" != no ; then
23161         cat >> confdefs.h <<\EOF
23162 #define SLAPD_BDB 1
23163 EOF
23164
23165         BUILD_SLAPD=yes
23166         BUILD_BDB=yes
23167         if test "$ol_with_bdb_module" != static ; then
23168                 cat >> confdefs.h <<\EOF
23169 #define SLAPD_BDB_DYNAMIC 1
23170 EOF
23171
23172                 BUILD_BDB=mod
23173                 BUILD_BDB_DYNAMIC=shared
23174                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23175         else
23176                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23177         fi
23178 fi
23179
23180 if test "$ol_link_dnssrv" != no ; then
23181         cat >> confdefs.h <<\EOF
23182 #define SLAPD_DNSSRV 1
23183 EOF
23184
23185         BUILD_SLAPD=yes
23186         BUILD_DNSSRV=yes
23187         if test "$ol_with_dnssrv_module" != static ; then
23188                 cat >> confdefs.h <<\EOF
23189 #define SLAPD_DNSSRV_DYNAMIC 1
23190 EOF
23191
23192                 BUILD_DNSSRV=mod
23193                 BUILD_DNSSRV_DYNAMIC=shared
23194                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23195         else
23196                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23197         fi
23198 fi
23199
23200 if test "$ol_enable_hdb" != no ; then
23201         cat >> confdefs.h <<\EOF
23202 #define SLAPD_HDB 1
23203 EOF
23204
23205         BUILD_SLAPD=yes
23206         BUILD_HDB=yes
23207         if test "$ol_with_hdb_module" != static ; then
23208                 cat >> confdefs.h <<\EOF
23209 #define SLAPD_HDB_DYNAMIC 1
23210 EOF
23211
23212                 BUILD_HDB=mod
23213                 BUILD_HDB_DYNAMIC=shared
23214                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23215         else
23216                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23217         fi
23218 fi
23219
23220 if test "$ol_enable_ldap" != no ; then
23221         cat >> confdefs.h <<\EOF
23222 #define SLAPD_LDAP 1
23223 EOF
23224
23225         BUILD_SLAPD=yes
23226         BUILD_LDAP=yes
23227         if test "$ol_with_ldap_module" != static ; then
23228                 cat >> confdefs.h <<\EOF
23229 #define SLAPD_LDAP_DYNAMIC 1
23230 EOF
23231
23232                 BUILD_LDAP=mod
23233                 BUILD_LDAP_DYNAMIC=shared
23234                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23235         else
23236                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23237         fi
23238 fi
23239
23240 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23241         cat >> confdefs.h <<\EOF
23242 #define SLAPD_LDBM 1
23243 EOF
23244
23245         BUILD_SLAPD=yes
23246         BUILD_LDBM=yes
23247         if test "$ol_with_ldbm_module" != static ; then
23248                 cat >> confdefs.h <<\EOF
23249 #define SLAPD_LDBM_DYNAMIC 1
23250 EOF
23251
23252                 BUILD_LDBM=mod
23253                 BUILD_LDBM_DYNAMIC=shared
23254                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23255         else
23256                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23257         fi
23258 fi
23259
23260 if test "$ol_enable_meta" != no ; then
23261         if test "$ol_enable_ldap" = no ; then
23262                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23263         fi
23264         if test "$ol_enable_rewrite" = no ; then
23265                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23266         fi
23267         cat >> confdefs.h <<\EOF
23268 #define SLAPD_META 1
23269 EOF
23270
23271         BUILD_SLAPD=yes
23272         BUILD_META=yes
23273         BUILD_REWRITE=yes
23274         if test "$ol_with_meta_module" != static ; then
23275                 cat >> confdefs.h <<\EOF
23276 #define SLAPD_META_DYNAMIC 1
23277 EOF
23278
23279                 BUILD_META=mod
23280                 BUILD_META_DYNAMIC=shared
23281                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23282         else
23283                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23284         fi
23285 fi
23286
23287 if test "$ol_enable_monitor" != no ; then
23288         cat >> confdefs.h <<\EOF
23289 #define SLAPD_MONITOR 1
23290 EOF
23291
23292         BUILD_SLAPD=yes
23293         BUILD_MONITOR=yes
23294         if test "$ol_with_monitor_module" != static ; then
23295                 cat >> confdefs.h <<\EOF
23296 #define SLAPD_MONITOR_DYNAMIC 1
23297 EOF
23298
23299                 BUILD_MONITOR=mod
23300                 BUILD_MONITOR_DYNAMIC=shared
23301                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23302         else
23303                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23304         fi
23305 fi
23306
23307 if test "$ol_enable_null" != no ; then
23308         cat >> confdefs.h <<\EOF
23309 #define SLAPD_NULL 1
23310 EOF
23311
23312         BUILD_SLAPD=yes
23313         BUILD_NULL=yes
23314         if test "$ol_with_null_module" != static ; then
23315                 cat >> confdefs.h <<\EOF
23316 #define SLAPD_NULL_DYNAMIC 1
23317 EOF
23318
23319                 BUILD_NULL=mod
23320                 BUILD_NULL_DYNAMIC=shared
23321                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23322         else
23323                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23324         fi
23325 fi
23326
23327 if test "$ol_enable_passwd" != no ; then
23328         cat >> confdefs.h <<\EOF
23329 #define SLAPD_PASSWD 1
23330 EOF
23331
23332         BUILD_SLAPD=yes
23333         BUILD_PASSWD=yes
23334         if test "$ol_with_passwd_module" != static ; then
23335                 cat >> confdefs.h <<\EOF
23336 #define SLAPD_PASSWD_DYNAMIC 1
23337 EOF
23338
23339                 BUILD_PASSWD=mod
23340                 BUILD_PASSWD_DYNAMIC=shared
23341                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23342         else
23343                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23344         fi
23345 fi
23346
23347 if test "$ol_link_perl" != no ; then
23348         cat >> confdefs.h <<\EOF
23349 #define SLAPD_PERL 1
23350 EOF
23351
23352         BUILD_SLAPD=yes
23353         BUILD_PERL=yes
23354         if test "$ol_with_perl_module" != static ; then
23355                 cat >> confdefs.h <<\EOF
23356 #define SLAPD_PERL_DYNAMIC 1
23357 EOF
23358
23359                 BUILD_PERL=mod
23360                 BUILD_PERL_DYNAMIC=shared
23361                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23362         else
23363                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23364         fi
23365 fi
23366
23367 if test "$ol_enable_shell" != no ; then
23368         if test "$ol_link_thread" != no ; then
23369                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23370         fi
23371         cat >> confdefs.h <<\EOF
23372 #define SLAPD_SHELL 1
23373 EOF
23374
23375         BUILD_SLAPD=yes
23376         BUILD_SHELL=yes
23377         if test "$ol_with_shell_module" != static ; then
23378                 cat >> confdefs.h <<\EOF
23379 #define SLAPD_SHELL_DYNAMIC 1
23380 EOF
23381
23382                 BUILD_SHELL=mod
23383                 BUILD_SHELL_DYNAMIC=shared
23384                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23385         else
23386                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23387         fi
23388 fi
23389
23390 if test "$ol_enable_tcl" != no ; then
23391         cat >> confdefs.h <<\EOF
23392 #define SLAPD_TCL 1
23393 EOF
23394
23395         BUILD_SLAPD=yes
23396         BUILD_TCL=yes
23397         if test "$ol_with_tcl_module" != static; then
23398                 cat >> confdefs.h <<\EOF
23399 #define SLAPD_TCL_DYNAMIC 1
23400 EOF
23401
23402                 BUILD_TCL=mod
23403                 BUILD_TCL_DYNAMIC=shared
23404                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
23405         else
23406                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
23407         fi
23408 fi
23409
23410 if test "$ol_link_sql" != no ; then
23411         cat >> confdefs.h <<\EOF
23412 #define SLAPD_SQL 1
23413 EOF
23414
23415         BUILD_SLAPD=yes
23416         BUILD_SQL=yes
23417         if test "$ol_with_sql_module" != static; then
23418                 cat >> confdefs.h <<\EOF
23419 #define SLAPD_SQL_DYNAMIC 1
23420 EOF
23421
23422                 BUILD_SQL=mod
23423                 BUILD_SQL_DYNAMIC=shared
23424                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23425         else
23426                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23427         fi
23428 fi
23429
23430 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23431         $BUILD_SLAPD = yes ; then
23432         BUILD_SLURPD=yes
23433 fi
23434
23435 if test "$ol_enable_rewrite" != no ; then
23436         cat >> confdefs.h <<\EOF
23437 #define ENABLE_REWRITE 1
23438 EOF
23439
23440         BUILD_REWRITE=yes
23441 fi
23442
23443 if test "$ol_enable_slapi" != no ; then
23444         cat >> confdefs.h <<\EOF
23445 #define ENABLE_SLAPI 1
23446 EOF
23447
23448         BUILD_SLAPI=yes
23449         SLAPD_SLAPI_DEPEND=libslapi.a
23450 fi
23451
23452
23453
23454 if test "$ac_cv_mingw32" = yes ; then
23455         PLAT=NT
23456         SLAPD_MODULES_LDFLAGS=
23457 else
23458         PLAT=UNIX
23459 fi
23460
23461 if test -z "$SLAPD_STATIC_BACKENDS"; then
23462         SLAPD_NO_STATIC='#'
23463 else
23464         SLAPD_NO_STATIC=
23465 fi
23466
23467
23468
23469
23470
23471
23472   
23473   
23474   
23475   
23476   
23477   
23478   
23479   
23480   
23481   
23482   
23483   
23484   
23485   
23486   
23487   
23488   
23489   
23490   
23491   
23492   
23493   
23494   
23495   
23496   
23497   
23498   
23499   
23500
23501
23502
23503
23504
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 # Check whether --with-xxinstall or --without-xxinstall was given.
23541 if test "${with_xxinstall+set}" = set; then
23542   withval="$with_xxinstall"
23543   :
23544 fi
23545
23546
23547
23548 trap '' 1 2 15
23549
23550 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23551
23552 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23553 # Let make expand exec_prefix.
23554 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23555
23556 # Any assignment to VPATH causes Sun make to only execute
23557 # the first set of double-colon rules, so remove it if not needed.
23558 # If there is a colon in the path, we need to keep it.
23559 if test "x$srcdir" = x.; then
23560   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23561 fi
23562
23563 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23564
23565 DEFS=-DHAVE_CONFIG_H
23566
23567 # Without the "./", some shells look in PATH for config.status.
23568 : ${CONFIG_STATUS=./config.status}
23569
23570 echo creating $CONFIG_STATUS
23571 rm -f $CONFIG_STATUS
23572 cat > $CONFIG_STATUS <<EOF
23573 #! /bin/sh
23574 # Generated automatically by configure.
23575 # Run this file to recreate the current configuration.
23576 # This directory was configured as follows,
23577 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23578 #
23579 # $0 $ac_configure_args
23580 #
23581 # Compiler output produced by configure, useful for debugging
23582 # configure, is in ./config.log if it exists.
23583
23584 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23585 for ac_option
23586 do
23587   case "\$ac_option" in
23588   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23589     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23590     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23591   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23592     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23593     exit 0 ;;
23594   -help | --help | --hel | --he | --h)
23595     echo "\$ac_cs_usage"; exit 0 ;;
23596   *) echo "\$ac_cs_usage"; exit 1 ;;
23597   esac
23598 done
23599
23600 ac_given_srcdir=$srcdir
23601 ac_given_INSTALL="$INSTALL"
23602
23603 trap 'rm -fr `echo "\
23604 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23605 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23606 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23607 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23608 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23609 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23610 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23611 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23612 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23613 include/Makefile:build/top.mk:include/Makefile.in \
23614 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23615 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23616 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23617 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23618 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23619 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23620 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23621 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23622 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23623 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23624 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23625 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23626 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23627 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23628 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23629 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23630 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23631 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23632 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23633 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23634 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23635 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23636 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23637 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23638 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23639 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23640 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23641 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23642 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23643 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23644 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23645  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23646 EOF
23647 cat >> $CONFIG_STATUS <<EOF
23648
23649 # Protect against being on the right side of a sed subst in config.status.
23650 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23651  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23652 $ac_vpsub
23653 $extrasub
23654 s%@SHELL@%$SHELL%g
23655 s%@CFLAGS@%$CFLAGS%g
23656 s%@CPPFLAGS@%$CPPFLAGS%g
23657 s%@CXXFLAGS@%$CXXFLAGS%g
23658 s%@FFLAGS@%$FFLAGS%g
23659 s%@DEFS@%$DEFS%g
23660 s%@LDFLAGS@%$LDFLAGS%g
23661 s%@LIBS@%$LIBS%g
23662 s%@exec_prefix@%$exec_prefix%g
23663 s%@prefix@%$prefix%g
23664 s%@program_transform_name@%$program_transform_name%g
23665 s%@bindir@%$bindir%g
23666 s%@sbindir@%$sbindir%g
23667 s%@libexecdir@%$libexecdir%g
23668 s%@datadir@%$datadir%g
23669 s%@sysconfdir@%$sysconfdir%g
23670 s%@sharedstatedir@%$sharedstatedir%g
23671 s%@localstatedir@%$localstatedir%g
23672 s%@libdir@%$libdir%g
23673 s%@includedir@%$includedir%g
23674 s%@oldincludedir@%$oldincludedir%g
23675 s%@infodir@%$infodir%g
23676 s%@mandir@%$mandir%g
23677 s%@host@%$host%g
23678 s%@host_alias@%$host_alias%g
23679 s%@host_cpu@%$host_cpu%g
23680 s%@host_vendor@%$host_vendor%g
23681 s%@host_os@%$host_os%g
23682 s%@target@%$target%g
23683 s%@target_alias@%$target_alias%g
23684 s%@target_cpu@%$target_cpu%g
23685 s%@target_vendor@%$target_vendor%g
23686 s%@target_os@%$target_os%g
23687 s%@build@%$build%g
23688 s%@build_alias@%$build_alias%g
23689 s%@build_cpu@%$build_cpu%g
23690 s%@build_vendor@%$build_vendor%g
23691 s%@build_os@%$build_os%g
23692 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23693 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23694 s%@INSTALL_DATA@%$INSTALL_DATA%g
23695 s%@PACKAGE@%$PACKAGE%g
23696 s%@VERSION@%$VERSION%g
23697 s%@ACLOCAL@%$ACLOCAL%g
23698 s%@AUTOCONF@%$AUTOCONF%g
23699 s%@AUTOMAKE@%$AUTOMAKE%g
23700 s%@AUTOHEADER@%$AUTOHEADER%g
23701 s%@MAKEINFO@%$MAKEINFO%g
23702 s%@install_sh@%$install_sh%g
23703 s%@AMTAR@%$AMTAR%g
23704 s%@AWK@%$AWK%g
23705 s%@AMTARFLAGS@%$AMTARFLAGS%g
23706 s%@SET_MAKE@%$SET_MAKE%g
23707 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23708 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23709 s%@top_builddir@%$top_builddir%g
23710 s%@ldap_subdir@%$ldap_subdir%g
23711 s%@CC@%$CC%g
23712 s%@AR@%$AR%g
23713 s%@LN_S@%$LN_S%g
23714 s%@OBJEXT@%$OBJEXT%g
23715 s%@EXEEXT@%$EXEEXT%g
23716 s%@ECHO@%$ECHO%g
23717 s%@RANLIB@%$RANLIB%g
23718 s%@STRIP@%$STRIP%g
23719 s%@DLLTOOL@%$DLLTOOL%g
23720 s%@AS@%$AS%g
23721 s%@OBJDUMP@%$OBJDUMP%g
23722 s%@CPP@%$CPP%g
23723 s%@LIBTOOL@%$LIBTOOL%g
23724 s%@LN_H@%$LN_H%g
23725 s%@PERLBIN@%$PERLBIN%g
23726 s%@OL_MKDEP@%$OL_MKDEP%g
23727 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23728 s%@LTSTATIC@%$LTSTATIC%g
23729 s%@LIBOBJS@%$LIBOBJS%g
23730 s%@LIBSRCS@%$LIBSRCS%g
23731 s%@PLAT@%$PLAT%g
23732 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23733 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23734 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23735 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23736 s%@BUILD_BDB@%$BUILD_BDB%g
23737 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23738 s%@BUILD_HDB@%$BUILD_HDB%g
23739 s%@BUILD_LDAP@%$BUILD_LDAP%g
23740 s%@BUILD_LDBM@%$BUILD_LDBM%g
23741 s%@BUILD_META@%$BUILD_META%g
23742 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23743 s%@BUILD_NULL@%$BUILD_NULL%g
23744 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23745 s%@BUILD_PERL@%$BUILD_PERL%g
23746 s%@BUILD_SHELL@%$BUILD_SHELL%g
23747 s%@BUILD_SQL@%$BUILD_SQL%g
23748 s%@BUILD_TCL@%$BUILD_TCL%g
23749 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23750 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23751 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
23752 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23753 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23754 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23755 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23756 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23757 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23758 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23759 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23760 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23761 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
23762 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23763 s%@LDAP_LIBS@%$LDAP_LIBS%g
23764 s%@LDIF_LIBS@%$LDIF_LIBS%g
23765 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23766 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23767 s%@LDBM_LIBS@%$LDBM_LIBS%g
23768 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23769 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23770 s%@WRAP_LIBS@%$WRAP_LIBS%g
23771 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
23772 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23773 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23774 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23775 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23776 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23777 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23778 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23779 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23780 s%@KRB4_LIBS@%$KRB4_LIBS%g
23781 s%@KRB5_LIBS@%$KRB5_LIBS%g
23782 s%@SASL_LIBS@%$SASL_LIBS%g
23783 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23784 s%@TLS_LIBS@%$TLS_LIBS%g
23785 s%@MODULES_LIBS@%$MODULES_LIBS%g
23786 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
23787 s%@LIBSLAPI@%$LIBSLAPI%g
23788 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
23789 s%@AUTH_LIBS@%$AUTH_LIBS%g
23790 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23791 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23792 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23793 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23794
23795 CEOF
23796 EOF
23797
23798 cat >> $CONFIG_STATUS <<\EOF
23799
23800 # Split the substitutions into bite-sized pieces for seds with
23801 # small command number limits, like on Digital OSF/1 and HP-UX.
23802 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23803 ac_file=1 # Number of current file.
23804 ac_beg=1 # First line for current file.
23805 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23806 ac_more_lines=:
23807 ac_sed_cmds=""
23808 while $ac_more_lines; do
23809   if test $ac_beg -gt 1; then
23810     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23811   else
23812     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23813   fi
23814   if test ! -s conftest.s$ac_file; then
23815     ac_more_lines=false
23816     rm -f conftest.s$ac_file
23817   else
23818     if test -z "$ac_sed_cmds"; then
23819       ac_sed_cmds="sed -f conftest.s$ac_file"
23820     else
23821       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23822     fi
23823     ac_file=`expr $ac_file + 1`
23824     ac_beg=$ac_end
23825     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23826   fi
23827 done
23828 if test -z "$ac_sed_cmds"; then
23829   ac_sed_cmds=cat
23830 fi
23831 EOF
23832
23833 cat >> $CONFIG_STATUS <<EOF
23834
23835 CONFIG_FILES=\${CONFIG_FILES-"\
23836 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23837 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23838 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23839 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23840 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23841 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23842 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23843 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23844 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23845 include/Makefile:build/top.mk:include/Makefile.in \
23846 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23847 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23848 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23849 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23850 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23851 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23852 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23853 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23854 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23855 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23856 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23857 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23858 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23859 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23860 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23861 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23862 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23863 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23864 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23865 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23866 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23867 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23868 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23869 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23870 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23871 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23872 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23873 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23874 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23875 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23876 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23877 "}
23878 EOF
23879 cat >> $CONFIG_STATUS <<\EOF
23880 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23881   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23882   case "$ac_file" in
23883   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23884        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23885   *) ac_file_in="${ac_file}.in" ;;
23886   esac
23887
23888   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23889
23890   # Remove last slash and all that follows it.  Not all systems have dirname.
23891   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23892   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23893     # The file is in a subdirectory.
23894     test ! -d "$ac_dir" && mkdir "$ac_dir"
23895     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23896     # A "../" for each directory in $ac_dir_suffix.
23897     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23898   else
23899     ac_dir_suffix= ac_dots=
23900   fi
23901
23902   case "$ac_given_srcdir" in
23903   .)  srcdir=.
23904       if test -z "$ac_dots"; then top_srcdir=.
23905       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23906   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23907   *) # Relative path.
23908     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23909     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23910   esac
23911
23912   case "$ac_given_INSTALL" in
23913   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23914   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23915   esac
23916
23917   echo creating "$ac_file"
23918   rm -f "$ac_file"
23919   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23920   case "$ac_file" in
23921   *[Mm]akefile*) ac_comsub="1i\\
23922 # $configure_input" ;;
23923   *) ac_comsub= ;;
23924   esac
23925
23926   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23927   sed -e "$ac_comsub
23928 s%@configure_input@%$configure_input%g
23929 s%@srcdir@%$srcdir%g
23930 s%@top_srcdir@%$top_srcdir%g
23931 s%@INSTALL@%$INSTALL%g
23932 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23933 fi; done
23934 rm -f conftest.s*
23935
23936 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23937 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23938 #
23939 # ac_d sets the value in "#define NAME VALUE" lines.
23940 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23941 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23942 ac_dC='\3'
23943 ac_dD='%g'
23944 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23945 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23946 ac_uB='\([      ]\)%\1#\2define\3'
23947 ac_uC=' '
23948 ac_uD='\4%g'
23949 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23950 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23951 ac_eB='$%\1#\2define\3'
23952 ac_eC=' '
23953 ac_eD='%g'
23954
23955 if test "${CONFIG_HEADERS+set}" != set; then
23956 EOF
23957 cat >> $CONFIG_STATUS <<EOF
23958   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23959 EOF
23960 cat >> $CONFIG_STATUS <<\EOF
23961 fi
23962 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23963   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23964   case "$ac_file" in
23965   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23966        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23967   *) ac_file_in="${ac_file}.in" ;;
23968   esac
23969
23970   echo creating $ac_file
23971
23972   rm -f conftest.frag conftest.in conftest.out
23973   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23974   cat $ac_file_inputs > conftest.in
23975
23976 EOF
23977
23978 # Transform confdefs.h into a sed script conftest.vals that substitutes
23979 # the proper values into config.h.in to produce config.h.  And first:
23980 # Protect against being on the right side of a sed subst in config.status.
23981 # Protect against being in an unquoted here document in config.status.
23982 rm -f conftest.vals
23983 cat > conftest.hdr <<\EOF
23984 s/[\\&%]/\\&/g
23985 s%[\\$`]%\\&%g
23986 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23987 s%ac_d%ac_u%gp
23988 s%ac_u%ac_e%gp
23989 EOF
23990 sed -n -f conftest.hdr confdefs.h > conftest.vals
23991 rm -f conftest.hdr
23992
23993 # This sed command replaces #undef with comments.  This is necessary, for
23994 # example, in the case of _POSIX_SOURCE, which is predefined and required
23995 # on some systems where configure will not decide to define it.
23996 cat >> conftest.vals <<\EOF
23997 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23998 EOF
23999
24000 # Break up conftest.vals because some shells have a limit on
24001 # the size of here documents, and old seds have small limits too.
24002
24003 rm -f conftest.tail
24004 while :
24005 do
24006   ac_lines=`grep -c . conftest.vals`
24007   # grep -c gives empty output for an empty file on some AIX systems.
24008   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24009   # Write a limited-size here document to conftest.frag.
24010   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24011   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24012   echo 'CEOF
24013   sed -f conftest.frag conftest.in > conftest.out
24014   rm -f conftest.in
24015   mv conftest.out conftest.in
24016 ' >> $CONFIG_STATUS
24017   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24018   rm -f conftest.vals
24019   mv conftest.tail conftest.vals
24020 done
24021 rm -f conftest.vals
24022
24023 cat >> $CONFIG_STATUS <<\EOF
24024   rm -f conftest.frag conftest.h
24025   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24026   cat conftest.in >> conftest.h
24027   rm -f conftest.in
24028   if cmp -s $ac_file conftest.h 2>/dev/null; then
24029     echo "$ac_file is unchanged"
24030     rm -f conftest.h
24031   else
24032     # Remove last slash and all that follows it.  Not all systems have dirname.
24033       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24034       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24035       # The file is in a subdirectory.
24036       test ! -d "$ac_dir" && mkdir "$ac_dir"
24037     fi
24038     rm -f $ac_file
24039     mv conftest.h $ac_file
24040   fi
24041 fi; done
24042
24043 EOF
24044 cat >> $CONFIG_STATUS <<EOF
24045
24046 EOF
24047 cat >> $CONFIG_STATUS <<\EOF
24048
24049 date > stamp-h
24050 echo Please run \"make depend\" to build dependencies
24051
24052 exit 0
24053 EOF
24054 chmod +x $CONFIG_STATUS
24055 rm -fr confdefs* $ac_clean_files
24056 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24057