]> git.sur5r.net Git - openldap/blob - configure
Add -ldb41 linking
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.455 2003/01/03 19:20:47 kurt Exp  
4
5 # Copyright 1998-2003 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2003 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-proctitle      enable proctitle support [yes]"
36 ac_help="$ac_help
37   --enable-ipv6           enable IPv6 support [auto]"
38 ac_help="$ac_help
39   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
40 ac_help="$ac_help
41   --enable-x-compile      enable cross compiling [no]"
42 ac_help="$ac_help
43   --with-cyrus-sasl       with Cyrus SASL support [auto]"
44 ac_help="$ac_help
45   --with-fetch            with fetch(3) URL support [auto]"
46 ac_help="$ac_help
47   --with-kerberos         with Kerberos support [auto]"
48 ac_help="$ac_help
49   --with-readline         with readline 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-dynamic      enable linking built binaries with dynamic libs [no]"
69 ac_help="$ac_help
70     --enable-kpasswd      enable Kerberos password verification [no]"
71 ac_help="$ac_help
72     --enable-lmpasswd     enable LAN Manager passwords [no]"
73 ac_help="$ac_help
74     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
75 ac_help="$ac_help
76     --enable-modules      enable dynamic module support [no]"
77 ac_help="$ac_help
78     --enable-phonetic     enable phonetic/soundex [no]"
79 ac_help="$ac_help
80     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
81 ac_help="$ac_help
82     --enable-rlookups     enable reverse lookups of client hostnames [no]"
83 ac_help="$ac_help
84     --enable-slp          enable SLPv2 support [no]"
85 ac_help="$ac_help
86     --enable-wrappers     enable tcp wrapper support [no]"
87 ac_help="$ac_help
88     --enable-slapi   enable installation of slapi library [no]"
89 ac_help="$ac_help
90     --enable-bdb          enable Berkeley DB backend [yes]"
91 ac_help="$ac_help
92     --with-bdb-module     module type static|dynamic [static]"
93 ac_help="$ac_help
94     --enable-dnssrv       enable dnssrv backend [no]"
95 ac_help="$ac_help
96     --with-dnssrv-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-syslog
1418         # Check whether --enable-syslog or --disable-syslog was given.
1419 if test "${enable_syslog+set}" = set; then
1420   enableval="$enable_syslog"
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-syslog" 1>&2; exit 1; }
1430         fi
1431         ol_enable_syslog="$ol_arg"
1432
1433 else
1434         ol_enable_syslog="auto"
1435 fi
1436 # end --enable-syslog
1437 # OpenLDAP --enable-proctitle
1438         # Check whether --enable-proctitle or --disable-proctitle was given.
1439 if test "${enable_proctitle+set}" = set; then
1440   enableval="$enable_proctitle"
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-proctitle" 1>&2; exit 1; }
1450         fi
1451         ol_enable_proctitle="$ol_arg"
1452
1453 else
1454         ol_enable_proctitle="yes"
1455 fi
1456 # end --enable-proctitle
1457 ol_enable_cache=${ol_enable_cache-no}
1458 ol_enable_referrals=${ol_enable_referrals-no}
1459 ol_enable_kbind=${ol_enable_kbind-no}
1460 # OpenLDAP --enable-ipv6
1461         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1462 if test "${enable_ipv6+set}" = set; then
1463   enableval="$enable_ipv6"
1464   
1465         ol_arg=invalid
1466         for ol_val in auto yes no ; do
1467                 if test "$enableval" = "$ol_val" ; then
1468                         ol_arg="$ol_val"
1469                 fi
1470         done
1471         if test "$ol_arg" = "invalid" ; then
1472                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1473         fi
1474         ol_enable_ipv6="$ol_arg"
1475
1476 else
1477         ol_enable_ipv6="auto"
1478 fi
1479 # end --enable-ipv6
1480 # OpenLDAP --enable-local
1481         # Check whether --enable-local or --disable-local was given.
1482 if test "${enable_local+set}" = set; then
1483   enableval="$enable_local"
1484   
1485         ol_arg=invalid
1486         for ol_val in auto yes no ; do
1487                 if test "$enableval" = "$ol_val" ; then
1488                         ol_arg="$ol_val"
1489                 fi
1490         done
1491         if test "$ol_arg" = "invalid" ; then
1492                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1493         fi
1494         ol_enable_local="$ol_arg"
1495
1496 else
1497         ol_enable_local="auto"
1498 fi
1499 # end --enable-local
1500 # OpenLDAP --enable-x_compile
1501         # Check whether --enable-x_compile or --disable-x_compile was given.
1502 if test "${enable_x_compile+set}" = set; then
1503   enableval="$enable_x_compile"
1504   
1505         ol_arg=invalid
1506         for ol_val in yes no ; do
1507                 if test "$enableval" = "$ol_val" ; then
1508                         ol_arg="$ol_val"
1509                 fi
1510         done
1511         if test "$ol_arg" = "invalid" ; then
1512                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1513         fi
1514         ol_enable_x_compile="$ol_arg"
1515
1516 else
1517         ol_enable_x_compile="no"
1518 fi
1519 # end --enable-x_compile
1520
1521
1522 # OpenLDAP --with-cyrus_sasl
1523         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1524 if test "${with_cyrus_sasl+set}" = set; then
1525   withval="$with_cyrus_sasl"
1526   
1527         ol_arg=invalid
1528         for ol_val in auto yes no  ; do
1529                 if test "$withval" = "$ol_val" ; then
1530                         ol_arg="$ol_val"
1531                 fi
1532         done
1533         if test "$ol_arg" = "invalid" ; then
1534                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1535         fi
1536         ol_with_cyrus_sasl="$ol_arg"
1537
1538 else
1539         ol_with_cyrus_sasl="auto"
1540 fi
1541 # end --with-cyrus_sasl
1542
1543 # OpenLDAP --with-fetch
1544         # Check whether --with-fetch or --without-fetch was given.
1545 if test "${with_fetch+set}" = set; then
1546   withval="$with_fetch"
1547   
1548         ol_arg=invalid
1549         for ol_val in auto yes no  ; do
1550                 if test "$withval" = "$ol_val" ; then
1551                         ol_arg="$ol_val"
1552                 fi
1553         done
1554         if test "$ol_arg" = "invalid" ; then
1555                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1556         fi
1557         ol_with_fetch="$ol_arg"
1558
1559 else
1560         ol_with_fetch="auto"
1561 fi
1562 # end --with-fetch
1563
1564 # OpenLDAP --with-kerberos
1565         # Check whether --with-kerberos or --without-kerberos was given.
1566 if test "${with_kerberos+set}" = set; then
1567   withval="$with_kerberos"
1568   
1569         ol_arg=invalid
1570         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1571                 if test "$withval" = "$ol_val" ; then
1572                         ol_arg="$ol_val"
1573                 fi
1574         done
1575         if test "$ol_arg" = "invalid" ; then
1576                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1577         fi
1578         ol_with_kerberos="$ol_arg"
1579
1580 else
1581         ol_with_kerberos="auto"
1582 fi
1583 # end --with-kerberos
1584
1585 # OpenLDAP --with-readline
1586         # Check whether --with-readline or --without-readline was given.
1587 if test "${with_readline+set}" = set; then
1588   withval="$with_readline"
1589   
1590         ol_arg=invalid
1591         for ol_val in auto yes no  ; do
1592                 if test "$withval" = "$ol_val" ; then
1593                         ol_arg="$ol_val"
1594                 fi
1595         done
1596         if test "$ol_arg" = "invalid" ; then
1597                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1598         fi
1599         ol_with_readline="$ol_arg"
1600
1601 else
1602         ol_with_readline="auto"
1603 fi
1604 # end --with-readline
1605
1606 # OpenLDAP --with-threads
1607         # Check whether --with-threads or --without-threads was given.
1608 if test "${with_threads+set}" = set; then
1609   withval="$with_threads"
1610   
1611         ol_arg=invalid
1612         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1613                 if test "$withval" = "$ol_val" ; then
1614                         ol_arg="$ol_val"
1615                 fi
1616         done
1617         if test "$ol_arg" = "invalid" ; then
1618                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1619         fi
1620         ol_with_threads="$ol_arg"
1621
1622 else
1623         ol_with_threads="auto"
1624 fi
1625 # end --with-threads
1626
1627 # OpenLDAP --with-tls
1628         # Check whether --with-tls or --without-tls was given.
1629 if test "${with_tls+set}" = set; then
1630   withval="$with_tls"
1631   
1632         ol_arg=invalid
1633         for ol_val in auto ssleay openssl yes no  ; do
1634                 if test "$withval" = "$ol_val" ; then
1635                         ol_arg="$ol_val"
1636                 fi
1637         done
1638         if test "$ol_arg" = "invalid" ; then
1639                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1640         fi
1641         ol_with_tls="$ol_arg"
1642
1643 else
1644         ol_with_tls="auto"
1645 fi
1646 # end --with-tls
1647
1648 # OpenLDAP --with-yielding_select
1649         # Check whether --with-yielding_select or --without-yielding_select was given.
1650 if test "${with_yielding_select+set}" = set; then
1651   withval="$with_yielding_select"
1652   
1653         ol_arg=invalid
1654         for ol_val in auto yes no manual  ; do
1655                 if test "$withval" = "$ol_val" ; then
1656                         ol_arg="$ol_val"
1657                 fi
1658         done
1659         if test "$ol_arg" = "invalid" ; then
1660                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1661         fi
1662         ol_with_yielding_select="$ol_arg"
1663
1664 else
1665         ol_with_yielding_select="auto"
1666 fi
1667 # end --with-yielding_select
1668
1669
1670
1671 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1672 if test "${with_xxslapdoptions+set}" = set; then
1673   withval="$with_xxslapdoptions"
1674   :
1675 fi
1676
1677 # OpenLDAP --enable-slapd
1678         # Check whether --enable-slapd or --disable-slapd was given.
1679 if test "${enable_slapd+set}" = set; then
1680   enableval="$enable_slapd"
1681   
1682         ol_arg=invalid
1683         for ol_val in auto yes no ; do
1684                 if test "$enableval" = "$ol_val" ; then
1685                         ol_arg="$ol_val"
1686                 fi
1687         done
1688         if test "$ol_arg" = "invalid" ; then
1689                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1690         fi
1691         ol_enable_slapd="$ol_arg"
1692
1693 else
1694         ol_enable_slapd="yes"
1695 fi
1696 # end --enable-slapd
1697 # OpenLDAP --enable-aci
1698         # Check whether --enable-aci or --disable-aci was given.
1699 if test "${enable_aci+set}" = set; then
1700   enableval="$enable_aci"
1701   
1702         ol_arg=invalid
1703         for ol_val in auto yes no ; do
1704                 if test "$enableval" = "$ol_val" ; then
1705                         ol_arg="$ol_val"
1706                 fi
1707         done
1708         if test "$ol_arg" = "invalid" ; then
1709                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1710         fi
1711         ol_enable_aci="$ol_arg"
1712
1713 else
1714         ol_enable_aci="no"
1715 fi
1716 # end --enable-aci
1717 # OpenLDAP --enable-cleartext
1718         # Check whether --enable-cleartext or --disable-cleartext was given.
1719 if test "${enable_cleartext+set}" = set; then
1720   enableval="$enable_cleartext"
1721   
1722         ol_arg=invalid
1723         for ol_val in auto yes no ; do
1724                 if test "$enableval" = "$ol_val" ; then
1725                         ol_arg="$ol_val"
1726                 fi
1727         done
1728         if test "$ol_arg" = "invalid" ; then
1729                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1730         fi
1731         ol_enable_cleartext="$ol_arg"
1732
1733 else
1734         ol_enable_cleartext="yes"
1735 fi
1736 # end --enable-cleartext
1737 # OpenLDAP --enable-crypt
1738         # Check whether --enable-crypt or --disable-crypt was given.
1739 if test "${enable_crypt+set}" = set; then
1740   enableval="$enable_crypt"
1741   
1742         ol_arg=invalid
1743         for ol_val in auto yes no ; do
1744                 if test "$enableval" = "$ol_val" ; then
1745                         ol_arg="$ol_val"
1746                 fi
1747         done
1748         if test "$ol_arg" = "invalid" ; then
1749                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1750         fi
1751         ol_enable_crypt="$ol_arg"
1752
1753 else
1754         ol_enable_crypt="no"
1755 fi
1756 # end --enable-crypt
1757 # OpenLDAP --enable-dynamic
1758         # Check whether --enable-dynamic or --disable-dynamic was given.
1759 if test "${enable_dynamic+set}" = set; then
1760   enableval="$enable_dynamic"
1761   
1762         ol_arg=invalid
1763         for ol_val in auto yes no ; do
1764                 if test "$enableval" = "$ol_val" ; then
1765                         ol_arg="$ol_val"
1766                 fi
1767         done
1768         if test "$ol_arg" = "invalid" ; then
1769                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1770         fi
1771         ol_enable_dynamic="$ol_arg"
1772
1773 else
1774         ol_enable_dynamic="no"
1775 fi
1776 # end --enable-dynamic
1777 # OpenLDAP --enable-kpasswd
1778         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1779 if test "${enable_kpasswd+set}" = set; then
1780   enableval="$enable_kpasswd"
1781   
1782         ol_arg=invalid
1783         for ol_val in auto yes no ; do
1784                 if test "$enableval" = "$ol_val" ; then
1785                         ol_arg="$ol_val"
1786                 fi
1787         done
1788         if test "$ol_arg" = "invalid" ; then
1789                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1790         fi
1791         ol_enable_kpasswd="$ol_arg"
1792
1793 else
1794         ol_enable_kpasswd="no"
1795 fi
1796 # end --enable-kpasswd
1797 # OpenLDAP --enable-lmpasswd
1798         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1799 if test "${enable_lmpasswd+set}" = set; then
1800   enableval="$enable_lmpasswd"
1801   
1802         ol_arg=invalid
1803         for ol_val in auto yes no ; do
1804                 if test "$enableval" = "$ol_val" ; then
1805                         ol_arg="$ol_val"
1806                 fi
1807         done
1808         if test "$ol_arg" = "invalid" ; then
1809                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1810         fi
1811         ol_enable_lmpasswd="$ol_arg"
1812
1813 else
1814         ol_enable_lmpasswd="no"
1815 fi
1816 # end --enable-lmpasswd
1817 # OpenLDAP --enable-spasswd
1818         # Check whether --enable-spasswd or --disable-spasswd was given.
1819 if test "${enable_spasswd+set}" = set; then
1820   enableval="$enable_spasswd"
1821   
1822         ol_arg=invalid
1823         for ol_val in auto yes no ; do
1824                 if test "$enableval" = "$ol_val" ; then
1825                         ol_arg="$ol_val"
1826                 fi
1827         done
1828         if test "$ol_arg" = "invalid" ; then
1829                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1830         fi
1831         ol_enable_spasswd="$ol_arg"
1832
1833 else
1834         ol_enable_spasswd="no"
1835 fi
1836 # end --enable-spasswd
1837 # OpenLDAP --enable-modules
1838         # Check whether --enable-modules or --disable-modules was given.
1839 if test "${enable_modules+set}" = set; then
1840   enableval="$enable_modules"
1841   
1842         ol_arg=invalid
1843         for ol_val in auto yes no ; do
1844                 if test "$enableval" = "$ol_val" ; then
1845                         ol_arg="$ol_val"
1846                 fi
1847         done
1848         if test "$ol_arg" = "invalid" ; then
1849                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1850         fi
1851         ol_enable_modules="$ol_arg"
1852
1853 else
1854         ol_enable_modules="no"
1855 fi
1856 # end --enable-modules
1857 ol_enable_multimaster=${ol_enable_multimaster-no}
1858 # OpenLDAP --enable-phonetic
1859         # Check whether --enable-phonetic or --disable-phonetic was given.
1860 if test "${enable_phonetic+set}" = set; then
1861   enableval="$enable_phonetic"
1862   
1863         ol_arg=invalid
1864         for ol_val in auto yes no ; do
1865                 if test "$enableval" = "$ol_val" ; then
1866                         ol_arg="$ol_val"
1867                 fi
1868         done
1869         if test "$ol_arg" = "invalid" ; then
1870                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1871         fi
1872         ol_enable_phonetic="$ol_arg"
1873
1874 else
1875         ol_enable_phonetic="no"
1876 fi
1877 # end --enable-phonetic
1878 # OpenLDAP --enable-rewrite
1879         # Check whether --enable-rewrite or --disable-rewrite was given.
1880 if test "${enable_rewrite+set}" = set; then
1881   enableval="$enable_rewrite"
1882   
1883         ol_arg=invalid
1884         for ol_val in auto yes no ; do
1885                 if test "$enableval" = "$ol_val" ; then
1886                         ol_arg="$ol_val"
1887                 fi
1888         done
1889         if test "$ol_arg" = "invalid" ; then
1890                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1891         fi
1892         ol_enable_rewrite="$ol_arg"
1893
1894 else
1895         ol_enable_rewrite="no"
1896 fi
1897 # end --enable-rewrite
1898 # OpenLDAP --enable-rlookups
1899         # Check whether --enable-rlookups or --disable-rlookups was given.
1900 if test "${enable_rlookups+set}" = set; then
1901   enableval="$enable_rlookups"
1902   
1903         ol_arg=invalid
1904         for ol_val in auto yes no ; do
1905                 if test "$enableval" = "$ol_val" ; then
1906                         ol_arg="$ol_val"
1907                 fi
1908         done
1909         if test "$ol_arg" = "invalid" ; then
1910                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1911         fi
1912         ol_enable_rlookups="$ol_arg"
1913
1914 else
1915         ol_enable_rlookups="no"
1916 fi
1917 # end --enable-rlookups
1918 # OpenLDAP --enable-slp
1919         # Check whether --enable-slp or --disable-slp was given.
1920 if test "${enable_slp+set}" = set; then
1921   enableval="$enable_slp"
1922   
1923         ol_arg=invalid
1924         for ol_val in auto yes no ; do
1925                 if test "$enableval" = "$ol_val" ; then
1926                         ol_arg="$ol_val"
1927                 fi
1928         done
1929         if test "$ol_arg" = "invalid" ; then
1930                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1931         fi
1932         ol_enable_slp="$ol_arg"
1933
1934 else
1935         ol_enable_slp="no"
1936 fi
1937 # end --enable-slp
1938 # OpenLDAP --enable-wrappers
1939         # Check whether --enable-wrappers or --disable-wrappers was given.
1940 if test "${enable_wrappers+set}" = set; then
1941   enableval="$enable_wrappers"
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-wrappers" 1>&2; exit 1; }
1951         fi
1952         ol_enable_wrappers="$ol_arg"
1953
1954 else
1955         ol_enable_wrappers="no"
1956 fi
1957 # end --enable-wrappers
1958
1959 # OpenLDAP --enable-slapi
1960         # Check whether --enable-slapi or --disable-slapi was given.
1961 if test "${enable_slapi+set}" = set; then
1962   enableval="$enable_slapi"
1963   
1964         ol_arg=invalid
1965         for ol_val in auto yes no ; do
1966                 if test "$enableval" = "$ol_val" ; then
1967                         ol_arg="$ol_val"
1968                 fi
1969         done
1970         if test "$ol_arg" = "invalid" ; then
1971                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1972         fi
1973         ol_enable_slapi="$ol_arg"
1974
1975 else
1976         ol_enable_slapi="no"
1977 fi
1978 # end --enable-slapi
1979
1980 # OpenLDAP --enable-bdb
1981         # Check whether --enable-bdb or --disable-bdb was given.
1982 if test "${enable_bdb+set}" = set; then
1983   enableval="$enable_bdb"
1984   
1985         ol_arg=invalid
1986         for ol_val in auto yes no ; do
1987                 if test "$enableval" = "$ol_val" ; then
1988                         ol_arg="$ol_val"
1989                 fi
1990         done
1991         if test "$ol_arg" = "invalid" ; then
1992                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1993         fi
1994         ol_enable_bdb="$ol_arg"
1995
1996 else
1997         ol_enable_bdb="yes"
1998 fi
1999 # end --enable-bdb
2000 # OpenLDAP --with-bdb_module
2001         # Check whether --with-bdb_module or --without-bdb_module was given.
2002 if test "${with_bdb_module+set}" = set; then
2003   withval="$with_bdb_module"
2004   
2005         ol_arg=invalid
2006         for ol_val in static dynamic ; do
2007                 if test "$withval" = "$ol_val" ; then
2008                         ol_arg="$ol_val"
2009                 fi
2010         done
2011         if test "$ol_arg" = "invalid" ; then
2012                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2013         fi
2014         ol_with_bdb_module="$ol_arg"
2015
2016 else
2017         ol_with_bdb_module="static"
2018 fi
2019 # end --with-bdb_module
2020
2021 # OpenLDAP --enable-dnssrv
2022         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2023 if test "${enable_dnssrv+set}" = set; then
2024   enableval="$enable_dnssrv"
2025   
2026         ol_arg=invalid
2027         for ol_val in auto yes no ; do
2028                 if test "$enableval" = "$ol_val" ; then
2029                         ol_arg="$ol_val"
2030                 fi
2031         done
2032         if test "$ol_arg" = "invalid" ; then
2033                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2034         fi
2035         ol_enable_dnssrv="$ol_arg"
2036
2037 else
2038         ol_enable_dnssrv="no"
2039 fi
2040 # end --enable-dnssrv
2041 # OpenLDAP --with-dnssrv_module
2042         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2043 if test "${with_dnssrv_module+set}" = set; then
2044   withval="$with_dnssrv_module"
2045   
2046         ol_arg=invalid
2047         for ol_val in static dynamic ; do
2048                 if test "$withval" = "$ol_val" ; then
2049                         ol_arg="$ol_val"
2050                 fi
2051         done
2052         if test "$ol_arg" = "invalid" ; then
2053                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2054         fi
2055         ol_with_dnssrv_module="$ol_arg"
2056
2057 else
2058         ol_with_dnssrv_module="static"
2059 fi
2060 # end --with-dnssrv_module
2061
2062 # OpenLDAP --enable-ldap
2063         # Check whether --enable-ldap or --disable-ldap was given.
2064 if test "${enable_ldap+set}" = set; then
2065   enableval="$enable_ldap"
2066   
2067         ol_arg=invalid
2068         for ol_val in auto yes no ; do
2069                 if test "$enableval" = "$ol_val" ; then
2070                         ol_arg="$ol_val"
2071                 fi
2072         done
2073         if test "$ol_arg" = "invalid" ; then
2074                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2075         fi
2076         ol_enable_ldap="$ol_arg"
2077
2078 else
2079         ol_enable_ldap="no"
2080 fi
2081 # end --enable-ldap
2082 # OpenLDAP --with-ldap_module
2083         # Check whether --with-ldap_module or --without-ldap_module was given.
2084 if test "${with_ldap_module+set}" = set; then
2085   withval="$with_ldap_module"
2086   
2087         ol_arg=invalid
2088         for ol_val in static dynamic ; do
2089                 if test "$withval" = "$ol_val" ; then
2090                         ol_arg="$ol_val"
2091                 fi
2092         done
2093         if test "$ol_arg" = "invalid" ; then
2094                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2095         fi
2096         ol_with_ldap_module="$ol_arg"
2097
2098 else
2099         ol_with_ldap_module="static"
2100 fi
2101 # end --with-ldap_module
2102
2103 # OpenLDAP --enable-ldbm
2104         # Check whether --enable-ldbm or --disable-ldbm was given.
2105 if test "${enable_ldbm+set}" = set; then
2106   enableval="$enable_ldbm"
2107   
2108         ol_arg=invalid
2109         for ol_val in auto yes no ; do
2110                 if test "$enableval" = "$ol_val" ; then
2111                         ol_arg="$ol_val"
2112                 fi
2113         done
2114         if test "$ol_arg" = "invalid" ; then
2115                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2116         fi
2117         ol_enable_ldbm="$ol_arg"
2118
2119 else
2120         ol_enable_ldbm="no"
2121 fi
2122 # end --enable-ldbm
2123 # OpenLDAP --with-ldbm_api
2124         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2125 if test "${with_ldbm_api+set}" = set; then
2126   withval="$with_ldbm_api"
2127   
2128         ol_arg=invalid
2129         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2130                 if test "$withval" = "$ol_val" ; then
2131                         ol_arg="$ol_val"
2132                 fi
2133         done
2134         if test "$ol_arg" = "invalid" ; then
2135                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2136         fi
2137         ol_with_ldbm_api="$ol_arg"
2138
2139 else
2140         ol_with_ldbm_api="auto"
2141 fi
2142 # end --with-ldbm_api
2143
2144 # OpenLDAP --with-ldbm_module
2145         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2146 if test "${with_ldbm_module+set}" = set; then
2147   withval="$with_ldbm_module"
2148   
2149         ol_arg=invalid
2150         for ol_val in static dynamic ; do
2151                 if test "$withval" = "$ol_val" ; then
2152                         ol_arg="$ol_val"
2153                 fi
2154         done
2155         if test "$ol_arg" = "invalid" ; then
2156                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2157         fi
2158         ol_with_ldbm_module="$ol_arg"
2159
2160 else
2161         ol_with_ldbm_module="static"
2162 fi
2163 # end --with-ldbm_module
2164
2165 # OpenLDAP --with-ldbm_type
2166         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2167 if test "${with_ldbm_type+set}" = set; then
2168   withval="$with_ldbm_type"
2169   
2170         ol_arg=invalid
2171         for ol_val in auto btree hash ; do
2172                 if test "$withval" = "$ol_val" ; then
2173                         ol_arg="$ol_val"
2174                 fi
2175         done
2176         if test "$ol_arg" = "invalid" ; then
2177                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2178         fi
2179         ol_with_ldbm_type="$ol_arg"
2180
2181 else
2182         ol_with_ldbm_type="auto"
2183 fi
2184 # end --with-ldbm_type
2185
2186 # OpenLDAP --enable-meta
2187         # Check whether --enable-meta or --disable-meta was given.
2188 if test "${enable_meta+set}" = set; then
2189   enableval="$enable_meta"
2190   
2191         ol_arg=invalid
2192         for ol_val in auto yes no ; do
2193                 if test "$enableval" = "$ol_val" ; then
2194                         ol_arg="$ol_val"
2195                 fi
2196         done
2197         if test "$ol_arg" = "invalid" ; then
2198                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2199         fi
2200         ol_enable_meta="$ol_arg"
2201
2202 else
2203         ol_enable_meta="no"
2204 fi
2205 # end --enable-meta
2206 # OpenLDAP --with-meta_module
2207         # Check whether --with-meta_module or --without-meta_module was given.
2208 if test "${with_meta_module+set}" = set; then
2209   withval="$with_meta_module"
2210   
2211         ol_arg=invalid
2212         for ol_val in static dynamic ; do
2213                 if test "$withval" = "$ol_val" ; then
2214                         ol_arg="$ol_val"
2215                 fi
2216         done
2217         if test "$ol_arg" = "invalid" ; then
2218                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2219         fi
2220         ol_with_meta_module="$ol_arg"
2221
2222 else
2223         ol_with_meta_module="static"
2224 fi
2225 # end --with-meta_module
2226
2227 # OpenLDAP --enable-monitor
2228         # Check whether --enable-monitor or --disable-monitor was given.
2229 if test "${enable_monitor+set}" = set; then
2230   enableval="$enable_monitor"
2231   
2232         ol_arg=invalid
2233         for ol_val in auto yes no ; do
2234                 if test "$enableval" = "$ol_val" ; then
2235                         ol_arg="$ol_val"
2236                 fi
2237         done
2238         if test "$ol_arg" = "invalid" ; then
2239                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2240         fi
2241         ol_enable_monitor="$ol_arg"
2242
2243 else
2244         ol_enable_monitor="no"
2245 fi
2246 # end --enable-monitor
2247 # OpenLDAP --with-monitor_module
2248         # Check whether --with-monitor_module or --without-monitor_module was given.
2249 if test "${with_monitor_module+set}" = set; then
2250   withval="$with_monitor_module"
2251   
2252         ol_arg=invalid
2253         for ol_val in static dynamic ; do
2254                 if test "$withval" = "$ol_val" ; then
2255                         ol_arg="$ol_val"
2256                 fi
2257         done
2258         if test "$ol_arg" = "invalid" ; then
2259                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2260         fi
2261         ol_with_monitor_module="$ol_arg"
2262
2263 else
2264         ol_with_monitor_module="static"
2265 fi
2266 # end --with-monitor_module
2267
2268 # OpenLDAP --enable-null
2269         # Check whether --enable-null or --disable-null was given.
2270 if test "${enable_null+set}" = set; then
2271   enableval="$enable_null"
2272   
2273         ol_arg=invalid
2274         for ol_val in auto yes no ; do
2275                 if test "$enableval" = "$ol_val" ; then
2276                         ol_arg="$ol_val"
2277                 fi
2278         done
2279         if test "$ol_arg" = "invalid" ; then
2280                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2281         fi
2282         ol_enable_null="$ol_arg"
2283
2284 else
2285         ol_enable_null="no"
2286 fi
2287 # end --enable-null
2288 # OpenLDAP --with-null_module
2289         # Check whether --with-null_module or --without-null_module was given.
2290 if test "${with_null_module+set}" = set; then
2291   withval="$with_null_module"
2292   
2293         ol_arg=invalid
2294         for ol_val in static dynamic ; do
2295                 if test "$withval" = "$ol_val" ; then
2296                         ol_arg="$ol_val"
2297                 fi
2298         done
2299         if test "$ol_arg" = "invalid" ; then
2300                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2301         fi
2302         ol_with_null_module="$ol_arg"
2303
2304 else
2305         ol_with_null_module="static"
2306 fi
2307 # end --with-null_module
2308
2309 # OpenLDAP --enable-passwd
2310         # Check whether --enable-passwd or --disable-passwd was given.
2311 if test "${enable_passwd+set}" = set; then
2312   enableval="$enable_passwd"
2313   
2314         ol_arg=invalid
2315         for ol_val in auto yes no ; do
2316                 if test "$enableval" = "$ol_val" ; then
2317                         ol_arg="$ol_val"
2318                 fi
2319         done
2320         if test "$ol_arg" = "invalid" ; then
2321                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2322         fi
2323         ol_enable_passwd="$ol_arg"
2324
2325 else
2326         ol_enable_passwd="no"
2327 fi
2328 # end --enable-passwd
2329 # OpenLDAP --with-passwd_module
2330         # Check whether --with-passwd_module or --without-passwd_module was given.
2331 if test "${with_passwd_module+set}" = set; then
2332   withval="$with_passwd_module"
2333   
2334         ol_arg=invalid
2335         for ol_val in static dynamic ; do
2336                 if test "$withval" = "$ol_val" ; then
2337                         ol_arg="$ol_val"
2338                 fi
2339         done
2340         if test "$ol_arg" = "invalid" ; then
2341                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2342         fi
2343         ol_with_passwd_module="$ol_arg"
2344
2345 else
2346         ol_with_passwd_module="static"
2347 fi
2348 # end --with-passwd_module
2349
2350 # OpenLDAP --enable-perl
2351         # Check whether --enable-perl or --disable-perl was given.
2352 if test "${enable_perl+set}" = set; then
2353   enableval="$enable_perl"
2354   
2355         ol_arg=invalid
2356         for ol_val in auto yes no ; do
2357                 if test "$enableval" = "$ol_val" ; then
2358                         ol_arg="$ol_val"
2359                 fi
2360         done
2361         if test "$ol_arg" = "invalid" ; then
2362                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2363         fi
2364         ol_enable_perl="$ol_arg"
2365
2366 else
2367         ol_enable_perl="no"
2368 fi
2369 # end --enable-perl
2370 # OpenLDAP --with-perl_module
2371         # Check whether --with-perl_module or --without-perl_module was given.
2372 if test "${with_perl_module+set}" = set; then
2373   withval="$with_perl_module"
2374   
2375         ol_arg=invalid
2376         for ol_val in static dynamic ; do
2377                 if test "$withval" = "$ol_val" ; then
2378                         ol_arg="$ol_val"
2379                 fi
2380         done
2381         if test "$ol_arg" = "invalid" ; then
2382                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2383         fi
2384         ol_with_perl_module="$ol_arg"
2385
2386 else
2387         ol_with_perl_module="static"
2388 fi
2389 # end --with-perl_module
2390
2391 # OpenLDAP --enable-shell
2392         # Check whether --enable-shell or --disable-shell was given.
2393 if test "${enable_shell+set}" = set; then
2394   enableval="$enable_shell"
2395   
2396         ol_arg=invalid
2397         for ol_val in auto yes no ; do
2398                 if test "$enableval" = "$ol_val" ; then
2399                         ol_arg="$ol_val"
2400                 fi
2401         done
2402         if test "$ol_arg" = "invalid" ; then
2403                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2404         fi
2405         ol_enable_shell="$ol_arg"
2406
2407 else
2408         ol_enable_shell="no"
2409 fi
2410 # end --enable-shell
2411 # OpenLDAP --with-shell_module
2412         # Check whether --with-shell_module or --without-shell_module was given.
2413 if test "${with_shell_module+set}" = set; then
2414   withval="$with_shell_module"
2415   
2416         ol_arg=invalid
2417         for ol_val in static dynamic ; do
2418                 if test "$withval" = "$ol_val" ; then
2419                         ol_arg="$ol_val"
2420                 fi
2421         done
2422         if test "$ol_arg" = "invalid" ; then
2423                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2424         fi
2425         ol_with_shell_module="$ol_arg"
2426
2427 else
2428         ol_with_shell_module="static"
2429 fi
2430 # end --with-shell_module
2431
2432 # OpenLDAP --enable-sql
2433         # Check whether --enable-sql or --disable-sql was given.
2434 if test "${enable_sql+set}" = set; then
2435   enableval="$enable_sql"
2436   
2437         ol_arg=invalid
2438         for ol_val in auto yes no ; do
2439                 if test "$enableval" = "$ol_val" ; then
2440                         ol_arg="$ol_val"
2441                 fi
2442         done
2443         if test "$ol_arg" = "invalid" ; then
2444                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2445         fi
2446         ol_enable_sql="$ol_arg"
2447
2448 else
2449         ol_enable_sql="no"
2450 fi
2451 # end --enable-sql
2452 # OpenLDAP --with-sql_module
2453         # Check whether --with-sql_module or --without-sql_module was given.
2454 if test "${with_sql_module+set}" = set; then
2455   withval="$with_sql_module"
2456   
2457         ol_arg=invalid
2458         for ol_val in static dynamic ; do
2459                 if test "$withval" = "$ol_val" ; then
2460                         ol_arg="$ol_val"
2461                 fi
2462         done
2463         if test "$ol_arg" = "invalid" ; then
2464                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2465         fi
2466         ol_with_sql_module="$ol_arg"
2467
2468 else
2469         ol_with_sql_module="static"
2470 fi
2471 # end --with-sql_module
2472
2473 # OpenLDAP --enable-tcl
2474         # Check whether --enable-tcl or --disable-tcl was given.
2475 if test "${enable_tcl+set}" = set; then
2476   enableval="$enable_tcl"
2477   
2478         ol_arg=invalid
2479         for ol_val in auto yes no ; do
2480                 if test "$enableval" = "$ol_val" ; then
2481                         ol_arg="$ol_val"
2482                 fi
2483         done
2484         if test "$ol_arg" = "invalid" ; then
2485                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2486         fi
2487         ol_enable_tcl="$ol_arg"
2488
2489 else
2490         ol_enable_tcl="no"
2491 fi
2492 # end --enable-tcl
2493 # OpenLDAP --with-tcl_module
2494         # Check whether --with-tcl_module or --without-tcl_module was given.
2495 if test "${with_tcl_module+set}" = set; then
2496   withval="$with_tcl_module"
2497   
2498         ol_arg=invalid
2499         for ol_val in static dynamic ; do
2500                 if test "$withval" = "$ol_val" ; then
2501                         ol_arg="$ol_val"
2502                 fi
2503         done
2504         if test "$ol_arg" = "invalid" ; then
2505                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2506         fi
2507         ol_with_tcl_module="$ol_arg"
2508
2509 else
2510         ol_with_tcl_module="static"
2511 fi
2512 # end --with-tcl_module
2513
2514
2515 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2516 if test "${with_xxslurpdoptions+set}" = set; then
2517   withval="$with_xxslurpdoptions"
2518   :
2519 fi
2520
2521 # OpenLDAP --enable-slurpd
2522         # Check whether --enable-slurpd or --disable-slurpd was given.
2523 if test "${enable_slurpd+set}" = set; then
2524   enableval="$enable_slurpd"
2525   
2526         ol_arg=invalid
2527         for ol_val in auto yes no ; do
2528                 if test "$enableval" = "$ol_val" ; then
2529                         ol_arg="$ol_val"
2530                 fi
2531         done
2532         if test "$ol_arg" = "invalid" ; then
2533                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2534         fi
2535         ol_enable_slurpd="$ol_arg"
2536
2537 else
2538         ol_enable_slurpd="auto"
2539 fi
2540 # end --enable-slurpd
2541
2542 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2543 if test "${with_xxliboptions+set}" = set; then
2544   withval="$with_xxliboptions"
2545   :
2546 fi
2547
2548 # Check whether --enable-static or --disable-static was given.
2549 if test "${enable_static+set}" = set; then
2550   enableval="$enable_static"
2551   p=${PACKAGE-default}
2552 case $enableval in
2553 yes) enable_static=yes ;;
2554 no) enable_static=no ;;
2555 *)
2556   enable_static=no
2557   # Look at the argument we got.  We use all the common list separators.
2558   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2559   for pkg in $enableval; do
2560     if test "X$pkg" = "X$p"; then
2561       enable_static=yes
2562     fi
2563   done
2564   IFS="$ac_save_ifs"
2565   ;;
2566 esac
2567 else
2568   enable_static=yes
2569 fi
2570
2571 # Check whether --enable-shared or --disable-shared was given.
2572 if test "${enable_shared+set}" = set; then
2573   enableval="$enable_shared"
2574   p=${PACKAGE-default}
2575 case $enableval in
2576 yes) enable_shared=yes ;;
2577 no) enable_shared=no ;;
2578 *)
2579   enable_shared=no
2580   # Look at the argument we got.  We use all the common list separators.
2581   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2582   for pkg in $enableval; do
2583     if test "X$pkg" = "X$p"; then
2584       enable_shared=yes
2585     fi
2586   done
2587   IFS="$ac_save_ifs"
2588   ;;
2589 esac
2590 else
2591   enable_shared=yes
2592 fi
2593
2594
2595
2596 # validate options
2597 if test $ol_enable_slapd = no ; then
2598                 if test $ol_enable_slapi = yes ; then
2599                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2600         fi
2601         if test $ol_enable_bdb = yes ; then
2602                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2603         fi
2604         if test $ol_enable_dnssrv = yes ; then
2605                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2606         fi
2607         if test $ol_enable_ldap = yes ; then
2608                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2609         fi
2610         if test $ol_enable_ldbm = yes ; then
2611                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2612         fi
2613         if test $ol_enable_meta = yes ; then
2614                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2615         fi
2616         if test $ol_enable_monitor = yes ; then
2617                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2618         fi
2619         if test $ol_enable_null = yes ; then
2620                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2621         fi
2622         if test $ol_enable_passwd = yes ; then
2623                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2624         fi
2625         if test $ol_enable_perl = yes ; then
2626                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2627         fi
2628         if test $ol_enable_shell = yes ; then
2629                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2630         fi
2631         if test $ol_enable_tcl = yes ; then
2632                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2633         fi
2634         if test $ol_enable_sql = yes ; then
2635                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2636         fi
2637         if test $ol_enable_modules = yes ; then
2638                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2639         fi
2640         if test $ol_enable_multimaster = yes ; then
2641                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2642         fi
2643         if test $ol_enable_wrappers = yes ; then
2644                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2645         fi
2646         if test $ol_enable_phonetic = yes ; then
2647                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2648         fi
2649         if test $ol_enable_rlookups = yes ; then
2650                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2651         fi
2652         if test $ol_enable_aci = yes ; then
2653                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2654         fi
2655         if test $ol_with_ldbm_api != auto ; then
2656                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2657         fi
2658         if test $ol_with_ldbm_type != auto ; then
2659                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2660         fi
2661         if test $ol_with_bdb_module != static ; then
2662                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2663         fi
2664         if test $ol_with_dnssrv_module != static ; then
2665                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2666         fi
2667         if test $ol_with_ldap_module != static ; then
2668                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2669         fi
2670         if test $ol_with_ldbm_module != static ; then
2671                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2672         fi
2673         if test $ol_with_meta_module != static ; then
2674                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2675         fi
2676         if test $ol_with_monitor_module != static ; then
2677                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2678         fi
2679         if test $ol_with_null_module != static ; then
2680                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2681         fi
2682         if test $ol_with_passwd_module != static ; then
2683                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2684         fi
2685         if test $ol_with_perl_module != static ; then
2686                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2687         fi
2688         if test $ol_with_shell_module != static ; then
2689                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2690         fi
2691         if test $ol_with_tcl_module != static ; then
2692                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2693         fi
2694         if test $ol_with_sql_module != static ; then
2695                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2696         fi
2697         if test $ol_enable_slurpd = yes ; then
2698                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2699         fi
2700         if test $ol_enable_rewrite = yes ; then
2701                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2702         fi
2703
2704         # force settings to no
2705         ol_enable_slapi=no
2706         ol_enable_bdb=no
2707         ol_enable_dnssrv=no
2708         ol_enable_ldap=no
2709         ol_enable_ldbm=no
2710         ol_enable_meta=no
2711         ol_enable_monitor=no
2712         ol_enable_null=no
2713         ol_enable_passwd=no
2714         ol_enable_perl=no
2715         ol_enable_shell=no
2716         ol_enable_tcl=no
2717         ol_enable_sql=no
2718
2719         ol_enable_modules=no
2720         ol_enable_multimaster=no
2721         ol_enable_phonetic=no
2722         ol_enable_rlookups=no
2723         ol_enable_aci=no
2724         ol_enable_wrappers=no
2725         ol_enable_dynamic=no
2726
2727         ol_with_ldbm_api=no
2728         ol_with_ldbm_type=no
2729
2730         ol_with_bdb_module=static
2731         ol_with_dnssrv_module=static
2732         ol_with_ldap_module=static
2733         ol_with_ldbm_module=static
2734         ol_with_meta_module=static
2735         ol_with_monitor_module=static
2736         ol_with_null_module=static
2737         ol_with_passwd_module=static
2738         ol_with_perl_module=static
2739         ol_with_shell_module=static
2740         ol_with_tcl_module=static
2741         ol_with_sql_module=static
2742
2743         ol_enable_slurpd=no
2744
2745         ol_enable_rewrite=no
2746
2747 elif test $ol_enable_ldbm = no ; then
2748         
2749         if test $ol_with_ldbm_api != auto ; then
2750                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2751         fi
2752
2753         if test $ol_with_ldbm_type != auto ; then
2754                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2755         fi
2756
2757         if test $ol_with_ldbm_module != static ; then
2758                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2759         fi
2760
2761         if test $ol_enable_modules != yes -a \
2762                 $ol_enable_bdb = no -a \
2763                 $ol_enable_dnssrv = no -a \
2764                 $ol_enable_ldap = no -a \
2765                 $ol_enable_meta = no -a \
2766                 $ol_enable_monitor = no -a \
2767                 $ol_enable_null = no -a \
2768                 $ol_enable_passwd = no -a \
2769                 $ol_enable_perl = no -a \
2770                 $ol_enable_shell = no -a \
2771                 $ol_enable_sql = no -a \
2772                 $ol_enable_tcl = no ; then
2773
2774                 if test $ol_enable_slapd = yes ; then
2775                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2776                 else
2777                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2778                         ol_enable_slapd=no
2779                 fi
2780         fi
2781
2782         ol_with_ldbm_api=no
2783         ol_with_ldbm_type=no
2784         ol_with_ldbm_module=static
2785
2786         if test $ol_enable_bdb != no ; then
2787                 ol_with_ldbm_api=berkeley
2788         fi
2789
2790 else
2791                 if test $ol_with_ldbm_api = gdbm -a \
2792                 $ol_with_ldbm_type = btree ; then
2793                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2794         fi
2795         if test $ol_with_ldbm_api = mdbm -a \
2796                 $ol_with_ldbm_type = btree ; then
2797                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2798         fi
2799         if test $ol_with_ldbm_api = ndbm -a \
2800                 $ol_with_ldbm_type = btree ; then
2801                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2802         fi
2803
2804         if test $ol_enable_bdb = yes ; then
2805                 if test $ol_with_ldbm_api = auto ; then
2806                         ol_with_ldbm_api=berkeley
2807                 elif test $ol_with_ldbm_api != berkeley ; then
2808                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2809                 fi
2810
2811         elif test $ol_enable_bdb = auto ; then
2812                 if test $ol_with_ldbm_api != berkeley \
2813                         -o $ol_with_ldbm_api != auto ; then
2814                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2815                         ol_enable_bdb=no
2816                 fi
2817         fi
2818 fi
2819
2820 if test $ol_enable_slurpd = yes ; then
2821                 if test $ol_with_threads = no ; then
2822                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2823         fi
2824 fi
2825
2826 if test $ol_enable_lmpasswd = yes ; then
2827         if test $ol_with_tls = no ; then
2828                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2829         fi
2830 fi
2831
2832 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2833         if test $ol_with_kerberos = no ; then
2834                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2835         elif test $ol_with_kerberos = auto ; then
2836                 ol_with_kerberos=yes
2837         fi
2838
2839 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2840         if test $ol_with_kerberos = auto ; then
2841                 ol_with_kerberos=no
2842         elif test $ol_with_kerberos != no ; then
2843                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2844                 ol_with_kerberos=no
2845         fi
2846 fi
2847
2848 if test $ol_enable_spasswd = yes ; then
2849         if test $ol_with_cyrus_sasl = no ; then
2850                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2851         fi
2852         ol_with_cyrus_sasl=yes
2853 fi
2854
2855 echo "$ac_t""done" 1>&6
2856
2857 LDAP_LIBS=
2858 LDIF_LIBS=
2859 LDBM_LIBS=
2860 LTHREAD_LIBS=
2861 LUTIL_LIBS=
2862
2863 SLAPD_LIBS=
2864 SLURPD_LIBS=
2865
2866 BUILD_SLAPD=no
2867 BUILD_SLURPD=no
2868
2869 BUILD_THREAD=no
2870
2871 BUILD_SLAPI=no
2872 SLAPD_SLAPI_DEPEND=
2873
2874 BUILD_BDB=no
2875 BUILD_DNSSRV=no
2876 BUILD_LDAP=no
2877 BUILD_LDBM=no
2878 BUILD_META=no
2879 BUILD_MONITOR=no
2880 BUILD_NULL=no
2881 BUILD_PASSWD=no
2882 BUILD_PERL=no
2883 BUILD_SHELL=no
2884 BUILD_SQL=no
2885 BUILD_TCL=no
2886
2887 BUILD_BDB_DYNAMIC=static
2888 BUILD_DNSSRV_DYNAMIC=static
2889 BUILD_LDAP_DYNAMIC=static
2890 BUILD_LDBM_DYNAMIC=static
2891 BUILD_META_DYNAMIC=static
2892 BUILD_MONITOR_DYNAMIC=static
2893 BUILD_NULL_DYNAMIC=static
2894 BUILD_PASSWD_DYNAMIC=static
2895 BUILD_PERL_DYNAMIC=static
2896 BUILD_SHELL_DYNAMIC=static
2897 BUILD_TCL_DYNAMIC=static
2898 BUILD_SQL_DYNAMIC=static
2899
2900 SLAPD_MODULES_LDFLAGS=
2901 SLAPD_MODULES_CPPFLAGS=
2902
2903 SLAPD_STATIC_BACKENDS=
2904 SLAPD_DYNAMIC_BACKENDS=
2905
2906 SLAPD_PERL_LDFLAGS=
2907 MOD_PERL_LDFLAGS=
2908 PERL_CPPFLAGS=
2909
2910 SLAPD_SQL_LDFLAGS=
2911 SLAPD_SQL_LIBS=
2912 SLAPD_SQL_INCLUDES=
2913
2914 MOD_TCL_LIB=
2915 KRB4_LIBS=
2916 KRB5_LIBS=
2917 READLINE_LIBS=
2918 SASL_LIBS=
2919 TERMCAP_LIBS=
2920 TLS_LIBS=
2921 MODULES_LIBS=
2922 SLAPI_LIBS=
2923 LIBSLAPI=
2924 LIBSLAPITOOLS=
2925 AUTH_LIBS=
2926
2927 SLAPD_SLP_LIBS=
2928
2929
2930 # Find a good install program.  We prefer a C program (faster),
2931 # so one script is as good as another.  But avoid the broken or
2932 # incompatible versions:
2933 # SysV /etc/install, /usr/sbin/install
2934 # SunOS /usr/etc/install
2935 # IRIX /sbin/install
2936 # AIX /bin/install
2937 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2938 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2939 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2940 # ./install, which can be erroneously created by make from ./install.sh.
2941 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2942 echo "configure:2943: checking for a BSD compatible install" >&5
2943 if test -z "$INSTALL"; then
2944 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2945   echo $ac_n "(cached) $ac_c" 1>&6
2946 else
2947     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2948   for ac_dir in $PATH; do
2949     # Account for people who put trailing slashes in PATH elements.
2950     case "$ac_dir/" in
2951     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2952     *)
2953       # OSF1 and SCO ODT 3.0 have their own names for install.
2954       # Don't use installbsd from OSF since it installs stuff as root
2955       # by default.
2956       for ac_prog in ginstall scoinst install; do
2957         if test -f $ac_dir/$ac_prog; then
2958           if test $ac_prog = install &&
2959             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2960             # AIX install.  It has an incompatible calling convention.
2961             :
2962           elif test $ac_prog = install &&
2963             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2964             # program-specific install script used by HP pwplus--don't use.
2965             :
2966           else
2967             ac_cv_path_install="$ac_dir/$ac_prog -c"
2968             break 2
2969           fi
2970         fi
2971       done
2972       ;;
2973     esac
2974   done
2975   IFS="$ac_save_IFS"
2976
2977 fi
2978   if test "${ac_cv_path_install+set}" = set; then
2979     INSTALL="$ac_cv_path_install"
2980   else
2981     # As a last resort, use the slow shell script.  We don't cache a
2982     # path for INSTALL within a source directory, because that will
2983     # break other packages using the cache if that directory is
2984     # removed, or if the path is relative.
2985     INSTALL="$ac_install_sh"
2986   fi
2987 fi
2988 echo "$ac_t""$INSTALL" 1>&6
2989
2990 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2991 # It thinks the first close brace ends the variable substitution.
2992 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2993
2994 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2995
2996 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2997
2998
2999 cat >> confdefs.h <<\EOF
3000 #define HAVE_MKVERSION 1
3001 EOF
3002
3003
3004
3005
3006 ol_aix_threads=no
3007 case "$target" in
3008 *-*-aix*)       if test -z "$CC" ; then
3009                 case "$ol_with_threads" in
3010                 auto | yes |  posix) ol_aix_threads=yes ;;
3011                 esac
3012         fi
3013 ;;
3014 esac
3015
3016 if test $ol_aix_threads = yes ; then
3017         if test -z "${CC}" ; then
3018                 for ac_prog in cc_r xlc_r cc
3019 do
3020 # Extract the first word of "$ac_prog", so it can be a program name with args.
3021 set dummy $ac_prog; ac_word=$2
3022 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3023 echo "configure:3024: checking for $ac_word" >&5
3024 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3025   echo $ac_n "(cached) $ac_c" 1>&6
3026 else
3027   if test -n "$CC"; then
3028   ac_cv_prog_CC="$CC" # Let the user override the test.
3029 else
3030   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3031   ac_dummy="$PATH"
3032   for ac_dir in $ac_dummy; do
3033     test -z "$ac_dir" && ac_dir=.
3034     if test -f $ac_dir/$ac_word; then
3035       ac_cv_prog_CC="$ac_prog"
3036       break
3037     fi
3038   done
3039   IFS="$ac_save_ifs"
3040 fi
3041 fi
3042 CC="$ac_cv_prog_CC"
3043 if test -n "$CC"; then
3044   echo "$ac_t""$CC" 1>&6
3045 else
3046   echo "$ac_t""no" 1>&6
3047 fi
3048
3049 test -n "$CC" && break
3050 done
3051
3052
3053                 if test "$CC" = cc ; then
3054                                                 if test $ol_with_threads != auto ; then
3055                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3056                         else
3057                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3058                         fi
3059                         ol_with_threads=no
3060                 fi
3061         fi
3062
3063         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3064                 ol_with_threads=posix
3065                 ol_cv_pthread_create=yes
3066         fi
3067 fi
3068
3069 if test -z "${CC}"; then
3070         for ac_prog in cc gcc
3071 do
3072 # Extract the first word of "$ac_prog", so it can be a program name with args.
3073 set dummy $ac_prog; ac_word=$2
3074 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3075 echo "configure:3076: checking for $ac_word" >&5
3076 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3077   echo $ac_n "(cached) $ac_c" 1>&6
3078 else
3079   if test -n "$CC"; then
3080   ac_cv_prog_CC="$CC" # Let the user override the test.
3081 else
3082   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3083   ac_dummy="$PATH"
3084   for ac_dir in $ac_dummy; do
3085     test -z "$ac_dir" && ac_dir=.
3086     if test -f $ac_dir/$ac_word; then
3087       ac_cv_prog_CC="$ac_prog"
3088       break
3089     fi
3090   done
3091   IFS="$ac_save_ifs"
3092 fi
3093 fi
3094 CC="$ac_cv_prog_CC"
3095 if test -n "$CC"; then
3096   echo "$ac_t""$CC" 1>&6
3097 else
3098   echo "$ac_t""no" 1>&6
3099 fi
3100
3101 test -n "$CC" && break
3102 done
3103 test -n "$CC" || CC="missing"
3104
3105
3106         if test "${CC}" = "missing" ; then
3107                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3108         fi
3109 fi
3110
3111 if test -z "${AR}"; then
3112         for ac_prog in ar gar
3113 do
3114 # Extract the first word of "$ac_prog", so it can be a program name with args.
3115 set dummy $ac_prog; ac_word=$2
3116 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3117 echo "configure:3118: checking for $ac_word" >&5
3118 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3119   echo $ac_n "(cached) $ac_c" 1>&6
3120 else
3121   if test -n "$AR"; then
3122   ac_cv_prog_AR="$AR" # Let the user override the test.
3123 else
3124   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3125   ac_dummy="$PATH"
3126   for ac_dir in $ac_dummy; do
3127     test -z "$ac_dir" && ac_dir=.
3128     if test -f $ac_dir/$ac_word; then
3129       ac_cv_prog_AR="$ac_prog"
3130       break
3131     fi
3132   done
3133   IFS="$ac_save_ifs"
3134 fi
3135 fi
3136 AR="$ac_cv_prog_AR"
3137 if test -n "$AR"; then
3138   echo "$ac_t""$AR" 1>&6
3139 else
3140   echo "$ac_t""no" 1>&6
3141 fi
3142
3143 test -n "$AR" && break
3144 done
3145 test -n "$AR" || AR="missing"
3146
3147
3148         if test "${AR}" = "missing" ; then
3149                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3150         fi
3151 fi
3152
3153
3154
3155 # Find the correct PATH separator.  Usually this is `:', but
3156 # DJGPP uses `;' like DOS.
3157 if test "X${PATH_SEPARATOR+set}" != Xset; then
3158   UNAME=${UNAME-`uname 2>/dev/null`}
3159   case X$UNAME in
3160     *-DOS) lt_cv_sys_path_separator=';' ;;
3161     *)     lt_cv_sys_path_separator=':' ;;
3162   esac
3163   PATH_SEPARATOR=$lt_cv_sys_path_separator
3164 fi
3165
3166 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3167 echo "configure:3168: checking for Cygwin environment" >&5
3168 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3169   echo $ac_n "(cached) $ac_c" 1>&6
3170 else
3171   cat > conftest.$ac_ext <<EOF
3172 #line 3173 "configure"
3173 #include "confdefs.h"
3174
3175 int main() {
3176
3177 #ifndef __CYGWIN__
3178 #define __CYGWIN__ __CYGWIN32__
3179 #endif
3180 return __CYGWIN__;
3181 ; return 0; }
3182 EOF
3183 if { (eval echo configure:3184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3184   rm -rf conftest*
3185   ac_cv_cygwin=yes
3186 else
3187   echo "configure: failed program was:" >&5
3188   cat conftest.$ac_ext >&5
3189   rm -rf conftest*
3190   ac_cv_cygwin=no
3191 fi
3192 rm -f conftest*
3193 fi
3194
3195 echo "$ac_t""$ac_cv_cygwin" 1>&6
3196 CYGWIN=
3197 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3198 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3199 echo "configure:3200: checking for mingw32 environment" >&5
3200 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3201   echo $ac_n "(cached) $ac_c" 1>&6
3202 else
3203   cat > conftest.$ac_ext <<EOF
3204 #line 3205 "configure"
3205 #include "confdefs.h"
3206
3207 int main() {
3208 return __MINGW32__;
3209 ; return 0; }
3210 EOF
3211 if { (eval echo configure:3212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3212   rm -rf conftest*
3213   ac_cv_mingw32=yes
3214 else
3215   echo "configure: failed program was:" >&5
3216   cat conftest.$ac_ext >&5
3217   rm -rf conftest*
3218   ac_cv_mingw32=no
3219 fi
3220 rm -f conftest*
3221 fi
3222
3223 echo "$ac_t""$ac_cv_mingw32" 1>&6
3224 MINGW32=
3225 test "$ac_cv_mingw32" = yes && MINGW32=yes
3226 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3227 echo "configure:3228: checking for EMX OS/2 environment" >&5
3228 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3229   echo $ac_n "(cached) $ac_c" 1>&6
3230 else
3231   cat > conftest.$ac_ext <<EOF
3232 #line 3233 "configure"
3233 #include "confdefs.h"
3234
3235 int main() {
3236 return __EMX__;
3237 ; return 0; }
3238 EOF
3239 if { (eval echo configure:3240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3240   rm -rf conftest*
3241   ac_cv_emxos2=yes
3242 else
3243   echo "configure: failed program was:" >&5
3244   cat conftest.$ac_ext >&5
3245   rm -rf conftest*
3246   ac_cv_emxos2=no
3247 fi
3248 rm -f conftest*
3249 fi
3250
3251 echo "$ac_t""$ac_cv_emxos2" 1>&6
3252 EMXOS2=
3253 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3254 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3255 echo "configure:3256: checking how to run the C preprocessor" >&5
3256 # On Suns, sometimes $CPP names a directory.
3257 if test -n "$CPP" && test -d "$CPP"; then
3258   CPP=
3259 fi
3260 if test -z "$CPP"; then
3261 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3262   echo $ac_n "(cached) $ac_c" 1>&6
3263 else
3264     # This must be in double quotes, not single quotes, because CPP may get
3265   # substituted into the Makefile and "${CC-cc}" will confuse make.
3266   CPP="${CC-cc} -E"
3267   # On the NeXT, cc -E runs the code through the compiler's parser,
3268   # not just through cpp.
3269   cat > conftest.$ac_ext <<EOF
3270 #line 3271 "configure"
3271 #include "confdefs.h"
3272 #include <assert.h>
3273 Syntax Error
3274 EOF
3275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3276 { (eval echo configure:3277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3278 if test -z "$ac_err"; then
3279   :
3280 else
3281   echo "$ac_err" >&5
3282   echo "configure: failed program was:" >&5
3283   cat conftest.$ac_ext >&5
3284   rm -rf conftest*
3285   CPP="${CC-cc} -E -traditional-cpp"
3286   cat > conftest.$ac_ext <<EOF
3287 #line 3288 "configure"
3288 #include "confdefs.h"
3289 #include <assert.h>
3290 Syntax Error
3291 EOF
3292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3293 { (eval echo configure:3294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3295 if test -z "$ac_err"; then
3296   :
3297 else
3298   echo "$ac_err" >&5
3299   echo "configure: failed program was:" >&5
3300   cat conftest.$ac_ext >&5
3301   rm -rf conftest*
3302   CPP="${CC-cc} -nologo -E"
3303   cat > conftest.$ac_ext <<EOF
3304 #line 3305 "configure"
3305 #include "confdefs.h"
3306 #include <assert.h>
3307 Syntax Error
3308 EOF
3309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3310 { (eval echo configure:3311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3312 if test -z "$ac_err"; then
3313   :
3314 else
3315   echo "$ac_err" >&5
3316   echo "configure: failed program was:" >&5
3317   cat conftest.$ac_ext >&5
3318   rm -rf conftest*
3319   CPP=/lib/cpp
3320 fi
3321 rm -f conftest*
3322 fi
3323 rm -f conftest*
3324 fi
3325 rm -f conftest*
3326   ac_cv_prog_CPP="$CPP"
3327 fi
3328   CPP="$ac_cv_prog_CPP"
3329 else
3330   ac_cv_prog_CPP="$CPP"
3331 fi
3332 echo "$ac_t""$CPP" 1>&6
3333
3334 # Check whether --enable-fast-install or --disable-fast-install was given.
3335 if test "${enable_fast_install+set}" = set; then
3336   enableval="$enable_fast_install"
3337   p=${PACKAGE-default}
3338 case $enableval in
3339 yes) enable_fast_install=yes ;;
3340 no) enable_fast_install=no ;;
3341 *)
3342   enable_fast_install=no
3343   # Look at the argument we got.  We use all the common list separators.
3344   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3345   for pkg in $enableval; do
3346     if test "X$pkg" = "X$p"; then
3347       enable_fast_install=yes
3348     fi
3349   done
3350   IFS="$ac_save_ifs"
3351   ;;
3352 esac
3353 else
3354   enable_fast_install=yes
3355 fi
3356
3357 # Extract the first word of "gcc", so it can be a program name with args.
3358 set dummy gcc; ac_word=$2
3359 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3360 echo "configure:3361: checking for $ac_word" >&5
3361 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3362   echo $ac_n "(cached) $ac_c" 1>&6
3363 else
3364   if test -n "$CC"; then
3365   ac_cv_prog_CC="$CC" # Let the user override the test.
3366 else
3367   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3368   ac_dummy="$PATH"
3369   for ac_dir in $ac_dummy; do
3370     test -z "$ac_dir" && ac_dir=.
3371     if test -f $ac_dir/$ac_word; then
3372       ac_cv_prog_CC="gcc"
3373       break
3374     fi
3375   done
3376   IFS="$ac_save_ifs"
3377 fi
3378 fi
3379 CC="$ac_cv_prog_CC"
3380 if test -n "$CC"; then
3381   echo "$ac_t""$CC" 1>&6
3382 else
3383   echo "$ac_t""no" 1>&6
3384 fi
3385
3386 if test -z "$CC"; then
3387   # Extract the first word of "cc", so it can be a program name with args.
3388 set dummy cc; ac_word=$2
3389 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3390 echo "configure:3391: checking for $ac_word" >&5
3391 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3392   echo $ac_n "(cached) $ac_c" 1>&6
3393 else
3394   if test -n "$CC"; then
3395   ac_cv_prog_CC="$CC" # Let the user override the test.
3396 else
3397   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3398   ac_prog_rejected=no
3399   ac_dummy="$PATH"
3400   for ac_dir in $ac_dummy; do
3401     test -z "$ac_dir" && ac_dir=.
3402     if test -f $ac_dir/$ac_word; then
3403       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3404         ac_prog_rejected=yes
3405         continue
3406       fi
3407       ac_cv_prog_CC="cc"
3408       break
3409     fi
3410   done
3411   IFS="$ac_save_ifs"
3412 if test $ac_prog_rejected = yes; then
3413   # We found a bogon in the path, so make sure we never use it.
3414   set dummy $ac_cv_prog_CC
3415   shift
3416   if test $# -gt 0; then
3417     # We chose a different compiler from the bogus one.
3418     # However, it has the same basename, so the bogon will be chosen
3419     # first if we set CC to just the basename; use the full file name.
3420     shift
3421     set dummy "$ac_dir/$ac_word" "$@"
3422     shift
3423     ac_cv_prog_CC="$@"
3424   fi
3425 fi
3426 fi
3427 fi
3428 CC="$ac_cv_prog_CC"
3429 if test -n "$CC"; then
3430   echo "$ac_t""$CC" 1>&6
3431 else
3432   echo "$ac_t""no" 1>&6
3433 fi
3434
3435   if test -z "$CC"; then
3436     case "`uname -s`" in
3437     *win32* | *WIN32* | *CYGWIN*)
3438       # Extract the first word of "cl", so it can be a program name with args.
3439 set dummy cl; ac_word=$2
3440 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3441 echo "configure:3442: checking for $ac_word" >&5
3442 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3443   echo $ac_n "(cached) $ac_c" 1>&6
3444 else
3445   if test -n "$CC"; then
3446   ac_cv_prog_CC="$CC" # Let the user override the test.
3447 else
3448   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3449   ac_dummy="$PATH"
3450   for ac_dir in $ac_dummy; do
3451     test -z "$ac_dir" && ac_dir=.
3452     if test -f $ac_dir/$ac_word; then
3453       ac_cv_prog_CC="cl"
3454       break
3455     fi
3456   done
3457   IFS="$ac_save_ifs"
3458 fi
3459 fi
3460 CC="$ac_cv_prog_CC"
3461 if test -n "$CC"; then
3462   echo "$ac_t""$CC" 1>&6
3463 else
3464   echo "$ac_t""no" 1>&6
3465 fi
3466  ;;
3467     esac
3468   fi
3469   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3470 fi
3471
3472 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3473 echo "configure:3474: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3474
3475 ac_ext=c
3476 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3477 ac_cpp='$CPP $CPPFLAGS'
3478 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3479 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3480 cross_compiling=$ac_cv_prog_cc_cross
3481
3482 cat > conftest.$ac_ext << EOF
3483
3484 #line 3485 "configure"
3485 #include "confdefs.h"
3486
3487 main(){return(0);}
3488 EOF
3489 if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3490   ac_cv_prog_cc_works=yes
3491   # If we can't run a trivial program, we are probably using a cross compiler.
3492   if (./conftest; exit) 2>/dev/null; then
3493     ac_cv_prog_cc_cross=no
3494   else
3495     ac_cv_prog_cc_cross=yes
3496   fi
3497 else
3498   echo "configure: failed program was:" >&5
3499   cat conftest.$ac_ext >&5
3500   ac_cv_prog_cc_works=no
3501 fi
3502 rm -fr conftest*
3503 ac_ext=c
3504 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3505 ac_cpp='$CPP $CPPFLAGS'
3506 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3507 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3508 cross_compiling=$ac_cv_prog_cc_cross
3509
3510 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3511 if test $ac_cv_prog_cc_works = no; then
3512   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3513 fi
3514 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3515 echo "configure:3516: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3516 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3517 cross_compiling=$ac_cv_prog_cc_cross
3518
3519 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3520 echo "configure:3521: checking whether we are using GNU C" >&5
3521 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3522   echo $ac_n "(cached) $ac_c" 1>&6
3523 else
3524   cat > conftest.c <<EOF
3525 #ifdef __GNUC__
3526   yes;
3527 #endif
3528 EOF
3529 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3530   ac_cv_prog_gcc=yes
3531 else
3532   ac_cv_prog_gcc=no
3533 fi
3534 fi
3535
3536 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3537
3538 if test $ac_cv_prog_gcc = yes; then
3539   GCC=yes
3540 else
3541   GCC=
3542 fi
3543
3544 ac_test_CFLAGS="${CFLAGS+set}"
3545 ac_save_CFLAGS="$CFLAGS"
3546 CFLAGS=
3547 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3548 echo "configure:3549: checking whether ${CC-cc} accepts -g" >&5
3549 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3550   echo $ac_n "(cached) $ac_c" 1>&6
3551 else
3552   echo 'void f(){}' > conftest.c
3553 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3554   ac_cv_prog_cc_g=yes
3555 else
3556   ac_cv_prog_cc_g=no
3557 fi
3558 rm -f conftest*
3559
3560 fi
3561
3562 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3563 if test "$ac_test_CFLAGS" = set; then
3564   CFLAGS="$ac_save_CFLAGS"
3565 elif test $ac_cv_prog_cc_g = yes; then
3566   if test "$GCC" = yes; then
3567     CFLAGS="-g -O2"
3568   else
3569     CFLAGS="-g"
3570   fi
3571 else
3572   if test "$GCC" = yes; then
3573     CFLAGS="-O2"
3574   else
3575     CFLAGS=
3576   fi
3577 fi
3578
3579 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3580 if test "${with_gnu_ld+set}" = set; then
3581   withval="$with_gnu_ld"
3582   test "$withval" = no || with_gnu_ld=yes
3583 else
3584   with_gnu_ld=no
3585 fi
3586
3587 ac_prog=ld
3588 if test "$GCC" = yes; then
3589   # Check if gcc -print-prog-name=ld gives a path.
3590   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3591 echo "configure:3592: checking for ld used by GCC" >&5
3592   case $host in
3593   *-*-mingw*)
3594     # gcc leaves a trailing carriage return which upsets mingw
3595     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3596   *)
3597     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3598   esac
3599   case $ac_prog in
3600     # Accept absolute paths.
3601     [\\/]* | [A-Za-z]:[\\/]*)
3602       re_direlt='/[^/][^/]*/\.\./'
3603       # Canonicalize the path of ld
3604       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3605       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3606         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3607       done
3608       test -z "$LD" && LD="$ac_prog"
3609       ;;
3610   "")
3611     # If it fails, then pretend we aren't using GCC.
3612     ac_prog=ld
3613     ;;
3614   *)
3615     # If it is relative, then search for the first ld in PATH.
3616     with_gnu_ld=unknown
3617     ;;
3618   esac
3619 elif test "$with_gnu_ld" = yes; then
3620   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3621 echo "configure:3622: checking for GNU ld" >&5
3622 else
3623   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3624 echo "configure:3625: checking for non-GNU ld" >&5
3625 fi
3626 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3627   echo $ac_n "(cached) $ac_c" 1>&6
3628 else
3629   if test -z "$LD"; then
3630   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3631   for ac_dir in $PATH; do
3632     test -z "$ac_dir" && ac_dir=.
3633     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3634       lt_cv_path_LD="$ac_dir/$ac_prog"
3635       # Check to see if the program is GNU ld.  I'd rather use --version,
3636       # but apparently some GNU ld's only accept -v.
3637       # Break only if it was the GNU/non-GNU ld that we prefer.
3638       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3639         test "$with_gnu_ld" != no && break
3640       else
3641         test "$with_gnu_ld" != yes && break
3642       fi
3643     fi
3644   done
3645   IFS="$ac_save_ifs"
3646 else
3647   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3648 fi
3649 fi
3650
3651 LD="$lt_cv_path_LD"
3652 if test -n "$LD"; then
3653   echo "$ac_t""$LD" 1>&6
3654 else
3655   echo "$ac_t""no" 1>&6
3656 fi
3657 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3658 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3659 echo "configure:3660: checking if the linker ($LD) is GNU ld" >&5
3660 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3661   echo $ac_n "(cached) $ac_c" 1>&6
3662 else
3663   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3664 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3665   lt_cv_prog_gnu_ld=yes
3666 else
3667   lt_cv_prog_gnu_ld=no
3668 fi
3669 fi
3670
3671 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3672 with_gnu_ld=$lt_cv_prog_gnu_ld
3673
3674
3675 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3676 echo "configure:3677: checking for $LD option to reload object files" >&5
3677 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3678   echo $ac_n "(cached) $ac_c" 1>&6
3679 else
3680   lt_cv_ld_reload_flag='-r'
3681 fi
3682
3683 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3684 reload_flag=$lt_cv_ld_reload_flag
3685 test -n "$reload_flag" && reload_flag=" $reload_flag"
3686
3687 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3688 echo "configure:3689: checking for BSD-compatible nm" >&5
3689 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3690   echo $ac_n "(cached) $ac_c" 1>&6
3691 else
3692   if test -n "$NM"; then
3693   # Let the user override the test.
3694   lt_cv_path_NM="$NM"
3695 else
3696   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3697   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3698     test -z "$ac_dir" && ac_dir=.
3699     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3700     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3701       # Check to see if the nm accepts a BSD-compat flag.
3702       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3703       #   nm: unknown option "B" ignored
3704       # Tru64's nm complains that /dev/null is an invalid object file
3705       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3706         lt_cv_path_NM="$tmp_nm -B"
3707         break
3708       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3709         lt_cv_path_NM="$tmp_nm -p"
3710         break
3711       else
3712         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3713         continue # so that we can try to find one that supports BSD flags
3714       fi
3715     fi
3716   done
3717   IFS="$ac_save_ifs"
3718   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3719 fi
3720 fi
3721
3722 NM="$lt_cv_path_NM"
3723 echo "$ac_t""$NM" 1>&6
3724
3725 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3726 echo "configure:3727: checking for a sed that does not truncate output" >&5
3727 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3728   echo $ac_n "(cached) $ac_c" 1>&6
3729 else
3730   # Loop through the user's path and test for sed and gsed.
3731 # Then use that list of sed's as ones to test for truncation.
3732 as_executable_p="test -f"
3733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3734 for as_dir in $PATH
3735 do
3736   IFS=$as_save_IFS
3737   test -z "$as_dir" && as_dir=.
3738   for ac_prog in sed gsed; do
3739     for ac_exec_ext in '' $ac_executable_extensions; do
3740       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3741         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3742       fi
3743     done
3744   done
3745 done
3746
3747   # Create a temporary directory, and hook for its removal unless debugging.
3748 $debug ||
3749 {
3750   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3751   trap '{ (exit 1); exit 1; }' 1 2 13 15
3752 }
3753
3754 # Create a (secure) tmp directory for tmp files.
3755 : ${TMPDIR=/tmp}
3756 {
3757   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3758   test -n "$tmp" && test -d "$tmp"
3759 }  ||
3760 {
3761   tmp=$TMPDIR/sed$$-$RANDOM
3762   (umask 077 && mkdir $tmp)
3763 } ||
3764 {
3765    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3766    { (exit 1); exit 1; }
3767 }
3768   _max=0
3769   _count=0
3770   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3771   # along with /bin/sed that truncates output.
3772   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3773     test ! -f ${_sed} && break
3774     cat /dev/null > "$tmp/sed.in"
3775     _count=0
3776     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3777     # Check for GNU sed and select it if it is found.
3778     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3779       lt_cv_path_SED=${_sed}
3780       break
3781     fi
3782     while true; do
3783       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3784       mv "$tmp/sed.tmp" "$tmp/sed.in"
3785       cp "$tmp/sed.in" "$tmp/sed.nl"
3786       echo >>"$tmp/sed.nl"
3787       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3788       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3789       # 40000 chars as input seems more than enough
3790       test $_count -gt 10 && break
3791       _count=`expr $_count + 1`
3792       if test $_count -gt $_max; then
3793         _max=$_count
3794         lt_cv_path_SED=$_sed
3795       fi
3796     done
3797   done
3798   rm -rf "$tmp"
3799
3800 fi
3801
3802 if test "X$SED" != "X"; then
3803   lt_cv_path_SED=$SED
3804 else
3805   SED=$lt_cv_path_SED
3806 fi
3807 echo "$ac_t""$SED" 1>&6
3808
3809 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3810 echo "configure:3811: checking whether ln -s works" >&5
3811 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3812   echo $ac_n "(cached) $ac_c" 1>&6
3813 else
3814   rm -f conftestdata
3815 if ln -s X conftestdata 2>/dev/null
3816 then
3817   rm -f conftestdata
3818   ac_cv_prog_LN_S="ln -s"
3819 else
3820   ac_cv_prog_LN_S=ln
3821 fi
3822 fi
3823 LN_S="$ac_cv_prog_LN_S"
3824 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3825   echo "$ac_t""yes" 1>&6
3826 else
3827   echo "$ac_t""no" 1>&6
3828 fi
3829
3830 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3831 echo "configure:3832: checking how to recognise dependent libraries" >&5
3832 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3833   echo $ac_n "(cached) $ac_c" 1>&6
3834 else
3835   lt_cv_file_magic_cmd='$MAGIC_CMD'
3836 lt_cv_file_magic_test_file=
3837 lt_cv_deplibs_check_method='unknown'
3838 # Need to set the preceding variable on all platforms that support
3839 # interlibrary dependencies.
3840 # 'none' -- dependencies not supported.
3841 # `unknown' -- same as none, but documents that we really don't know.
3842 # 'pass_all' -- all dependencies passed with no checks.
3843 # 'test_compile' -- check by making test program.
3844 # 'file_magic [[regex]]' -- check by looking for files in library path
3845 # which responds to the $file_magic_cmd with a given egrep regex.
3846 # If you have `file' or equivalent on your system and you're not sure
3847 # whether `pass_all' will *always* work, you probably want this one.
3848
3849 case $host_os in
3850 aix4* | aix5*)
3851   lt_cv_deplibs_check_method=pass_all
3852   ;;
3853
3854 beos*)
3855   lt_cv_deplibs_check_method=pass_all
3856   ;;
3857
3858 bsdi4*)
3859   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3860   lt_cv_file_magic_cmd='/usr/bin/file -L'
3861   lt_cv_file_magic_test_file=/shlib/libc.so
3862   ;;
3863
3864 cygwin* | mingw* | pw32*)
3865   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3866   lt_cv_file_magic_cmd='$OBJDUMP -f'
3867   ;;
3868
3869 darwin* | rhapsody*)
3870   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3871   lt_cv_file_magic_cmd='/usr/bin/file -L'
3872   case "$host_os" in
3873   rhapsody* | darwin1.[012])
3874     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3875     ;;
3876   *) # Darwin 1.3 on
3877     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3878     ;;
3879   esac
3880   ;;
3881
3882 freebsd*)
3883   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3884     case $host_cpu in
3885     i*86 )
3886       # Not sure whether the presence of OpenBSD here was a mistake.
3887       # Let's accept both of them until this is cleared up.
3888       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3889       lt_cv_file_magic_cmd=/usr/bin/file
3890       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3891       ;;
3892     esac
3893   else
3894     lt_cv_deplibs_check_method=pass_all
3895   fi
3896   ;;
3897
3898 gnu*)
3899   lt_cv_deplibs_check_method=pass_all
3900   ;;
3901
3902 hpux10.20*|hpux11*)
3903   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3904   lt_cv_file_magic_cmd=/usr/bin/file
3905   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3906   ;;
3907
3908 irix5* | irix6* | nonstopux*)
3909   case $host_os in
3910   irix5* | nonstopux*)
3911     # this will be overridden with pass_all, but let us keep it just in case
3912     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3913     ;;
3914   *)
3915     case $LD in
3916     *-32|*"-32 ") libmagic=32-bit;;
3917     *-n32|*"-n32 ") libmagic=N32;;
3918     *-64|*"-64 ") libmagic=64-bit;;
3919     *) libmagic=never-match;;
3920     esac
3921     # this will be overridden with pass_all, but let us keep it just in case
3922     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3923     ;;
3924   esac
3925   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3926   lt_cv_deplibs_check_method=pass_all
3927   ;;
3928
3929 # This must be Linux ELF.
3930 linux-gnu*)
3931   case $host_cpu in
3932   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3933     lt_cv_deplibs_check_method=pass_all ;;
3934   *)
3935     # glibc up to 2.1.1 does not perform some relocations on ARM
3936     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3937   esac
3938   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3939   ;;
3940
3941 netbsd*)
3942   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3943     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3944   else
3945     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3946   fi
3947   ;;
3948
3949 newos6*)
3950   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3951   lt_cv_file_magic_cmd=/usr/bin/file
3952   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3953   ;;
3954
3955 openbsd*)
3956   lt_cv_file_magic_cmd=/usr/bin/file
3957   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3958   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3959     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3960   else
3961     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3962   fi
3963   ;;
3964
3965 osf3* | osf4* | osf5*)
3966   # this will be overridden with pass_all, but let us keep it just in case
3967   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3968   lt_cv_file_magic_test_file=/shlib/libc.so
3969   lt_cv_deplibs_check_method=pass_all
3970   ;;
3971
3972 sco3.2v5*)
3973   lt_cv_deplibs_check_method=pass_all
3974   ;;
3975
3976 solaris*)
3977   lt_cv_deplibs_check_method=pass_all
3978   lt_cv_file_magic_test_file=/lib/libc.so
3979   ;;
3980
3981 sysv5uw[78]* | sysv4*uw2*)
3982   lt_cv_deplibs_check_method=pass_all
3983   ;;
3984
3985 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3986   case $host_vendor in
3987   motorola)
3988     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]'
3989     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3990     ;;
3991   ncr)
3992     lt_cv_deplibs_check_method=pass_all
3993     ;;
3994   sequent)
3995     lt_cv_file_magic_cmd='/bin/file'
3996     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3997     ;;
3998   sni)
3999     lt_cv_file_magic_cmd='/bin/file'
4000     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4001     lt_cv_file_magic_test_file=/lib/libc.so
4002     ;;
4003   siemens)
4004     lt_cv_deplibs_check_method=pass_all
4005     ;;
4006   esac
4007   ;;
4008 esac
4009
4010 fi
4011
4012 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
4013 file_magic_cmd=$lt_cv_file_magic_cmd
4014 deplibs_check_method=$lt_cv_deplibs_check_method
4015
4016 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4017 echo "configure:4018: checking for object suffix" >&5
4018 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4019   echo $ac_n "(cached) $ac_c" 1>&6
4020 else
4021   rm -f conftest*
4022 echo 'int i = 1;' > conftest.$ac_ext
4023 if { (eval echo configure:4024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4024   for ac_file in conftest.*; do
4025     case $ac_file in
4026     *.c) ;;
4027     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4028     esac
4029   done
4030 else
4031   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4032 fi
4033 rm -f conftest*
4034 fi
4035
4036 echo "$ac_t""$ac_cv_objext" 1>&6
4037 OBJEXT=$ac_cv_objext
4038 ac_objext=$ac_cv_objext
4039
4040
4041
4042
4043 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4044 echo "configure:4045: checking for executable suffix" >&5
4045 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4046   echo $ac_n "(cached) $ac_c" 1>&6
4047 else
4048   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4049   ac_cv_exeext=.exe
4050 else
4051   rm -f conftest*
4052   echo 'int main () { return 0; }' > conftest.$ac_ext
4053   ac_cv_exeext=
4054   if { (eval echo configure:4055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4055     for file in conftest.*; do
4056       case $file in
4057       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4058       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4059       esac
4060     done
4061   else
4062     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4063   fi
4064   rm -f conftest*
4065   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4066 fi
4067 fi
4068
4069 EXEEXT=""
4070 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4071 echo "$ac_t""${ac_cv_exeext}" 1>&6
4072 ac_exeext=$EXEEXT
4073
4074 if test $host != $build; then
4075   ac_tool_prefix=${host_alias}-
4076 else
4077   ac_tool_prefix=
4078 fi
4079
4080
4081
4082
4083 # Check for command to grab the raw symbol name followed by C symbol from nm.
4084 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4085 echo "configure:4086: checking command to parse $NM output" >&5
4086 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4087   echo $ac_n "(cached) $ac_c" 1>&6
4088 else
4089   
4090 # These are sane defaults that work on at least a few old systems.
4091 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4092
4093 # Character class describing NM global symbol codes.
4094 symcode='[BCDEGRST]'
4095
4096 # Regexp to match symbols that can be accessed directly from C.
4097 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4098
4099 # Transform the above into a raw symbol and a C symbol.
4100 symxfrm='\1 \2\3 \3'
4101
4102 # Transform an extracted symbol line into a proper C declaration
4103 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4104
4105 # Transform an extracted symbol line into symbol name and symbol address
4106 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'"
4107
4108 # Define system-specific variables.
4109 case $host_os in
4110 aix*)
4111   symcode='[BCDT]'
4112   ;;
4113 cygwin* | mingw* | pw32*)
4114   symcode='[ABCDGISTW]'
4115   ;;
4116 hpux*) # Its linker distinguishes data from code symbols
4117   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4118   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'"
4119   ;;
4120 irix* | nonstopux*)
4121   symcode='[BCDEGRST]'
4122   ;;
4123 osf*)
4124   symcode='[BCDEGQRST]'
4125   ;;
4126 solaris* | sysv5*)
4127   symcode='[BDT]'
4128   ;;
4129 sysv4)
4130   symcode='[DFNSTU]'
4131   ;;
4132 esac
4133
4134 # Handle CRLF in mingw tool chain
4135 opt_cr=
4136 case $host_os in
4137 mingw*)
4138   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4139   ;;
4140 esac
4141
4142 # If we're using GNU nm, then use its standard symbol codes.
4143 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4144   symcode='[ABCDGISTW]'
4145 fi
4146
4147 # Try without a prefix undercore, then with it.
4148 for ac_symprfx in "" "_"; do
4149
4150   # Write the raw and C identifiers.
4151 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4152
4153   # Check to see that the pipe works correctly.
4154   pipe_works=no
4155   rm -f conftest*
4156   cat > conftest.$ac_ext <<EOF
4157 #ifdef __cplusplus
4158 extern "C" {
4159 #endif
4160 char nm_test_var;
4161 void nm_test_func(){}
4162 #ifdef __cplusplus
4163 }
4164 #endif
4165 int main(){nm_test_var='a';nm_test_func();return(0);}
4166 EOF
4167
4168   if { (eval echo configure:4169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4169     # Now try to grab the symbols.
4170     nlist=conftest.nm
4171     if { (eval echo configure:4172: \"$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
4172       # Try sorting and uniquifying the output.
4173       if sort "$nlist" | uniq > "$nlist"T; then
4174         mv -f "$nlist"T "$nlist"
4175       else
4176         rm -f "$nlist"T
4177       fi
4178
4179       # Make sure that we snagged all the symbols we need.
4180       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4181         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4182           cat <<EOF > conftest.$ac_ext
4183 #ifdef __cplusplus
4184 extern "C" {
4185 #endif
4186
4187 EOF
4188           # Now generate the symbol file.
4189           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4190
4191           cat <<EOF >> conftest.$ac_ext
4192 #if defined (__STDC__) && __STDC__
4193 # define lt_ptr void *
4194 #else
4195 # define lt_ptr char *
4196 # define const
4197 #endif
4198
4199 /* The mapping between symbol names and symbols. */
4200 const struct {
4201   const char *name;
4202   lt_ptr address;
4203 }
4204 lt_preloaded_symbols[] =
4205 {
4206 EOF
4207           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4208           cat <<\EOF >> conftest.$ac_ext
4209   {0, (lt_ptr) 0}
4210 };
4211
4212 #ifdef __cplusplus
4213 }
4214 #endif
4215 EOF
4216           # Now try linking the two files.
4217           mv conftest.$ac_objext conftstm.$ac_objext
4218           save_LIBS="$LIBS"
4219           save_CFLAGS="$CFLAGS"
4220           LIBS="conftstm.$ac_objext"
4221           CFLAGS="$CFLAGS$no_builtin_flag"
4222           if { (eval echo configure:4223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4223             pipe_works=yes
4224           fi
4225           LIBS="$save_LIBS"
4226           CFLAGS="$save_CFLAGS"
4227         else
4228           echo "cannot find nm_test_func in $nlist" >&5
4229         fi
4230       else
4231         echo "cannot find nm_test_var in $nlist" >&5
4232       fi
4233     else
4234       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4235     fi
4236   else
4237     echo "$progname: failed program was:" >&5
4238     cat conftest.$ac_ext >&5
4239   fi
4240   rm -f conftest* conftst*
4241
4242   # Do not use the global_symbol_pipe unless it works.
4243   if test "$pipe_works" = yes; then
4244     break
4245   else
4246     lt_cv_sys_global_symbol_pipe=
4247   fi
4248 done
4249
4250 fi
4251
4252 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4253 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4254   global_symbol_to_cdecl=
4255   global_symbol_to_c_name_address=
4256 else
4257   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4258   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4259 fi
4260 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4261 then
4262   echo "$ac_t""failed" 1>&6
4263 else
4264   echo "$ac_t""ok" 1>&6
4265 fi
4266
4267 for ac_hdr in dlfcn.h
4268 do
4269 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4270 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4271 echo "configure:4272: checking for $ac_hdr" >&5
4272 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4273   echo $ac_n "(cached) $ac_c" 1>&6
4274 else
4275   cat > conftest.$ac_ext <<EOF
4276 #line 4277 "configure"
4277 #include "confdefs.h"
4278 #include <$ac_hdr>
4279 EOF
4280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4281 { (eval echo configure:4282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4283 if test -z "$ac_err"; then
4284   rm -rf conftest*
4285   eval "ac_cv_header_$ac_safe=yes"
4286 else
4287   echo "$ac_err" >&5
4288   echo "configure: failed program was:" >&5
4289   cat conftest.$ac_ext >&5
4290   rm -rf conftest*
4291   eval "ac_cv_header_$ac_safe=no"
4292 fi
4293 rm -f conftest*
4294 fi
4295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4296   echo "$ac_t""yes" 1>&6
4297     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4298   cat >> confdefs.h <<EOF
4299 #define $ac_tr_hdr 1
4300 EOF
4301  
4302 else
4303   echo "$ac_t""no" 1>&6
4304 fi
4305 done
4306
4307
4308
4309
4310
4311
4312 # Only perform the check for file, if the check method requires it
4313 case $deplibs_check_method in
4314 file_magic*)
4315   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4316     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4317 echo "configure:4318: checking for ${ac_tool_prefix}file" >&5
4318 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4319   echo $ac_n "(cached) $ac_c" 1>&6
4320 else
4321   case $MAGIC_CMD in
4322   /*)
4323   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4324   ;;
4325   ?:/*)
4326   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4327   ;;
4328   *)
4329   ac_save_MAGIC_CMD="$MAGIC_CMD"
4330   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4331   ac_dummy="/usr/bin:$PATH"
4332   for ac_dir in $ac_dummy; do
4333     test -z "$ac_dir" && ac_dir=.
4334     if test -f $ac_dir/${ac_tool_prefix}file; then
4335       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4336       if test -n "$file_magic_test_file"; then
4337         case $deplibs_check_method in
4338         "file_magic "*)
4339           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4340           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4341           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4342             egrep "$file_magic_regex" > /dev/null; then
4343             :
4344           else
4345             cat <<EOF 1>&2
4346
4347 *** Warning: the command libtool uses to detect shared libraries,
4348 *** $file_magic_cmd, produces output that libtool cannot recognize.
4349 *** The result is that libtool may fail to recognize shared libraries
4350 *** as such.  This will affect the creation of libtool libraries that
4351 *** depend on shared libraries, but programs linked with such libtool
4352 *** libraries will work regardless of this problem.  Nevertheless, you
4353 *** may want to report the problem to your system manager and/or to
4354 *** bug-libtool@gnu.org
4355
4356 EOF
4357           fi ;;
4358         esac
4359       fi
4360       break
4361     fi
4362   done
4363   IFS="$ac_save_ifs"
4364   MAGIC_CMD="$ac_save_MAGIC_CMD"
4365   ;;
4366 esac
4367 fi
4368
4369 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4370 if test -n "$MAGIC_CMD"; then
4371   echo "$ac_t""$MAGIC_CMD" 1>&6
4372 else
4373   echo "$ac_t""no" 1>&6
4374 fi
4375
4376 if test -z "$lt_cv_path_MAGIC_CMD"; then
4377   if test -n "$ac_tool_prefix"; then
4378     echo $ac_n "checking for file""... $ac_c" 1>&6
4379 echo "configure:4380: checking for file" >&5
4380 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4381   echo $ac_n "(cached) $ac_c" 1>&6
4382 else
4383   case $MAGIC_CMD in
4384   /*)
4385   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4386   ;;
4387   ?:/*)
4388   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4389   ;;
4390   *)
4391   ac_save_MAGIC_CMD="$MAGIC_CMD"
4392   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4393   ac_dummy="/usr/bin:$PATH"
4394   for ac_dir in $ac_dummy; do
4395     test -z "$ac_dir" && ac_dir=.
4396     if test -f $ac_dir/file; then
4397       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4398       if test -n "$file_magic_test_file"; then
4399         case $deplibs_check_method in
4400         "file_magic "*)
4401           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4402           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4403           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4404             egrep "$file_magic_regex" > /dev/null; then
4405             :
4406           else
4407             cat <<EOF 1>&2
4408
4409 *** Warning: the command libtool uses to detect shared libraries,
4410 *** $file_magic_cmd, produces output that libtool cannot recognize.
4411 *** The result is that libtool may fail to recognize shared libraries
4412 *** as such.  This will affect the creation of libtool libraries that
4413 *** depend on shared libraries, but programs linked with such libtool
4414 *** libraries will work regardless of this problem.  Nevertheless, you
4415 *** may want to report the problem to your system manager and/or to
4416 *** bug-libtool@gnu.org
4417
4418 EOF
4419           fi ;;
4420         esac
4421       fi
4422       break
4423     fi
4424   done
4425   IFS="$ac_save_ifs"
4426   MAGIC_CMD="$ac_save_MAGIC_CMD"
4427   ;;
4428 esac
4429 fi
4430
4431 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4432 if test -n "$MAGIC_CMD"; then
4433   echo "$ac_t""$MAGIC_CMD" 1>&6
4434 else
4435   echo "$ac_t""no" 1>&6
4436 fi
4437
4438   else
4439     MAGIC_CMD=:
4440   fi
4441 fi
4442
4443   fi
4444   ;;
4445 esac
4446
4447 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4448 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4449 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4450 echo "configure:4451: checking for $ac_word" >&5
4451 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4452   echo $ac_n "(cached) $ac_c" 1>&6
4453 else
4454   if test -n "$RANLIB"; then
4455   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4456 else
4457   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4458   ac_dummy="$PATH"
4459   for ac_dir in $ac_dummy; do
4460     test -z "$ac_dir" && ac_dir=.
4461     if test -f $ac_dir/$ac_word; then
4462       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4463       break
4464     fi
4465   done
4466   IFS="$ac_save_ifs"
4467 fi
4468 fi
4469 RANLIB="$ac_cv_prog_RANLIB"
4470 if test -n "$RANLIB"; then
4471   echo "$ac_t""$RANLIB" 1>&6
4472 else
4473   echo "$ac_t""no" 1>&6
4474 fi
4475
4476
4477 if test -z "$ac_cv_prog_RANLIB"; then
4478 if test -n "$ac_tool_prefix"; then
4479   # Extract the first word of "ranlib", so it can be a program name with args.
4480 set dummy ranlib; ac_word=$2
4481 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4482 echo "configure:4483: checking for $ac_word" >&5
4483 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4484   echo $ac_n "(cached) $ac_c" 1>&6
4485 else
4486   if test -n "$RANLIB"; then
4487   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4488 else
4489   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4490   ac_dummy="$PATH"
4491   for ac_dir in $ac_dummy; do
4492     test -z "$ac_dir" && ac_dir=.
4493     if test -f $ac_dir/$ac_word; then
4494       ac_cv_prog_RANLIB="ranlib"
4495       break
4496     fi
4497   done
4498   IFS="$ac_save_ifs"
4499   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4500 fi
4501 fi
4502 RANLIB="$ac_cv_prog_RANLIB"
4503 if test -n "$RANLIB"; then
4504   echo "$ac_t""$RANLIB" 1>&6
4505 else
4506   echo "$ac_t""no" 1>&6
4507 fi
4508
4509 else
4510   RANLIB=":"
4511 fi
4512 fi
4513
4514 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4515 set dummy ${ac_tool_prefix}strip; ac_word=$2
4516 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4517 echo "configure:4518: checking for $ac_word" >&5
4518 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4519   echo $ac_n "(cached) $ac_c" 1>&6
4520 else
4521   if test -n "$STRIP"; then
4522   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4523 else
4524   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4525   ac_dummy="$PATH"
4526   for ac_dir in $ac_dummy; do
4527     test -z "$ac_dir" && ac_dir=.
4528     if test -f $ac_dir/$ac_word; then
4529       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4530       break
4531     fi
4532   done
4533   IFS="$ac_save_ifs"
4534 fi
4535 fi
4536 STRIP="$ac_cv_prog_STRIP"
4537 if test -n "$STRIP"; then
4538   echo "$ac_t""$STRIP" 1>&6
4539 else
4540   echo "$ac_t""no" 1>&6
4541 fi
4542
4543
4544 if test -z "$ac_cv_prog_STRIP"; then
4545 if test -n "$ac_tool_prefix"; then
4546   # Extract the first word of "strip", so it can be a program name with args.
4547 set dummy strip; ac_word=$2
4548 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4549 echo "configure:4550: checking for $ac_word" >&5
4550 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4551   echo $ac_n "(cached) $ac_c" 1>&6
4552 else
4553   if test -n "$STRIP"; then
4554   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4555 else
4556   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4557   ac_dummy="$PATH"
4558   for ac_dir in $ac_dummy; do
4559     test -z "$ac_dir" && ac_dir=.
4560     if test -f $ac_dir/$ac_word; then
4561       ac_cv_prog_STRIP="strip"
4562       break
4563     fi
4564   done
4565   IFS="$ac_save_ifs"
4566   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4567 fi
4568 fi
4569 STRIP="$ac_cv_prog_STRIP"
4570 if test -n "$STRIP"; then
4571   echo "$ac_t""$STRIP" 1>&6
4572 else
4573   echo "$ac_t""no" 1>&6
4574 fi
4575
4576 else
4577   STRIP=":"
4578 fi
4579 fi
4580
4581
4582 enable_dlopen=yes
4583 enable_win32_dll=yes
4584
4585 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4586 if test "${enable_libtool_lock+set}" = set; then
4587   enableval="$enable_libtool_lock"
4588   :
4589 fi
4590
4591 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4592
4593 # Some flags need to be propagated to the compiler or linker for good
4594 # libtool support.
4595 case $host in
4596 *-*-irix6*)
4597   # Find out which ABI we are using.
4598   echo '#line 4599 "configure"' > conftest.$ac_ext
4599   if { (eval echo configure:4600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4600     case `/usr/bin/file conftest.$ac_objext` in
4601     *32-bit*)
4602       LD="${LD-ld} -32"
4603       ;;
4604     *N32*)
4605       LD="${LD-ld} -n32"
4606       ;;
4607     *64-bit*)
4608       LD="${LD-ld} -64"
4609       ;;
4610     esac
4611   fi
4612   rm -rf conftest*
4613   ;;
4614
4615 *-*-sco3.2v5*)
4616   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4617   SAVE_CFLAGS="$CFLAGS"
4618   CFLAGS="$CFLAGS -belf"
4619   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4620 echo "configure:4621: checking whether the C compiler needs -belf" >&5
4621 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4622   echo $ac_n "(cached) $ac_c" 1>&6
4623 else
4624   
4625      ac_ext=c
4626 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4627 ac_cpp='$CPP $CPPFLAGS'
4628 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4629 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4630 cross_compiling=$ac_cv_prog_cc_cross
4631
4632      cat > conftest.$ac_ext <<EOF
4633 #line 4634 "configure"
4634 #include "confdefs.h"
4635
4636 int main() {
4637
4638 ; return 0; }
4639 EOF
4640 if { (eval echo configure:4641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4641   rm -rf conftest*
4642   lt_cv_cc_needs_belf=yes
4643 else
4644   echo "configure: failed program was:" >&5
4645   cat conftest.$ac_ext >&5
4646   rm -rf conftest*
4647   lt_cv_cc_needs_belf=no
4648 fi
4649 rm -f conftest*
4650      ac_ext=c
4651 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4652 ac_cpp='$CPP $CPPFLAGS'
4653 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4654 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4655 cross_compiling=$ac_cv_prog_cc_cross
4656
4657 fi
4658
4659 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4660   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4661     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4662     CFLAGS="$SAVE_CFLAGS"
4663   fi
4664   ;;
4665
4666 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4667   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4668 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4669 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4670 echo "configure:4671: checking for $ac_word" >&5
4671 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4672   echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674   if test -n "$DLLTOOL"; then
4675   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4676 else
4677   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4678   ac_dummy="$PATH"
4679   for ac_dir in $ac_dummy; do
4680     test -z "$ac_dir" && ac_dir=.
4681     if test -f $ac_dir/$ac_word; then
4682       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4683       break
4684     fi
4685   done
4686   IFS="$ac_save_ifs"
4687 fi
4688 fi
4689 DLLTOOL="$ac_cv_prog_DLLTOOL"
4690 if test -n "$DLLTOOL"; then
4691   echo "$ac_t""$DLLTOOL" 1>&6
4692 else
4693   echo "$ac_t""no" 1>&6
4694 fi
4695
4696
4697 if test -z "$ac_cv_prog_DLLTOOL"; then
4698 if test -n "$ac_tool_prefix"; then
4699   # Extract the first word of "dlltool", so it can be a program name with args.
4700 set dummy dlltool; ac_word=$2
4701 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4702 echo "configure:4703: checking for $ac_word" >&5
4703 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4704   echo $ac_n "(cached) $ac_c" 1>&6
4705 else
4706   if test -n "$DLLTOOL"; then
4707   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4708 else
4709   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4710   ac_dummy="$PATH"
4711   for ac_dir in $ac_dummy; do
4712     test -z "$ac_dir" && ac_dir=.
4713     if test -f $ac_dir/$ac_word; then
4714       ac_cv_prog_DLLTOOL="dlltool"
4715       break
4716     fi
4717   done
4718   IFS="$ac_save_ifs"
4719   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4720 fi
4721 fi
4722 DLLTOOL="$ac_cv_prog_DLLTOOL"
4723 if test -n "$DLLTOOL"; then
4724   echo "$ac_t""$DLLTOOL" 1>&6
4725 else
4726   echo "$ac_t""no" 1>&6
4727 fi
4728
4729 else
4730   DLLTOOL="false"
4731 fi
4732 fi
4733
4734   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4735 set dummy ${ac_tool_prefix}as; ac_word=$2
4736 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4737 echo "configure:4738: checking for $ac_word" >&5
4738 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4739   echo $ac_n "(cached) $ac_c" 1>&6
4740 else
4741   if test -n "$AS"; then
4742   ac_cv_prog_AS="$AS" # Let the user override the test.
4743 else
4744   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4745   ac_dummy="$PATH"
4746   for ac_dir in $ac_dummy; do
4747     test -z "$ac_dir" && ac_dir=.
4748     if test -f $ac_dir/$ac_word; then
4749       ac_cv_prog_AS="${ac_tool_prefix}as"
4750       break
4751     fi
4752   done
4753   IFS="$ac_save_ifs"
4754 fi
4755 fi
4756 AS="$ac_cv_prog_AS"
4757 if test -n "$AS"; then
4758   echo "$ac_t""$AS" 1>&6
4759 else
4760   echo "$ac_t""no" 1>&6
4761 fi
4762
4763
4764 if test -z "$ac_cv_prog_AS"; then
4765 if test -n "$ac_tool_prefix"; then
4766   # Extract the first word of "as", so it can be a program name with args.
4767 set dummy as; ac_word=$2
4768 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4769 echo "configure:4770: checking for $ac_word" >&5
4770 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4771   echo $ac_n "(cached) $ac_c" 1>&6
4772 else
4773   if test -n "$AS"; then
4774   ac_cv_prog_AS="$AS" # Let the user override the test.
4775 else
4776   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4777   ac_dummy="$PATH"
4778   for ac_dir in $ac_dummy; do
4779     test -z "$ac_dir" && ac_dir=.
4780     if test -f $ac_dir/$ac_word; then
4781       ac_cv_prog_AS="as"
4782       break
4783     fi
4784   done
4785   IFS="$ac_save_ifs"
4786   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4787 fi
4788 fi
4789 AS="$ac_cv_prog_AS"
4790 if test -n "$AS"; then
4791   echo "$ac_t""$AS" 1>&6
4792 else
4793   echo "$ac_t""no" 1>&6
4794 fi
4795
4796 else
4797   AS="false"
4798 fi
4799 fi
4800
4801   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4802 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4803 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4804 echo "configure:4805: checking for $ac_word" >&5
4805 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4806   echo $ac_n "(cached) $ac_c" 1>&6
4807 else
4808   if test -n "$OBJDUMP"; then
4809   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4810 else
4811   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4812   ac_dummy="$PATH"
4813   for ac_dir in $ac_dummy; do
4814     test -z "$ac_dir" && ac_dir=.
4815     if test -f $ac_dir/$ac_word; then
4816       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4817       break
4818     fi
4819   done
4820   IFS="$ac_save_ifs"
4821 fi
4822 fi
4823 OBJDUMP="$ac_cv_prog_OBJDUMP"
4824 if test -n "$OBJDUMP"; then
4825   echo "$ac_t""$OBJDUMP" 1>&6
4826 else
4827   echo "$ac_t""no" 1>&6
4828 fi
4829
4830
4831 if test -z "$ac_cv_prog_OBJDUMP"; then
4832 if test -n "$ac_tool_prefix"; then
4833   # Extract the first word of "objdump", so it can be a program name with args.
4834 set dummy objdump; ac_word=$2
4835 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4836 echo "configure:4837: checking for $ac_word" >&5
4837 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4838   echo $ac_n "(cached) $ac_c" 1>&6
4839 else
4840   if test -n "$OBJDUMP"; then
4841   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4842 else
4843   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4844   ac_dummy="$PATH"
4845   for ac_dir in $ac_dummy; do
4846     test -z "$ac_dir" && ac_dir=.
4847     if test -f $ac_dir/$ac_word; then
4848       ac_cv_prog_OBJDUMP="objdump"
4849       break
4850     fi
4851   done
4852   IFS="$ac_save_ifs"
4853   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4854 fi
4855 fi
4856 OBJDUMP="$ac_cv_prog_OBJDUMP"
4857 if test -n "$OBJDUMP"; then
4858   echo "$ac_t""$OBJDUMP" 1>&6
4859 else
4860   echo "$ac_t""no" 1>&6
4861 fi
4862
4863 else
4864   OBJDUMP="false"
4865 fi
4866 fi
4867
4868
4869   # recent cygwin and mingw systems supply a stub DllMain which the user
4870   # can override, but on older systems we have to supply one
4871   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4872 echo "configure:4873: checking if libtool should supply DllMain function" >&5
4873 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4874   echo $ac_n "(cached) $ac_c" 1>&6
4875 else
4876   cat > conftest.$ac_ext <<EOF
4877 #line 4878 "configure"
4878 #include "confdefs.h"
4879
4880 int main() {
4881 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4882       DllMain (0, 0, 0);
4883 ; return 0; }
4884 EOF
4885 if { (eval echo configure:4886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4886   rm -rf conftest*
4887   lt_cv_need_dllmain=no
4888 else
4889   echo "configure: failed program was:" >&5
4890   cat conftest.$ac_ext >&5
4891   rm -rf conftest*
4892   lt_cv_need_dllmain=yes
4893 fi
4894 rm -f conftest*
4895 fi
4896
4897 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4898
4899   case $host/$CC in
4900   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4901     # old mingw systems require "-dll" to link a DLL, while more recent ones
4902     # require "-mdll"
4903     SAVE_CFLAGS="$CFLAGS"
4904     CFLAGS="$CFLAGS -mdll"
4905     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4906 echo "configure:4907: checking how to link DLLs" >&5
4907 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4908   echo $ac_n "(cached) $ac_c" 1>&6
4909 else
4910   cat > conftest.$ac_ext <<EOF
4911 #line 4912 "configure"
4912 #include "confdefs.h"
4913
4914 int main() {
4915
4916 ; return 0; }
4917 EOF
4918 if { (eval echo configure:4919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4919   rm -rf conftest*
4920   lt_cv_cc_dll_switch=-mdll
4921 else
4922   echo "configure: failed program was:" >&5
4923   cat conftest.$ac_ext >&5
4924   rm -rf conftest*
4925   lt_cv_cc_dll_switch=-dll
4926 fi
4927 rm -f conftest*
4928 fi
4929
4930 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4931     CFLAGS="$SAVE_CFLAGS" ;;
4932   *-*-cygwin* | *-*-pw32*)
4933     # cygwin systems need to pass --dll to the linker, and not link
4934     # crt.o which will require a WinMain@16 definition.
4935     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4936   esac
4937   ;;
4938   
4939 esac
4940
4941 # Sed substitution that helps us do robust quoting.  It backslashifies
4942 # metacharacters that are still active within double-quoted strings.
4943 Xsed='sed -e s/^X//'
4944 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4945
4946 # Same as above, but do not quote variable references.
4947 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4948
4949 # Sed substitution to delay expansion of an escaped shell variable in a
4950 # double_quote_subst'ed string.
4951 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4952
4953 # Constants:
4954 rm="rm -f"
4955
4956 # Global variables:
4957 default_ofile=libtool
4958 can_build_shared=yes
4959
4960 # All known linkers require a `.a' archive for static linking (except M$VC,
4961 # which needs '.lib').
4962 libext=a
4963 ltmain="$ac_aux_dir/ltmain.sh"
4964 ofile="$default_ofile"
4965 with_gnu_ld="$lt_cv_prog_gnu_ld"
4966 need_locks="$enable_libtool_lock"
4967
4968 old_CC="$CC"
4969 old_CFLAGS="$CFLAGS"
4970
4971 # Set sane defaults for various variables
4972 test -z "$AR" && AR=ar
4973 test -z "$AR_FLAGS" && AR_FLAGS=cru
4974 test -z "$AS" && AS=as
4975 test -z "$CC" && CC=cc
4976 test -z "$DLLTOOL" && DLLTOOL=dlltool
4977 test -z "$LD" && LD=ld
4978 test -z "$LN_S" && LN_S="ln -s"
4979 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4980 test -z "$NM" && NM=nm
4981 test -z "$OBJDUMP" && OBJDUMP=objdump
4982 test -z "$RANLIB" && RANLIB=:
4983 test -z "$STRIP" && STRIP=:
4984 test -z "$ac_objext" && ac_objext=o
4985
4986 if test x"$host" != x"$build"; then
4987   ac_tool_prefix=${host_alias}-
4988 else
4989   ac_tool_prefix=
4990 fi
4991
4992 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4993 case $host_os in
4994 linux-gnu*) ;;
4995 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4996 esac
4997
4998 case $host_os in
4999 aix3*)
5000   # AIX sometimes has problems with the GCC collect2 program.  For some
5001   # reason, if we set the COLLECT_NAMES environment variable, the problems
5002   # vanish in a puff of smoke.
5003   if test "X${COLLECT_NAMES+set}" != Xset; then
5004     COLLECT_NAMES=
5005     export COLLECT_NAMES
5006   fi
5007   ;;
5008 esac
5009
5010 # Determine commands to create old-style static archives.
5011 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5012 old_postinstall_cmds='chmod 644 $oldlib'
5013 old_postuninstall_cmds=
5014
5015 if test -n "$RANLIB"; then
5016   case $host_os in
5017   openbsd*)
5018     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5019     ;;
5020   *)
5021     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5022     ;;
5023   esac
5024   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5025 fi
5026
5027 # Allow CC to be a program name with arguments.
5028 set dummy $CC
5029 compiler="$2"
5030
5031 ## FIXME: this should be a separate macro
5032 ##
5033 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5034 echo "configure:5035: checking for objdir" >&5
5035 rm -f .libs 2>/dev/null
5036 mkdir .libs 2>/dev/null
5037 if test -d .libs; then
5038   objdir=.libs
5039 else
5040   # MS-DOS does not allow filenames that begin with a dot.
5041   objdir=_libs
5042 fi
5043 rmdir .libs 2>/dev/null
5044 echo "$ac_t""$objdir" 1>&6
5045 ##
5046 ## END FIXME
5047
5048
5049 ## FIXME: this should be a separate macro
5050 ##
5051 # Check whether --with-pic or --without-pic was given.
5052 if test "${with_pic+set}" = set; then
5053   withval="$with_pic"
5054   pic_mode="$withval"
5055 else
5056   pic_mode=default
5057 fi
5058
5059 test -z "$pic_mode" && pic_mode=default
5060
5061 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5062 # in isolation, and that seeing it set (from the cache) indicates that
5063 # the associated values are set (in the cache) correctly too.
5064 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5065 echo "configure:5066: checking for $compiler option to produce PIC" >&5
5066 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5067   echo $ac_n "(cached) $ac_c" 1>&6
5068 else
5069    lt_cv_prog_cc_pic=
5070   lt_cv_prog_cc_shlib=
5071   lt_cv_prog_cc_wl=
5072   lt_cv_prog_cc_static=
5073   lt_cv_prog_cc_no_builtin=
5074   lt_cv_prog_cc_can_build_shared=$can_build_shared
5075
5076   if test "$GCC" = yes; then
5077     lt_cv_prog_cc_wl='-Wl,'
5078     lt_cv_prog_cc_static='-static'
5079
5080     case $host_os in
5081     aix*)
5082       # Below there is a dirty hack to force normal static linking with -ldl
5083       # The problem is because libdl dynamically linked with both libc and
5084       # libC (AIX C++ library), which obviously doesn't included in libraries
5085       # list by gcc. This cause undefined symbols with -static flags.
5086       # This hack allows C programs to be linked with "-static -ldl", but
5087       # not sure about C++ programs.
5088       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5089       ;;
5090     amigaos*)
5091       # FIXME: we need at least 68020 code to build shared libraries, but
5092       # adding the `-m68020' flag to GCC prevents building anything better,
5093       # like `-m68040'.
5094       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5095       ;;
5096     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5097       # PIC is the default for these OSes.
5098       ;;
5099     darwin* | rhapsody*)
5100       # PIC is the default on this platform
5101       # Common symbols not allowed in MH_DYLIB files
5102       lt_cv_prog_cc_pic='-fno-common'
5103       ;;
5104     cygwin* | mingw* | pw32* | os2*)
5105       # This hack is so that the source file can tell whether it is being
5106       # built for inclusion in a dll (and should export symbols for example).
5107       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5108       ;;
5109     sysv4*MP*)
5110       if test -d /usr/nec; then
5111          lt_cv_prog_cc_pic=-Kconform_pic
5112       fi
5113       ;;
5114     *)
5115       lt_cv_prog_cc_pic='-fPIC'
5116       ;;
5117     esac
5118   else
5119     # PORTME Check for PIC flags for the system compiler.
5120     case $host_os in
5121     aix3* | aix4* | aix5*)
5122       lt_cv_prog_cc_wl='-Wl,'
5123       # All AIX code is PIC.
5124       if test "$host_cpu" = ia64; then
5125         # AIX 5 now supports IA64 processor
5126         lt_cv_prog_cc_static='-Bstatic'
5127       else
5128         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5129       fi
5130       ;;
5131
5132     hpux9* | hpux10* | hpux11*)
5133       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5134       lt_cv_prog_cc_wl='-Wl,'
5135       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5136       lt_cv_prog_cc_pic='+Z'
5137       ;;
5138
5139     irix5* | irix6* | nonstopux*)
5140       lt_cv_prog_cc_wl='-Wl,'
5141       lt_cv_prog_cc_static='-non_shared'
5142       # PIC (with -KPIC) is the default.
5143       ;;
5144
5145     cygwin* | mingw* | pw32* | os2*)
5146       # This hack is so that the source file can tell whether it is being
5147       # built for inclusion in a dll (and should export symbols for example).
5148       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5149       ;;
5150
5151     newsos6)
5152       lt_cv_prog_cc_pic='-KPIC'
5153       lt_cv_prog_cc_static='-Bstatic'
5154       ;;
5155
5156     osf3* | osf4* | osf5*)
5157       # All OSF/1 code is PIC.
5158       lt_cv_prog_cc_wl='-Wl,'
5159       lt_cv_prog_cc_static='-non_shared'
5160       ;;
5161
5162     sco3.2v5*)
5163       lt_cv_prog_cc_pic='-Kpic'
5164       lt_cv_prog_cc_static='-dn'
5165       lt_cv_prog_cc_shlib='-belf'
5166       ;;
5167
5168     solaris*)
5169       lt_cv_prog_cc_pic='-KPIC'
5170       lt_cv_prog_cc_static='-Bstatic'
5171       lt_cv_prog_cc_wl='-Wl,'
5172       ;;
5173
5174     sunos4*)
5175       lt_cv_prog_cc_pic='-PIC'
5176       lt_cv_prog_cc_static='-Bstatic'
5177       lt_cv_prog_cc_wl='-Qoption ld '
5178       ;;
5179
5180     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5181       lt_cv_prog_cc_pic='-KPIC'
5182       lt_cv_prog_cc_static='-Bstatic'
5183       lt_cv_prog_cc_wl='-Wl,'
5184       ;;
5185
5186     uts4*)
5187       lt_cv_prog_cc_pic='-pic'
5188       lt_cv_prog_cc_static='-Bstatic'
5189       ;;
5190
5191     sysv4*MP*)
5192       if test -d /usr/nec ;then
5193         lt_cv_prog_cc_pic='-Kconform_pic'
5194         lt_cv_prog_cc_static='-Bstatic'
5195       fi
5196       ;;
5197
5198     *)
5199       lt_cv_prog_cc_can_build_shared=no
5200       ;;
5201     esac
5202   fi
5203
5204 fi
5205
5206 if test -z "$lt_cv_prog_cc_pic"; then
5207   echo "$ac_t""none" 1>&6
5208 else
5209   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5210
5211   # Check to make sure the pic_flag actually works.
5212   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5213 echo "configure:5214: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5214   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5215   echo $ac_n "(cached) $ac_c" 1>&6
5216 else
5217       save_CFLAGS="$CFLAGS"
5218     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5219     cat > conftest.$ac_ext <<EOF
5220 #line 5221 "configure"
5221 #include "confdefs.h"
5222
5223 int main() {
5224
5225 ; return 0; }
5226 EOF
5227 if { (eval echo configure:5228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5228   rm -rf conftest*
5229         case $host_os in
5230       hpux9* | hpux10* | hpux11*)
5231         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5232         # they create non-PIC objects.  So, if there were any warnings, we
5233         # assume that PIC is not supported.
5234         if test -s conftest.err; then
5235           lt_cv_prog_cc_pic_works=no
5236         else
5237           lt_cv_prog_cc_pic_works=yes
5238         fi
5239         ;;
5240       *)
5241         lt_cv_prog_cc_pic_works=yes
5242         ;;
5243       esac
5244     
5245 else
5246   echo "configure: failed program was:" >&5
5247   cat conftest.$ac_ext >&5
5248   rm -rf conftest*
5249         lt_cv_prog_cc_pic_works=no
5250     
5251 fi
5252 rm -f conftest*
5253     CFLAGS="$save_CFLAGS"
5254   
5255 fi
5256
5257
5258   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5259     lt_cv_prog_cc_pic=
5260     lt_cv_prog_cc_can_build_shared=no
5261   else
5262     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5263   fi
5264
5265   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5266 fi
5267 ##
5268 ## END FIXME
5269
5270 # Check for any special shared library compilation flags.
5271 if test -n "$lt_cv_prog_cc_shlib"; then
5272   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5273   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5274   else
5275    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5276     lt_cv_prog_cc_can_build_shared=no
5277   fi
5278 fi
5279
5280 ## FIXME: this should be a separate macro
5281 ##
5282 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5283 echo "configure:5284: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5284 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5285   echo $ac_n "(cached) $ac_c" 1>&6
5286 else
5287     lt_cv_prog_cc_static_works=no
5288   save_LDFLAGS="$LDFLAGS"
5289   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5290   cat > conftest.$ac_ext <<EOF
5291 #line 5292 "configure"
5292 #include "confdefs.h"
5293
5294 int main() {
5295
5296 ; return 0; }
5297 EOF
5298 if { (eval echo configure:5299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5299   rm -rf conftest*
5300   lt_cv_prog_cc_static_works=yes
5301 else
5302   echo "configure: failed program was:" >&5
5303   cat conftest.$ac_ext >&5
5304 fi
5305 rm -f conftest*
5306   LDFLAGS="$save_LDFLAGS"
5307
5308 fi
5309
5310
5311 # Belt *and* braces to stop my trousers falling down:
5312 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5313 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5314
5315 pic_flag="$lt_cv_prog_cc_pic"
5316 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5317 wl="$lt_cv_prog_cc_wl"
5318 link_static_flag="$lt_cv_prog_cc_static"
5319 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5320 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5321 ##
5322 ## END FIXME
5323
5324
5325 ## FIXME: this should be a separate macro
5326 ##
5327 # Check to see if options -o and -c are simultaneously supported by compiler
5328 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5329 echo "configure:5330: checking if $compiler supports -c -o file.$ac_objext" >&5
5330 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5331   echo $ac_n "(cached) $ac_c" 1>&6
5332 else
5333   
5334 $rm -r conftest 2>/dev/null
5335 mkdir conftest
5336 cd conftest
5337 echo "int some_variable = 0;" > conftest.$ac_ext
5338 mkdir out
5339 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5340 # that will create temporary files in the current directory regardless of
5341 # the output directory.  Thus, making CWD read-only will cause this test
5342 # to fail, enabling locking or at least warning the user not to do parallel
5343 # builds.
5344 chmod -w .
5345 save_CFLAGS="$CFLAGS"
5346 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5347 compiler_c_o=no
5348 if { (eval echo configure:5349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5349   # The compiler can only warn and ignore the option if not recognized
5350   # So say no if there are warnings
5351   if test -s out/conftest.err; then
5352     lt_cv_compiler_c_o=no
5353   else
5354     lt_cv_compiler_c_o=yes
5355   fi
5356 else
5357   # Append any errors to the config.log.
5358   cat out/conftest.err 1>&5
5359   lt_cv_compiler_c_o=no
5360 fi
5361 CFLAGS="$save_CFLAGS"
5362 chmod u+w .
5363 $rm conftest* out/*
5364 rmdir out
5365 cd ..
5366 rmdir conftest
5367 $rm -r conftest 2>/dev/null
5368
5369 fi
5370
5371 compiler_c_o=$lt_cv_compiler_c_o
5372 echo "$ac_t""$compiler_c_o" 1>&6
5373
5374 if test x"$compiler_c_o" = x"yes"; then
5375   # Check to see if we can write to a .lo
5376   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5377 echo "configure:5378: checking if $compiler supports -c -o file.lo" >&5
5378   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5379   echo $ac_n "(cached) $ac_c" 1>&6
5380 else
5381   
5382   lt_cv_compiler_o_lo=no
5383   save_CFLAGS="$CFLAGS"
5384   CFLAGS="$CFLAGS -c -o conftest.lo"
5385   save_objext="$ac_objext"
5386   ac_objext=lo
5387   cat > conftest.$ac_ext <<EOF
5388 #line 5389 "configure"
5389 #include "confdefs.h"
5390
5391 int main() {
5392 int some_variable = 0;
5393 ; return 0; }
5394 EOF
5395 if { (eval echo configure:5396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5396   rm -rf conftest*
5397       # The compiler can only warn and ignore the option if not recognized
5398     # So say no if there are warnings
5399     if test -s conftest.err; then
5400       lt_cv_compiler_o_lo=no
5401     else
5402       lt_cv_compiler_o_lo=yes
5403     fi
5404   
5405 else
5406   echo "configure: failed program was:" >&5
5407   cat conftest.$ac_ext >&5
5408 fi
5409 rm -f conftest*
5410   ac_objext="$save_objext"
5411   CFLAGS="$save_CFLAGS"
5412   
5413 fi
5414
5415   compiler_o_lo=$lt_cv_compiler_o_lo
5416   echo "$ac_t""$compiler_o_lo" 1>&6
5417 else
5418   compiler_o_lo=no
5419 fi
5420 ##
5421 ## END FIXME
5422
5423 ## FIXME: this should be a separate macro
5424 ##
5425 # Check to see if we can do hard links to lock some files if needed
5426 hard_links="nottested"
5427 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5428   # do not overwrite the value of need_locks provided by the user
5429   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5430 echo "configure:5431: checking if we can lock with hard links" >&5
5431   hard_links=yes
5432   $rm conftest*
5433   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5434   touch conftest.a
5435   ln conftest.a conftest.b 2>&5 || hard_links=no
5436   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5437   echo "$ac_t""$hard_links" 1>&6
5438   if test "$hard_links" = no; then
5439     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5440     need_locks=warn
5441   fi
5442 else
5443   need_locks=no
5444 fi
5445 ##
5446 ## END FIXME
5447
5448 ## FIXME: this should be a separate macro
5449 ##
5450 if test "$GCC" = yes; then
5451   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5452   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5453 echo "configure:5454: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5454   echo "int some_variable = 0;" > conftest.$ac_ext
5455   save_CFLAGS="$CFLAGS"
5456   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5457   compiler_rtti_exceptions=no
5458   cat > conftest.$ac_ext <<EOF
5459 #line 5460 "configure"
5460 #include "confdefs.h"
5461
5462 int main() {
5463 int some_variable = 0;
5464 ; return 0; }
5465 EOF
5466 if { (eval echo configure:5467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5467   rm -rf conftest*
5468       # The compiler can only warn and ignore the option if not recognized
5469     # So say no if there are warnings
5470     if test -s conftest.err; then
5471       compiler_rtti_exceptions=no
5472     else
5473       compiler_rtti_exceptions=yes
5474     fi
5475   
5476 else
5477   echo "configure: failed program was:" >&5
5478   cat conftest.$ac_ext >&5
5479 fi
5480 rm -f conftest*
5481   CFLAGS="$save_CFLAGS"
5482   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5483
5484   if test "$compiler_rtti_exceptions" = "yes"; then
5485     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5486   else
5487     no_builtin_flag=' -fno-builtin'
5488   fi
5489 fi
5490 ##
5491 ## END FIXME
5492
5493 ## FIXME: this should be a separate macro
5494 ##
5495 # See if the linker supports building shared libraries.
5496 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5497 echo "configure:5498: checking whether the linker ($LD) supports shared libraries" >&5
5498
5499 allow_undefined_flag=
5500 no_undefined_flag=
5501 need_lib_prefix=unknown
5502 need_version=unknown
5503 # when you set need_version to no, make sure it does not cause -set_version
5504 # flags to be left without arguments
5505 archive_cmds=
5506 archive_expsym_cmds=
5507 old_archive_from_new_cmds=
5508 old_archive_from_expsyms_cmds=
5509 export_dynamic_flag_spec=
5510 whole_archive_flag_spec=
5511 thread_safe_flag_spec=
5512 hardcode_into_libs=no
5513 hardcode_libdir_flag_spec=
5514 hardcode_libdir_separator=
5515 hardcode_direct=no
5516 hardcode_minus_L=no
5517 hardcode_shlibpath_var=unsupported
5518 runpath_var=
5519 link_all_deplibs=unknown
5520 always_export_symbols=no
5521 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5522 # include_expsyms should be a list of space-separated symbols to be *always*
5523 # included in the symbol list
5524 include_expsyms=
5525 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5526 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5527 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5528 # as well as any symbol that contains `d'.
5529 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5530 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5531 # platforms (ab)use it in PIC code, but their linkers get confused if
5532 # the symbol is explicitly referenced.  Since portable code cannot
5533 # rely on this symbol name, it's probably fine to never include it in
5534 # preloaded symbol tables.
5535 extract_expsyms_cmds=
5536
5537 case $host_os in
5538 cygwin* | mingw* | pw32*)
5539   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5540   # When not using gcc, we currently assume that we are using
5541   # Microsoft Visual C++.
5542   if test "$GCC" != yes; then
5543     with_gnu_ld=no
5544   fi
5545   ;;
5546 openbsd*)
5547   with_gnu_ld=no
5548   ;;
5549 esac
5550
5551 ld_shlibs=yes
5552 if test "$with_gnu_ld" = yes; then
5553   # If archive_cmds runs LD, not CC, wlarc should be empty
5554   wlarc='${wl}'
5555
5556   # See if GNU ld supports shared libraries.
5557   case $host_os in
5558   aix3* | aix4* | aix5*)
5559     # On AIX, the GNU linker is very broken
5560     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5561     ld_shlibs=no
5562     cat <<EOF 1>&2
5563
5564 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5565 *** to be unable to reliably create shared libraries on AIX.
5566 *** Therefore, libtool is disabling shared libraries support.  If you
5567 *** really care for shared libraries, you may want to modify your PATH
5568 *** so that a non-GNU linker is found, and then restart.
5569
5570 EOF
5571     ;;
5572
5573   amigaos*)
5574     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)'
5575     hardcode_libdir_flag_spec='-L$libdir'
5576     hardcode_minus_L=yes
5577
5578     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5579     # that the semantics of dynamic libraries on AmigaOS, at least up
5580     # to version 4, is to share data among multiple programs linked
5581     # with the same dynamic library.  Since this doesn't match the
5582     # behavior of shared libraries on other platforms, we can use
5583     # them.
5584     ld_shlibs=no
5585     ;;
5586
5587   beos*)
5588     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5589       allow_undefined_flag=unsupported
5590       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5591       # support --undefined.  This deserves some investigation.  FIXME
5592       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5593     else
5594       ld_shlibs=no
5595     fi
5596     ;;
5597
5598   cygwin* | mingw* | pw32*)
5599     # hardcode_libdir_flag_spec is actually meaningless, as there is
5600     # no search path for DLLs.
5601     hardcode_libdir_flag_spec='-L$libdir'
5602     allow_undefined_flag=unsupported
5603     always_export_symbols=yes
5604
5605     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5606       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5607       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5608       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5609       else $CC -o impgen impgen.c ; fi)~
5610       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5611
5612     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5613
5614     # cygwin and mingw dlls have different entry points and sets of symbols
5615     # to exclude.
5616     # FIXME: what about values for MSVC?
5617     dll_entry=__cygwin_dll_entry@12
5618     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5619     case $host_os in
5620     mingw*)
5621       # mingw values
5622       dll_entry=_DllMainCRTStartup@12
5623       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5624       ;;
5625     esac
5626
5627     # mingw and cygwin differ, and it's simplest to just exclude the union
5628     # of the two symbol sets.
5629     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5630
5631     # recent cygwin and mingw systems supply a stub DllMain which the user
5632     # can override, but on older systems we have to supply one (in ltdll.c)
5633     if test "x$lt_cv_need_dllmain" = "xyes"; then
5634       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5635       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~
5636         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5637     else
5638       ltdll_obj=
5639       ltdll_cmds=
5640     fi
5641
5642     # Extract the symbol export list from an `--export-all' def file,
5643     # then regenerate the def file from the symbol export list, so that
5644     # the compiled dll only exports the symbol export list.
5645     # Be careful not to strip the DATA tag left be newer dlltools.
5646     export_symbols_cmds="$ltdll_cmds"'
5647       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5648       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5649
5650     # If the export-symbols file already is a .def file (1st line
5651     # is EXPORTS), use it as is.
5652     # If DATA tags from a recent dlltool are present, honour them!
5653     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5654         cp $export_symbols $output_objdir/$soname-def;
5655       else
5656         echo EXPORTS > $output_objdir/$soname-def;
5657         _lt_hint=1;
5658         cat $export_symbols | while read symbol; do
5659          set dummy \$symbol;
5660          case \$# in
5661            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5662            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5663            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5664          esac;
5665          _lt_hint=`expr 1 + \$_lt_hint`;
5666         done;
5667       fi~
5668       '"$ltdll_cmds"'
5669       $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~
5670       $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~
5671       $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~
5672       $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~
5673       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5674     ;;
5675
5676   netbsd*)
5677     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5678       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5679       wlarc=
5680     else
5681       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5682       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5683     fi
5684     ;;
5685
5686   solaris* | sysv5*)
5687     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5688       ld_shlibs=no
5689       cat <<EOF 1>&2
5690
5691 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5692 *** create shared libraries on Solaris systems.  Therefore, libtool
5693 *** is disabling shared libraries support.  We urge you to upgrade GNU
5694 *** binutils to release 2.9.1 or newer.  Another option is to modify
5695 *** your PATH or compiler configuration so that the native linker is
5696 *** used, and then restart.
5697
5698 EOF
5699     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5700       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5701       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5702     else
5703       ld_shlibs=no
5704     fi
5705     ;;
5706
5707   sunos4*)
5708     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5709     wlarc=
5710     hardcode_direct=yes
5711     hardcode_shlibpath_var=no
5712     ;;
5713
5714   *)
5715     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5716       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5717       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5718     else
5719       ld_shlibs=no
5720     fi
5721     ;;
5722   esac
5723
5724   if test "$ld_shlibs" = yes; then
5725     runpath_var=LD_RUN_PATH
5726     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5727     export_dynamic_flag_spec='${wl}--export-dynamic'
5728     case $host_os in
5729     cygwin* | mingw* | pw32*)
5730       # dlltool doesn't understand --whole-archive et. al.
5731       whole_archive_flag_spec=
5732       ;;
5733     *)
5734       # ancient GNU ld didn't support --whole-archive et. al.
5735       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5736         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5737       else
5738         whole_archive_flag_spec=
5739       fi
5740       ;;
5741     esac
5742   fi
5743 else
5744   # PORTME fill in a description of your system's linker (not GNU ld)
5745   case $host_os in
5746   aix3*)
5747     allow_undefined_flag=unsupported
5748     always_export_symbols=yes
5749     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'
5750     # Note: this linker hardcodes the directories in LIBPATH if there
5751     # are no directories specified by -L.
5752     hardcode_minus_L=yes
5753     if test "$GCC" = yes && test -z "$link_static_flag"; then
5754       # Neither direct hardcoding nor static linking is supported with a
5755       # broken collect2.
5756       hardcode_direct=unsupported
5757     fi
5758     ;;
5759
5760   aix4* | aix5*)
5761     if test "$host_cpu" = ia64; then
5762       # On IA64, the linker does run time linking by default, so we don't
5763       # have to do anything special.
5764       aix_use_runtimelinking=no
5765       exp_sym_flag='-Bexport'
5766       no_entry_flag=""
5767     else
5768       aix_use_runtimelinking=no
5769
5770       # Test if we are trying to use run time linking or normal
5771       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5772       # need to do runtime linking.
5773       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5774         for ld_flag in $LDFLAGS; do
5775           case $ld_flag in
5776           *-brtl*)
5777             aix_use_runtimelinking=yes
5778             break
5779           ;;
5780           esac
5781         done
5782       esac
5783
5784       exp_sym_flag='-bexport'
5785       no_entry_flag='-bnoentry'
5786     fi
5787
5788     # When large executables or shared objects are built, AIX ld can
5789     # have problems creating the table of contents.  If linking a library
5790     # or program results in "error TOC overflow" add -mminimal-toc to
5791     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5792     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5793
5794     hardcode_direct=yes
5795     archive_cmds=''
5796     hardcode_libdir_separator=':'
5797     if test "$GCC" = yes; then
5798       case $host_os in aix4.[012]|aix4.[012].*)
5799         collect2name=`${CC} -print-prog-name=collect2`
5800         if test -f "$collect2name" && \
5801           strings "$collect2name" | grep resolve_lib_name >/dev/null
5802         then
5803           # We have reworked collect2
5804           hardcode_direct=yes
5805         else
5806           # We have old collect2
5807           hardcode_direct=unsupported
5808           # It fails to find uninstalled libraries when the uninstalled
5809           # path is not listed in the libpath.  Setting hardcode_minus_L
5810           # to unsupported forces relinking
5811           hardcode_minus_L=yes
5812           hardcode_libdir_flag_spec='-L$libdir'
5813           hardcode_libdir_separator=
5814         fi
5815       esac
5816
5817       shared_flag='-shared'
5818     else
5819       # not using gcc
5820       if test "$host_cpu" = ia64; then
5821         shared_flag='${wl}-G'
5822       else
5823         if test "$aix_use_runtimelinking" = yes; then
5824           shared_flag='${wl}-G'
5825         else
5826           shared_flag='${wl}-bM:SRE'
5827         fi
5828       fi
5829     fi
5830
5831     # It seems that -bexpall can do strange things, so it is better to
5832     # generate a list of symbols to export.
5833     always_export_symbols=yes
5834     if test "$aix_use_runtimelinking" = yes; then
5835       # Warning - without using the other runtime loading flags (-brtl),
5836       # -berok will link without error, but may produce a broken library.
5837       allow_undefined_flag='-berok'
5838       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5839       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"
5840     else
5841       if test "$host_cpu" = ia64; then
5842         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5843         allow_undefined_flag="-z nodefs"
5844         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"
5845       else
5846         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5847         # Warning - without using the other run time loading flags,
5848         # -berok will link without error, but may produce a broken library.
5849         allow_undefined_flag='${wl}-berok'
5850         # This is a bit strange, but is similar to how AIX traditionally builds
5851         # it's shared libraries.
5852         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'
5853       fi
5854     fi
5855     ;;
5856
5857   amigaos*)
5858     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)'
5859     hardcode_libdir_flag_spec='-L$libdir'
5860     hardcode_minus_L=yes
5861     # see comment about different semantics on the GNU ld section
5862     ld_shlibs=no
5863     ;;
5864
5865   cygwin* | mingw* | pw32*)
5866     # When not using gcc, we currently assume that we are using
5867     # Microsoft Visual C++.
5868     # hardcode_libdir_flag_spec is actually meaningless, as there is
5869     # no search path for DLLs.
5870     hardcode_libdir_flag_spec=' '
5871     allow_undefined_flag=unsupported
5872     # Tell ltmain to make .lib files, not .a files.
5873     libext=lib
5874     # FIXME: Setting linknames here is a bad hack.
5875     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5876     # The linker will automatically build a .lib file if we build a DLL.
5877     old_archive_from_new_cmds='true'
5878     # FIXME: Should let the user specify the lib program.
5879     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5880     fix_srcfile_path='`cygpath -w "$srcfile"`'
5881     ;;
5882
5883   darwin* | rhapsody*)
5884     case "$host_os" in
5885     rhapsody* | darwin1.[012])
5886       allow_undefined_flag='-undefined suppress'
5887       ;;
5888     *) # Darwin 1.3 on
5889       allow_undefined_flag='-flat_namespace -undefined suppress'
5890       ;;
5891     esac
5892     # FIXME: Relying on posixy $() will cause problems for
5893     #        cross-compilation, but unfortunately the echo tests do not
5894     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5895     #        `"' quotes if we put them in here... so don't!
5896     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)'
5897     # We need to add '_' to the symbols in $export_symbols first
5898     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5899     hardcode_direct=yes
5900     hardcode_shlibpath_var=no
5901     whole_archive_flag_spec='-all_load $convenience'
5902     ;;
5903
5904   freebsd1*)
5905     ld_shlibs=no
5906     ;;
5907
5908   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5909   # support.  Future versions do this automatically, but an explicit c++rt0.o
5910   # does not break anything, and helps significantly (at the cost of a little
5911   # extra space).
5912   freebsd2.2*)
5913     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5914     hardcode_libdir_flag_spec='-R$libdir'
5915     hardcode_direct=yes
5916     hardcode_shlibpath_var=no
5917     ;;
5918
5919   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5920   freebsd2*)
5921     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5922     hardcode_direct=yes
5923     hardcode_minus_L=yes
5924     hardcode_shlibpath_var=no
5925     ;;
5926
5927   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5928   freebsd*)
5929     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5930     hardcode_libdir_flag_spec='-R$libdir'
5931     hardcode_direct=yes
5932     hardcode_shlibpath_var=no
5933     ;;
5934
5935   hpux9* | hpux10* | hpux11*)
5936     case $host_os in
5937     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' ;;
5938     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5939     esac
5940     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5941     hardcode_libdir_separator=:
5942     hardcode_direct=yes
5943     hardcode_minus_L=yes # Not in the search PATH, but as the default
5944                          # location of the library.
5945     export_dynamic_flag_spec='${wl}-E'
5946     ;;
5947
5948   irix5* | irix6* | nonstopux*)
5949     if test "$GCC" = yes; then
5950       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'
5951       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5952     else
5953       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'
5954       hardcode_libdir_flag_spec='-rpath $libdir'
5955     fi
5956     hardcode_libdir_separator=:
5957     link_all_deplibs=yes
5958     ;;
5959
5960   netbsd*)
5961     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5962       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5963     else
5964       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5965     fi
5966     hardcode_libdir_flag_spec='-R$libdir'
5967     hardcode_direct=yes
5968     hardcode_shlibpath_var=no
5969     ;;
5970
5971   newsos6)
5972     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5973     hardcode_direct=yes
5974     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5975     hardcode_libdir_separator=:
5976     hardcode_shlibpath_var=no
5977     ;;
5978
5979   openbsd*)
5980     hardcode_direct=yes
5981     hardcode_shlibpath_var=no
5982     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5983       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5984       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5985       export_dynamic_flag_spec='${wl}-E'
5986     else
5987       case "$host_os" in
5988       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5989         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5990         hardcode_libdir_flag_spec='-R$libdir'
5991         ;;
5992       *)
5993         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5994         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5995         ;;
5996       esac
5997     fi
5998     ;;
5999
6000   os2*)
6001     hardcode_libdir_flag_spec='-L$libdir'
6002     hardcode_minus_L=yes
6003     allow_undefined_flag=unsupported
6004     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'
6005     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6006     ;;
6007
6008   osf3*)
6009     if test "$GCC" = yes; then
6010       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6011       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'
6012     else
6013       allow_undefined_flag=' -expect_unresolved \*'
6014       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'
6015     fi
6016     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6017     hardcode_libdir_separator=:
6018     ;;
6019
6020   osf4* | osf5*)        # as osf3* with the addition of -msym flag
6021     if test "$GCC" = yes; then
6022       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6023       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'
6024       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6025     else
6026       allow_undefined_flag=' -expect_unresolved \*'
6027       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'
6028       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6029       $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'
6030
6031       #Both c and cxx compiler support -rpath directly
6032       hardcode_libdir_flag_spec='-rpath $libdir'
6033     fi
6034     hardcode_libdir_separator=:
6035     ;;
6036
6037   sco3.2v5*)
6038     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6039     hardcode_shlibpath_var=no
6040     runpath_var=LD_RUN_PATH
6041     hardcode_runpath_var=yes
6042     export_dynamic_flag_spec='${wl}-Bexport'
6043     ;;
6044
6045   solaris*)
6046     # gcc --version < 3.0 without binutils cannot create self contained
6047     # shared libraries reliably, requiring libgcc.a to resolve some of
6048     # the object symbols generated in some cases.  Libraries that use
6049     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6050     # a copy of libgcc.a into every shared library to guarantee resolving
6051     # such symbols causes other problems:  According to Tim Van Holder
6052     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6053     # (to the application) exception stack for one thing.
6054     no_undefined_flag=' -z defs'
6055     if test "$GCC" = yes; then
6056       case `$CC --version 2>/dev/null` in
6057       [12].*)
6058         cat <<EOF 1>&2
6059
6060 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6061 *** create self contained shared libraries on Solaris systems, without
6062 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6063 *** -no-undefined support, which will at least allow you to build shared
6064 *** libraries.  However, you may find that when you link such libraries
6065 *** into an application without using GCC, you have to manually add
6066 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6067 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6068 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6069
6070 EOF
6071         no_undefined_flag=
6072         ;;
6073       esac
6074     fi
6075     # $CC -shared without GNU ld will not create a library from C++
6076     # object files and a static libstdc++, better avoid it by now
6077     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6078     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6079                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6080     hardcode_libdir_flag_spec='-R$libdir'
6081     hardcode_shlibpath_var=no
6082     case $host_os in
6083     solaris2.[0-5] | solaris2.[0-5].*) ;;
6084     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6085       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6086     esac
6087     link_all_deplibs=yes
6088     ;;
6089
6090   sunos4*)
6091     if test "x$host_vendor" = xsequent; then
6092       # Use $CC to link under sequent, because it throws in some extra .o
6093       # files that make .init and .fini sections work.
6094       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6095     else
6096       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6097     fi
6098     hardcode_libdir_flag_spec='-L$libdir'
6099     hardcode_direct=yes
6100     hardcode_minus_L=yes
6101     hardcode_shlibpath_var=no
6102     ;;
6103
6104   sysv4)
6105     case $host_vendor in
6106       sni)
6107         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6108         hardcode_direct=yes # is this really true???
6109         ;;
6110       siemens)
6111         ## LD is ld it makes a PLAMLIB
6112         ## CC just makes a GrossModule.
6113         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6114         reload_cmds='$CC -r -o $output$reload_objs'
6115         hardcode_direct=no
6116         ;;
6117       motorola)
6118         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6119         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6120         ;;
6121     esac
6122     runpath_var='LD_RUN_PATH'
6123     hardcode_shlibpath_var=no
6124     ;;
6125
6126   sysv4.3*)
6127     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6128     hardcode_shlibpath_var=no
6129     export_dynamic_flag_spec='-Bexport'
6130     ;;
6131
6132   sysv5*)
6133     no_undefined_flag=' -z text'
6134     # $CC -shared without GNU ld will not create a library from C++
6135     # object files and a static libstdc++, better avoid it by now
6136     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6137     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6138                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6139     hardcode_libdir_flag_spec=
6140     hardcode_shlibpath_var=no
6141     runpath_var='LD_RUN_PATH'
6142     ;;
6143
6144   uts4*)
6145     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6146     hardcode_libdir_flag_spec='-L$libdir'
6147     hardcode_shlibpath_var=no
6148     ;;
6149
6150   dgux*)
6151     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6152     hardcode_libdir_flag_spec='-L$libdir'
6153     hardcode_shlibpath_var=no
6154     ;;
6155
6156   sysv4*MP*)
6157     if test -d /usr/nec; then
6158       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6159       hardcode_shlibpath_var=no
6160       runpath_var=LD_RUN_PATH
6161       hardcode_runpath_var=yes
6162       ld_shlibs=yes
6163     fi
6164     ;;
6165
6166   sysv4.2uw2*)
6167     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6168     hardcode_direct=yes
6169     hardcode_minus_L=no
6170     hardcode_shlibpath_var=no
6171     hardcode_runpath_var=yes
6172     runpath_var=LD_RUN_PATH
6173     ;;
6174
6175   sysv5uw7* | unixware7*)
6176     no_undefined_flag='${wl}-z ${wl}text'
6177     if test "$GCC" = yes; then
6178       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6179     else
6180       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6181     fi
6182     runpath_var='LD_RUN_PATH'
6183     hardcode_shlibpath_var=no
6184     ;;
6185
6186   *)
6187     ld_shlibs=no
6188     ;;
6189   esac
6190 fi
6191 echo "$ac_t""$ld_shlibs" 1>&6
6192 test "$ld_shlibs" = no && can_build_shared=no
6193 ##
6194 ## END FIXME
6195
6196 ## FIXME: this should be a separate macro
6197 ##
6198 # Check hardcoding attributes.
6199 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6200 echo "configure:6201: checking how to hardcode library paths into programs" >&5
6201 hardcode_action=
6202 if test -n "$hardcode_libdir_flag_spec" || \
6203    test -n "$runpath_var"; then
6204
6205   # We can hardcode non-existant directories.
6206   if test "$hardcode_direct" != no &&
6207      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6208      # have to relink, otherwise we might link with an installed library
6209      # when we should be linking with a yet-to-be-installed one
6210      ## test "$hardcode_shlibpath_var" != no &&
6211      test "$hardcode_minus_L" != no; then
6212     # Linking always hardcodes the temporary library directory.
6213     hardcode_action=relink
6214   else
6215     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6216     hardcode_action=immediate
6217   fi
6218 else
6219   # We cannot hardcode anything, or else we can only hardcode existing
6220   # directories.
6221   hardcode_action=unsupported
6222 fi
6223 echo "$ac_t""$hardcode_action" 1>&6
6224 ##
6225 ## END FIXME
6226
6227 ## FIXME: this should be a separate macro
6228 ##
6229 striplib=
6230 old_striplib=
6231 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6232 echo "configure:6233: checking whether stripping libraries is possible" >&5
6233 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6234   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6235   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6236   echo "$ac_t""yes" 1>&6
6237 else
6238   echo "$ac_t""no" 1>&6
6239 fi
6240 ##
6241 ## END FIXME
6242
6243 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6244 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6245
6246 ## FIXME: this should be a separate macro
6247 ##
6248 # PORTME Fill in your ld.so characteristics
6249 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6250 echo "configure:6251: checking dynamic linker characteristics" >&5
6251 library_names_spec=
6252 libname_spec='lib$name'
6253 soname_spec=
6254 postinstall_cmds=
6255 postuninstall_cmds=
6256 finish_cmds=
6257 finish_eval=
6258 shlibpath_var=
6259 shlibpath_overrides_runpath=unknown
6260 version_type=none
6261 dynamic_linker="$host_os ld.so"
6262 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6263 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6264
6265 case $host_os in
6266 aix3*)
6267   version_type=linux
6268   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6269   shlibpath_var=LIBPATH
6270
6271   # AIX has no versioning support, so we append a major version to the name.
6272   soname_spec='${libname}${release}.so$major'
6273   ;;
6274
6275 aix4* | aix5*)
6276   version_type=linux
6277   need_lib_prefix=no
6278   need_version=no
6279   hardcode_into_libs=yes
6280   if test "$host_cpu" = ia64; then
6281     # AIX 5 supports IA64
6282     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6283     shlibpath_var=LD_LIBRARY_PATH
6284   else
6285     # With GCC up to 2.95.x, collect2 would create an import file
6286     # for dependence libraries.  The import file would start with
6287     # the line `#! .'.  This would cause the generated library to
6288     # depend on `.', always an invalid library.  This was fixed in
6289     # development snapshots of GCC prior to 3.0.
6290     case $host_os in
6291       aix4 | aix4.[01] | aix4.[01].*)
6292         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6293              echo ' yes '
6294              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6295           :
6296         else
6297           can_build_shared=no
6298         fi
6299         ;;
6300     esac
6301     # AIX (on Power*) has no versioning support, so currently we can
6302     # not hardcode correct soname into executable. Probably we can
6303     # add versioning support to collect2, so additional links can
6304     # be useful in future.
6305     if test "$aix_use_runtimelinking" = yes; then
6306       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6307       # instead of lib<name>.a to let people know that these are not
6308       # typical AIX shared libraries.
6309       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6310     else
6311       # We preserve .a as extension for shared libraries through AIX4.2
6312       # and later when we are not doing run time linking.
6313       library_names_spec='${libname}${release}.a $libname.a'
6314       soname_spec='${libname}${release}.so$major'
6315     fi
6316     shlibpath_var=LIBPATH
6317   fi
6318   hardcode_into_libs=yes
6319   ;;
6320
6321 amigaos*)
6322   library_names_spec='$libname.ixlibrary $libname.a'
6323   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6324   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'
6325   ;;
6326
6327 beos*)
6328   library_names_spec='${libname}.so'
6329   dynamic_linker="$host_os ld.so"
6330   shlibpath_var=LIBRARY_PATH
6331   ;;
6332
6333 bsdi4*)
6334   version_type=linux
6335   need_version=no
6336   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6337   soname_spec='${libname}${release}.so$major'
6338   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6339   shlibpath_var=LD_LIBRARY_PATH
6340   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6341   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6342   export_dynamic_flag_spec=-rdynamic
6343   # the default ld.so.conf also contains /usr/contrib/lib and
6344   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6345   # libtool to hard-code these into programs
6346   ;;
6347
6348 cygwin* | mingw* | pw32*)
6349   version_type=windows
6350   need_version=no
6351   need_lib_prefix=no
6352   case $GCC,$host_os in
6353   yes,cygwin*)
6354     library_names_spec='$libname.dll.a'
6355     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6356     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6357       dldir=$destdir/`dirname \$dlpath`~
6358       test -d \$dldir || mkdir -p \$dldir~
6359       $install_prog .libs/$dlname \$dldir/$dlname'
6360     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6361       dlpath=$dir/\$dldll~
6362        $rm \$dlpath'
6363     ;;
6364   yes,mingw*)
6365     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6366     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6367     ;;
6368   yes,pw32*)
6369     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6370     ;;
6371   *)
6372     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6373     ;;
6374   esac
6375   dynamic_linker='Win32 ld.exe'
6376   # FIXME: first we should search . and the directory the executable is in
6377   shlibpath_var=PATH
6378   ;;
6379
6380 darwin* | rhapsody*)
6381   dynamic_linker="$host_os dyld"
6382   version_type=darwin
6383   need_lib_prefix=no
6384   need_version=no
6385   # FIXME: Relying on posixy $() will cause problems for
6386   #        cross-compilation, but unfortunately the echo tests do not
6387   #        yet detect zsh echo's removal of \ escapes.
6388   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)'
6389   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6390   shlibpath_overrides_runpath=yes
6391   shlibpath_var=DYLD_LIBRARY_PATH
6392   ;;
6393
6394 freebsd1*)
6395   dynamic_linker=no
6396   ;;
6397
6398 freebsd*)
6399   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6400   version_type=freebsd-$objformat
6401   case $version_type in
6402     freebsd-elf*)
6403       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6404       need_version=no
6405       need_lib_prefix=no
6406       ;;
6407     freebsd-*)
6408       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6409       need_version=yes
6410       ;;
6411   esac
6412   shlibpath_var=LD_LIBRARY_PATH
6413   case $host_os in
6414   freebsd2*)
6415     shlibpath_overrides_runpath=yes
6416     ;;
6417   *)
6418     shlibpath_overrides_runpath=no
6419     hardcode_into_libs=yes
6420     ;;
6421   esac
6422   ;;
6423
6424 gnu*)
6425   version_type=linux
6426   need_lib_prefix=no
6427   need_version=no
6428   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6429   soname_spec='${libname}${release}.so$major'
6430   shlibpath_var=LD_LIBRARY_PATH
6431   hardcode_into_libs=yes
6432   ;;
6433
6434 hpux9* | hpux10* | hpux11*)
6435   # Give a soname corresponding to the major version so that dld.sl refuses to
6436   # link against other versions.
6437   dynamic_linker="$host_os dld.sl"
6438   version_type=sunos
6439   need_lib_prefix=no
6440   need_version=no
6441   shlibpath_var=SHLIB_PATH
6442   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6443   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6444   soname_spec='${libname}${release}.sl$major'
6445   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6446   postinstall_cmds='chmod 555 $lib'
6447   ;;
6448
6449 irix5* | irix6* | nonstopux*)
6450   case $host_os in
6451     nonstopux*) version_type=nonstopux ;;
6452     *)          version_type=irix ;;
6453   esac
6454   need_lib_prefix=no
6455   need_version=no
6456   soname_spec='${libname}${release}.so$major'
6457   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6458   case $host_os in
6459   irix5* | nonstopux*)
6460     libsuff= shlibsuff=
6461     ;;
6462   *)
6463     case $LD in # libtool.m4 will add one of these switches to LD
6464     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6465     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6466     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6467     *) libsuff= shlibsuff= libmagic=never-match;;
6468     esac
6469     ;;
6470   esac
6471   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6472   shlibpath_overrides_runpath=no
6473   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6474   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6475   ;;
6476
6477 # No shared lib support for Linux oldld, aout, or coff.
6478 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6479   dynamic_linker=no
6480   ;;
6481
6482 # This must be Linux ELF.
6483 linux-gnu*)
6484   version_type=linux
6485   need_lib_prefix=no
6486   need_version=no
6487   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6488   soname_spec='${libname}${release}.so$major'
6489   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6490   shlibpath_var=LD_LIBRARY_PATH
6491   shlibpath_overrides_runpath=no
6492   # This implies no fast_install, which is unacceptable.
6493   # Some rework will be needed to allow for fast_install
6494   # before this can be enabled.
6495   hardcode_into_libs=yes
6496
6497   # We used to test for /lib/ld.so.1 and disable shared libraries on
6498   # powerpc, because MkLinux only supported shared libraries with the
6499   # GNU dynamic linker.  Since this was broken with cross compilers,
6500   # most powerpc-linux boxes support dynamic linking these days and
6501   # people can always --disable-shared, the test was removed, and we
6502   # assume the GNU/Linux dynamic linker is in use.
6503   dynamic_linker='GNU/Linux ld.so'
6504   ;;
6505
6506 netbsd*)
6507   version_type=sunos
6508   need_lib_prefix=no
6509   need_version=no
6510   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6511     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6512     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6513     dynamic_linker='NetBSD (a.out) ld.so'
6514   else
6515     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6516     soname_spec='${libname}${release}.so$major'
6517     dynamic_linker='NetBSD ld.elf_so'
6518   fi
6519   shlibpath_var=LD_LIBRARY_PATH
6520   shlibpath_overrides_runpath=yes
6521   hardcode_into_libs=yes
6522   ;;
6523
6524 newsos6)
6525   version_type=linux
6526   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6527   shlibpath_var=LD_LIBRARY_PATH
6528   shlibpath_overrides_runpath=yes
6529   ;;
6530
6531 openbsd*)
6532   version_type=sunos
6533   need_lib_prefix=no
6534   need_version=no
6535   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6536     case "$host_os" in
6537     openbsd2.[89] | openbsd2.[89].*)
6538       shlibpath_overrides_runpath=no
6539       ;;
6540     *)
6541       shlibpath_overrides_runpath=yes
6542       ;;
6543     esac
6544   else
6545     shlibpath_overrides_runpath=yes
6546   fi
6547   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6548   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6549   shlibpath_var=LD_LIBRARY_PATH
6550   ;;
6551
6552 os2*)
6553   libname_spec='$name'
6554   need_lib_prefix=no
6555   library_names_spec='$libname.dll $libname.a'
6556   dynamic_linker='OS/2 ld.exe'
6557   shlibpath_var=LIBPATH
6558   ;;
6559
6560 osf3* | osf4* | osf5*)
6561   version_type=osf
6562   need_version=no
6563   soname_spec='${libname}${release}.so$major'
6564   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6565   shlibpath_var=LD_LIBRARY_PATH
6566   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6567   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6568   hardcode_into_libs=yes
6569   ;;
6570
6571 sco3.2v5*)
6572   version_type=osf
6573   soname_spec='${libname}${release}.so$major'
6574   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6575   shlibpath_var=LD_LIBRARY_PATH
6576   ;;
6577
6578 solaris*)
6579   version_type=linux
6580   need_lib_prefix=no
6581   need_version=no
6582   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6583   soname_spec='${libname}${release}.so$major'
6584   shlibpath_var=LD_LIBRARY_PATH
6585   shlibpath_overrides_runpath=yes
6586   hardcode_into_libs=yes
6587   # ldd complains unless libraries are executable
6588   postinstall_cmds='chmod +x $lib'
6589   ;;
6590
6591 sunos4*)
6592   version_type=sunos
6593   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6594   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6595   shlibpath_var=LD_LIBRARY_PATH
6596   shlibpath_overrides_runpath=yes
6597   if test "$with_gnu_ld" = yes; then
6598     need_lib_prefix=no
6599   fi
6600   need_version=yes
6601   ;;
6602
6603 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6604   version_type=linux
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   case $host_vendor in
6609     sni)
6610       shlibpath_overrides_runpath=no
6611       need_lib_prefix=no
6612       export_dynamic_flag_spec='${wl}-Blargedynsym'
6613       runpath_var=LD_RUN_PATH
6614       ;;
6615     siemens)
6616       need_lib_prefix=no
6617       ;;
6618     motorola)
6619       need_lib_prefix=no
6620       need_version=no
6621       shlibpath_overrides_runpath=no
6622       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6623       ;;
6624   esac
6625   ;;
6626
6627 uts4*)
6628   version_type=linux
6629   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6630   soname_spec='${libname}${release}.so$major'
6631   shlibpath_var=LD_LIBRARY_PATH
6632   ;;
6633
6634 dgux*)
6635   version_type=linux
6636   need_lib_prefix=no
6637   need_version=no
6638   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6639   soname_spec='${libname}${release}.so$major'
6640   shlibpath_var=LD_LIBRARY_PATH
6641   ;;
6642
6643 sysv4*MP*)
6644   if test -d /usr/nec ;then
6645     version_type=linux
6646     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6647     soname_spec='$libname.so.$major'
6648     shlibpath_var=LD_LIBRARY_PATH
6649   fi
6650   ;;
6651
6652 *)
6653   dynamic_linker=no
6654   ;;
6655 esac
6656 echo "$ac_t""$dynamic_linker" 1>&6
6657 test "$dynamic_linker" = no && can_build_shared=no
6658 ##
6659 ## END FIXME
6660
6661 ## FIXME: this should be a separate macro
6662 ##
6663 # Report the final consequences.
6664 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6665 echo "configure:6666: checking if libtool supports shared libraries" >&5
6666 echo "$ac_t""$can_build_shared" 1>&6
6667 ##
6668 ## END FIXME
6669
6670 ## FIXME: this should be a separate macro
6671 ##
6672 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6673 echo "configure:6674: checking whether to build shared libraries" >&5
6674 test "$can_build_shared" = "no" && enable_shared=no
6675
6676 # On AIX, shared libraries and static libraries use the same namespace, and
6677 # are all built from PIC.
6678 case "$host_os" in
6679 aix3*)
6680   test "$enable_shared" = yes && enable_static=no
6681   if test -n "$RANLIB"; then
6682     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6683     postinstall_cmds='$RANLIB $lib'
6684   fi
6685   ;;
6686
6687 aix4*)
6688   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6689     test "$enable_shared" = yes && enable_static=no
6690   fi
6691   ;;
6692 esac
6693 echo "$ac_t""$enable_shared" 1>&6
6694 ##
6695 ## END FIXME
6696
6697 ## FIXME: this should be a separate macro
6698 ##
6699 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6700 echo "configure:6701: checking whether to build static libraries" >&5
6701 # Make sure either enable_shared or enable_static is yes.
6702 test "$enable_shared" = yes || enable_static=yes
6703 echo "$ac_t""$enable_static" 1>&6
6704 ##
6705 ## END FIXME
6706
6707 if test "$hardcode_action" = relink; then
6708   # Fast installation is not supported
6709   enable_fast_install=no
6710 elif test "$shlibpath_overrides_runpath" = yes ||
6711      test "$enable_shared" = no; then
6712   # Fast installation is not necessary
6713   enable_fast_install=needless
6714 fi
6715
6716 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6717 if test "$GCC" = yes; then
6718   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6719 fi
6720
6721 if test "x$enable_dlopen" != xyes; then
6722   enable_dlopen=unknown
6723   enable_dlopen_self=unknown
6724   enable_dlopen_self_static=unknown
6725 else
6726   lt_cv_dlopen=no
6727   lt_cv_dlopen_libs=
6728
6729   case $host_os in
6730   beos*)
6731     lt_cv_dlopen="load_add_on"
6732     lt_cv_dlopen_libs=
6733     lt_cv_dlopen_self=yes
6734     ;;
6735
6736   cygwin* | mingw* | pw32*)
6737     lt_cv_dlopen="LoadLibrary"
6738     lt_cv_dlopen_libs=
6739    ;;
6740
6741   *)
6742     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6743 echo "configure:6744: checking for shl_load" >&5
6744 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6745   echo $ac_n "(cached) $ac_c" 1>&6
6746 else
6747   cat > conftest.$ac_ext <<EOF
6748 #line 6749 "configure"
6749 #include "confdefs.h"
6750 /* System header to define __stub macros and hopefully few prototypes,
6751     which can conflict with char shl_load(); below.  */
6752 #include <assert.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 char (*f)();
6758
6759 int main() {
6760
6761 /* The GNU C library defines this for functions which it implements
6762     to always fail with ENOSYS.  Some functions are actually named
6763     something starting with __ and the normal name is an alias.  */
6764 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6765 choke me
6766 #else
6767 f = shl_load;
6768 #endif
6769
6770 ; return 0; }
6771 EOF
6772 if { (eval echo configure:6773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6773   rm -rf conftest*
6774   eval "ac_cv_func_shl_load=yes"
6775 else
6776   echo "configure: failed program was:" >&5
6777   cat conftest.$ac_ext >&5
6778   rm -rf conftest*
6779   eval "ac_cv_func_shl_load=no"
6780 fi
6781 rm -f conftest*
6782 fi
6783
6784 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6785   echo "$ac_t""yes" 1>&6
6786   lt_cv_dlopen="shl_load"
6787 else
6788   echo "$ac_t""no" 1>&6
6789 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6790 echo "configure:6791: checking for shl_load in -ldld" >&5
6791 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6792 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6793   echo $ac_n "(cached) $ac_c" 1>&6
6794 else
6795   ac_save_LIBS="$LIBS"
6796 LIBS="-ldld  $LIBS"
6797 cat > conftest.$ac_ext <<EOF
6798 #line 6799 "configure"
6799 #include "confdefs.h"
6800 /* Override any gcc2 internal prototype to avoid an error.  */
6801 /* We use char because int might match the return type of a gcc2
6802     builtin and then its argument prototype would still apply.  */
6803 char shl_load();
6804
6805 int main() {
6806 shl_load()
6807 ; return 0; }
6808 EOF
6809 if { (eval echo configure:6810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6810   rm -rf conftest*
6811   eval "ac_cv_lib_$ac_lib_var=yes"
6812 else
6813   echo "configure: failed program was:" >&5
6814   cat conftest.$ac_ext >&5
6815   rm -rf conftest*
6816   eval "ac_cv_lib_$ac_lib_var=no"
6817 fi
6818 rm -f conftest*
6819 LIBS="$ac_save_LIBS"
6820
6821 fi
6822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6823   echo "$ac_t""yes" 1>&6
6824   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6825 else
6826   echo "$ac_t""no" 1>&6
6827 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6828 echo "configure:6829: checking for dlopen" >&5
6829 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6830   echo $ac_n "(cached) $ac_c" 1>&6
6831 else
6832   cat > conftest.$ac_ext <<EOF
6833 #line 6834 "configure"
6834 #include "confdefs.h"
6835 /* System header to define __stub macros and hopefully few prototypes,
6836     which can conflict with char dlopen(); below.  */
6837 #include <assert.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 char (*f)();
6843
6844 int main() {
6845
6846 /* The GNU C library defines this for functions which it implements
6847     to always fail with ENOSYS.  Some functions are actually named
6848     something starting with __ and the normal name is an alias.  */
6849 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6850 choke me
6851 #else
6852 f = dlopen;
6853 #endif
6854
6855 ; return 0; }
6856 EOF
6857 if { (eval echo configure:6858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6858   rm -rf conftest*
6859   eval "ac_cv_func_dlopen=yes"
6860 else
6861   echo "configure: failed program was:" >&5
6862   cat conftest.$ac_ext >&5
6863   rm -rf conftest*
6864   eval "ac_cv_func_dlopen=no"
6865 fi
6866 rm -f conftest*
6867 fi
6868
6869 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6870   echo "$ac_t""yes" 1>&6
6871   lt_cv_dlopen="dlopen"
6872 else
6873   echo "$ac_t""no" 1>&6
6874 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6875 echo "configure:6876: checking for dlopen in -ldl" >&5
6876 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6877 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6878   echo $ac_n "(cached) $ac_c" 1>&6
6879 else
6880   ac_save_LIBS="$LIBS"
6881 LIBS="-ldl  $LIBS"
6882 cat > conftest.$ac_ext <<EOF
6883 #line 6884 "configure"
6884 #include "confdefs.h"
6885 /* Override any gcc2 internal prototype to avoid an error.  */
6886 /* We use char because int might match the return type of a gcc2
6887     builtin and then its argument prototype would still apply.  */
6888 char dlopen();
6889
6890 int main() {
6891 dlopen()
6892 ; return 0; }
6893 EOF
6894 if { (eval echo configure:6895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6895   rm -rf conftest*
6896   eval "ac_cv_lib_$ac_lib_var=yes"
6897 else
6898   echo "configure: failed program was:" >&5
6899   cat conftest.$ac_ext >&5
6900   rm -rf conftest*
6901   eval "ac_cv_lib_$ac_lib_var=no"
6902 fi
6903 rm -f conftest*
6904 LIBS="$ac_save_LIBS"
6905
6906 fi
6907 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6908   echo "$ac_t""yes" 1>&6
6909   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6910 else
6911   echo "$ac_t""no" 1>&6
6912 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6913 echo "configure:6914: checking for dlopen in -lsvld" >&5
6914 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6915 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6916   echo $ac_n "(cached) $ac_c" 1>&6
6917 else
6918   ac_save_LIBS="$LIBS"
6919 LIBS="-lsvld  $LIBS"
6920 cat > conftest.$ac_ext <<EOF
6921 #line 6922 "configure"
6922 #include "confdefs.h"
6923 /* Override any gcc2 internal prototype to avoid an error.  */
6924 /* We use char because int might match the return type of a gcc2
6925     builtin and then its argument prototype would still apply.  */
6926 char dlopen();
6927
6928 int main() {
6929 dlopen()
6930 ; return 0; }
6931 EOF
6932 if { (eval echo configure:6933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6933   rm -rf conftest*
6934   eval "ac_cv_lib_$ac_lib_var=yes"
6935 else
6936   echo "configure: failed program was:" >&5
6937   cat conftest.$ac_ext >&5
6938   rm -rf conftest*
6939   eval "ac_cv_lib_$ac_lib_var=no"
6940 fi
6941 rm -f conftest*
6942 LIBS="$ac_save_LIBS"
6943
6944 fi
6945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6946   echo "$ac_t""yes" 1>&6
6947   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6948 else
6949   echo "$ac_t""no" 1>&6
6950 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6951 echo "configure:6952: checking for dld_link in -ldld" >&5
6952 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6953 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6954   echo $ac_n "(cached) $ac_c" 1>&6
6955 else
6956   ac_save_LIBS="$LIBS"
6957 LIBS="-ldld  $LIBS"
6958 cat > conftest.$ac_ext <<EOF
6959 #line 6960 "configure"
6960 #include "confdefs.h"
6961 /* Override any gcc2 internal prototype to avoid an error.  */
6962 /* We use char because int might match the return type of a gcc2
6963     builtin and then its argument prototype would still apply.  */
6964 char dld_link();
6965
6966 int main() {
6967 dld_link()
6968 ; return 0; }
6969 EOF
6970 if { (eval echo configure:6971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6971   rm -rf conftest*
6972   eval "ac_cv_lib_$ac_lib_var=yes"
6973 else
6974   echo "configure: failed program was:" >&5
6975   cat conftest.$ac_ext >&5
6976   rm -rf conftest*
6977   eval "ac_cv_lib_$ac_lib_var=no"
6978 fi
6979 rm -f conftest*
6980 LIBS="$ac_save_LIBS"
6981
6982 fi
6983 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6984   echo "$ac_t""yes" 1>&6
6985   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6986 else
6987   echo "$ac_t""no" 1>&6
6988 fi
6989
6990               
6991 fi
6992
6993             
6994 fi
6995
6996           
6997 fi
6998
6999         
7000 fi
7001
7002       
7003 fi
7004
7005     ;;
7006   esac
7007
7008   if test "x$lt_cv_dlopen" != xno; then
7009     enable_dlopen=yes
7010   else
7011     enable_dlopen=no
7012   fi
7013
7014   case $lt_cv_dlopen in
7015   dlopen)
7016     save_CPPFLAGS="$CPPFLAGS"
7017         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
7018
7019     save_LDFLAGS="$LDFLAGS"
7020     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
7021
7022     save_LIBS="$LIBS"
7023     LIBS="$lt_cv_dlopen_libs $LIBS"
7024
7025     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
7026 echo "configure:7027: checking whether a program can dlopen itself" >&5
7027 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
7028   echo $ac_n "(cached) $ac_c" 1>&6
7029 else
7030           if test "$cross_compiling" = yes; then :
7031   lt_cv_dlopen_self=cross
7032 else
7033     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7034   lt_status=$lt_dlunknown
7035   cat > conftest.$ac_ext <<EOF
7036 #line 7037 "configure"
7037 #include "confdefs.h"
7038
7039 #if HAVE_DLFCN_H
7040 #include <dlfcn.h>
7041 #endif
7042
7043 #include <stdio.h>
7044
7045 #ifdef RTLD_GLOBAL
7046 #  define LT_DLGLOBAL           RTLD_GLOBAL
7047 #else
7048 #  ifdef DL_GLOBAL
7049 #    define LT_DLGLOBAL         DL_GLOBAL
7050 #  else
7051 #    define LT_DLGLOBAL         0
7052 #  endif
7053 #endif
7054
7055 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7056    find out it does not work in some platform. */
7057 #ifndef LT_DLLAZY_OR_NOW
7058 #  ifdef RTLD_LAZY
7059 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7060 #  else
7061 #    ifdef DL_LAZY
7062 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7063 #    else
7064 #      ifdef RTLD_NOW
7065 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7066 #      else
7067 #        ifdef DL_NOW
7068 #          define LT_DLLAZY_OR_NOW      DL_NOW
7069 #        else
7070 #          define LT_DLLAZY_OR_NOW      0
7071 #        endif
7072 #      endif
7073 #    endif
7074 #  endif
7075 #endif
7076
7077 #ifdef __cplusplus
7078 extern "C" void exit (int);
7079 #endif
7080
7081 void fnord() { int i=42;}
7082 int main ()
7083 {
7084   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7085   int status = $lt_dlunknown;
7086
7087   if (self)
7088     {
7089       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7090       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7091       /* dlclose (self); */
7092     }
7093
7094     exit (status);
7095 }
7096 EOF
7097   if { (eval echo configure:7098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7098     (./conftest; exit; ) 2>/dev/null
7099     lt_status=$?
7100     case x$lt_status in
7101       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7102       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7103       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7104     esac
7105   else :
7106     # compilation failed
7107     lt_cv_dlopen_self=no
7108   fi
7109 fi
7110 rm -fr conftest*
7111
7112     
7113 fi
7114
7115 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7116
7117     if test "x$lt_cv_dlopen_self" = xyes; then
7118       LDFLAGS="$LDFLAGS $link_static_flag"
7119       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7120 echo "configure:7121: checking whether a statically linked program can dlopen itself" >&5
7121 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7122   echo $ac_n "(cached) $ac_c" 1>&6
7123 else
7124           if test "$cross_compiling" = yes; then :
7125   lt_cv_dlopen_self_static=cross
7126 else
7127     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7128   lt_status=$lt_dlunknown
7129   cat > conftest.$ac_ext <<EOF
7130 #line 7131 "configure"
7131 #include "confdefs.h"
7132
7133 #if HAVE_DLFCN_H
7134 #include <dlfcn.h>
7135 #endif
7136
7137 #include <stdio.h>
7138
7139 #ifdef RTLD_GLOBAL
7140 #  define LT_DLGLOBAL           RTLD_GLOBAL
7141 #else
7142 #  ifdef DL_GLOBAL
7143 #    define LT_DLGLOBAL         DL_GLOBAL
7144 #  else
7145 #    define LT_DLGLOBAL         0
7146 #  endif
7147 #endif
7148
7149 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7150    find out it does not work in some platform. */
7151 #ifndef LT_DLLAZY_OR_NOW
7152 #  ifdef RTLD_LAZY
7153 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7154 #  else
7155 #    ifdef DL_LAZY
7156 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7157 #    else
7158 #      ifdef RTLD_NOW
7159 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7160 #      else
7161 #        ifdef DL_NOW
7162 #          define LT_DLLAZY_OR_NOW      DL_NOW
7163 #        else
7164 #          define LT_DLLAZY_OR_NOW      0
7165 #        endif
7166 #      endif
7167 #    endif
7168 #  endif
7169 #endif
7170
7171 #ifdef __cplusplus
7172 extern "C" void exit (int);
7173 #endif
7174
7175 void fnord() { int i=42;}
7176 int main ()
7177 {
7178   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7179   int status = $lt_dlunknown;
7180
7181   if (self)
7182     {
7183       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7184       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7185       /* dlclose (self); */
7186     }
7187
7188     exit (status);
7189 }
7190 EOF
7191   if { (eval echo configure:7192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7192     (./conftest; exit; ) 2>/dev/null
7193     lt_status=$?
7194     case x$lt_status in
7195       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7196       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7197       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7198     esac
7199   else :
7200     # compilation failed
7201     lt_cv_dlopen_self_static=no
7202   fi
7203 fi
7204 rm -fr conftest*
7205
7206       
7207 fi
7208
7209 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7210     fi
7211
7212     CPPFLAGS="$save_CPPFLAGS"
7213     LDFLAGS="$save_LDFLAGS"
7214     LIBS="$save_LIBS"
7215     ;;
7216   esac
7217
7218   case $lt_cv_dlopen_self in
7219   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7220   *) enable_dlopen_self=unknown ;;
7221   esac
7222
7223   case $lt_cv_dlopen_self_static in
7224   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7225   *) enable_dlopen_self_static=unknown ;;
7226   esac
7227 fi
7228
7229
7230 ## FIXME: this should be a separate macro
7231 ##
7232 if test "$enable_shared" = yes && test "$GCC" = yes; then
7233   case $archive_cmds in
7234   *'~'*)
7235     # FIXME: we may have to deal with multi-command sequences.
7236     ;;
7237   '$CC '*)
7238     # Test whether the compiler implicitly links with -lc since on some
7239     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7240     # to ld, don't add -lc before -lgcc.
7241     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7242 echo "configure:7243: checking whether -lc should be explicitly linked in" >&5
7243     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7244   echo $ac_n "(cached) $ac_c" 1>&6
7245 else
7246   $rm conftest*
7247     echo 'static int dummy;' > conftest.$ac_ext
7248
7249     if { (eval echo configure:7250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7250       soname=conftest
7251       lib=conftest
7252       libobjs=conftest.$ac_objext
7253       deplibs=
7254       wl=$lt_cv_prog_cc_wl
7255       compiler_flags=-v
7256       linker_flags=-v
7257       verstring=
7258       output_objdir=.
7259       libname=conftest
7260       save_allow_undefined_flag=$allow_undefined_flag
7261       allow_undefined_flag=
7262       if { (eval echo configure:7263: \"$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; }
7263       then
7264         lt_cv_archive_cmds_need_lc=no
7265       else
7266         lt_cv_archive_cmds_need_lc=yes
7267       fi
7268       allow_undefined_flag=$save_allow_undefined_flag
7269     else
7270       cat conftest.err 1>&5
7271     fi
7272 fi
7273
7274     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7275     ;;
7276   esac
7277 fi
7278 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7279 ##
7280 ## END FIXME
7281
7282 ## FIXME: this should be a separate macro
7283 ##
7284 # The second clause should only fire when bootstrapping the
7285 # libtool distribution, otherwise you forgot to ship ltmain.sh
7286 # with your package, and you will get complaints that there are
7287 # no rules to generate ltmain.sh.
7288 if test -f "$ltmain"; then
7289   :
7290 else
7291   # If there is no Makefile yet, we rely on a make rule to execute
7292   # `config.status --recheck' to rerun these tests and create the
7293   # libtool script then.
7294   test -f Makefile && make "$ltmain"
7295 fi
7296
7297 if test -f "$ltmain"; then
7298   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7299   $rm -f "${ofile}T"
7300
7301   echo creating $ofile
7302
7303   # Now quote all the things that may contain metacharacters while being
7304   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7305   # variables and quote the copies for generation of the libtool script.
7306   for var in echo old_CC old_CFLAGS SED \
7307     AR AR_FLAGS CC LD LN_S NM SHELL \
7308     reload_flag reload_cmds wl \
7309     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7310     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7311     library_names_spec soname_spec \
7312     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7313     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7314     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7315     old_striplib striplib file_magic_cmd export_symbols_cmds \
7316     deplibs_check_method allow_undefined_flag no_undefined_flag \
7317     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7318     global_symbol_to_c_name_address \
7319     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7320     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7321     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7322
7323     case $var in
7324     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7325     old_postinstall_cmds | old_postuninstall_cmds | \
7326     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7327     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7328     postinstall_cmds | postuninstall_cmds | \
7329     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7330       # Double-quote double-evaled strings.
7331       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7332       ;;
7333     *)
7334       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7335       ;;
7336     esac
7337   done
7338
7339   cat <<__EOF__ > "${ofile}T"
7340 #! $SHELL
7341
7342 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7343 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7344 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7345 #
7346 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7347 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7348 #
7349 # This program is free software; you can redistribute it and/or modify
7350 # it under the terms of the GNU General Public License as published by
7351 # the Free Software Foundation; either version 2 of the License, or
7352 # (at your option) any later version.
7353 #
7354 # This program is distributed in the hope that it will be useful, but
7355 # WITHOUT ANY WARRANTY; without even the implied warranty of
7356 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7357 # General Public License for more details.
7358 #
7359 # You should have received a copy of the GNU General Public License
7360 # along with this program; if not, write to the Free Software
7361 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7362 #
7363 # As a special exception to the GNU General Public License, if you
7364 # distribute this file as part of a program that contains a
7365 # configuration script generated by Autoconf, you may include it under
7366 # the same distribution terms that you use for the rest of that program.
7367
7368 # A sed that does not truncate output.
7369 SED=$lt_SED
7370
7371 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7372 Xsed="${SED} -e s/^X//"
7373
7374 # The HP-UX ksh and POSIX shell print the target directory to stdout
7375 # if CDPATH is set.
7376 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7377
7378 # ### BEGIN LIBTOOL CONFIG
7379
7380 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7381
7382 # Shell to use when invoking shell scripts.
7383 SHELL=$lt_SHELL
7384
7385 # Whether or not to build shared libraries.
7386 build_libtool_libs=$enable_shared
7387
7388 # Whether or not to build static libraries.
7389 build_old_libs=$enable_static
7390
7391 # Whether or not to add -lc for building shared libraries.
7392 build_libtool_need_lc=$need_lc
7393
7394 # Whether or not to optimize for fast installation.
7395 fast_install=$enable_fast_install
7396
7397 # The host system.
7398 host_alias=$host_alias
7399 host=$host
7400
7401 # An echo program that does not interpret backslashes.
7402 echo=$lt_echo
7403
7404 # The archiver.
7405 AR=$lt_AR
7406 AR_FLAGS=$lt_AR_FLAGS
7407
7408 # The default C compiler.
7409 CC=$lt_CC
7410
7411 # Is the compiler the GNU C compiler?
7412 with_gcc=$GCC
7413
7414 # The linker used to build libraries.
7415 LD=$lt_LD
7416
7417 # Whether we need hard or soft links.
7418 LN_S=$lt_LN_S
7419
7420 # A BSD-compatible nm program.
7421 NM=$lt_NM
7422
7423 # A symbol stripping program
7424 STRIP=$STRIP
7425
7426 # Used to examine libraries when file_magic_cmd begins "file"
7427 MAGIC_CMD=$MAGIC_CMD
7428
7429 # Used on cygwin: DLL creation program.
7430 DLLTOOL="$DLLTOOL"
7431
7432 # Used on cygwin: object dumper.
7433 OBJDUMP="$OBJDUMP"
7434
7435 # Used on cygwin: assembler.
7436 AS="$AS"
7437
7438 # The name of the directory that contains temporary libtool files.
7439 objdir=$objdir
7440
7441 # How to create reloadable object files.
7442 reload_flag=$lt_reload_flag
7443 reload_cmds=$lt_reload_cmds
7444
7445 # How to pass a linker flag through the compiler.
7446 wl=$lt_wl
7447
7448 # Object file suffix (normally "o").
7449 objext="$ac_objext"
7450
7451 # Old archive suffix (normally "a").
7452 libext="$libext"
7453
7454 # Executable file suffix (normally "").
7455 exeext="$exeext"
7456
7457 # Additional compiler flags for building library objects.
7458 pic_flag=$lt_pic_flag
7459 pic_mode=$pic_mode
7460
7461 # Does compiler simultaneously support -c and -o options?
7462 compiler_c_o=$lt_compiler_c_o
7463
7464 # Can we write directly to a .lo ?
7465 compiler_o_lo=$lt_compiler_o_lo
7466
7467 # Must we lock files when doing compilation ?
7468 need_locks=$lt_need_locks
7469
7470 # Do we need the lib prefix for modules?
7471 need_lib_prefix=$need_lib_prefix
7472
7473 # Do we need a version for libraries?
7474 need_version=$need_version
7475
7476 # Whether dlopen is supported.
7477 dlopen_support=$enable_dlopen
7478
7479 # Whether dlopen of programs is supported.
7480 dlopen_self=$enable_dlopen_self
7481
7482 # Whether dlopen of statically linked programs is supported.
7483 dlopen_self_static=$enable_dlopen_self_static
7484
7485 # Compiler flag to prevent dynamic linking.
7486 link_static_flag=$lt_link_static_flag
7487
7488 # Compiler flag to turn off builtin functions.
7489 no_builtin_flag=$lt_no_builtin_flag
7490
7491 # Compiler flag to allow reflexive dlopens.
7492 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7493
7494 # Compiler flag to generate shared objects directly from archives.
7495 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7496
7497 # Compiler flag to generate thread-safe objects.
7498 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7499
7500 # Library versioning type.
7501 version_type=$version_type
7502
7503 # Format of library name prefix.
7504 libname_spec=$lt_libname_spec
7505
7506 # List of archive names.  First name is the real one, the rest are links.
7507 # The last name is the one that the linker finds with -lNAME.
7508 library_names_spec=$lt_library_names_spec
7509
7510 # The coded name of the library, if different from the real name.
7511 soname_spec=$lt_soname_spec
7512
7513 # Commands used to build and install an old-style archive.
7514 RANLIB=$lt_RANLIB
7515 old_archive_cmds=$lt_old_archive_cmds
7516 old_postinstall_cmds=$lt_old_postinstall_cmds
7517 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7518
7519 # Create an old-style archive from a shared archive.
7520 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7521
7522 # Create a temporary old-style archive to link instead of a shared archive.
7523 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7524
7525 # Commands used to build and install a shared archive.
7526 archive_cmds=$lt_archive_cmds
7527 archive_expsym_cmds=$lt_archive_expsym_cmds
7528 postinstall_cmds=$lt_postinstall_cmds
7529 postuninstall_cmds=$lt_postuninstall_cmds
7530
7531 # Commands to strip libraries.
7532 old_striplib=$lt_old_striplib
7533 striplib=$lt_striplib
7534
7535 # Method to check whether dependent libraries are shared objects.
7536 deplibs_check_method=$lt_deplibs_check_method
7537
7538 # Command to use when deplibs_check_method == file_magic.
7539 file_magic_cmd=$lt_file_magic_cmd
7540
7541 # Flag that allows shared libraries with undefined symbols to be built.
7542 allow_undefined_flag=$lt_allow_undefined_flag
7543
7544 # Flag that forces no undefined symbols.
7545 no_undefined_flag=$lt_no_undefined_flag
7546
7547 # Commands used to finish a libtool library installation in a directory.
7548 finish_cmds=$lt_finish_cmds
7549
7550 # Same as above, but a single script fragment to be evaled but not shown.
7551 finish_eval=$lt_finish_eval
7552
7553 # Take the output of nm and produce a listing of raw symbols and C names.
7554 global_symbol_pipe=$lt_global_symbol_pipe
7555
7556 # Transform the output of nm in a proper C declaration
7557 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7558
7559 # Transform the output of nm in a C name address pair
7560 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7561
7562 # This is the shared library runtime path variable.
7563 runpath_var=$runpath_var
7564
7565 # This is the shared library path variable.
7566 shlibpath_var=$shlibpath_var
7567
7568 # Is shlibpath searched before the hard-coded library search path?
7569 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7570
7571 # How to hardcode a shared library path into an executable.
7572 hardcode_action=$hardcode_action
7573
7574 # Whether we should hardcode library paths into libraries.
7575 hardcode_into_libs=$hardcode_into_libs
7576
7577 # Flag to hardcode \$libdir into a binary during linking.
7578 # This must work even if \$libdir does not exist.
7579 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7580
7581 # Whether we need a single -rpath flag with a separated argument.
7582 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7583
7584 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7585 # resulting binary.
7586 hardcode_direct=$hardcode_direct
7587
7588 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7589 # resulting binary.
7590 hardcode_minus_L=$hardcode_minus_L
7591
7592 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7593 # the resulting binary.
7594 hardcode_shlibpath_var=$hardcode_shlibpath_var
7595
7596 # Variables whose values should be saved in libtool wrapper scripts and
7597 # restored at relink time.
7598 variables_saved_for_relink="$variables_saved_for_relink"
7599
7600 # Whether libtool must link a program against all its dependency libraries.
7601 link_all_deplibs=$link_all_deplibs
7602
7603 # Compile-time system search path for libraries
7604 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7605
7606 # Run-time system search path for libraries
7607 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7608
7609 # Fix the shell variable \$srcfile for the compiler.
7610 fix_srcfile_path="$fix_srcfile_path"
7611
7612 # Set to yes if exported symbols are required.
7613 always_export_symbols=$always_export_symbols
7614
7615 # The commands to list exported symbols.
7616 export_symbols_cmds=$lt_export_symbols_cmds
7617
7618 # The commands to extract the exported symbol list from a shared archive.
7619 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7620
7621 # Symbols that should not be listed in the preloaded symbols.
7622 exclude_expsyms=$lt_exclude_expsyms
7623
7624 # Symbols that must always be exported.
7625 include_expsyms=$lt_include_expsyms
7626
7627 # ### END LIBTOOL CONFIG
7628
7629 __EOF__
7630
7631   case $host_os in
7632   aix3*)
7633     cat <<\EOF >> "${ofile}T"
7634
7635 # AIX sometimes has problems with the GCC collect2 program.  For some
7636 # reason, if we set the COLLECT_NAMES environment variable, the problems
7637 # vanish in a puff of smoke.
7638 if test "X${COLLECT_NAMES+set}" != Xset; then
7639   COLLECT_NAMES=
7640   export COLLECT_NAMES
7641 fi
7642 EOF
7643     ;;
7644   esac
7645
7646   case $host_os in
7647   cygwin* | mingw* | pw32* | os2*)
7648     cat <<'EOF' >> "${ofile}T"
7649       # This is a source program that is used to create dlls on Windows
7650       # Don't remove nor modify the starting and closing comments
7651 # /* ltdll.c starts here */
7652 # #define WIN32_LEAN_AND_MEAN
7653 # #include <windows.h>
7654 # #undef WIN32_LEAN_AND_MEAN
7655 # #include <stdio.h>
7656 #
7657 # #ifndef __CYGWIN__
7658 # #  ifdef __CYGWIN32__
7659 # #    define __CYGWIN__ __CYGWIN32__
7660 # #  endif
7661 # #endif
7662 #
7663 # #ifdef __cplusplus
7664 # extern "C" {
7665 # #endif
7666 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7667 # #ifdef __cplusplus
7668 # }
7669 # #endif
7670 #
7671 # #ifdef __CYGWIN__
7672 # #include <cygwin/cygwin_dll.h>
7673 # DECLARE_CYGWIN_DLL( DllMain );
7674 # #endif
7675 # HINSTANCE __hDllInstance_base;
7676 #
7677 # BOOL APIENTRY
7678 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7679 # {
7680 #   __hDllInstance_base = hInst;
7681 #   return TRUE;
7682 # }
7683 # /* ltdll.c ends here */
7684         # This is a source program that is used to create import libraries
7685         # on Windows for dlls which lack them. Don't remove nor modify the
7686         # starting and closing comments
7687 # /* impgen.c starts here */
7688 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7689 #
7690 #  This file is part of GNU libtool.
7691 #
7692 #  This program is free software; you can redistribute it and/or modify
7693 #  it under the terms of the GNU General Public License as published by
7694 #  the Free Software Foundation; either version 2 of the License, or
7695 #  (at your option) any later version.
7696 #
7697 #  This program is distributed in the hope that it will be useful,
7698 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7699 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7700 #  GNU General Public License for more details.
7701 #
7702 #  You should have received a copy of the GNU General Public License
7703 #  along with this program; if not, write to the Free Software
7704 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7705 #  */
7706 #
7707 # #include <stdio.h>            /* for printf() */
7708 # #include <unistd.h>           /* for open(), lseek(), read() */
7709 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7710 # #include <string.h>           /* for strdup() */
7711 #
7712 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7713 # #ifndef O_BINARY
7714 # #define O_BINARY 0
7715 # #endif
7716 #
7717 # static unsigned int
7718 # pe_get16 (fd, offset)
7719 #      int fd;
7720 #      int offset;
7721 # {
7722 #   unsigned char b[2];
7723 #   lseek (fd, offset, SEEK_SET);
7724 #   read (fd, b, 2);
7725 #   return b[0] + (b[1]<<8);
7726 # }
7727 #
7728 # static unsigned int
7729 # pe_get32 (fd, offset)
7730 #     int fd;
7731 #     int offset;
7732 # {
7733 #   unsigned char b[4];
7734 #   lseek (fd, offset, SEEK_SET);
7735 #   read (fd, b, 4);
7736 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7737 # }
7738 #
7739 # static unsigned int
7740 # pe_as32 (ptr)
7741 #      void *ptr;
7742 # {
7743 #   unsigned char *b = ptr;
7744 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7745 # }
7746 #
7747 # int
7748 # main (argc, argv)
7749 #     int argc;
7750 #     char *argv[];
7751 # {
7752 #     int dll;
7753 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7754 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7755 #     unsigned long name_rvas, nexp;
7756 #     unsigned char *expdata, *erva;
7757 #     char *filename, *dll_name;
7758 #
7759 #     filename = argv[1];
7760 #
7761 #     dll = open(filename, O_RDONLY|O_BINARY);
7762 #     if (dll < 1)
7763 #       return 1;
7764 #
7765 #     dll_name = filename;
7766 #
7767 #     for (i=0; filename[i]; i++)
7768 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7769 #           dll_name = filename + i +1;
7770 #
7771 #     pe_header_offset = pe_get32 (dll, 0x3c);
7772 #     opthdr_ofs = pe_header_offset + 4 + 20;
7773 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7774 #
7775 #     if (num_entries < 1) /* no exports */
7776 #       return 1;
7777 #
7778 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7779 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7780 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7781 #     secptr = (pe_header_offset + 4 + 20 +
7782 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7783 #
7784 #     expptr = 0;
7785 #     for (i = 0; i < nsections; i++)
7786 #     {
7787 #       char sname[8];
7788 #       unsigned long secptr1 = secptr + 40 * i;
7789 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7790 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7791 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7792 #       lseek(dll, secptr1, SEEK_SET);
7793 #       read(dll, sname, 8);
7794 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7795 #       {
7796 #           expptr = fptr + (export_rva - vaddr);
7797 #           if (export_rva + export_size > vaddr + vsize)
7798 #               export_size = vsize - (export_rva - vaddr);
7799 #           break;
7800 #       }
7801 #     }
7802 #
7803 #     expdata = (unsigned char*)malloc(export_size);
7804 #     lseek (dll, expptr, SEEK_SET);
7805 #     read (dll, expdata, export_size);
7806 #     erva = expdata - export_rva;
7807 #
7808 #     nexp = pe_as32 (expdata+24);
7809 #     name_rvas = pe_as32 (expdata+32);
7810 #
7811 #     printf ("EXPORTS\n");
7812 #     for (i = 0; i<nexp; i++)
7813 #     {
7814 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7815 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7816 #     }
7817 #
7818 #     return 0;
7819 # }
7820 # /* impgen.c ends here */
7821
7822 EOF
7823     ;;
7824   esac
7825
7826   # We use sed instead of cat because bash on DJGPP gets confused if
7827   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7828   # text mode, it properly converts lines to CR/LF.  This bash problem
7829   # is reportedly fixed, but why not run on old versions too?
7830   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7831
7832   mv -f "${ofile}T" "$ofile" || \
7833     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7834   chmod +x "$ofile"
7835 fi
7836 ##
7837 ## END FIXME
7838
7839
7840
7841
7842
7843 # This can be used to rebuild libtool when needed
7844 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7845
7846 # Always use our own libtool.
7847 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7848
7849 # Prevent multiple expansion
7850
7851
7852
7853 LTSTATIC=""
7854 if test -z "$LTDYNAMIC" -a "${OPENLDAP_CVS}"; then
7855         LTSTATIC="-static"
7856 fi
7857
7858 # test for ln hardlink support
7859 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7860 echo "configure:7861: checking whether ln works" >&5
7861 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7862   echo $ac_n "(cached) $ac_c" 1>&6
7863 else
7864   rm -f conftest.src conftest.dst
7865 echo "conftest" > conftest.src
7866 if ln conftest.src conftest.dst 2>/dev/null
7867 then
7868   ol_cv_prog_LN_H="ln"
7869 else
7870   ol_cv_prog_LN_H="cp"
7871 fi
7872 rm -f conftest.src conftest.dst
7873
7874 fi
7875 LN_H="$ol_cv_prog_LN_H"
7876 if test "$ol_cv_prog_LN_H" = "ln"; then
7877         echo "$ac_t""yes" 1>&6
7878 else
7879         echo "$ac_t""no" 1>&6
7880 fi
7881
7882 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7883 echo "configure:7884: checking whether ln -s works" >&5
7884 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7885   echo $ac_n "(cached) $ac_c" 1>&6
7886 else
7887   rm -f conftestdata
7888 if ln -s X conftestdata 2>/dev/null
7889 then
7890   rm -f conftestdata
7891   ac_cv_prog_LN_S="ln -s"
7892 else
7893   ac_cv_prog_LN_S=ln
7894 fi
7895 fi
7896 LN_S="$ac_cv_prog_LN_S"
7897 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7898   echo "$ac_t""yes" 1>&6
7899 else
7900   echo "$ac_t""no" 1>&6
7901 fi
7902
7903
7904 ol_link_perl=no
7905 if test $ol_enable_perl != no ; then
7906         # Extract the first word of "perl", so it can be a program name with args.
7907 set dummy perl; ac_word=$2
7908 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7909 echo "configure:7910: checking for $ac_word" >&5
7910 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7911   echo $ac_n "(cached) $ac_c" 1>&6
7912 else
7913   case "$PERLBIN" in
7914   /*)
7915   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7916   ;;
7917   ?:/*)
7918   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7919   ;;
7920   *)
7921   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7922   ac_dummy="$PATH"
7923   for ac_dir in $ac_dummy; do 
7924     test -z "$ac_dir" && ac_dir=.
7925     if test -f $ac_dir/$ac_word; then
7926       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7927       break
7928     fi
7929   done
7930   IFS="$ac_save_ifs"
7931   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7932   ;;
7933 esac
7934 fi
7935 PERLBIN="$ac_cv_path_PERLBIN"
7936 if test -n "$PERLBIN"; then
7937   echo "$ac_t""$PERLBIN" 1>&6
7938 else
7939   echo "$ac_t""no" 1>&6
7940 fi
7941
7942
7943         if test "no$PERLBIN" = "no" ; then
7944                 if test $ol_enable_perl = yes ; then
7945                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7946                 fi
7947
7948         else
7949                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7950                 if test x"$ol_with_perl_module" = "xstatic" ; then
7951                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7952                 else
7953                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7954                 fi
7955                                 ol_link_perl=yes
7956         fi
7957 fi
7958
7959 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7960 echo "configure:7961: checking how to run the C preprocessor" >&5
7961 # On Suns, sometimes $CPP names a directory.
7962 if test -n "$CPP" && test -d "$CPP"; then
7963   CPP=
7964 fi
7965 if test -z "$CPP"; then
7966 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7967   echo $ac_n "(cached) $ac_c" 1>&6
7968 else
7969     # This must be in double quotes, not single quotes, because CPP may get
7970   # substituted into the Makefile and "${CC-cc}" will confuse make.
7971   CPP="${CC-cc} -E"
7972   # On the NeXT, cc -E runs the code through the compiler's parser,
7973   # not just through cpp.
7974   cat > conftest.$ac_ext <<EOF
7975 #line 7976 "configure"
7976 #include "confdefs.h"
7977 #include <assert.h>
7978 Syntax Error
7979 EOF
7980 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7981 { (eval echo configure:7982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7982 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7983 if test -z "$ac_err"; then
7984   :
7985 else
7986   echo "$ac_err" >&5
7987   echo "configure: failed program was:" >&5
7988   cat conftest.$ac_ext >&5
7989   rm -rf conftest*
7990   CPP="${CC-cc} -E -traditional-cpp"
7991   cat > conftest.$ac_ext <<EOF
7992 #line 7993 "configure"
7993 #include "confdefs.h"
7994 #include <assert.h>
7995 Syntax Error
7996 EOF
7997 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7998 { (eval echo configure:7999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7999 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8000 if test -z "$ac_err"; then
8001   :
8002 else
8003   echo "$ac_err" >&5
8004   echo "configure: failed program was:" >&5
8005   cat conftest.$ac_ext >&5
8006   rm -rf conftest*
8007   CPP="${CC-cc} -nologo -E"
8008   cat > conftest.$ac_ext <<EOF
8009 #line 8010 "configure"
8010 #include "confdefs.h"
8011 #include <assert.h>
8012 Syntax Error
8013 EOF
8014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8015 { (eval echo configure:8016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8017 if test -z "$ac_err"; then
8018   :
8019 else
8020   echo "$ac_err" >&5
8021   echo "configure: failed program was:" >&5
8022   cat conftest.$ac_ext >&5
8023   rm -rf conftest*
8024   CPP=/lib/cpp
8025 fi
8026 rm -f conftest*
8027 fi
8028 rm -f conftest*
8029 fi
8030 rm -f conftest*
8031   ac_cv_prog_CPP="$CPP"
8032 fi
8033   CPP="$ac_cv_prog_CPP"
8034 else
8035   ac_cv_prog_CPP="$CPP"
8036 fi
8037 echo "$ac_t""$CPP" 1>&6
8038
8039
8040 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
8041         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
8042
8043 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
8044         echo "configure: warning: programs compiled here do run here..." 1>&2
8045         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
8046
8047 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
8048         echo "configure: warning: programs compiled here do not run here..." 1>&2
8049         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
8050 fi
8051
8052
8053 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
8054 echo "configure:8055: checking for Cygwin environment" >&5
8055 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
8056   echo $ac_n "(cached) $ac_c" 1>&6
8057 else
8058   cat > conftest.$ac_ext <<EOF
8059 #line 8060 "configure"
8060 #include "confdefs.h"
8061
8062 int main() {
8063
8064 #ifndef __CYGWIN__
8065 #define __CYGWIN__ __CYGWIN32__
8066 #endif
8067 return __CYGWIN__;
8068 ; return 0; }
8069 EOF
8070 if { (eval echo configure:8071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8071   rm -rf conftest*
8072   ac_cv_cygwin=yes
8073 else
8074   echo "configure: failed program was:" >&5
8075   cat conftest.$ac_ext >&5
8076   rm -rf conftest*
8077   ac_cv_cygwin=no
8078 fi
8079 rm -f conftest*
8080 fi
8081
8082 echo "$ac_t""$ac_cv_cygwin" 1>&6
8083 CYGWIN=
8084 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8085 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8086 echo "configure:8087: checking for mingw32 environment" >&5
8087 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8088   echo $ac_n "(cached) $ac_c" 1>&6
8089 else
8090   cat > conftest.$ac_ext <<EOF
8091 #line 8092 "configure"
8092 #include "confdefs.h"
8093
8094 int main() {
8095 return __MINGW32__;
8096 ; return 0; }
8097 EOF
8098 if { (eval echo configure:8099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8099   rm -rf conftest*
8100   ac_cv_mingw32=yes
8101 else
8102   echo "configure: failed program was:" >&5
8103   cat conftest.$ac_ext >&5
8104   rm -rf conftest*
8105   ac_cv_mingw32=no
8106 fi
8107 rm -f conftest*
8108 fi
8109
8110 echo "$ac_t""$ac_cv_mingw32" 1>&6
8111 MINGW32=
8112 test "$ac_cv_mingw32" = yes && MINGW32=yes
8113
8114
8115
8116 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8117 echo "configure:8118: checking for executable suffix" >&5
8118 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8119   echo $ac_n "(cached) $ac_c" 1>&6
8120 else
8121   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8122   ac_cv_exeext=.exe
8123 else
8124   rm -f conftest*
8125   echo 'int main () { return 0; }' > conftest.$ac_ext
8126   ac_cv_exeext=
8127   if { (eval echo configure:8128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8128     for file in conftest.*; do
8129       case $file in
8130       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8131       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8132       esac
8133     done
8134   else
8135     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8136   fi
8137   rm -f conftest*
8138   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8139 fi
8140 fi
8141
8142 EXEEXT=""
8143 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8144 echo "$ac_t""${ac_cv_exeext}" 1>&6
8145 ac_exeext=$EXEEXT
8146
8147 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8148 echo "configure:8149: checking for object suffix" >&5
8149 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8150   echo $ac_n "(cached) $ac_c" 1>&6
8151 else
8152   rm -f conftest*
8153 echo 'int i = 1;' > conftest.$ac_ext
8154 if { (eval echo configure:8155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8155   for ac_file in conftest.*; do
8156     case $ac_file in
8157     *.c) ;;
8158     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8159     esac
8160   done
8161 else
8162   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8163 fi
8164 rm -f conftest*
8165 fi
8166
8167 echo "$ac_t""$ac_cv_objext" 1>&6
8168 OBJEXT=$ac_cv_objext
8169 ac_objext=$ac_cv_objext
8170
8171
8172 cat >> confdefs.h <<EOF
8173 #define EXEEXT "${EXEEXT}"
8174 EOF
8175
8176
8177 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8178 echo "configure:8179: checking for be_app in -lbe" >&5
8179 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8180 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8181   echo $ac_n "(cached) $ac_c" 1>&6
8182 else
8183   ac_save_LIBS="$LIBS"
8184 LIBS="-lbe -lroot -lnet $LIBS"
8185 cat > conftest.$ac_ext <<EOF
8186 #line 8187 "configure"
8187 #include "confdefs.h"
8188 /* Override any gcc2 internal prototype to avoid an error.  */
8189 /* We use char because int might match the return type of a gcc2
8190     builtin and then its argument prototype would still apply.  */
8191 char be_app();
8192
8193 int main() {
8194 be_app()
8195 ; return 0; }
8196 EOF
8197 if { (eval echo configure:8198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8198   rm -rf conftest*
8199   eval "ac_cv_lib_$ac_lib_var=yes"
8200 else
8201   echo "configure: failed program was:" >&5
8202   cat conftest.$ac_ext >&5
8203   rm -rf conftest*
8204   eval "ac_cv_lib_$ac_lib_var=no"
8205 fi
8206 rm -f conftest*
8207 LIBS="$ac_save_LIBS"
8208
8209 fi
8210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8211   echo "$ac_t""yes" 1>&6
8212   LIBS="$LIBS -lbe -lroot -lnet"
8213 else
8214   echo "$ac_t""no" 1>&6
8215 :
8216 fi
8217
8218
8219
8220
8221
8222 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8223 echo "configure:8224: checking for ${CC-cc} option to accept ANSI C" >&5
8224 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8225   echo $ac_n "(cached) $ac_c" 1>&6
8226 else
8227   am_cv_prog_cc_stdc=no
8228 ac_save_CC="$CC"
8229 # Don't try gcc -ansi; that turns off useful extensions and
8230 # breaks some systems' header files.
8231 # AIX                   -qlanglvl=ansi
8232 # Ultrix and OSF/1      -std1
8233 # HP-UX 10.20 and later -Ae
8234 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8235 # SVR4                  -Xc -D__EXTENSIONS__
8236 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8237 do
8238   CC="$ac_save_CC $ac_arg"
8239   cat > conftest.$ac_ext <<EOF
8240 #line 8241 "configure"
8241 #include "confdefs.h"
8242 #include <stdarg.h>
8243 #include <stdio.h>
8244 #include <sys/types.h>
8245 #include <sys/stat.h>
8246 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8247 struct buf { int x; };
8248 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8249 static char *e (p, i)
8250      char **p;
8251      int i;
8252 {
8253   return p[i];
8254 }
8255 static char *f (char * (*g) (char **, int), char **p, ...)
8256 {
8257   char *s;
8258   va_list v;
8259   va_start (v,p);
8260   s = g (p, va_arg (v,int));
8261   va_end (v);
8262   return s;
8263 }
8264 int test (int i, double x);
8265 struct s1 {int (*f) (int a);};
8266 struct s2 {int (*f) (double a);};
8267 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8268 int argc;
8269 char **argv;
8270
8271 int main() {
8272
8273 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8274
8275 ; return 0; }
8276 EOF
8277 if { (eval echo configure:8278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8278   rm -rf conftest*
8279   am_cv_prog_cc_stdc="$ac_arg"; break
8280 else
8281   echo "configure: failed program was:" >&5
8282   cat conftest.$ac_ext >&5
8283 fi
8284 rm -f conftest*
8285 done
8286 CC="$ac_save_CC"
8287
8288 fi
8289
8290 if test -z "$am_cv_prog_cc_stdc"; then
8291   echo "$ac_t""none needed" 1>&6
8292 else
8293   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8294 fi
8295 case "x$am_cv_prog_cc_stdc" in
8296   x|xno) ;;
8297   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8298 esac
8299
8300 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8301         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8302 fi
8303
8304 # test for make depend flag
8305 OL_MKDEP=
8306 OL_MKDEP_FLAGS=
8307 if test -z "${MKDEP}"; then
8308         OL_MKDEP="${CC-cc}"
8309         if test -z "${MKDEP_FLAGS}"; then
8310                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8311 echo "configure:8312: checking for ${OL_MKDEP} depend flag" >&5
8312 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8313   echo $ac_n "(cached) $ac_c" 1>&6
8314 else
8315   
8316                         ol_cv_mkdep=no
8317                         for flag in "-M" "-xM"; do
8318                                 cat > conftest.c <<EOF
8319  noCode;
8320 EOF
8321                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8322                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8323                                 then
8324                                         if test ! -f conftest."${ac_object}" ; then
8325                                                 ol_cv_mkdep=$flag
8326                                                 OL_MKDEP_FLAGS="$flag"
8327                                                 break
8328                                         fi
8329                                 fi
8330                         done
8331                         rm -f conftest*
8332                 
8333 fi
8334
8335 echo "$ac_t""$ol_cv_mkdep" 1>&6
8336         else
8337                 cc_cv_mkdep=yes
8338                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8339         fi
8340 else
8341         cc_cv_mkdep=yes
8342         OL_MKDEP="${MKDEP}"
8343         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8344 fi
8345
8346
8347
8348 if test "${ol_cv_mkdep}" = no ; then
8349         # this will soon become an error
8350         echo "configure: warning: do not know how to generate dependencies" 1>&2
8351 fi
8352
8353 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8354 echo "configure:8355: checking for afopen in -ls" >&5
8355 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8356 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8357   echo $ac_n "(cached) $ac_c" 1>&6
8358 else
8359   ac_save_LIBS="$LIBS"
8360 LIBS="-ls  $LIBS"
8361 cat > conftest.$ac_ext <<EOF
8362 #line 8363 "configure"
8363 #include "confdefs.h"
8364 /* Override any gcc2 internal prototype to avoid an error.  */
8365 /* We use char because int might match the return type of a gcc2
8366     builtin and then its argument prototype would still apply.  */
8367 char afopen();
8368
8369 int main() {
8370 afopen()
8371 ; return 0; }
8372 EOF
8373 if { (eval echo configure:8374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8374   rm -rf conftest*
8375   eval "ac_cv_lib_$ac_lib_var=yes"
8376 else
8377   echo "configure: failed program was:" >&5
8378   cat conftest.$ac_ext >&5
8379   rm -rf conftest*
8380   eval "ac_cv_lib_$ac_lib_var=no"
8381 fi
8382 rm -f conftest*
8383 LIBS="$ac_save_LIBS"
8384
8385 fi
8386 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8387   echo "$ac_t""yes" 1>&6
8388   
8389         AUTH_LIBS=-ls
8390         cat >> confdefs.h <<\EOF
8391 #define HAVE_AIX_SECURITY 1
8392 EOF
8393
8394
8395 else
8396   echo "$ac_t""no" 1>&6
8397 fi
8398
8399
8400 case "$target" in
8401 *-ibm-openedition)
8402         ac_cv_func_getopt=no
8403         cat >> confdefs.h <<\EOF
8404 #define BOTH_STRINGS_H 1
8405 EOF
8406
8407         ;;
8408 esac
8409
8410 ol_link_modules=no
8411 if test $ol_enable_modules != no ; then
8412         for ac_hdr in ltdl.h
8413 do
8414 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8415 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8416 echo "configure:8417: checking for $ac_hdr" >&5
8417 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8418   echo $ac_n "(cached) $ac_c" 1>&6
8419 else
8420   cat > conftest.$ac_ext <<EOF
8421 #line 8422 "configure"
8422 #include "confdefs.h"
8423 #include <$ac_hdr>
8424 EOF
8425 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8426 { (eval echo configure:8427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8427 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8428 if test -z "$ac_err"; then
8429   rm -rf conftest*
8430   eval "ac_cv_header_$ac_safe=yes"
8431 else
8432   echo "$ac_err" >&5
8433   echo "configure: failed program was:" >&5
8434   cat conftest.$ac_ext >&5
8435   rm -rf conftest*
8436   eval "ac_cv_header_$ac_safe=no"
8437 fi
8438 rm -f conftest*
8439 fi
8440 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8441   echo "$ac_t""yes" 1>&6
8442     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8443   cat >> confdefs.h <<EOF
8444 #define $ac_tr_hdr 1
8445 EOF
8446  
8447 else
8448   echo "$ac_t""no" 1>&6
8449 fi
8450 done
8451
8452
8453         if test $ac_cv_header_ltdl_h = no ; then
8454                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8455         fi
8456
8457         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8458 echo "configure:8459: checking for lt_dlinit in -lltdl" >&5
8459 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8460 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8461   echo $ac_n "(cached) $ac_c" 1>&6
8462 else
8463   ac_save_LIBS="$LIBS"
8464 LIBS="-lltdl  $LIBS"
8465 cat > conftest.$ac_ext <<EOF
8466 #line 8467 "configure"
8467 #include "confdefs.h"
8468 /* Override any gcc2 internal prototype to avoid an error.  */
8469 /* We use char because int might match the return type of a gcc2
8470     builtin and then its argument prototype would still apply.  */
8471 char lt_dlinit();
8472
8473 int main() {
8474 lt_dlinit()
8475 ; return 0; }
8476 EOF
8477 if { (eval echo configure:8478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8478   rm -rf conftest*
8479   eval "ac_cv_lib_$ac_lib_var=yes"
8480 else
8481   echo "configure: failed program was:" >&5
8482   cat conftest.$ac_ext >&5
8483   rm -rf conftest*
8484   eval "ac_cv_lib_$ac_lib_var=no"
8485 fi
8486 rm -f conftest*
8487 LIBS="$ac_save_LIBS"
8488
8489 fi
8490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8491   echo "$ac_t""yes" 1>&6
8492   
8493                 MODULES_LIBS=-lltdl
8494                 cat >> confdefs.h <<\EOF
8495 #define HAVE_LIBLTDL 1
8496 EOF
8497
8498         
8499 else
8500   echo "$ac_t""no" 1>&6
8501 fi
8502
8503
8504         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8505                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8506         fi
8507         ol_link_modules=yes
8508 else
8509         ol_with_bdb_module=static
8510         ol_with_dnssrv_module=static
8511         ol_with_ldap_module=static
8512         ol_with_ldbm_module=static
8513         ol_with_meta_module=static
8514         ol_with_monitor_module=static
8515         ol_with_null_module=static
8516         ol_with_passwd_module=static
8517         ol_with_perl_module=static
8518         ol_with_shell_module=static
8519         ol_with_tcl_module=static
8520         ol_with_sql_module=static
8521 fi
8522
8523 # test for EBCDIC
8524 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8525 echo "configure:8526: checking for EBCDIC" >&5
8526 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8527   echo $ac_n "(cached) $ac_c" 1>&6
8528 else
8529   
8530         cat > conftest.$ac_ext <<EOF
8531 #line 8532 "configure"
8532 #include "confdefs.h"
8533
8534 #if !('M' == 0xd4)
8535 #include <__ASCII__/generate_error.h>
8536 #endif
8537
8538 EOF
8539 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8540 { (eval echo configure:8541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8541 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8542 if test -z "$ac_err"; then
8543   rm -rf conftest*
8544   ol_cv_cpp_ebcdic=yes
8545 else
8546   echo "$ac_err" >&5
8547   echo "configure: failed program was:" >&5
8548   cat conftest.$ac_ext >&5
8549   rm -rf conftest*
8550   ol_cv_cpp_ebcdic=no
8551 fi
8552 rm -f conftest*
8553 fi
8554
8555 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8556 if test $ol_cv_cpp_ebcdic = yes ; then
8557         cat >> confdefs.h <<\EOF
8558 #define HAVE_EBCDIC 1
8559 EOF
8560
8561 fi
8562
8563 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8564 echo "configure:8565: checking for ANSI C header files" >&5
8565 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8566   echo $ac_n "(cached) $ac_c" 1>&6
8567 else
8568   cat > conftest.$ac_ext <<EOF
8569 #line 8570 "configure"
8570 #include "confdefs.h"
8571 #include <stdlib.h>
8572 #include <stdarg.h>
8573 #include <string.h>
8574 #include <float.h>
8575 EOF
8576 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8577 { (eval echo configure:8578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8578 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8579 if test -z "$ac_err"; then
8580   rm -rf conftest*
8581   ol_cv_header_stdc=yes
8582 else
8583   echo "$ac_err" >&5
8584   echo "configure: failed program was:" >&5
8585   cat conftest.$ac_ext >&5
8586   rm -rf conftest*
8587   ol_cv_header_stdc=no
8588 fi
8589 rm -f conftest*
8590
8591 if test $ol_cv_header_stdc = yes; then
8592   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8593 cat > conftest.$ac_ext <<EOF
8594 #line 8595 "configure"
8595 #include "confdefs.h"
8596 #include <string.h>
8597 EOF
8598 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8599   egrep "memchr" >/dev/null 2>&1; then
8600   :
8601 else
8602   rm -rf conftest*
8603   ol_cv_header_stdc=no
8604 fi
8605 rm -f conftest*
8606
8607 fi
8608
8609 if test $ol_cv_header_stdc = yes; then
8610   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8611 cat > conftest.$ac_ext <<EOF
8612 #line 8613 "configure"
8613 #include "confdefs.h"
8614 #include <stdlib.h>
8615 EOF
8616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8617   egrep "free" >/dev/null 2>&1; then
8618   :
8619 else
8620   rm -rf conftest*
8621   ol_cv_header_stdc=no
8622 fi
8623 rm -f conftest*
8624
8625 fi
8626
8627 if test $ol_cv_header_stdc = yes; then
8628   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8629 if test "$cross_compiling" = yes; then
8630   :
8631 else
8632   cat > conftest.$ac_ext <<EOF
8633 #line 8634 "configure"
8634 #include "confdefs.h"
8635 #include <ctype.h>
8636 #ifndef HAVE_EBCDIC
8637 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8638 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8639 #else
8640 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8641                 || ('j' <= (c) && (c) <= 'r') \
8642                 || ('s' <= (c) && (c) <= 'z'))
8643 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8644 #endif
8645 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8646 int main () { int i; for (i = 0; i < 256; i++)
8647 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8648 exit (0); }
8649
8650 EOF
8651 if { (eval echo configure:8652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8652 then
8653   :
8654 else
8655   echo "configure: failed program was:" >&5
8656   cat conftest.$ac_ext >&5
8657   rm -fr conftest*
8658   ol_cv_header_stdc=no
8659 fi
8660 rm -fr conftest*
8661 fi
8662
8663 fi
8664 fi
8665
8666 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8667 if test $ol_cv_header_stdc = yes; then
8668   cat >> confdefs.h <<\EOF
8669 #define STDC_HEADERS 1
8670 EOF
8671
8672 fi
8673 ac_cv_header_stdc=disable
8674
8675
8676 if test $ol_cv_header_stdc != yes; then
8677         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8678 fi
8679
8680 ac_header_dirent=no
8681 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8682 do
8683 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8684 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8685 echo "configure:8686: checking for $ac_hdr that defines DIR" >&5
8686 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8687   echo $ac_n "(cached) $ac_c" 1>&6
8688 else
8689   cat > conftest.$ac_ext <<EOF
8690 #line 8691 "configure"
8691 #include "confdefs.h"
8692 #include <sys/types.h>
8693 #include <$ac_hdr>
8694 int main() {
8695 DIR *dirp = 0;
8696 ; return 0; }
8697 EOF
8698 if { (eval echo configure:8699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8699   rm -rf conftest*
8700   eval "ac_cv_header_dirent_$ac_safe=yes"
8701 else
8702   echo "configure: failed program was:" >&5
8703   cat conftest.$ac_ext >&5
8704   rm -rf conftest*
8705   eval "ac_cv_header_dirent_$ac_safe=no"
8706 fi
8707 rm -f conftest*
8708 fi
8709 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8710   echo "$ac_t""yes" 1>&6
8711     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8712   cat >> confdefs.h <<EOF
8713 #define $ac_tr_hdr 1
8714 EOF
8715  ac_header_dirent=$ac_hdr; break
8716 else
8717   echo "$ac_t""no" 1>&6
8718 fi
8719 done
8720 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8721 if test $ac_header_dirent = dirent.h; then
8722 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8723 echo "configure:8724: checking for opendir in -ldir" >&5
8724 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8725 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8726   echo $ac_n "(cached) $ac_c" 1>&6
8727 else
8728   ac_save_LIBS="$LIBS"
8729 LIBS="-ldir  $LIBS"
8730 cat > conftest.$ac_ext <<EOF
8731 #line 8732 "configure"
8732 #include "confdefs.h"
8733 /* Override any gcc2 internal prototype to avoid an error.  */
8734 /* We use char because int might match the return type of a gcc2
8735     builtin and then its argument prototype would still apply.  */
8736 char opendir();
8737
8738 int main() {
8739 opendir()
8740 ; return 0; }
8741 EOF
8742 if { (eval echo configure:8743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8743   rm -rf conftest*
8744   eval "ac_cv_lib_$ac_lib_var=yes"
8745 else
8746   echo "configure: failed program was:" >&5
8747   cat conftest.$ac_ext >&5
8748   rm -rf conftest*
8749   eval "ac_cv_lib_$ac_lib_var=no"
8750 fi
8751 rm -f conftest*
8752 LIBS="$ac_save_LIBS"
8753
8754 fi
8755 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8756   echo "$ac_t""yes" 1>&6
8757   LIBS="$LIBS -ldir"
8758 else
8759   echo "$ac_t""no" 1>&6
8760 fi
8761
8762 else
8763 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8764 echo "configure:8765: checking for opendir in -lx" >&5
8765 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8766 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8767   echo $ac_n "(cached) $ac_c" 1>&6
8768 else
8769   ac_save_LIBS="$LIBS"
8770 LIBS="-lx  $LIBS"
8771 cat > conftest.$ac_ext <<EOF
8772 #line 8773 "configure"
8773 #include "confdefs.h"
8774 /* Override any gcc2 internal prototype to avoid an error.  */
8775 /* We use char because int might match the return type of a gcc2
8776     builtin and then its argument prototype would still apply.  */
8777 char opendir();
8778
8779 int main() {
8780 opendir()
8781 ; return 0; }
8782 EOF
8783 if { (eval echo configure:8784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8784   rm -rf conftest*
8785   eval "ac_cv_lib_$ac_lib_var=yes"
8786 else
8787   echo "configure: failed program was:" >&5
8788   cat conftest.$ac_ext >&5
8789   rm -rf conftest*
8790   eval "ac_cv_lib_$ac_lib_var=no"
8791 fi
8792 rm -f conftest*
8793 LIBS="$ac_save_LIBS"
8794
8795 fi
8796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8797   echo "$ac_t""yes" 1>&6
8798   LIBS="$LIBS -lx"
8799 else
8800   echo "$ac_t""no" 1>&6
8801 fi
8802
8803 fi
8804
8805 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8806 echo "configure:8807: checking for sys/wait.h that is POSIX.1 compatible" >&5
8807 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8808   echo $ac_n "(cached) $ac_c" 1>&6
8809 else
8810   cat > conftest.$ac_ext <<EOF
8811 #line 8812 "configure"
8812 #include "confdefs.h"
8813 #include <sys/types.h>
8814 #include <sys/wait.h>
8815 #ifndef WEXITSTATUS
8816 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8817 #endif
8818 #ifndef WIFEXITED
8819 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8820 #endif
8821 int main() {
8822 int s;
8823 wait (&s);
8824 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8825 ; return 0; }
8826 EOF
8827 if { (eval echo configure:8828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8828   rm -rf conftest*
8829   ac_cv_header_sys_wait_h=yes
8830 else
8831   echo "configure: failed program was:" >&5
8832   cat conftest.$ac_ext >&5
8833   rm -rf conftest*
8834   ac_cv_header_sys_wait_h=no
8835 fi
8836 rm -f conftest*
8837 fi
8838
8839 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8840 if test $ac_cv_header_sys_wait_h = yes; then
8841   cat >> confdefs.h <<\EOF
8842 #define HAVE_SYS_WAIT_H 1
8843 EOF
8844
8845 fi
8846
8847 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8848 echo "configure:8849: checking POSIX termios" >&5
8849 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8850   echo $ac_n "(cached) $ac_c" 1>&6
8851 else
8852   cat > conftest.$ac_ext <<EOF
8853 #line 8854 "configure"
8854 #include "confdefs.h"
8855 #include <sys/types.h>
8856 #include <unistd.h>
8857 #include <termios.h>
8858 int main() {
8859 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8860    tcgetattr(0, 0);
8861 ; return 0; }
8862 EOF
8863 if { (eval echo configure:8864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8864   rm -rf conftest*
8865   am_cv_sys_posix_termios=yes
8866 else
8867   echo "configure: failed program was:" >&5
8868   cat conftest.$ac_ext >&5
8869   rm -rf conftest*
8870   am_cv_sys_posix_termios=no
8871 fi
8872 rm -f conftest*
8873 fi
8874
8875 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8876
8877
8878  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8879 echo "configure:8880: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8880 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8881   echo $ac_n "(cached) $ac_c" 1>&6
8882 else
8883   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8884
8885   gwinsz_in_termios_h=no
8886   if test $am_cv_sys_posix_termios = yes; then
8887     cat > conftest.$ac_ext <<EOF
8888 #line 8889 "configure"
8889 #include "confdefs.h"
8890 #include <sys/types.h>
8891 #     include <termios.h>
8892 #     ifdef TIOCGWINSZ
8893         yes
8894 #     endif
8895     
8896 EOF
8897 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8898   egrep "yes" >/dev/null 2>&1; then
8899   rm -rf conftest*
8900   gwinsz_in_termios_h=yes
8901 fi
8902 rm -f conftest*
8903
8904   fi
8905
8906   if test $gwinsz_in_termios_h = no; then
8907     cat > conftest.$ac_ext <<EOF
8908 #line 8909 "configure"
8909 #include "confdefs.h"
8910 #include <sys/types.h>
8911 #     include <sys/ioctl.h>
8912 #     ifdef TIOCGWINSZ
8913         yes
8914 #     endif
8915     
8916 EOF
8917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8918   egrep "yes" >/dev/null 2>&1; then
8919   rm -rf conftest*
8920   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8921 fi
8922 rm -f conftest*
8923
8924   fi
8925   
8926 fi
8927
8928 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8929   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8930     cat >> confdefs.h <<\EOF
8931 #define GWINSZ_IN_SYS_IOCTL 1
8932 EOF
8933
8934   fi
8935
8936 if test $am_cv_sys_posix_termios = yes ; then
8937         cat >> confdefs.h <<\EOF
8938 #define HAVE_POSIX_TERMIOS 1
8939 EOF
8940
8941 fi
8942
8943 for ac_hdr in \
8944         arpa/inet.h             \
8945         arpa/nameser.h  \
8946         assert.h                \
8947         conio.h                 \
8948         crypt.h                 \
8949         direct.h                \
8950         errno.h                 \
8951         fcntl.h                 \
8952         filio.h                 \
8953         getopt.h                \
8954         grp.h                   \
8955         io.h                    \
8956         libutil.h               \
8957         limits.h                \
8958         locale.h                \
8959         netinet/tcp.h   \
8960         malloc.h                \
8961         memory.h                \
8962         psap.h                  \
8963         pwd.h                   \
8964         process.h               \
8965         resolv.h                \
8966         sgtty.h                 \
8967         shadow.h                \
8968         stddef.h                \
8969         string.h                \
8970         strings.h               \
8971         sysexits.h              \
8972         sys/file.h              \
8973         sys/filio.h             \
8974         sys/errno.h             \
8975         sys/ioctl.h             \
8976         sys/param.h             \
8977         sys/resource.h  \
8978         sys/select.h    \
8979         sys/socket.h    \
8980         sys/syslog.h    \
8981         sys/time.h              \
8982         sys/types.h             \
8983         sys/ucred.h             \
8984         syslog.h                \
8985         termios.h               \
8986         unistd.h                \
8987         winsock.h               \
8988         winsock2.h              \
8989
8990 do
8991 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8992 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8993 echo "configure:8994: checking for $ac_hdr" >&5
8994 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8995   echo $ac_n "(cached) $ac_c" 1>&6
8996 else
8997   cat > conftest.$ac_ext <<EOF
8998 #line 8999 "configure"
8999 #include "confdefs.h"
9000 #include <$ac_hdr>
9001 EOF
9002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9003 { (eval echo configure:9004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9005 if test -z "$ac_err"; then
9006   rm -rf conftest*
9007   eval "ac_cv_header_$ac_safe=yes"
9008 else
9009   echo "$ac_err" >&5
9010   echo "configure: failed program was:" >&5
9011   cat conftest.$ac_ext >&5
9012   rm -rf conftest*
9013   eval "ac_cv_header_$ac_safe=no"
9014 fi
9015 rm -f conftest*
9016 fi
9017 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9018   echo "$ac_t""yes" 1>&6
9019     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9020   cat >> confdefs.h <<EOF
9021 #define $ac_tr_hdr 1
9022 EOF
9023  
9024 else
9025   echo "$ac_t""no" 1>&6
9026 fi
9027 done
9028
9029
9030
9031
9032 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
9033 echo "configure:9034: checking for dlopen" >&5
9034 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
9035   echo $ac_n "(cached) $ac_c" 1>&6
9036 else
9037   cat > conftest.$ac_ext <<EOF
9038 #line 9039 "configure"
9039 #include "confdefs.h"
9040 /* System header to define __stub macros and hopefully few prototypes,
9041     which can conflict with char dlopen(); below.  */
9042 #include <assert.h>
9043 /* Override any gcc2 internal prototype to avoid an error.  */
9044 /* We use char because int might match the return type of a gcc2
9045     builtin and then its argument prototype would still apply.  */
9046 char dlopen();
9047 char (*f)();
9048
9049 int main() {
9050
9051 /* The GNU C library defines this for functions which it implements
9052     to always fail with ENOSYS.  Some functions are actually named
9053     something starting with __ and the normal name is an alias.  */
9054 #if defined (__stub_dlopen) || defined (__stub___dlopen)
9055 choke me
9056 #else
9057 f = dlopen;
9058 #endif
9059
9060 ; return 0; }
9061 EOF
9062 if { (eval echo configure:9063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9063   rm -rf conftest*
9064   eval "ac_cv_func_dlopen=yes"
9065 else
9066   echo "configure: failed program was:" >&5
9067   cat conftest.$ac_ext >&5
9068   rm -rf conftest*
9069   eval "ac_cv_func_dlopen=no"
9070 fi
9071 rm -f conftest*
9072 fi
9073
9074 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
9075   echo "$ac_t""yes" 1>&6
9076   :
9077 else
9078   echo "$ac_t""no" 1>&6
9079 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9080 echo "configure:9081: checking for dlopen in -ldl" >&5
9081 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9082 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9083   echo $ac_n "(cached) $ac_c" 1>&6
9084 else
9085   ac_save_LIBS="$LIBS"
9086 LIBS="-ldl  $LIBS"
9087 cat > conftest.$ac_ext <<EOF
9088 #line 9089 "configure"
9089 #include "confdefs.h"
9090 /* Override any gcc2 internal prototype to avoid an error.  */
9091 /* We use char because int might match the return type of a gcc2
9092     builtin and then its argument prototype would still apply.  */
9093 char dlopen();
9094
9095 int main() {
9096 dlopen()
9097 ; return 0; }
9098 EOF
9099 if { (eval echo configure:9100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9100   rm -rf conftest*
9101   eval "ac_cv_lib_$ac_lib_var=yes"
9102 else
9103   echo "configure: failed program was:" >&5
9104   cat conftest.$ac_ext >&5
9105   rm -rf conftest*
9106   eval "ac_cv_lib_$ac_lib_var=no"
9107 fi
9108 rm -f conftest*
9109 LIBS="$ac_save_LIBS"
9110
9111 fi
9112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9113   echo "$ac_t""yes" 1>&6
9114     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9115     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9116   cat >> confdefs.h <<EOF
9117 #define $ac_tr_lib 1
9118 EOF
9119
9120   LIBS="-ldl $LIBS"
9121
9122 else
9123   echo "$ac_t""no" 1>&6
9124 fi
9125
9126 fi
9127
9128
9129 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9130 echo "configure:9131: checking for sigset in -lV3" >&5
9131 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9132 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9133   echo $ac_n "(cached) $ac_c" 1>&6
9134 else
9135   ac_save_LIBS="$LIBS"
9136 LIBS="-lV3  $LIBS"
9137 cat > conftest.$ac_ext <<EOF
9138 #line 9139 "configure"
9139 #include "confdefs.h"
9140 /* Override any gcc2 internal prototype to avoid an error.  */
9141 /* We use char because int might match the return type of a gcc2
9142     builtin and then its argument prototype would still apply.  */
9143 char sigset();
9144
9145 int main() {
9146 sigset()
9147 ; return 0; }
9148 EOF
9149 if { (eval echo configure:9150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9150   rm -rf conftest*
9151   eval "ac_cv_lib_$ac_lib_var=yes"
9152 else
9153   echo "configure: failed program was:" >&5
9154   cat conftest.$ac_ext >&5
9155   rm -rf conftest*
9156   eval "ac_cv_lib_$ac_lib_var=no"
9157 fi
9158 rm -f conftest*
9159 LIBS="$ac_save_LIBS"
9160
9161 fi
9162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9163   echo "$ac_t""yes" 1>&6
9164     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9165     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9166   cat >> confdefs.h <<EOF
9167 #define $ac_tr_lib 1
9168 EOF
9169
9170   LIBS="-lV3 $LIBS"
9171
9172 else
9173   echo "$ac_t""no" 1>&6
9174 fi
9175
9176
9177 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9178 echo "configure:9179: checking for winsock" >&5
9179 save_LIBS="$LIBS"
9180 for curlib in ws2_32 wsock32; do
9181         LIBS="$LIBS -l$curlib"
9182         cat > conftest.$ac_ext <<EOF
9183 #line 9184 "configure"
9184 #include "confdefs.h"
9185
9186                         char socket@12();
9187                         char select@20();
9188                         char closesocket@4();
9189                         char gethostname@8();
9190                         
9191 int main() {
9192
9193                         socket@12();
9194                         select@20();
9195                         closesocket@4();
9196                         gethostname@8();
9197                         
9198 ; return 0; }
9199 EOF
9200 if { (eval echo configure:9201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9201   rm -rf conftest*
9202   have_winsock=yes
9203 else
9204   echo "configure: failed program was:" >&5
9205   cat conftest.$ac_ext >&5
9206   rm -rf conftest*
9207   have_winsock=no
9208 fi
9209 rm -f conftest*
9210
9211         if test $have_winsock = yes; then
9212                 cat >> confdefs.h <<\EOF
9213 #define HAVE_WINSOCK 1
9214 EOF
9215
9216                 ac_cv_func_socket=yes
9217                 ac_cv_func_select=yes
9218                 ac_cv_func_closesocket=yes
9219                 ac_cv_func_gethostname=yes
9220                 if test $curlib = ws2_32; then
9221                         have_winsock=winsock2
9222                         cat >> confdefs.h <<\EOF
9223 #define HAVE_WINSOCK2 1
9224 EOF
9225
9226                 fi
9227                 break
9228         fi
9229         LIBS="$save_LIBS"
9230 done
9231 echo "$ac_t""$have_winsock" 1>&6
9232
9233
9234 echo $ac_n "checking for socket""... $ac_c" 1>&6
9235 echo "configure:9236: checking for socket" >&5
9236 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9237   echo $ac_n "(cached) $ac_c" 1>&6
9238 else
9239   cat > conftest.$ac_ext <<EOF
9240 #line 9241 "configure"
9241 #include "confdefs.h"
9242 /* System header to define __stub macros and hopefully few prototypes,
9243     which can conflict with char socket(); below.  */
9244 #include <assert.h>
9245 /* Override any gcc2 internal prototype to avoid an error.  */
9246 /* We use char because int might match the return type of a gcc2
9247     builtin and then its argument prototype would still apply.  */
9248 char socket();
9249 char (*f)();
9250
9251 int main() {
9252
9253 /* The GNU C library defines this for functions which it implements
9254     to always fail with ENOSYS.  Some functions are actually named
9255     something starting with __ and the normal name is an alias.  */
9256 #if defined (__stub_socket) || defined (__stub___socket)
9257 choke me
9258 #else
9259 f = socket;
9260 #endif
9261
9262 ; return 0; }
9263 EOF
9264 if { (eval echo configure:9265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9265   rm -rf conftest*
9266   eval "ac_cv_func_socket=yes"
9267 else
9268   echo "configure: failed program was:" >&5
9269   cat conftest.$ac_ext >&5
9270   rm -rf conftest*
9271   eval "ac_cv_func_socket=no"
9272 fi
9273 rm -f conftest*
9274 fi
9275
9276 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9277   echo "$ac_t""yes" 1>&6
9278   :
9279 else
9280   echo "$ac_t""no" 1>&6
9281         
9282         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9283 echo "configure:9284: checking for main in -lsocket" >&5
9284 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9285 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9286   echo $ac_n "(cached) $ac_c" 1>&6
9287 else
9288   ac_save_LIBS="$LIBS"
9289 LIBS="-lsocket  $LIBS"
9290 cat > conftest.$ac_ext <<EOF
9291 #line 9292 "configure"
9292 #include "confdefs.h"
9293
9294 int main() {
9295 main()
9296 ; return 0; }
9297 EOF
9298 if { (eval echo configure:9299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9299   rm -rf conftest*
9300   eval "ac_cv_lib_$ac_lib_var=yes"
9301 else
9302   echo "configure: failed program was:" >&5
9303   cat conftest.$ac_ext >&5
9304   rm -rf conftest*
9305   eval "ac_cv_lib_$ac_lib_var=no"
9306 fi
9307 rm -f conftest*
9308 LIBS="$ac_save_LIBS"
9309
9310 fi
9311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9312   echo "$ac_t""yes" 1>&6
9313     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9314     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9315   cat >> confdefs.h <<EOF
9316 #define $ac_tr_lib 1
9317 EOF
9318
9319   LIBS="-lsocket $LIBS"
9320
9321 else
9322   echo "$ac_t""no" 1>&6
9323 fi
9324
9325         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9326 echo "configure:9327: checking for main in -lnet" >&5
9327 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9328 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9329   echo $ac_n "(cached) $ac_c" 1>&6
9330 else
9331   ac_save_LIBS="$LIBS"
9332 LIBS="-lnet  $LIBS"
9333 cat > conftest.$ac_ext <<EOF
9334 #line 9335 "configure"
9335 #include "confdefs.h"
9336
9337 int main() {
9338 main()
9339 ; return 0; }
9340 EOF
9341 if { (eval echo configure:9342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9342   rm -rf conftest*
9343   eval "ac_cv_lib_$ac_lib_var=yes"
9344 else
9345   echo "configure: failed program was:" >&5
9346   cat conftest.$ac_ext >&5
9347   rm -rf conftest*
9348   eval "ac_cv_lib_$ac_lib_var=no"
9349 fi
9350 rm -f conftest*
9351 LIBS="$ac_save_LIBS"
9352
9353 fi
9354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9355   echo "$ac_t""yes" 1>&6
9356     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9357     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9358   cat >> confdefs.h <<EOF
9359 #define $ac_tr_lib 1
9360 EOF
9361
9362   LIBS="-lnet $LIBS"
9363
9364 else
9365   echo "$ac_t""no" 1>&6
9366 fi
9367
9368         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9369 echo "configure:9370: checking for main in -lnsl_s" >&5
9370 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9371 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9372   echo $ac_n "(cached) $ac_c" 1>&6
9373 else
9374   ac_save_LIBS="$LIBS"
9375 LIBS="-lnsl_s  $LIBS"
9376 cat > conftest.$ac_ext <<EOF
9377 #line 9378 "configure"
9378 #include "confdefs.h"
9379
9380 int main() {
9381 main()
9382 ; return 0; }
9383 EOF
9384 if { (eval echo configure:9385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9385   rm -rf conftest*
9386   eval "ac_cv_lib_$ac_lib_var=yes"
9387 else
9388   echo "configure: failed program was:" >&5
9389   cat conftest.$ac_ext >&5
9390   rm -rf conftest*
9391   eval "ac_cv_lib_$ac_lib_var=no"
9392 fi
9393 rm -f conftest*
9394 LIBS="$ac_save_LIBS"
9395
9396 fi
9397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9398   echo "$ac_t""yes" 1>&6
9399     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9400     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9401   cat >> confdefs.h <<EOF
9402 #define $ac_tr_lib 1
9403 EOF
9404
9405   LIBS="-lnsl_s $LIBS"
9406
9407 else
9408   echo "$ac_t""no" 1>&6
9409 fi
9410
9411         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9412 echo "configure:9413: checking for main in -lnsl" >&5
9413 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9414 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9415   echo $ac_n "(cached) $ac_c" 1>&6
9416 else
9417   ac_save_LIBS="$LIBS"
9418 LIBS="-lnsl  $LIBS"
9419 cat > conftest.$ac_ext <<EOF
9420 #line 9421 "configure"
9421 #include "confdefs.h"
9422
9423 int main() {
9424 main()
9425 ; return 0; }
9426 EOF
9427 if { (eval echo configure:9428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9428   rm -rf conftest*
9429   eval "ac_cv_lib_$ac_lib_var=yes"
9430 else
9431   echo "configure: failed program was:" >&5
9432   cat conftest.$ac_ext >&5
9433   rm -rf conftest*
9434   eval "ac_cv_lib_$ac_lib_var=no"
9435 fi
9436 rm -f conftest*
9437 LIBS="$ac_save_LIBS"
9438
9439 fi
9440 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9441   echo "$ac_t""yes" 1>&6
9442     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9443     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9444   cat >> confdefs.h <<EOF
9445 #define $ac_tr_lib 1
9446 EOF
9447
9448   LIBS="-lnsl $LIBS"
9449
9450 else
9451   echo "$ac_t""no" 1>&6
9452 fi
9453
9454         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9455 echo "configure:9456: checking for socket in -linet" >&5
9456 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9457 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9458   echo $ac_n "(cached) $ac_c" 1>&6
9459 else
9460   ac_save_LIBS="$LIBS"
9461 LIBS="-linet  $LIBS"
9462 cat > conftest.$ac_ext <<EOF
9463 #line 9464 "configure"
9464 #include "confdefs.h"
9465 /* Override any gcc2 internal prototype to avoid an error.  */
9466 /* We use char because int might match the return type of a gcc2
9467     builtin and then its argument prototype would still apply.  */
9468 char socket();
9469
9470 int main() {
9471 socket()
9472 ; return 0; }
9473 EOF
9474 if { (eval echo configure:9475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9475   rm -rf conftest*
9476   eval "ac_cv_lib_$ac_lib_var=yes"
9477 else
9478   echo "configure: failed program was:" >&5
9479   cat conftest.$ac_ext >&5
9480   rm -rf conftest*
9481   eval "ac_cv_lib_$ac_lib_var=no"
9482 fi
9483 rm -f conftest*
9484 LIBS="$ac_save_LIBS"
9485
9486 fi
9487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9488   echo "$ac_t""yes" 1>&6
9489     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9490     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9491   cat >> confdefs.h <<EOF
9492 #define $ac_tr_lib 1
9493 EOF
9494
9495   LIBS="-linet $LIBS"
9496
9497 else
9498   echo "$ac_t""no" 1>&6
9499 fi
9500
9501         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9502 echo "configure:9503: checking for main in -lgen" >&5
9503 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9504 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9505   echo $ac_n "(cached) $ac_c" 1>&6
9506 else
9507   ac_save_LIBS="$LIBS"
9508 LIBS="-lgen  $LIBS"
9509 cat > conftest.$ac_ext <<EOF
9510 #line 9511 "configure"
9511 #include "confdefs.h"
9512
9513 int main() {
9514 main()
9515 ; return 0; }
9516 EOF
9517 if { (eval echo configure:9518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9518   rm -rf conftest*
9519   eval "ac_cv_lib_$ac_lib_var=yes"
9520 else
9521   echo "configure: failed program was:" >&5
9522   cat conftest.$ac_ext >&5
9523   rm -rf conftest*
9524   eval "ac_cv_lib_$ac_lib_var=no"
9525 fi
9526 rm -f conftest*
9527 LIBS="$ac_save_LIBS"
9528
9529 fi
9530 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9531   echo "$ac_t""yes" 1>&6
9532     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9533     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9534   cat >> confdefs.h <<EOF
9535 #define $ac_tr_lib 1
9536 EOF
9537
9538   LIBS="-lgen $LIBS"
9539
9540 else
9541   echo "$ac_t""no" 1>&6
9542 fi
9543
9544
9545 fi
9546
9547
9548 echo $ac_n "checking for select""... $ac_c" 1>&6
9549 echo "configure:9550: checking for select" >&5
9550 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9551   echo $ac_n "(cached) $ac_c" 1>&6
9552 else
9553   cat > conftest.$ac_ext <<EOF
9554 #line 9555 "configure"
9555 #include "confdefs.h"
9556 /* System header to define __stub macros and hopefully few prototypes,
9557     which can conflict with char select(); below.  */
9558 #include <assert.h>
9559 /* Override any gcc2 internal prototype to avoid an error.  */
9560 /* We use char because int might match the return type of a gcc2
9561     builtin and then its argument prototype would still apply.  */
9562 char select();
9563 char (*f)();
9564
9565 int main() {
9566
9567 /* The GNU C library defines this for functions which it implements
9568     to always fail with ENOSYS.  Some functions are actually named
9569     something starting with __ and the normal name is an alias.  */
9570 #if defined (__stub_select) || defined (__stub___select)
9571 choke me
9572 #else
9573 f = select;
9574 #endif
9575
9576 ; return 0; }
9577 EOF
9578 if { (eval echo configure:9579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9579   rm -rf conftest*
9580   eval "ac_cv_func_select=yes"
9581 else
9582   echo "configure: failed program was:" >&5
9583   cat conftest.$ac_ext >&5
9584   rm -rf conftest*
9585   eval "ac_cv_func_select=no"
9586 fi
9587 rm -f conftest*
9588 fi
9589
9590 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9591   echo "$ac_t""yes" 1>&6
9592   :
9593 else
9594   echo "$ac_t""no" 1>&6
9595 { echo "configure: error: select() required." 1>&2; exit 1; }
9596 fi
9597
9598
9599 if test "${ac_cv_header_winsock_h}" != yes; then
9600                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9601 echo "configure:9602: checking types of arguments for select()" >&5
9602  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9603   echo $ac_n "(cached) $ac_c" 1>&6
9604 else
9605    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9606   echo $ac_n "(cached) $ac_c" 1>&6
9607 else
9608     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9609   echo $ac_n "(cached) $ac_c" 1>&6
9610 else
9611      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9612      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9613       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9614        cat > conftest.$ac_ext <<EOF
9615 #line 9616 "configure"
9616 #include "confdefs.h"
9617 #ifdef HAVE_SYS_TYPES_H
9618 #include <sys/types.h>
9619 #endif
9620 #ifdef HAVE_SYS_TIME_H
9621 #include <sys/time.h>
9622 #endif
9623 #ifdef HAVE_SYS_SELECT_H
9624 #include <sys/select.h>
9625 #endif
9626 #ifdef HAVE_SYS_SOCKET_H
9627 #include <sys/socket.h>
9628 #endif
9629 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);
9630 int main() {
9631
9632 ; return 0; }
9633 EOF
9634 if { (eval echo configure:9635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9635   rm -rf conftest*
9636           ac_not_found=no ; break 3
9637 else
9638   echo "configure: failed program was:" >&5
9639   cat conftest.$ac_ext >&5
9640   rm -rf conftest*
9641   ac_not_found=yes
9642 fi
9643 rm -f conftest*
9644       done
9645      done
9646     done
9647    
9648 fi
9649   
9650 fi
9651  
9652 fi
9653  if test "$ac_not_found" = yes; then
9654   ac_cv_func_select_arg1=int 
9655   ac_cv_func_select_arg234='int *' 
9656   ac_cv_func_select_arg5='struct timeval *'
9657  fi
9658  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9659  cat >> confdefs.h <<EOF
9660 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9661 EOF
9662
9663  cat >> confdefs.h <<EOF
9664 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9665 EOF
9666
9667  cat >> confdefs.h <<EOF
9668 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9669 EOF
9670
9671
9672 fi
9673
9674
9675 for ac_hdr in regex.h 
9676 do
9677 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9678 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9679 echo "configure:9680: checking for $ac_hdr" >&5
9680 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9681   echo $ac_n "(cached) $ac_c" 1>&6
9682 else
9683   cat > conftest.$ac_ext <<EOF
9684 #line 9685 "configure"
9685 #include "confdefs.h"
9686 #include <$ac_hdr>
9687 EOF
9688 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9689 { (eval echo configure:9690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9690 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9691 if test -z "$ac_err"; then
9692   rm -rf conftest*
9693   eval "ac_cv_header_$ac_safe=yes"
9694 else
9695   echo "$ac_err" >&5
9696   echo "configure: failed program was:" >&5
9697   cat conftest.$ac_ext >&5
9698   rm -rf conftest*
9699   eval "ac_cv_header_$ac_safe=no"
9700 fi
9701 rm -f conftest*
9702 fi
9703 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9704   echo "$ac_t""yes" 1>&6
9705     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9706   cat >> confdefs.h <<EOF
9707 #define $ac_tr_hdr 1
9708 EOF
9709  
9710 else
9711   echo "$ac_t""no" 1>&6
9712 fi
9713 done
9714
9715 if test "$ac_cv_header_regex_h" != yes ; then
9716         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9717 fi
9718
9719 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9720 echo "configure:9721: checking for library containing regfree" >&5
9721 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9722   echo $ac_n "(cached) $ac_c" 1>&6
9723 else
9724   ac_func_search_save_LIBS="$LIBS"
9725 ac_cv_search_regfree="no"
9726 cat > conftest.$ac_ext <<EOF
9727 #line 9728 "configure"
9728 #include "confdefs.h"
9729 /* Override any gcc2 internal prototype to avoid an error.  */
9730 /* We use char because int might match the return type of a gcc2
9731     builtin and then its argument prototype would still apply.  */
9732 char regfree();
9733
9734 int main() {
9735 regfree()
9736 ; return 0; }
9737 EOF
9738 if { (eval echo configure:9739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9739   rm -rf conftest*
9740   ac_cv_search_regfree="none required"
9741 else
9742   echo "configure: failed program was:" >&5
9743   cat conftest.$ac_ext >&5
9744 fi
9745 rm -f conftest*
9746 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9747 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9748 cat > conftest.$ac_ext <<EOF
9749 #line 9750 "configure"
9750 #include "confdefs.h"
9751 /* Override any gcc2 internal prototype to avoid an error.  */
9752 /* We use char because int might match the return type of a gcc2
9753     builtin and then its argument prototype would still apply.  */
9754 char regfree();
9755
9756 int main() {
9757 regfree()
9758 ; return 0; }
9759 EOF
9760 if { (eval echo configure:9761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9761   rm -rf conftest*
9762   ac_cv_search_regfree="-l$ac_lib"
9763 break
9764 else
9765   echo "configure: failed program was:" >&5
9766   cat conftest.$ac_ext >&5
9767 fi
9768 rm -f conftest*
9769 done
9770 LIBS="$ac_func_search_save_LIBS"
9771 fi
9772
9773 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9774 if test "$ac_cv_search_regfree" != "no"; then
9775   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9776   :
9777 else :
9778   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9779 fi
9780
9781
9782 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9783 echo "configure:9784: checking for compatible POSIX regex" >&5
9784 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9785   echo $ac_n "(cached) $ac_c" 1>&6
9786 else
9787   
9788         if test "$cross_compiling" = yes; then
9789   ol_cv_c_posix_regex=cross
9790 else
9791   cat > conftest.$ac_ext <<EOF
9792 #line 9793 "configure"
9793 #include "confdefs.h"
9794
9795 #include <sys/types.h>
9796 #include <regex.h>
9797 static char *pattern, *string;
9798 main()
9799 {
9800         int rc;
9801         regex_t re;
9802
9803         pattern = "^A";
9804
9805         if(regcomp(&re, pattern, 0)) {
9806                 return -1;
9807         }
9808         
9809         string = "ALL MATCH";
9810         
9811         rc = regexec(&re, string, 0, (void*)0, 0);
9812
9813         regfree(&re);
9814
9815         return rc;
9816 }
9817 EOF
9818 if { (eval echo configure:9819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9819 then
9820   ol_cv_c_posix_regex=yes
9821 else
9822   echo "configure: failed program was:" >&5
9823   cat conftest.$ac_ext >&5
9824   rm -fr conftest*
9825   ol_cv_c_posix_regex=no
9826 fi
9827 rm -fr conftest*
9828 fi
9829
9830 fi
9831
9832 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9833
9834 if test "$ol_cv_c_posix_regex" = no ; then
9835         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9836 fi
9837
9838
9839 have_uuid=no
9840 for ac_hdr in sys/uuid.h
9841 do
9842 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9843 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9844 echo "configure:9845: checking for $ac_hdr" >&5
9845 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9846   echo $ac_n "(cached) $ac_c" 1>&6
9847 else
9848   cat > conftest.$ac_ext <<EOF
9849 #line 9850 "configure"
9850 #include "confdefs.h"
9851 #include <$ac_hdr>
9852 EOF
9853 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9854 { (eval echo configure:9855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9855 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9856 if test -z "$ac_err"; then
9857   rm -rf conftest*
9858   eval "ac_cv_header_$ac_safe=yes"
9859 else
9860   echo "$ac_err" >&5
9861   echo "configure: failed program was:" >&5
9862   cat conftest.$ac_ext >&5
9863   rm -rf conftest*
9864   eval "ac_cv_header_$ac_safe=no"
9865 fi
9866 rm -f conftest*
9867 fi
9868 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9869   echo "$ac_t""yes" 1>&6
9870     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9871   cat >> confdefs.h <<EOF
9872 #define $ac_tr_hdr 1
9873 EOF
9874  
9875 else
9876   echo "$ac_t""no" 1>&6
9877 fi
9878 done
9879
9880 if test $ac_cv_header_sys_uuid_h = yes ; then
9881         save_LIBS="$LIBS"
9882         
9883 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9884 echo "configure:9885: checking for library containing uuid_to_str" >&5
9885 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9886   echo $ac_n "(cached) $ac_c" 1>&6
9887 else
9888   ac_func_search_save_LIBS="$LIBS"
9889 ac_cv_search_uuid_to_str="no"
9890 cat > conftest.$ac_ext <<EOF
9891 #line 9892 "configure"
9892 #include "confdefs.h"
9893 /* Override any gcc2 internal prototype to avoid an error.  */
9894 /* We use char because int might match the return type of a gcc2
9895     builtin and then its argument prototype would still apply.  */
9896 char uuid_to_str();
9897
9898 int main() {
9899 uuid_to_str()
9900 ; return 0; }
9901 EOF
9902 if { (eval echo configure:9903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9903   rm -rf conftest*
9904   ac_cv_search_uuid_to_str="none required"
9905 else
9906   echo "configure: failed program was:" >&5
9907   cat conftest.$ac_ext >&5
9908 fi
9909 rm -f conftest*
9910 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9911 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9912 cat > conftest.$ac_ext <<EOF
9913 #line 9914 "configure"
9914 #include "confdefs.h"
9915 /* Override any gcc2 internal prototype to avoid an error.  */
9916 /* We use char because int might match the return type of a gcc2
9917     builtin and then its argument prototype would still apply.  */
9918 char uuid_to_str();
9919
9920 int main() {
9921 uuid_to_str()
9922 ; return 0; }
9923 EOF
9924 if { (eval echo configure:9925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9925   rm -rf conftest*
9926   ac_cv_search_uuid_to_str="-l$ac_lib"
9927 break
9928 else
9929   echo "configure: failed program was:" >&5
9930   cat conftest.$ac_ext >&5
9931 fi
9932 rm -f conftest*
9933 done
9934 LIBS="$ac_func_search_save_LIBS"
9935 fi
9936
9937 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9938 if test "$ac_cv_search_uuid_to_str" != "no"; then
9939   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9940   have_uuid=yes
9941 else :
9942   :
9943 fi
9944         LIBS="$save_LIBS"
9945
9946         if test have_uuid = yes ; then
9947                 cat >> confdefs.h <<\EOF
9948 #define HAVE_UUID_TO_STR 1
9949 EOF
9950
9951
9952                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9953                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9954         fi
9955 fi
9956
9957 if test $have_uuid = no ; then
9958         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9959 echo "configure:9960: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9960         save_LIBS="$LIBS"
9961         LIBS="$LIBS -lrpcrt4"
9962         cat > conftest.$ac_ext <<EOF
9963 #line 9964 "configure"
9964 #include "confdefs.h"
9965
9966                 char UuidCreate@4();
9967                 char UuidToStringA@8();
9968                 
9969 int main() {
9970
9971                 UuidCreate@4();
9972                 UuidToStringA@8();
9973                 
9974 ; return 0; }
9975 EOF
9976 if { (eval echo configure:9977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9977   rm -rf conftest*
9978   need_rpcrt=yes
9979 else
9980   echo "configure: failed program was:" >&5
9981   cat conftest.$ac_ext >&5
9982   rm -rf conftest*
9983   need_rpcrt=no
9984 fi
9985 rm -f conftest*
9986         if test $need_rpcrt = yes; then
9987                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9988         fi
9989         LIBS="$save_LIBS"
9990         echo "$ac_t""$need_rpcrt" 1>&6
9991 fi
9992
9993 ol_link_dnssrv=no
9994 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9995 echo "configure:9996: checking for res_query" >&5
9996 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9997   echo $ac_n "(cached) $ac_c" 1>&6
9998 else
9999   cat > conftest.$ac_ext <<EOF
10000 #line 10001 "configure"
10001 #include "confdefs.h"
10002 /* System header to define __stub macros and hopefully few prototypes,
10003     which can conflict with char res_query(); below.  */
10004 #include <assert.h>
10005 /* Override any gcc2 internal prototype to avoid an error.  */
10006 /* We use char because int might match the return type of a gcc2
10007     builtin and then its argument prototype would still apply.  */
10008 char res_query();
10009 char (*f)();
10010
10011 int main() {
10012
10013 /* The GNU C library defines this for functions which it implements
10014     to always fail with ENOSYS.  Some functions are actually named
10015     something starting with __ and the normal name is an alias.  */
10016 #if defined (__stub_res_query) || defined (__stub___res_query)
10017 choke me
10018 #else
10019 f = res_query;
10020 #endif
10021
10022 ; return 0; }
10023 EOF
10024 if { (eval echo configure:10025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10025   rm -rf conftest*
10026   eval "ac_cv_func_res_query=yes"
10027 else
10028   echo "configure: failed program was:" >&5
10029   cat conftest.$ac_ext >&5
10030   rm -rf conftest*
10031   eval "ac_cv_func_res_query=no"
10032 fi
10033 rm -f conftest*
10034 fi
10035
10036 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10037   echo "$ac_t""yes" 1>&6
10038   :
10039 else
10040   echo "$ac_t""no" 1>&6
10041 fi
10042
10043 if test $ac_cv_func_res_query = no ; then 
10044         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10045 echo "configure:10046: checking for __res_query" >&5
10046 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10047   echo $ac_n "(cached) $ac_c" 1>&6
10048 else
10049   cat > conftest.$ac_ext <<EOF
10050 #line 10051 "configure"
10051 #include "confdefs.h"
10052 /* System header to define __stub macros and hopefully few prototypes,
10053     which can conflict with char __res_query(); below.  */
10054 #include <assert.h>
10055 /* Override any gcc2 internal prototype to avoid an error.  */
10056 /* We use char because int might match the return type of a gcc2
10057     builtin and then its argument prototype would still apply.  */
10058 char __res_query();
10059 char (*f)();
10060
10061 int main() {
10062
10063 /* The GNU C library defines this for functions which it implements
10064     to always fail with ENOSYS.  Some functions are actually named
10065     something starting with __ and the normal name is an alias.  */
10066 #if defined (__stub___res_query) || defined (__stub_____res_query)
10067 choke me
10068 #else
10069 f = __res_query;
10070 #endif
10071
10072 ; return 0; }
10073 EOF
10074 if { (eval echo configure:10075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10075   rm -rf conftest*
10076   eval "ac_cv_func___res_query=yes"
10077 else
10078   echo "configure: failed program was:" >&5
10079   cat conftest.$ac_ext >&5
10080   rm -rf conftest*
10081   eval "ac_cv_func___res_query=no"
10082 fi
10083 rm -f conftest*
10084 fi
10085
10086 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10087   echo "$ac_t""yes" 1>&6
10088   :
10089 else
10090   echo "$ac_t""no" 1>&6
10091 fi
10092
10093         ac_cv_func_res_query=$ac_cv_func___res_query
10094 fi
10095
10096 if test $ac_cv_func_res_query = no ; then 
10097         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10098 echo "configure:10099: checking for res_query in -lbind" >&5
10099 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10100 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10101   echo $ac_n "(cached) $ac_c" 1>&6
10102 else
10103   ac_save_LIBS="$LIBS"
10104 LIBS="-lbind  $LIBS"
10105 cat > conftest.$ac_ext <<EOF
10106 #line 10107 "configure"
10107 #include "confdefs.h"
10108 /* Override any gcc2 internal prototype to avoid an error.  */
10109 /* We use char because int might match the return type of a gcc2
10110     builtin and then its argument prototype would still apply.  */
10111 char res_query();
10112
10113 int main() {
10114 res_query()
10115 ; return 0; }
10116 EOF
10117 if { (eval echo configure:10118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10118   rm -rf conftest*
10119   eval "ac_cv_lib_$ac_lib_var=yes"
10120 else
10121   echo "configure: failed program was:" >&5
10122   cat conftest.$ac_ext >&5
10123   rm -rf conftest*
10124   eval "ac_cv_lib_$ac_lib_var=no"
10125 fi
10126 rm -f conftest*
10127 LIBS="$ac_save_LIBS"
10128
10129 fi
10130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10131   echo "$ac_t""yes" 1>&6
10132     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10133     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10134   cat >> confdefs.h <<EOF
10135 #define $ac_tr_lib 1
10136 EOF
10137
10138   LIBS="-lbind $LIBS"
10139
10140 else
10141   echo "$ac_t""no" 1>&6
10142 fi
10143
10144         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10145 fi
10146
10147 if test $ac_cv_func_res_query = no ; then 
10148         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10149 echo "configure:10150: checking for __res_query in -lbind" >&5
10150 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10151 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10152   echo $ac_n "(cached) $ac_c" 1>&6
10153 else
10154   ac_save_LIBS="$LIBS"
10155 LIBS="-lbind  $LIBS"
10156 cat > conftest.$ac_ext <<EOF
10157 #line 10158 "configure"
10158 #include "confdefs.h"
10159 /* Override any gcc2 internal prototype to avoid an error.  */
10160 /* We use char because int might match the return type of a gcc2
10161     builtin and then its argument prototype would still apply.  */
10162 char __res_query();
10163
10164 int main() {
10165 __res_query()
10166 ; return 0; }
10167 EOF
10168 if { (eval echo configure:10169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10169   rm -rf conftest*
10170   eval "ac_cv_lib_$ac_lib_var=yes"
10171 else
10172   echo "configure: failed program was:" >&5
10173   cat conftest.$ac_ext >&5
10174   rm -rf conftest*
10175   eval "ac_cv_lib_$ac_lib_var=no"
10176 fi
10177 rm -f conftest*
10178 LIBS="$ac_save_LIBS"
10179
10180 fi
10181 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10182   echo "$ac_t""yes" 1>&6
10183     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10184     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10185   cat >> confdefs.h <<EOF
10186 #define $ac_tr_lib 1
10187 EOF
10188
10189   LIBS="-lbind $LIBS"
10190
10191 else
10192   echo "$ac_t""no" 1>&6
10193 fi
10194
10195         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10196 fi
10197
10198 if test $ac_cv_func_res_query = no ; then 
10199         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10200 echo "configure:10201: checking for res_query in -lresolv" >&5
10201 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10202 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10203   echo $ac_n "(cached) $ac_c" 1>&6
10204 else
10205   ac_save_LIBS="$LIBS"
10206 LIBS="-lresolv  $LIBS"
10207 cat > conftest.$ac_ext <<EOF
10208 #line 10209 "configure"
10209 #include "confdefs.h"
10210 /* Override any gcc2 internal prototype to avoid an error.  */
10211 /* We use char because int might match the return type of a gcc2
10212     builtin and then its argument prototype would still apply.  */
10213 char res_query();
10214
10215 int main() {
10216 res_query()
10217 ; return 0; }
10218 EOF
10219 if { (eval echo configure:10220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10220   rm -rf conftest*
10221   eval "ac_cv_lib_$ac_lib_var=yes"
10222 else
10223   echo "configure: failed program was:" >&5
10224   cat conftest.$ac_ext >&5
10225   rm -rf conftest*
10226   eval "ac_cv_lib_$ac_lib_var=no"
10227 fi
10228 rm -f conftest*
10229 LIBS="$ac_save_LIBS"
10230
10231 fi
10232 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10233   echo "$ac_t""yes" 1>&6
10234     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10235     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10236   cat >> confdefs.h <<EOF
10237 #define $ac_tr_lib 1
10238 EOF
10239
10240   LIBS="-lresolv $LIBS"
10241
10242 else
10243   echo "$ac_t""no" 1>&6
10244 fi
10245
10246         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10247 fi
10248
10249 if test $ac_cv_func_res_query = no ; then 
10250         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10251 echo "configure:10252: checking for __res_query in -lresolv" >&5
10252 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10253 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10254   echo $ac_n "(cached) $ac_c" 1>&6
10255 else
10256   ac_save_LIBS="$LIBS"
10257 LIBS="-lresolv  $LIBS"
10258 cat > conftest.$ac_ext <<EOF
10259 #line 10260 "configure"
10260 #include "confdefs.h"
10261 /* Override any gcc2 internal prototype to avoid an error.  */
10262 /* We use char because int might match the return type of a gcc2
10263     builtin and then its argument prototype would still apply.  */
10264 char __res_query();
10265
10266 int main() {
10267 __res_query()
10268 ; return 0; }
10269 EOF
10270 if { (eval echo configure:10271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10271   rm -rf conftest*
10272   eval "ac_cv_lib_$ac_lib_var=yes"
10273 else
10274   echo "configure: failed program was:" >&5
10275   cat conftest.$ac_ext >&5
10276   rm -rf conftest*
10277   eval "ac_cv_lib_$ac_lib_var=no"
10278 fi
10279 rm -f conftest*
10280 LIBS="$ac_save_LIBS"
10281
10282 fi
10283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10284   echo "$ac_t""yes" 1>&6
10285     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10286     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10287   cat >> confdefs.h <<EOF
10288 #define $ac_tr_lib 1
10289 EOF
10290
10291   LIBS="-lresolv $LIBS"
10292
10293 else
10294   echo "$ac_t""no" 1>&6
10295 fi
10296
10297         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10298 fi
10299
10300 if test "$ac_cv_func_res_query" = yes ; then
10301         cat >> confdefs.h <<\EOF
10302 #define HAVE_RES_QUERY 1
10303 EOF
10304
10305
10306         if test $ol_enable_dnssrv != no ; then
10307                 ol_link_dnssrv=yes
10308         fi
10309 fi
10310
10311 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10312         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10313 fi
10314
10315 for ac_func in getaddrinfo gai_strerror inet_ntop 
10316 do
10317 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10318 echo "configure:10319: checking for $ac_func" >&5
10319 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10320   echo $ac_n "(cached) $ac_c" 1>&6
10321 else
10322   cat > conftest.$ac_ext <<EOF
10323 #line 10324 "configure"
10324 #include "confdefs.h"
10325 /* System header to define __stub macros and hopefully few prototypes,
10326     which can conflict with char $ac_func(); below.  */
10327 #include <assert.h>
10328 /* Override any gcc2 internal prototype to avoid an error.  */
10329 /* We use char because int might match the return type of a gcc2
10330     builtin and then its argument prototype would still apply.  */
10331 char $ac_func();
10332 char (*f)();
10333
10334 int main() {
10335
10336 /* The GNU C library defines this for functions which it implements
10337     to always fail with ENOSYS.  Some functions are actually named
10338     something starting with __ and the normal name is an alias.  */
10339 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10340 choke me
10341 #else
10342 f = $ac_func;
10343 #endif
10344
10345 ; return 0; }
10346 EOF
10347 if { (eval echo configure:10348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10348   rm -rf conftest*
10349   eval "ac_cv_func_$ac_func=yes"
10350 else
10351   echo "configure: failed program was:" >&5
10352   cat conftest.$ac_ext >&5
10353   rm -rf conftest*
10354   eval "ac_cv_func_$ac_func=no"
10355 fi
10356 rm -f conftest*
10357 fi
10358
10359 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10360   echo "$ac_t""yes" 1>&6
10361     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10362   cat >> confdefs.h <<EOF
10363 #define $ac_tr_func 1
10364 EOF
10365  
10366 else
10367   echo "$ac_t""no" 1>&6
10368 fi
10369 done
10370
10371
10372 ol_link_ipv6=no
10373 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10374         if test $ol_enable_ipv6 = yes ; then
10375                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10376         fi
10377 elif test $ol_enable_ipv6 != no ; then
10378         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10379 echo "configure:10380: checking INET6_ADDRSTRLEN" >&5
10380 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10381   echo $ac_n "(cached) $ac_c" 1>&6
10382 else
10383   
10384                 cat > conftest.$ac_ext <<EOF
10385 #line 10386 "configure"
10386 #include "confdefs.h"
10387
10388 #                       include <netinet/in.h>
10389 #                       ifdef INET6_ADDRSTRLEN
10390                                 __has_inet6_addrstrlen__;
10391 #                       endif
10392                 
10393 EOF
10394 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10395   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10396   rm -rf conftest*
10397   ol_cv_inet6_addrstrlen=yes
10398 else
10399   rm -rf conftest*
10400   ol_cv_inet6_addrstrlen=no
10401 fi
10402 rm -f conftest*
10403
10404 fi
10405
10406 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10407
10408
10409         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10410 echo "configure:10411: checking struct sockaddr_storage" >&5
10411 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10412   echo $ac_n "(cached) $ac_c" 1>&6
10413 else
10414   
10415                 cat > conftest.$ac_ext <<EOF
10416 #line 10417 "configure"
10417 #include "confdefs.h"
10418
10419 #include <sys/types.h>
10420 #include <sys/socket.h>
10421
10422 int main() {
10423
10424                         struct sockaddr_storage ss;
10425
10426 ; return 0; }
10427 EOF
10428 if { (eval echo configure:10429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10429   rm -rf conftest*
10430   ol_cv_struct_sockaddr_storage=yes
10431 else
10432   echo "configure: failed program was:" >&5
10433   cat conftest.$ac_ext >&5
10434   rm -rf conftest*
10435   ol_cv_struct_sockaddr_storage=no
10436 fi
10437 rm -f conftest*
10438 fi
10439
10440 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10441
10442         if test $ol_cv_inet6_addrstrlen = yes \
10443                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10444                 ol_link_ipv6=yes
10445         elif test $ol_enable_ipv6 = yes \
10446                         -a $ol_cv_inet6_addrstrlen = no ; then
10447                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10448         elif test $ol_enable_ipv6 = yes \
10449                         -a $ol_cv_struct_sockaddr_storage = no ; then
10450                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10451         fi
10452 fi
10453
10454 if test $ol_enable_local != no ; then
10455         for ac_hdr in sys/un.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 $ol_enable_local = auto ; then
10497                 ol_enable_local=$ac_cv_header_sys_un_h
10498         elif test $ac_cv_header_sys_un_h = no ; then
10499                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10500         fi
10501 fi
10502
10503 ol_link_kbind=no
10504 ol_link_kpasswd=no
10505 ol_link_krb5=no
10506 ol_link_krb4=no
10507
10508 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10509         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10510         -o $ol_with_kerberos = k425 ; then
10511
10512         for ac_hdr in krb5.h
10513 do
10514 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10515 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10516 echo "configure:10517: checking for $ac_hdr" >&5
10517 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10518   echo $ac_n "(cached) $ac_c" 1>&6
10519 else
10520   cat > conftest.$ac_ext <<EOF
10521 #line 10522 "configure"
10522 #include "confdefs.h"
10523 #include <$ac_hdr>
10524 EOF
10525 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10526 { (eval echo configure:10527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10527 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10528 if test -z "$ac_err"; then
10529   rm -rf conftest*
10530   eval "ac_cv_header_$ac_safe=yes"
10531 else
10532   echo "$ac_err" >&5
10533   echo "configure: failed program was:" >&5
10534   cat conftest.$ac_ext >&5
10535   rm -rf conftest*
10536   eval "ac_cv_header_$ac_safe=no"
10537 fi
10538 rm -f conftest*
10539 fi
10540 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10541   echo "$ac_t""yes" 1>&6
10542     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10543   cat >> confdefs.h <<EOF
10544 #define $ac_tr_hdr 1
10545 EOF
10546  
10547 else
10548   echo "$ac_t""no" 1>&6
10549 fi
10550 done
10551
10552
10553         if test $ac_cv_header_krb5_h = yes ; then
10554                                 for ac_hdr in heim_err.h
10555 do
10556 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10557 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10558 echo "configure:10559: checking for $ac_hdr" >&5
10559 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10560   echo $ac_n "(cached) $ac_c" 1>&6
10561 else
10562   cat > conftest.$ac_ext <<EOF
10563 #line 10564 "configure"
10564 #include "confdefs.h"
10565 #include <$ac_hdr>
10566 EOF
10567 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10568 { (eval echo configure:10569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10569 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10570 if test -z "$ac_err"; then
10571   rm -rf conftest*
10572   eval "ac_cv_header_$ac_safe=yes"
10573 else
10574   echo "$ac_err" >&5
10575   echo "configure: failed program was:" >&5
10576   cat conftest.$ac_ext >&5
10577   rm -rf conftest*
10578   eval "ac_cv_header_$ac_safe=no"
10579 fi
10580 rm -f conftest*
10581 fi
10582 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10583   echo "$ac_t""yes" 1>&6
10584     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10585   cat >> confdefs.h <<EOF
10586 #define $ac_tr_hdr 1
10587 EOF
10588  
10589 else
10590   echo "$ac_t""no" 1>&6
10591 fi
10592 done
10593
10594                 if test $ac_cv_header_heim_err_h = yes ; then
10595                         krb5_impl=heimdal
10596                 else
10597                         krb5_impl=mit
10598                 fi
10599
10600                 if test $krb5_impl = mit; then
10601                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10602 echo "configure:10603: checking for main in -lk5crypto" >&5
10603 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10604 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10605   echo $ac_n "(cached) $ac_c" 1>&6
10606 else
10607   ac_save_LIBS="$LIBS"
10608 LIBS="-lk5crypto  $LIBS"
10609 cat > conftest.$ac_ext <<EOF
10610 #line 10611 "configure"
10611 #include "confdefs.h"
10612
10613 int main() {
10614 main()
10615 ; return 0; }
10616 EOF
10617 if { (eval echo configure:10618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10618   rm -rf conftest*
10619   eval "ac_cv_lib_$ac_lib_var=yes"
10620 else
10621   echo "configure: failed program was:" >&5
10622   cat conftest.$ac_ext >&5
10623   rm -rf conftest*
10624   eval "ac_cv_lib_$ac_lib_var=no"
10625 fi
10626 rm -f conftest*
10627 LIBS="$ac_save_LIBS"
10628
10629 fi
10630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10631   echo "$ac_t""yes" 1>&6
10632   krb5crypto=k5crypto
10633 else
10634   echo "$ac_t""no" 1>&6
10635 krb5crypto=crypto
10636 fi
10637
10638
10639                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10640 echo "configure:10641: checking for main in -lkrb5" >&5
10641 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10642 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10643   echo $ac_n "(cached) $ac_c" 1>&6
10644 else
10645   ac_save_LIBS="$LIBS"
10646 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10647 cat > conftest.$ac_ext <<EOF
10648 #line 10649 "configure"
10649 #include "confdefs.h"
10650
10651 int main() {
10652 main()
10653 ; return 0; }
10654 EOF
10655 if { (eval echo configure:10656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10656   rm -rf conftest*
10657   eval "ac_cv_lib_$ac_lib_var=yes"
10658 else
10659   echo "configure: failed program was:" >&5
10660   cat conftest.$ac_ext >&5
10661   rm -rf conftest*
10662   eval "ac_cv_lib_$ac_lib_var=no"
10663 fi
10664 rm -f conftest*
10665 LIBS="$ac_save_LIBS"
10666
10667 fi
10668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10669   echo "$ac_t""yes" 1>&6
10670   have_krb5=yes
10671                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10672 else
10673   echo "$ac_t""no" 1>&6
10674 have_krb5=no
10675 fi
10676
10677
10678                 elif test $krb5_impl = heimdal; then
10679                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10680 echo "configure:10681: checking for main in -ldes" >&5
10681 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10682 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10683   echo $ac_n "(cached) $ac_c" 1>&6
10684 else
10685   ac_save_LIBS="$LIBS"
10686 LIBS="-ldes  $LIBS"
10687 cat > conftest.$ac_ext <<EOF
10688 #line 10689 "configure"
10689 #include "confdefs.h"
10690
10691 int main() {
10692 main()
10693 ; return 0; }
10694 EOF
10695 if { (eval echo configure:10696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10696   rm -rf conftest*
10697   eval "ac_cv_lib_$ac_lib_var=yes"
10698 else
10699   echo "configure: failed program was:" >&5
10700   cat conftest.$ac_ext >&5
10701   rm -rf conftest*
10702   eval "ac_cv_lib_$ac_lib_var=no"
10703 fi
10704 rm -f conftest*
10705 LIBS="$ac_save_LIBS"
10706
10707 fi
10708 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10709   echo "$ac_t""yes" 1>&6
10710   krb5crypto=des
10711 else
10712   echo "$ac_t""no" 1>&6
10713 krb5crypto=crypto
10714 fi
10715
10716
10717                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10718 echo "configure:10719: checking for main in -lkrb5" >&5
10719 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10720 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10721   echo $ac_n "(cached) $ac_c" 1>&6
10722 else
10723   ac_save_LIBS="$LIBS"
10724 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10725 cat > conftest.$ac_ext <<EOF
10726 #line 10727 "configure"
10727 #include "confdefs.h"
10728
10729 int main() {
10730 main()
10731 ; return 0; }
10732 EOF
10733 if { (eval echo configure:10734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10734   rm -rf conftest*
10735   eval "ac_cv_lib_$ac_lib_var=yes"
10736 else
10737   echo "configure: failed program was:" >&5
10738   cat conftest.$ac_ext >&5
10739   rm -rf conftest*
10740   eval "ac_cv_lib_$ac_lib_var=no"
10741 fi
10742 rm -f conftest*
10743 LIBS="$ac_save_LIBS"
10744
10745 fi
10746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10747   echo "$ac_t""yes" 1>&6
10748   have_krb5=yes
10749                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10750 else
10751   echo "$ac_t""no" 1>&6
10752 have_krb5=no
10753 fi
10754
10755
10756                         cat >> confdefs.h <<\EOF
10757 #define HAVE_HEIMDAL_KERBEROS 1
10758 EOF
10759
10760
10761                 else
10762                         have_krb5=no
10763                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10764                 fi
10765
10766                 if test $have_krb5 = yes ; then
10767                         ol_link_krb5=yes
10768
10769                         cat >> confdefs.h <<\EOF
10770 #define HAVE_KRB5 1
10771 EOF
10772
10773
10774                         if test $ol_enable_kpasswd != no ; then
10775                                 ol_link_kpasswd=yes;
10776                         fi
10777
10778                         if test $ol_with_kerberos = k5only ; then
10779                                 ol_with_kerberos=found
10780                         fi
10781
10782                 elif test $ol_with_kerberos != auto ; then
10783                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10784                 fi
10785
10786         fi
10787 fi
10788
10789 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10790         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10791
10792         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10793 do
10794 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10795 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10796 echo "configure:10797: checking for $ac_hdr" >&5
10797 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10798   echo $ac_n "(cached) $ac_c" 1>&6
10799 else
10800   cat > conftest.$ac_ext <<EOF
10801 #line 10802 "configure"
10802 #include "confdefs.h"
10803 #include <$ac_hdr>
10804 EOF
10805 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10806 { (eval echo configure:10807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10807 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10808 if test -z "$ac_err"; then
10809   rm -rf conftest*
10810   eval "ac_cv_header_$ac_safe=yes"
10811 else
10812   echo "$ac_err" >&5
10813   echo "configure: failed program was:" >&5
10814   cat conftest.$ac_ext >&5
10815   rm -rf conftest*
10816   eval "ac_cv_header_$ac_safe=no"
10817 fi
10818 rm -f conftest*
10819 fi
10820 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10821   echo "$ac_t""yes" 1>&6
10822     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10823   cat >> confdefs.h <<EOF
10824 #define $ac_tr_hdr 1
10825 EOF
10826  
10827 else
10828   echo "$ac_t""no" 1>&6
10829 fi
10830 done
10831
10832
10833         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10834                 if test $krb5_impl = mit; then
10835                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10836 echo "configure:10837: checking for main in -lkrb4" >&5
10837 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10838 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10839   echo $ac_n "(cached) $ac_c" 1>&6
10840 else
10841   ac_save_LIBS="$LIBS"
10842 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10843 cat > conftest.$ac_ext <<EOF
10844 #line 10845 "configure"
10845 #include "confdefs.h"
10846
10847 int main() {
10848 main()
10849 ; return 0; }
10850 EOF
10851 if { (eval echo configure:10852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10852   rm -rf conftest*
10853   eval "ac_cv_lib_$ac_lib_var=yes"
10854 else
10855   echo "configure: failed program was:" >&5
10856   cat conftest.$ac_ext >&5
10857   rm -rf conftest*
10858   eval "ac_cv_lib_$ac_lib_var=no"
10859 fi
10860 rm -f conftest*
10861 LIBS="$ac_save_LIBS"
10862
10863 fi
10864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10865   echo "$ac_t""yes" 1>&6
10866   have_k425=yes
10867                                 KRB4_LIBS="-lkrb4 -ldes425"
10868 else
10869   echo "$ac_t""no" 1>&6
10870 have_k425=no
10871 fi
10872
10873
10874                 elif test $krb5_impl = heimdal; then
10875                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10876 echo "configure:10877: checking for main in -lkrb4" >&5
10877 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10878 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10879   echo $ac_n "(cached) $ac_c" 1>&6
10880 else
10881   ac_save_LIBS="$LIBS"
10882 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10883 cat > conftest.$ac_ext <<EOF
10884 #line 10885 "configure"
10885 #include "confdefs.h"
10886
10887 int main() {
10888 main()
10889 ; return 0; }
10890 EOF
10891 if { (eval echo configure:10892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10892   rm -rf conftest*
10893   eval "ac_cv_lib_$ac_lib_var=yes"
10894 else
10895   echo "configure: failed program was:" >&5
10896   cat conftest.$ac_ext >&5
10897   rm -rf conftest*
10898   eval "ac_cv_lib_$ac_lib_var=no"
10899 fi
10900 rm -f conftest*
10901 LIBS="$ac_save_LIBS"
10902
10903 fi
10904 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10905   echo "$ac_t""yes" 1>&6
10906   have_k425=yes
10907                                 KRB4_LIBS="-lkrb4"
10908 else
10909   echo "$ac_t""no" 1>&6
10910 have_k425=no
10911 fi
10912
10913
10914                 else
10915                         have_425=no
10916                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10917                 fi
10918
10919                 if test $have_k425 = yes ; then
10920                         ol_with_kerberos=found
10921                         ol_link_krb4=yes
10922
10923                         cat >> confdefs.h <<\EOF
10924 #define HAVE_KRB425 1
10925 EOF
10926
10927                         cat >> confdefs.h <<\EOF
10928 #define HAVE_KRB4 1
10929 EOF
10930
10931
10932                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10933 echo "configure:10934: checking for des_debug in Kerberos libraries" >&5
10934 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10935   echo $ac_n "(cached) $ac_c" 1>&6
10936 else
10937   
10938                                                                 save_LIBS="$LIBS"
10939                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10940                                 cat > conftest.$ac_ext <<EOF
10941 #line 10942 "configure"
10942 #include "confdefs.h"
10943
10944 #include <kerberosIV/krb.h>
10945 #include <kerberosIV/des.h>
10946 extern int des_debug;
10947
10948 int main() {
10949
10950 des_debug = 1;
10951
10952 ; return 0; }
10953 EOF
10954 if { (eval echo configure:10955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10955   rm -rf conftest*
10956   ol_cv_var_des_debug=yes
10957 else
10958   echo "configure: failed program was:" >&5
10959   cat conftest.$ac_ext >&5
10960   rm -rf conftest*
10961   ol_cv_var_des_debug=no
10962 fi
10963 rm -f conftest*
10964                                                                 LIBS="$save_LIBS"
10965                         
10966 fi
10967
10968 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10969
10970                         if test $ol_cv_var_des_debug = yes ; then
10971                                 cat >> confdefs.h <<\EOF
10972 #define HAVE_DES_DEBUG 1
10973 EOF
10974
10975                         fi
10976
10977                         LIBS="$save_LIBS"
10978                 fi
10979         fi
10980 fi
10981
10982 if test $ol_link_krb5 = yes ; then
10983         ol_with_kerberos=found
10984 fi
10985
10986 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10987         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10988
10989         for ac_hdr in krb.h des.h krb-archaeology.h 
10990 do
10991 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10992 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10993 echo "configure:10994: checking for $ac_hdr" >&5
10994 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10995   echo $ac_n "(cached) $ac_c" 1>&6
10996 else
10997   cat > conftest.$ac_ext <<EOF
10998 #line 10999 "configure"
10999 #include "confdefs.h"
11000 #include <$ac_hdr>
11001 EOF
11002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11003 { (eval echo configure:11004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11005 if test -z "$ac_err"; then
11006   rm -rf conftest*
11007   eval "ac_cv_header_$ac_safe=yes"
11008 else
11009   echo "$ac_err" >&5
11010   echo "configure: failed program was:" >&5
11011   cat conftest.$ac_ext >&5
11012   rm -rf conftest*
11013   eval "ac_cv_header_$ac_safe=no"
11014 fi
11015 rm -f conftest*
11016 fi
11017 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11018   echo "$ac_t""yes" 1>&6
11019     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11020   cat >> confdefs.h <<EOF
11021 #define $ac_tr_hdr 1
11022 EOF
11023  
11024 else
11025   echo "$ac_t""no" 1>&6
11026 fi
11027 done
11028
11029
11030         if test $ac_cv_header_krb_h = yes ; then
11031                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11032 echo "configure:11033: checking for main in -lkrb" >&5
11033 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11034 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11035   echo $ac_n "(cached) $ac_c" 1>&6
11036 else
11037   ac_save_LIBS="$LIBS"
11038 LIBS="-lkrb -ldes $LIBS"
11039 cat > conftest.$ac_ext <<EOF
11040 #line 11041 "configure"
11041 #include "confdefs.h"
11042
11043 int main() {
11044 main()
11045 ; return 0; }
11046 EOF
11047 if { (eval echo configure:11048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11048   rm -rf conftest*
11049   eval "ac_cv_lib_$ac_lib_var=yes"
11050 else
11051   echo "configure: failed program was:" >&5
11052   cat conftest.$ac_ext >&5
11053   rm -rf conftest*
11054   eval "ac_cv_lib_$ac_lib_var=no"
11055 fi
11056 rm -f conftest*
11057 LIBS="$ac_save_LIBS"
11058
11059 fi
11060 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11061   echo "$ac_t""yes" 1>&6
11062   have_k4=yes
11063 else
11064   echo "$ac_t""no" 1>&6
11065 have_k4=no
11066 fi
11067
11068
11069                 if test $have_k4 = yes ; then
11070                         ol_with_kerberos=found
11071                         ol_link_krb4=yes
11072
11073                         cat >> confdefs.h <<\EOF
11074 #define HAVE_KRB4 1
11075 EOF
11076
11077
11078                         KRB4_LIBS="-lkrb -ldes"
11079
11080                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11081                                 cat >> confdefs.h <<\EOF
11082 #define HAVE_KTH_KERBEROS 1
11083 EOF
11084
11085                         fi
11086                 fi
11087         fi
11088 fi
11089
11090 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
11091         ol_link_kpasswd=yes
11092 fi
11093
11094 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11095         ol_link_kbind=yes
11096
11097 elif test $ol_enable_kbind = yes ; then
11098         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11099 fi
11100
11101 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11102         cat >> confdefs.h <<\EOF
11103 #define HAVE_KERBEROS 1
11104 EOF
11105
11106
11107 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11108         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11109 fi
11110
11111 ol_link_tls=no
11112 if test $ol_with_tls != no ; then
11113         for ac_hdr in openssl/ssl.h ssl.h
11114 do
11115 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11116 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11117 echo "configure:11118: checking for $ac_hdr" >&5
11118 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11119   echo $ac_n "(cached) $ac_c" 1>&6
11120 else
11121   cat > conftest.$ac_ext <<EOF
11122 #line 11123 "configure"
11123 #include "confdefs.h"
11124 #include <$ac_hdr>
11125 EOF
11126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11127 { (eval echo configure:11128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11129 if test -z "$ac_err"; then
11130   rm -rf conftest*
11131   eval "ac_cv_header_$ac_safe=yes"
11132 else
11133   echo "$ac_err" >&5
11134   echo "configure: failed program was:" >&5
11135   cat conftest.$ac_ext >&5
11136   rm -rf conftest*
11137   eval "ac_cv_header_$ac_safe=no"
11138 fi
11139 rm -f conftest*
11140 fi
11141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11142   echo "$ac_t""yes" 1>&6
11143     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11144   cat >> confdefs.h <<EOF
11145 #define $ac_tr_hdr 1
11146 EOF
11147  
11148 else
11149   echo "$ac_t""no" 1>&6
11150 fi
11151 done
11152
11153         
11154         if test $ac_cv_header_openssl_ssl_h = yes \
11155                 -o $ac_cv_header_ssl_h = yes ; then
11156                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11157 echo "configure:11158: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11158 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11159 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11160   echo $ac_n "(cached) $ac_c" 1>&6
11161 else
11162   ac_save_LIBS="$LIBS"
11163 LIBS="-lssl -lcrypto $LIBS"
11164 cat > conftest.$ac_ext <<EOF
11165 #line 11166 "configure"
11166 #include "confdefs.h"
11167 /* Override any gcc2 internal prototype to avoid an error.  */
11168 /* We use char because int might match the return type of a gcc2
11169     builtin and then its argument prototype would still apply.  */
11170 char SSLeay_add_ssl_algorithms();
11171
11172 int main() {
11173 SSLeay_add_ssl_algorithms()
11174 ; return 0; }
11175 EOF
11176 if { (eval echo configure:11177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11177   rm -rf conftest*
11178   eval "ac_cv_lib_$ac_lib_var=yes"
11179 else
11180   echo "configure: failed program was:" >&5
11181   cat conftest.$ac_ext >&5
11182   rm -rf conftest*
11183   eval "ac_cv_lib_$ac_lib_var=no"
11184 fi
11185 rm -f conftest*
11186 LIBS="$ac_save_LIBS"
11187
11188 fi
11189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11190   echo "$ac_t""yes" 1>&6
11191   have_ssleay=yes
11192                         need_rsaref=no
11193 else
11194   echo "$ac_t""no" 1>&6
11195 have_ssleay=no
11196 fi
11197
11198                         
11199                 if test $have_ssleay = no ; then
11200                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11201 echo "configure:11202: checking for SSL_library_init in -lssl" >&5
11202 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11203 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11204   echo $ac_n "(cached) $ac_c" 1>&6
11205 else
11206   ac_save_LIBS="$LIBS"
11207 LIBS="-lssl -lcrypto $LIBS"
11208 cat > conftest.$ac_ext <<EOF
11209 #line 11210 "configure"
11210 #include "confdefs.h"
11211 /* Override any gcc2 internal prototype to avoid an error.  */
11212 /* We use char because int might match the return type of a gcc2
11213     builtin and then its argument prototype would still apply.  */
11214 char SSL_library_init();
11215
11216 int main() {
11217 SSL_library_init()
11218 ; return 0; }
11219 EOF
11220 if { (eval echo configure:11221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11221   rm -rf conftest*
11222   eval "ac_cv_lib_$ac_lib_var=yes"
11223 else
11224   echo "configure: failed program was:" >&5
11225   cat conftest.$ac_ext >&5
11226   rm -rf conftest*
11227   eval "ac_cv_lib_$ac_lib_var=no"
11228 fi
11229 rm -f conftest*
11230 LIBS="$ac_save_LIBS"
11231
11232 fi
11233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11234   echo "$ac_t""yes" 1>&6
11235   have_ssleay=yes
11236                                 need_rsaref=no
11237 else
11238   echo "$ac_t""no" 1>&6
11239 have_ssleay=no
11240 fi
11241
11242                 fi
11243
11244                 if test $have_ssleay = no ; then
11245                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11246 echo "configure:11247: checking for ssl3_accept in -lssl" >&5
11247 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11248 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11249   echo $ac_n "(cached) $ac_c" 1>&6
11250 else
11251   ac_save_LIBS="$LIBS"
11252 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11253 cat > conftest.$ac_ext <<EOF
11254 #line 11255 "configure"
11255 #include "confdefs.h"
11256 /* Override any gcc2 internal prototype to avoid an error.  */
11257 /* We use char because int might match the return type of a gcc2
11258     builtin and then its argument prototype would still apply.  */
11259 char ssl3_accept();
11260
11261 int main() {
11262 ssl3_accept()
11263 ; return 0; }
11264 EOF
11265 if { (eval echo configure:11266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11266   rm -rf conftest*
11267   eval "ac_cv_lib_$ac_lib_var=yes"
11268 else
11269   echo "configure: failed program was:" >&5
11270   cat conftest.$ac_ext >&5
11271   rm -rf conftest*
11272   eval "ac_cv_lib_$ac_lib_var=no"
11273 fi
11274 rm -f conftest*
11275 LIBS="$ac_save_LIBS"
11276
11277 fi
11278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11279   echo "$ac_t""yes" 1>&6
11280   have_ssleay=yes
11281                                 need_rsaref=yes
11282 else
11283   echo "$ac_t""no" 1>&6
11284 have_ssleay=no
11285 fi
11286
11287                 fi
11288
11289                 if test $have_ssleay = yes ; then
11290                         ol_with_tls=found
11291                         ol_link_tls=yes
11292
11293                         cat >> confdefs.h <<\EOF
11294 #define HAVE_SSLEAY 1
11295 EOF
11296
11297
11298                         if test $need_rsaref = yes; then
11299                                 cat >> confdefs.h <<\EOF
11300 #define HAVE_RSAREF 1
11301 EOF
11302
11303
11304                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11305                         else
11306                                 TLS_LIBS="-lssl -lcrypto"
11307                         fi
11308                 fi
11309         fi
11310
11311 else
11312         echo "configure: warning: TLS data protection not supported!" 1>&2
11313 fi
11314
11315 if test $ol_link_tls = yes ; then
11316         cat >> confdefs.h <<\EOF
11317 #define HAVE_TLS 1
11318 EOF
11319
11320
11321 elif test $ol_with_tls = auto ; then
11322         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11323         echo "configure: warning: TLS data protection not supported!" 1>&2
11324
11325 elif test $ol_with_tls != no ; then
11326         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11327 fi
11328
11329 if test $ol_enable_lmpasswd != no; then
11330         if test $ol_link_tls != yes ; then
11331                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11332         fi
11333
11334         cat >> confdefs.h <<\EOF
11335 #define SLAPD_LMHASH 1
11336 EOF
11337
11338 fi
11339
11340 ol_link_threads=no
11341
11342 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11343         -o $ol_with_threads = nt ; then
11344
11345         
11346         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11347 echo "configure:11348: checking for _beginthread" >&5
11348 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11349   echo $ac_n "(cached) $ac_c" 1>&6
11350 else
11351   cat > conftest.$ac_ext <<EOF
11352 #line 11353 "configure"
11353 #include "confdefs.h"
11354 /* System header to define __stub macros and hopefully few prototypes,
11355     which can conflict with char _beginthread(); below.  */
11356 #include <assert.h>
11357 /* Override any gcc2 internal prototype to avoid an error.  */
11358 /* We use char because int might match the return type of a gcc2
11359     builtin and then its argument prototype would still apply.  */
11360 char _beginthread();
11361 char (*f)();
11362
11363 int main() {
11364
11365 /* The GNU C library defines this for functions which it implements
11366     to always fail with ENOSYS.  Some functions are actually named
11367     something starting with __ and the normal name is an alias.  */
11368 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11369 choke me
11370 #else
11371 f = _beginthread;
11372 #endif
11373
11374 ; return 0; }
11375 EOF
11376 if { (eval echo configure:11377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11377   rm -rf conftest*
11378   eval "ac_cv_func__beginthread=yes"
11379 else
11380   echo "configure: failed program was:" >&5
11381   cat conftest.$ac_ext >&5
11382   rm -rf conftest*
11383   eval "ac_cv_func__beginthread=no"
11384 fi
11385 rm -f conftest*
11386 fi
11387
11388 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11389   echo "$ac_t""yes" 1>&6
11390   :
11391 else
11392   echo "$ac_t""no" 1>&6
11393 fi
11394
11395
11396         if test $ac_cv_func__beginthread = yes ; then
11397                 cat >> confdefs.h <<\EOF
11398 #define HAVE_NT_THREADS 1
11399 EOF
11400
11401                 ol_cv_nt_threads=yes
11402         fi
11403
11404
11405         if test "$ol_cv_nt_threads" = yes ; then
11406                 ol_link_threads=nt
11407                 ol_with_threads=found
11408                 ol_with_yielding_select=yes
11409
11410                 cat >> confdefs.h <<\EOF
11411 #define HAVE_NT_SERVICE_MANAGER 1
11412 EOF
11413
11414                 cat >> confdefs.h <<\EOF
11415 #define HAVE_NT_EVENT_LOG 1
11416 EOF
11417
11418         fi
11419
11420         if test $ol_with_threads = nt ; then
11421                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11422         fi
11423 fi
11424
11425 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11426         -o $ol_with_threads = posix ; then
11427
11428         for ac_hdr in pthread.h
11429 do
11430 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11431 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11432 echo "configure:11433: checking for $ac_hdr" >&5
11433 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11434   echo $ac_n "(cached) $ac_c" 1>&6
11435 else
11436   cat > conftest.$ac_ext <<EOF
11437 #line 11438 "configure"
11438 #include "confdefs.h"
11439 #include <$ac_hdr>
11440 EOF
11441 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11442 { (eval echo configure:11443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11443 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11444 if test -z "$ac_err"; then
11445   rm -rf conftest*
11446   eval "ac_cv_header_$ac_safe=yes"
11447 else
11448   echo "$ac_err" >&5
11449   echo "configure: failed program was:" >&5
11450   cat conftest.$ac_ext >&5
11451   rm -rf conftest*
11452   eval "ac_cv_header_$ac_safe=no"
11453 fi
11454 rm -f conftest*
11455 fi
11456 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11457   echo "$ac_t""yes" 1>&6
11458     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11459   cat >> confdefs.h <<EOF
11460 #define $ac_tr_hdr 1
11461 EOF
11462  
11463 else
11464   echo "$ac_t""no" 1>&6
11465 fi
11466 done
11467
11468
11469         if test $ac_cv_header_pthread_h = yes ; then
11470                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11471 echo "configure:11472: checking POSIX thread version" >&5
11472 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11473   echo $ac_n "(cached) $ac_c" 1>&6
11474 else
11475   
11476         cat > conftest.$ac_ext <<EOF
11477 #line 11478 "configure"
11478 #include "confdefs.h"
11479
11480 #               include <pthread.h>
11481         
11482 int main() {
11483
11484                 int i = PTHREAD_CREATE_JOINABLE;
11485         
11486 ; return 0; }
11487 EOF
11488 if { (eval echo configure:11489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11489   rm -rf conftest*
11490   
11491         cat > conftest.$ac_ext <<EOF
11492 #line 11493 "configure"
11493 #include "confdefs.h"
11494 #include <pthread.h>
11495 EOF
11496 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11497   egrep "pthread_detach" >/dev/null 2>&1; then
11498   rm -rf conftest*
11499   ol_cv_pthread_version=10
11500 else
11501   rm -rf conftest*
11502   ol_cv_pthread_version=8
11503 fi
11504 rm -f conftest*
11505
11506 else
11507   echo "configure: failed program was:" >&5
11508   cat conftest.$ac_ext >&5
11509   rm -rf conftest*
11510   
11511         cat > conftest.$ac_ext <<EOF
11512 #line 11513 "configure"
11513 #include "confdefs.h"
11514
11515 #               include <pthread.h>
11516 #               ifdef PTHREAD_CREATE_UNDETACHED
11517                 draft7
11518 #               endif
11519         
11520 EOF
11521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11522   egrep "draft7" >/dev/null 2>&1; then
11523   rm -rf conftest*
11524   ol_cv_pthread_version=7
11525 else
11526   rm -rf conftest*
11527   
11528         cat > conftest.$ac_ext <<EOF
11529 #line 11530 "configure"
11530 #include "confdefs.h"
11531 #include <pthread.h>
11532 EOF
11533 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11534   egrep "pthread_attr_init" >/dev/null 2>&1; then
11535   rm -rf conftest*
11536   ol_cv_pthread_version=6
11537 else
11538   rm -rf conftest*
11539   
11540         cat > conftest.$ac_ext <<EOF
11541 #line 11542 "configure"
11542 #include "confdefs.h"
11543
11544 #               include <pthread.h>
11545 #ifdef          PTHREAD_MUTEX_INITIALIZER
11546                 draft5
11547 #endif
11548         
11549 EOF
11550 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11551   egrep "draft5" >/dev/null 2>&1; then
11552   rm -rf conftest*
11553   ol_cv_pthread_version=5
11554 else
11555   rm -rf conftest*
11556   ol_cv_pthread_version=4
11557 fi
11558 rm -f conftest*
11559  
11560 fi
11561 rm -f conftest*
11562  
11563 fi
11564 rm -f conftest*
11565  
11566 fi
11567 rm -f conftest*
11568
11569 fi
11570
11571 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11572
11573
11574                 if test $ol_cv_pthread_version != 0 ; then
11575                         cat >> confdefs.h <<EOF
11576 #define HAVE_PTHREADS $ol_cv_pthread_version
11577 EOF
11578
11579                 else
11580                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11581                 fi
11582
11583                 # consider threads found
11584                 ol_with_threads=found
11585
11586                 
11587         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11588 echo "configure:11589: checking for LinuxThreads pthread.h" >&5
11589 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11590   echo $ac_n "(cached) $ac_c" 1>&6
11591 else
11592   cat > conftest.$ac_ext <<EOF
11593 #line 11594 "configure"
11594 #include "confdefs.h"
11595 #include <pthread.h>
11596 EOF
11597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11598   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11599   rm -rf conftest*
11600   ol_cv_header_linux_threads=yes
11601 else
11602   rm -rf conftest*
11603   ol_cv_header_linux_threads=no
11604 fi
11605 rm -f conftest*
11606
11607                 
11608 fi
11609
11610 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11611         if test $ol_cv_header_linux_threads = yes; then
11612                 cat >> confdefs.h <<\EOF
11613 #define HAVE_LINUX_THREADS 1
11614 EOF
11615
11616         fi
11617
11618                 
11619         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11620 echo "configure:11621: checking for GNU Pth pthread.h" >&5
11621 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11622   echo $ac_n "(cached) $ac_c" 1>&6
11623 else
11624   cat > conftest.$ac_ext <<EOF
11625 #line 11626 "configure"
11626 #include "confdefs.h"
11627 #include <pthread.h>
11628 #ifdef _POSIX_THREAD_IS_GNU_PTH
11629         __gnu_pth__;
11630 #endif
11631
11632 EOF
11633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11634   egrep "__gnu_pth__" >/dev/null 2>&1; then
11635   rm -rf conftest*
11636   ol_cv_header_gnu_pth_pthread_h=yes
11637 else
11638   rm -rf conftest*
11639   ol_cv_header_gnu_pth_pthread_h=no
11640 fi
11641 rm -f conftest*
11642
11643                 
11644 fi
11645
11646 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11647
11648
11649                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11650                         for ac_hdr in sched.h
11651 do
11652 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11653 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11654 echo "configure:11655: checking for $ac_hdr" >&5
11655 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11656   echo $ac_n "(cached) $ac_c" 1>&6
11657 else
11658   cat > conftest.$ac_ext <<EOF
11659 #line 11660 "configure"
11660 #include "confdefs.h"
11661 #include <$ac_hdr>
11662 EOF
11663 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11664 { (eval echo configure:11665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11665 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11666 if test -z "$ac_err"; then
11667   rm -rf conftest*
11668   eval "ac_cv_header_$ac_safe=yes"
11669 else
11670   echo "$ac_err" >&5
11671   echo "configure: failed program was:" >&5
11672   cat conftest.$ac_ext >&5
11673   rm -rf conftest*
11674   eval "ac_cv_header_$ac_safe=no"
11675 fi
11676 rm -f conftest*
11677 fi
11678 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11679   echo "$ac_t""yes" 1>&6
11680     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11681   cat >> confdefs.h <<EOF
11682 #define $ac_tr_hdr 1
11683 EOF
11684  
11685 else
11686   echo "$ac_t""no" 1>&6
11687 fi
11688 done
11689
11690                 fi
11691
11692                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11693                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11694 echo "configure:11695: checking for pthread_create in default libraries" >&5
11695 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11696   echo $ac_n "(cached) $ac_c" 1>&6
11697 else
11698   
11699                 if test "$cross_compiling" = yes; then
11700   cat > conftest.$ac_ext <<EOF
11701 #line 11702 "configure"
11702 #include "confdefs.h"
11703 /* pthread test headers */
11704 #include <pthread.h>
11705 #if HAVE_PTHREADS < 7
11706 #include <errno.h>
11707 #endif
11708 #ifndef NULL
11709 #define NULL (void*)0
11710 #endif
11711
11712 static void *task(p)
11713         void *p;
11714 {
11715         return (void *) (p == NULL);
11716 }
11717
11718 int main() {
11719
11720         /* pthread test function */
11721 #ifndef PTHREAD_CREATE_DETACHED
11722 #define PTHREAD_CREATE_DETACHED 1
11723 #endif
11724         pthread_t t;
11725         int status;
11726         int detach = PTHREAD_CREATE_DETACHED;
11727
11728 #if HAVE_PTHREADS > 4
11729         /* Final pthreads */
11730         pthread_attr_t attr;
11731
11732         status = pthread_attr_init(&attr);
11733         if( status ) return status;
11734
11735 #if HAVE_PTHREADS < 7
11736         status = pthread_attr_setdetachstate(&attr, &detach);
11737         if( status < 0 ) status = errno;
11738 #else
11739         status = pthread_attr_setdetachstate(&attr, detach);
11740 #endif
11741         if( status ) return status;
11742         status = pthread_create( &t, &attr, task, NULL );
11743 #if HAVE_PTHREADS < 7
11744         if( status < 0 ) status = errno;
11745 #endif
11746         if( status ) return status;
11747 #else
11748         /* Draft 4 pthreads */
11749         status = pthread_create( &t, pthread_attr_default, task, NULL );
11750         if( status ) return errno;
11751
11752         /* give thread a chance to complete */
11753         /* it should remain joinable and hence detachable */
11754         sleep( 1 );
11755
11756         status = pthread_detach( &t );
11757         if( status ) return errno;
11758 #endif
11759
11760 #ifdef HAVE_LINUX_THREADS
11761         pthread_kill_other_threads_np();
11762 #endif
11763
11764         return 0;
11765
11766 ; return 0; }
11767 EOF
11768 if { (eval echo configure:11769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11769   rm -rf conftest*
11770   ol_cv_pthread_create=yes
11771 else
11772   echo "configure: failed program was:" >&5
11773   cat conftest.$ac_ext >&5
11774   rm -rf conftest*
11775   ol_cv_pthread_create=no
11776 fi
11777 rm -f conftest*
11778 else
11779   cat > conftest.$ac_ext <<EOF
11780 #line 11781 "configure"
11781 #include "confdefs.h"
11782 /* pthread test headers */
11783 #include <pthread.h>
11784 #if HAVE_PTHREADS < 7
11785 #include <errno.h>
11786 #endif
11787 #ifndef NULL
11788 #define NULL (void*)0
11789 #endif
11790
11791 static void *task(p)
11792         void *p;
11793 {
11794         return (void *) (p == NULL);
11795 }
11796
11797
11798 int main(argc, argv)
11799         int argc;
11800         char **argv;
11801 {
11802
11803         /* pthread test function */
11804 #ifndef PTHREAD_CREATE_DETACHED
11805 #define PTHREAD_CREATE_DETACHED 1
11806 #endif
11807         pthread_t t;
11808         int status;
11809         int detach = PTHREAD_CREATE_DETACHED;
11810
11811 #if HAVE_PTHREADS > 4
11812         /* Final pthreads */
11813         pthread_attr_t attr;
11814
11815         status = pthread_attr_init(&attr);
11816         if( status ) return status;
11817
11818 #if HAVE_PTHREADS < 7
11819         status = pthread_attr_setdetachstate(&attr, &detach);
11820         if( status < 0 ) status = errno;
11821 #else
11822         status = pthread_attr_setdetachstate(&attr, detach);
11823 #endif
11824         if( status ) return status;
11825         status = pthread_create( &t, &attr, task, NULL );
11826 #if HAVE_PTHREADS < 7
11827         if( status < 0 ) status = errno;
11828 #endif
11829         if( status ) return status;
11830 #else
11831         /* Draft 4 pthreads */
11832         status = pthread_create( &t, pthread_attr_default, task, NULL );
11833         if( status ) return errno;
11834
11835         /* give thread a chance to complete */
11836         /* it should remain joinable and hence detachable */
11837         sleep( 1 );
11838
11839         status = pthread_detach( &t );
11840         if( status ) return errno;
11841 #endif
11842
11843 #ifdef HAVE_LINUX_THREADS
11844         pthread_kill_other_threads_np();
11845 #endif
11846
11847         return 0;
11848
11849 }
11850
11851 EOF
11852 if { (eval echo configure:11853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11853 then
11854   ol_cv_pthread_create=yes
11855 else
11856   echo "configure: failed program was:" >&5
11857   cat conftest.$ac_ext >&5
11858   rm -fr conftest*
11859   ol_cv_pthread_create=no
11860 fi
11861 rm -fr conftest*
11862 fi
11863
11864 fi
11865
11866 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11867
11868                 if test $ol_cv_pthread_create != no ; then
11869                         ol_link_threads=posix
11870                         ol_link_pthreads=""
11871                 fi
11872                 
11873                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11874 if test "$ol_link_threads" = no ; then
11875         # try -kthread
11876         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11877 echo "configure:11878: checking for pthread link with -kthread" >&5
11878 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11879   echo $ac_n "(cached) $ac_c" 1>&6
11880 else
11881   
11882                 # save the flags
11883                 ol_LIBS="$LIBS"
11884                 LIBS="-kthread $LIBS"
11885
11886                 if test "$cross_compiling" = yes; then
11887   cat > conftest.$ac_ext <<EOF
11888 #line 11889 "configure"
11889 #include "confdefs.h"
11890 /* pthread test headers */
11891 #include <pthread.h>
11892 #if HAVE_PTHREADS < 7
11893 #include <errno.h>
11894 #endif
11895 #ifndef NULL
11896 #define NULL (void*)0
11897 #endif
11898
11899 static void *task(p)
11900         void *p;
11901 {
11902         return (void *) (p == NULL);
11903 }
11904
11905 int main() {
11906
11907         /* pthread test function */
11908 #ifndef PTHREAD_CREATE_DETACHED
11909 #define PTHREAD_CREATE_DETACHED 1
11910 #endif
11911         pthread_t t;
11912         int status;
11913         int detach = PTHREAD_CREATE_DETACHED;
11914
11915 #if HAVE_PTHREADS > 4
11916         /* Final pthreads */
11917         pthread_attr_t attr;
11918
11919         status = pthread_attr_init(&attr);
11920         if( status ) return status;
11921
11922 #if HAVE_PTHREADS < 7
11923         status = pthread_attr_setdetachstate(&attr, &detach);
11924         if( status < 0 ) status = errno;
11925 #else
11926         status = pthread_attr_setdetachstate(&attr, detach);
11927 #endif
11928         if( status ) return status;
11929         status = pthread_create( &t, &attr, task, NULL );
11930 #if HAVE_PTHREADS < 7
11931         if( status < 0 ) status = errno;
11932 #endif
11933         if( status ) return status;
11934 #else
11935         /* Draft 4 pthreads */
11936         status = pthread_create( &t, pthread_attr_default, task, NULL );
11937         if( status ) return errno;
11938
11939         /* give thread a chance to complete */
11940         /* it should remain joinable and hence detachable */
11941         sleep( 1 );
11942
11943         status = pthread_detach( &t );
11944         if( status ) return errno;
11945 #endif
11946
11947 #ifdef HAVE_LINUX_THREADS
11948         pthread_kill_other_threads_np();
11949 #endif
11950
11951         return 0;
11952
11953 ; return 0; }
11954 EOF
11955 if { (eval echo configure:11956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11956   rm -rf conftest*
11957   ol_cv_pthread_kthread=yes
11958 else
11959   echo "configure: failed program was:" >&5
11960   cat conftest.$ac_ext >&5
11961   rm -rf conftest*
11962   ol_cv_pthread_kthread=no
11963 fi
11964 rm -f conftest*
11965 else
11966   cat > conftest.$ac_ext <<EOF
11967 #line 11968 "configure"
11968 #include "confdefs.h"
11969 /* pthread test headers */
11970 #include <pthread.h>
11971 #if HAVE_PTHREADS < 7
11972 #include <errno.h>
11973 #endif
11974 #ifndef NULL
11975 #define NULL (void*)0
11976 #endif
11977
11978 static void *task(p)
11979         void *p;
11980 {
11981         return (void *) (p == NULL);
11982 }
11983
11984
11985 int main(argc, argv)
11986         int argc;
11987         char **argv;
11988 {
11989
11990         /* pthread test function */
11991 #ifndef PTHREAD_CREATE_DETACHED
11992 #define PTHREAD_CREATE_DETACHED 1
11993 #endif
11994         pthread_t t;
11995         int status;
11996         int detach = PTHREAD_CREATE_DETACHED;
11997
11998 #if HAVE_PTHREADS > 4
11999         /* Final pthreads */
12000         pthread_attr_t attr;
12001
12002         status = pthread_attr_init(&attr);
12003         if( status ) return status;
12004
12005 #if HAVE_PTHREADS < 7
12006         status = pthread_attr_setdetachstate(&attr, &detach);
12007         if( status < 0 ) status = errno;
12008 #else
12009         status = pthread_attr_setdetachstate(&attr, detach);
12010 #endif
12011         if( status ) return status;
12012         status = pthread_create( &t, &attr, task, NULL );
12013 #if HAVE_PTHREADS < 7
12014         if( status < 0 ) status = errno;
12015 #endif
12016         if( status ) return status;
12017 #else
12018         /* Draft 4 pthreads */
12019         status = pthread_create( &t, pthread_attr_default, task, NULL );
12020         if( status ) return errno;
12021
12022         /* give thread a chance to complete */
12023         /* it should remain joinable and hence detachable */
12024         sleep( 1 );
12025
12026         status = pthread_detach( &t );
12027         if( status ) return errno;
12028 #endif
12029
12030 #ifdef HAVE_LINUX_THREADS
12031         pthread_kill_other_threads_np();
12032 #endif
12033
12034         return 0;
12035
12036 }
12037
12038 EOF
12039 if { (eval echo configure:12040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12040 then
12041   ol_cv_pthread_kthread=yes
12042 else
12043   echo "configure: failed program was:" >&5
12044   cat conftest.$ac_ext >&5
12045   rm -fr conftest*
12046   ol_cv_pthread_kthread=no
12047 fi
12048 rm -fr conftest*
12049 fi
12050
12051
12052                 # restore the LIBS
12053                 LIBS="$ol_LIBS"
12054         
12055 fi
12056
12057 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12058
12059         if test $ol_cv_pthread_kthread = yes ; then
12060                 ol_link_pthreads="-kthread"
12061                 ol_link_threads=posix
12062         fi
12063 fi
12064
12065                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12066 if test "$ol_link_threads" = no ; then
12067         # try -pthread
12068         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12069 echo "configure:12070: checking for pthread link with -pthread" >&5
12070 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12071   echo $ac_n "(cached) $ac_c" 1>&6
12072 else
12073   
12074                 # save the flags
12075                 ol_LIBS="$LIBS"
12076                 LIBS="-pthread $LIBS"
12077
12078                 if test "$cross_compiling" = yes; then
12079   cat > conftest.$ac_ext <<EOF
12080 #line 12081 "configure"
12081 #include "confdefs.h"
12082 /* pthread test headers */
12083 #include <pthread.h>
12084 #if HAVE_PTHREADS < 7
12085 #include <errno.h>
12086 #endif
12087 #ifndef NULL
12088 #define NULL (void*)0
12089 #endif
12090
12091 static void *task(p)
12092         void *p;
12093 {
12094         return (void *) (p == NULL);
12095 }
12096
12097 int main() {
12098
12099         /* pthread test function */
12100 #ifndef PTHREAD_CREATE_DETACHED
12101 #define PTHREAD_CREATE_DETACHED 1
12102 #endif
12103         pthread_t t;
12104         int status;
12105         int detach = PTHREAD_CREATE_DETACHED;
12106
12107 #if HAVE_PTHREADS > 4
12108         /* Final pthreads */
12109         pthread_attr_t attr;
12110
12111         status = pthread_attr_init(&attr);
12112         if( status ) return status;
12113
12114 #if HAVE_PTHREADS < 7
12115         status = pthread_attr_setdetachstate(&attr, &detach);
12116         if( status < 0 ) status = errno;
12117 #else
12118         status = pthread_attr_setdetachstate(&attr, detach);
12119 #endif
12120         if( status ) return status;
12121         status = pthread_create( &t, &attr, task, NULL );
12122 #if HAVE_PTHREADS < 7
12123         if( status < 0 ) status = errno;
12124 #endif
12125         if( status ) return status;
12126 #else
12127         /* Draft 4 pthreads */
12128         status = pthread_create( &t, pthread_attr_default, task, NULL );
12129         if( status ) return errno;
12130
12131         /* give thread a chance to complete */
12132         /* it should remain joinable and hence detachable */
12133         sleep( 1 );
12134
12135         status = pthread_detach( &t );
12136         if( status ) return errno;
12137 #endif
12138
12139 #ifdef HAVE_LINUX_THREADS
12140         pthread_kill_other_threads_np();
12141 #endif
12142
12143         return 0;
12144
12145 ; return 0; }
12146 EOF
12147 if { (eval echo configure:12148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12148   rm -rf conftest*
12149   ol_cv_pthread_pthread=yes
12150 else
12151   echo "configure: failed program was:" >&5
12152   cat conftest.$ac_ext >&5
12153   rm -rf conftest*
12154   ol_cv_pthread_pthread=no
12155 fi
12156 rm -f conftest*
12157 else
12158   cat > conftest.$ac_ext <<EOF
12159 #line 12160 "configure"
12160 #include "confdefs.h"
12161 /* pthread test headers */
12162 #include <pthread.h>
12163 #if HAVE_PTHREADS < 7
12164 #include <errno.h>
12165 #endif
12166 #ifndef NULL
12167 #define NULL (void*)0
12168 #endif
12169
12170 static void *task(p)
12171         void *p;
12172 {
12173         return (void *) (p == NULL);
12174 }
12175
12176
12177 int main(argc, argv)
12178         int argc;
12179         char **argv;
12180 {
12181
12182         /* pthread test function */
12183 #ifndef PTHREAD_CREATE_DETACHED
12184 #define PTHREAD_CREATE_DETACHED 1
12185 #endif
12186         pthread_t t;
12187         int status;
12188         int detach = PTHREAD_CREATE_DETACHED;
12189
12190 #if HAVE_PTHREADS > 4
12191         /* Final pthreads */
12192         pthread_attr_t attr;
12193
12194         status = pthread_attr_init(&attr);
12195         if( status ) return status;
12196
12197 #if HAVE_PTHREADS < 7
12198         status = pthread_attr_setdetachstate(&attr, &detach);
12199         if( status < 0 ) status = errno;
12200 #else
12201         status = pthread_attr_setdetachstate(&attr, detach);
12202 #endif
12203         if( status ) return status;
12204         status = pthread_create( &t, &attr, task, NULL );
12205 #if HAVE_PTHREADS < 7
12206         if( status < 0 ) status = errno;
12207 #endif
12208         if( status ) return status;
12209 #else
12210         /* Draft 4 pthreads */
12211         status = pthread_create( &t, pthread_attr_default, task, NULL );
12212         if( status ) return errno;
12213
12214         /* give thread a chance to complete */
12215         /* it should remain joinable and hence detachable */
12216         sleep( 1 );
12217
12218         status = pthread_detach( &t );
12219         if( status ) return errno;
12220 #endif
12221
12222 #ifdef HAVE_LINUX_THREADS
12223         pthread_kill_other_threads_np();
12224 #endif
12225
12226         return 0;
12227
12228 }
12229
12230 EOF
12231 if { (eval echo configure:12232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12232 then
12233   ol_cv_pthread_pthread=yes
12234 else
12235   echo "configure: failed program was:" >&5
12236   cat conftest.$ac_ext >&5
12237   rm -fr conftest*
12238   ol_cv_pthread_pthread=no
12239 fi
12240 rm -fr conftest*
12241 fi
12242
12243
12244                 # restore the LIBS
12245                 LIBS="$ol_LIBS"
12246         
12247 fi
12248
12249 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12250
12251         if test $ol_cv_pthread_pthread = yes ; then
12252                 ol_link_pthreads="-pthread"
12253                 ol_link_threads=posix
12254         fi
12255 fi
12256
12257                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12258 if test "$ol_link_threads" = no ; then
12259         # try -pthreads
12260         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12261 echo "configure:12262: checking for pthread link with -pthreads" >&5
12262 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12263   echo $ac_n "(cached) $ac_c" 1>&6
12264 else
12265   
12266                 # save the flags
12267                 ol_LIBS="$LIBS"
12268                 LIBS="-pthreads $LIBS"
12269
12270                 if test "$cross_compiling" = yes; then
12271   cat > conftest.$ac_ext <<EOF
12272 #line 12273 "configure"
12273 #include "confdefs.h"
12274 /* pthread test headers */
12275 #include <pthread.h>
12276 #if HAVE_PTHREADS < 7
12277 #include <errno.h>
12278 #endif
12279 #ifndef NULL
12280 #define NULL (void*)0
12281 #endif
12282
12283 static void *task(p)
12284         void *p;
12285 {
12286         return (void *) (p == NULL);
12287 }
12288
12289 int main() {
12290
12291         /* pthread test function */
12292 #ifndef PTHREAD_CREATE_DETACHED
12293 #define PTHREAD_CREATE_DETACHED 1
12294 #endif
12295         pthread_t t;
12296         int status;
12297         int detach = PTHREAD_CREATE_DETACHED;
12298
12299 #if HAVE_PTHREADS > 4
12300         /* Final pthreads */
12301         pthread_attr_t attr;
12302
12303         status = pthread_attr_init(&attr);
12304         if( status ) return status;
12305
12306 #if HAVE_PTHREADS < 7
12307         status = pthread_attr_setdetachstate(&attr, &detach);
12308         if( status < 0 ) status = errno;
12309 #else
12310         status = pthread_attr_setdetachstate(&attr, detach);
12311 #endif
12312         if( status ) return status;
12313         status = pthread_create( &t, &attr, task, NULL );
12314 #if HAVE_PTHREADS < 7
12315         if( status < 0 ) status = errno;
12316 #endif
12317         if( status ) return status;
12318 #else
12319         /* Draft 4 pthreads */
12320         status = pthread_create( &t, pthread_attr_default, task, NULL );
12321         if( status ) return errno;
12322
12323         /* give thread a chance to complete */
12324         /* it should remain joinable and hence detachable */
12325         sleep( 1 );
12326
12327         status = pthread_detach( &t );
12328         if( status ) return errno;
12329 #endif
12330
12331 #ifdef HAVE_LINUX_THREADS
12332         pthread_kill_other_threads_np();
12333 #endif
12334
12335         return 0;
12336
12337 ; return 0; }
12338 EOF
12339 if { (eval echo configure:12340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12340   rm -rf conftest*
12341   ol_cv_pthread_pthreads=yes
12342 else
12343   echo "configure: failed program was:" >&5
12344   cat conftest.$ac_ext >&5
12345   rm -rf conftest*
12346   ol_cv_pthread_pthreads=no
12347 fi
12348 rm -f conftest*
12349 else
12350   cat > conftest.$ac_ext <<EOF
12351 #line 12352 "configure"
12352 #include "confdefs.h"
12353 /* pthread test headers */
12354 #include <pthread.h>
12355 #if HAVE_PTHREADS < 7
12356 #include <errno.h>
12357 #endif
12358 #ifndef NULL
12359 #define NULL (void*)0
12360 #endif
12361
12362 static void *task(p)
12363         void *p;
12364 {
12365         return (void *) (p == NULL);
12366 }
12367
12368
12369 int main(argc, argv)
12370         int argc;
12371         char **argv;
12372 {
12373
12374         /* pthread test function */
12375 #ifndef PTHREAD_CREATE_DETACHED
12376 #define PTHREAD_CREATE_DETACHED 1
12377 #endif
12378         pthread_t t;
12379         int status;
12380         int detach = PTHREAD_CREATE_DETACHED;
12381
12382 #if HAVE_PTHREADS > 4
12383         /* Final pthreads */
12384         pthread_attr_t attr;
12385
12386         status = pthread_attr_init(&attr);
12387         if( status ) return status;
12388
12389 #if HAVE_PTHREADS < 7
12390         status = pthread_attr_setdetachstate(&attr, &detach);
12391         if( status < 0 ) status = errno;
12392 #else
12393         status = pthread_attr_setdetachstate(&attr, detach);
12394 #endif
12395         if( status ) return status;
12396         status = pthread_create( &t, &attr, task, NULL );
12397 #if HAVE_PTHREADS < 7
12398         if( status < 0 ) status = errno;
12399 #endif
12400         if( status ) return status;
12401 #else
12402         /* Draft 4 pthreads */
12403         status = pthread_create( &t, pthread_attr_default, task, NULL );
12404         if( status ) return errno;
12405
12406         /* give thread a chance to complete */
12407         /* it should remain joinable and hence detachable */
12408         sleep( 1 );
12409
12410         status = pthread_detach( &t );
12411         if( status ) return errno;
12412 #endif
12413
12414 #ifdef HAVE_LINUX_THREADS
12415         pthread_kill_other_threads_np();
12416 #endif
12417
12418         return 0;
12419
12420 }
12421
12422 EOF
12423 if { (eval echo configure:12424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12424 then
12425   ol_cv_pthread_pthreads=yes
12426 else
12427   echo "configure: failed program was:" >&5
12428   cat conftest.$ac_ext >&5
12429   rm -fr conftest*
12430   ol_cv_pthread_pthreads=no
12431 fi
12432 rm -fr conftest*
12433 fi
12434
12435
12436                 # restore the LIBS
12437                 LIBS="$ol_LIBS"
12438         
12439 fi
12440
12441 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12442
12443         if test $ol_cv_pthread_pthreads = yes ; then
12444                 ol_link_pthreads="-pthreads"
12445                 ol_link_threads=posix
12446         fi
12447 fi
12448
12449                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12450 if test "$ol_link_threads" = no ; then
12451         # try -mthreads
12452         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12453 echo "configure:12454: checking for pthread link with -mthreads" >&5
12454 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12455   echo $ac_n "(cached) $ac_c" 1>&6
12456 else
12457   
12458                 # save the flags
12459                 ol_LIBS="$LIBS"
12460                 LIBS="-mthreads $LIBS"
12461
12462                 if test "$cross_compiling" = yes; then
12463   cat > conftest.$ac_ext <<EOF
12464 #line 12465 "configure"
12465 #include "confdefs.h"
12466 /* pthread test headers */
12467 #include <pthread.h>
12468 #if HAVE_PTHREADS < 7
12469 #include <errno.h>
12470 #endif
12471 #ifndef NULL
12472 #define NULL (void*)0
12473 #endif
12474
12475 static void *task(p)
12476         void *p;
12477 {
12478         return (void *) (p == NULL);
12479 }
12480
12481 int main() {
12482
12483         /* pthread test function */
12484 #ifndef PTHREAD_CREATE_DETACHED
12485 #define PTHREAD_CREATE_DETACHED 1
12486 #endif
12487         pthread_t t;
12488         int status;
12489         int detach = PTHREAD_CREATE_DETACHED;
12490
12491 #if HAVE_PTHREADS > 4
12492         /* Final pthreads */
12493         pthread_attr_t attr;
12494
12495         status = pthread_attr_init(&attr);
12496         if( status ) return status;
12497
12498 #if HAVE_PTHREADS < 7
12499         status = pthread_attr_setdetachstate(&attr, &detach);
12500         if( status < 0 ) status = errno;
12501 #else
12502         status = pthread_attr_setdetachstate(&attr, detach);
12503 #endif
12504         if( status ) return status;
12505         status = pthread_create( &t, &attr, task, NULL );
12506 #if HAVE_PTHREADS < 7
12507         if( status < 0 ) status = errno;
12508 #endif
12509         if( status ) return status;
12510 #else
12511         /* Draft 4 pthreads */
12512         status = pthread_create( &t, pthread_attr_default, task, NULL );
12513         if( status ) return errno;
12514
12515         /* give thread a chance to complete */
12516         /* it should remain joinable and hence detachable */
12517         sleep( 1 );
12518
12519         status = pthread_detach( &t );
12520         if( status ) return errno;
12521 #endif
12522
12523 #ifdef HAVE_LINUX_THREADS
12524         pthread_kill_other_threads_np();
12525 #endif
12526
12527         return 0;
12528
12529 ; return 0; }
12530 EOF
12531 if { (eval echo configure:12532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12532   rm -rf conftest*
12533   ol_cv_pthread_mthreads=yes
12534 else
12535   echo "configure: failed program was:" >&5
12536   cat conftest.$ac_ext >&5
12537   rm -rf conftest*
12538   ol_cv_pthread_mthreads=no
12539 fi
12540 rm -f conftest*
12541 else
12542   cat > conftest.$ac_ext <<EOF
12543 #line 12544 "configure"
12544 #include "confdefs.h"
12545 /* pthread test headers */
12546 #include <pthread.h>
12547 #if HAVE_PTHREADS < 7
12548 #include <errno.h>
12549 #endif
12550 #ifndef NULL
12551 #define NULL (void*)0
12552 #endif
12553
12554 static void *task(p)
12555         void *p;
12556 {
12557         return (void *) (p == NULL);
12558 }
12559
12560
12561 int main(argc, argv)
12562         int argc;
12563         char **argv;
12564 {
12565
12566         /* pthread test function */
12567 #ifndef PTHREAD_CREATE_DETACHED
12568 #define PTHREAD_CREATE_DETACHED 1
12569 #endif
12570         pthread_t t;
12571         int status;
12572         int detach = PTHREAD_CREATE_DETACHED;
12573
12574 #if HAVE_PTHREADS > 4
12575         /* Final pthreads */
12576         pthread_attr_t attr;
12577
12578         status = pthread_attr_init(&attr);
12579         if( status ) return status;
12580
12581 #if HAVE_PTHREADS < 7
12582         status = pthread_attr_setdetachstate(&attr, &detach);
12583         if( status < 0 ) status = errno;
12584 #else
12585         status = pthread_attr_setdetachstate(&attr, detach);
12586 #endif
12587         if( status ) return status;
12588         status = pthread_create( &t, &attr, task, NULL );
12589 #if HAVE_PTHREADS < 7
12590         if( status < 0 ) status = errno;
12591 #endif
12592         if( status ) return status;
12593 #else
12594         /* Draft 4 pthreads */
12595         status = pthread_create( &t, pthread_attr_default, task, NULL );
12596         if( status ) return errno;
12597
12598         /* give thread a chance to complete */
12599         /* it should remain joinable and hence detachable */
12600         sleep( 1 );
12601
12602         status = pthread_detach( &t );
12603         if( status ) return errno;
12604 #endif
12605
12606 #ifdef HAVE_LINUX_THREADS
12607         pthread_kill_other_threads_np();
12608 #endif
12609
12610         return 0;
12611
12612 }
12613
12614 EOF
12615 if { (eval echo configure:12616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12616 then
12617   ol_cv_pthread_mthreads=yes
12618 else
12619   echo "configure: failed program was:" >&5
12620   cat conftest.$ac_ext >&5
12621   rm -fr conftest*
12622   ol_cv_pthread_mthreads=no
12623 fi
12624 rm -fr conftest*
12625 fi
12626
12627
12628                 # restore the LIBS
12629                 LIBS="$ol_LIBS"
12630         
12631 fi
12632
12633 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12634
12635         if test $ol_cv_pthread_mthreads = yes ; then
12636                 ol_link_pthreads="-mthreads"
12637                 ol_link_threads=posix
12638         fi
12639 fi
12640
12641                 # Pthread try link: -thread (ol_cv_pthread_thread)
12642 if test "$ol_link_threads" = no ; then
12643         # try -thread
12644         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12645 echo "configure:12646: checking for pthread link with -thread" >&5
12646 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12647   echo $ac_n "(cached) $ac_c" 1>&6
12648 else
12649   
12650                 # save the flags
12651                 ol_LIBS="$LIBS"
12652                 LIBS="-thread $LIBS"
12653
12654                 if test "$cross_compiling" = yes; then
12655   cat > conftest.$ac_ext <<EOF
12656 #line 12657 "configure"
12657 #include "confdefs.h"
12658 /* pthread test headers */
12659 #include <pthread.h>
12660 #if HAVE_PTHREADS < 7
12661 #include <errno.h>
12662 #endif
12663 #ifndef NULL
12664 #define NULL (void*)0
12665 #endif
12666
12667 static void *task(p)
12668         void *p;
12669 {
12670         return (void *) (p == NULL);
12671 }
12672
12673 int main() {
12674
12675         /* pthread test function */
12676 #ifndef PTHREAD_CREATE_DETACHED
12677 #define PTHREAD_CREATE_DETACHED 1
12678 #endif
12679         pthread_t t;
12680         int status;
12681         int detach = PTHREAD_CREATE_DETACHED;
12682
12683 #if HAVE_PTHREADS > 4
12684         /* Final pthreads */
12685         pthread_attr_t attr;
12686
12687         status = pthread_attr_init(&attr);
12688         if( status ) return status;
12689
12690 #if HAVE_PTHREADS < 7
12691         status = pthread_attr_setdetachstate(&attr, &detach);
12692         if( status < 0 ) status = errno;
12693 #else
12694         status = pthread_attr_setdetachstate(&attr, detach);
12695 #endif
12696         if( status ) return status;
12697         status = pthread_create( &t, &attr, task, NULL );
12698 #if HAVE_PTHREADS < 7
12699         if( status < 0 ) status = errno;
12700 #endif
12701         if( status ) return status;
12702 #else
12703         /* Draft 4 pthreads */
12704         status = pthread_create( &t, pthread_attr_default, task, NULL );
12705         if( status ) return errno;
12706
12707         /* give thread a chance to complete */
12708         /* it should remain joinable and hence detachable */
12709         sleep( 1 );
12710
12711         status = pthread_detach( &t );
12712         if( status ) return errno;
12713 #endif
12714
12715 #ifdef HAVE_LINUX_THREADS
12716         pthread_kill_other_threads_np();
12717 #endif
12718
12719         return 0;
12720
12721 ; return 0; }
12722 EOF
12723 if { (eval echo configure:12724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12724   rm -rf conftest*
12725   ol_cv_pthread_thread=yes
12726 else
12727   echo "configure: failed program was:" >&5
12728   cat conftest.$ac_ext >&5
12729   rm -rf conftest*
12730   ol_cv_pthread_thread=no
12731 fi
12732 rm -f conftest*
12733 else
12734   cat > conftest.$ac_ext <<EOF
12735 #line 12736 "configure"
12736 #include "confdefs.h"
12737 /* pthread test headers */
12738 #include <pthread.h>
12739 #if HAVE_PTHREADS < 7
12740 #include <errno.h>
12741 #endif
12742 #ifndef NULL
12743 #define NULL (void*)0
12744 #endif
12745
12746 static void *task(p)
12747         void *p;
12748 {
12749         return (void *) (p == NULL);
12750 }
12751
12752
12753 int main(argc, argv)
12754         int argc;
12755         char **argv;
12756 {
12757
12758         /* pthread test function */
12759 #ifndef PTHREAD_CREATE_DETACHED
12760 #define PTHREAD_CREATE_DETACHED 1
12761 #endif
12762         pthread_t t;
12763         int status;
12764         int detach = PTHREAD_CREATE_DETACHED;
12765
12766 #if HAVE_PTHREADS > 4
12767         /* Final pthreads */
12768         pthread_attr_t attr;
12769
12770         status = pthread_attr_init(&attr);
12771         if( status ) return status;
12772
12773 #if HAVE_PTHREADS < 7
12774         status = pthread_attr_setdetachstate(&attr, &detach);
12775         if( status < 0 ) status = errno;
12776 #else
12777         status = pthread_attr_setdetachstate(&attr, detach);
12778 #endif
12779         if( status ) return status;
12780         status = pthread_create( &t, &attr, task, NULL );
12781 #if HAVE_PTHREADS < 7
12782         if( status < 0 ) status = errno;
12783 #endif
12784         if( status ) return status;
12785 #else
12786         /* Draft 4 pthreads */
12787         status = pthread_create( &t, pthread_attr_default, task, NULL );
12788         if( status ) return errno;
12789
12790         /* give thread a chance to complete */
12791         /* it should remain joinable and hence detachable */
12792         sleep( 1 );
12793
12794         status = pthread_detach( &t );
12795         if( status ) return errno;
12796 #endif
12797
12798 #ifdef HAVE_LINUX_THREADS
12799         pthread_kill_other_threads_np();
12800 #endif
12801
12802         return 0;
12803
12804 }
12805
12806 EOF
12807 if { (eval echo configure:12808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12808 then
12809   ol_cv_pthread_thread=yes
12810 else
12811   echo "configure: failed program was:" >&5
12812   cat conftest.$ac_ext >&5
12813   rm -fr conftest*
12814   ol_cv_pthread_thread=no
12815 fi
12816 rm -fr conftest*
12817 fi
12818
12819
12820                 # restore the LIBS
12821                 LIBS="$ol_LIBS"
12822         
12823 fi
12824
12825 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12826
12827         if test $ol_cv_pthread_thread = yes ; then
12828                 ol_link_pthreads="-thread"
12829                 ol_link_threads=posix
12830         fi
12831 fi
12832
12833
12834                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12835 if test "$ol_link_threads" = no ; then
12836         # try -lpthread -lmach -lexc -lc_r
12837         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12838 echo "configure:12839: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12839 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12840   echo $ac_n "(cached) $ac_c" 1>&6
12841 else
12842   
12843                 # save the flags
12844                 ol_LIBS="$LIBS"
12845                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12846
12847                 if test "$cross_compiling" = yes; then
12848   cat > conftest.$ac_ext <<EOF
12849 #line 12850 "configure"
12850 #include "confdefs.h"
12851 /* pthread test headers */
12852 #include <pthread.h>
12853 #if HAVE_PTHREADS < 7
12854 #include <errno.h>
12855 #endif
12856 #ifndef NULL
12857 #define NULL (void*)0
12858 #endif
12859
12860 static void *task(p)
12861         void *p;
12862 {
12863         return (void *) (p == NULL);
12864 }
12865
12866 int main() {
12867
12868         /* pthread test function */
12869 #ifndef PTHREAD_CREATE_DETACHED
12870 #define PTHREAD_CREATE_DETACHED 1
12871 #endif
12872         pthread_t t;
12873         int status;
12874         int detach = PTHREAD_CREATE_DETACHED;
12875
12876 #if HAVE_PTHREADS > 4
12877         /* Final pthreads */
12878         pthread_attr_t attr;
12879
12880         status = pthread_attr_init(&attr);
12881         if( status ) return status;
12882
12883 #if HAVE_PTHREADS < 7
12884         status = pthread_attr_setdetachstate(&attr, &detach);
12885         if( status < 0 ) status = errno;
12886 #else
12887         status = pthread_attr_setdetachstate(&attr, detach);
12888 #endif
12889         if( status ) return status;
12890         status = pthread_create( &t, &attr, task, NULL );
12891 #if HAVE_PTHREADS < 7
12892         if( status < 0 ) status = errno;
12893 #endif
12894         if( status ) return status;
12895 #else
12896         /* Draft 4 pthreads */
12897         status = pthread_create( &t, pthread_attr_default, task, NULL );
12898         if( status ) return errno;
12899
12900         /* give thread a chance to complete */
12901         /* it should remain joinable and hence detachable */
12902         sleep( 1 );
12903
12904         status = pthread_detach( &t );
12905         if( status ) return errno;
12906 #endif
12907
12908 #ifdef HAVE_LINUX_THREADS
12909         pthread_kill_other_threads_np();
12910 #endif
12911
12912         return 0;
12913
12914 ; return 0; }
12915 EOF
12916 if { (eval echo configure:12917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12917   rm -rf conftest*
12918   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12919 else
12920   echo "configure: failed program was:" >&5
12921   cat conftest.$ac_ext >&5
12922   rm -rf conftest*
12923   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12924 fi
12925 rm -f conftest*
12926 else
12927   cat > conftest.$ac_ext <<EOF
12928 #line 12929 "configure"
12929 #include "confdefs.h"
12930 /* pthread test headers */
12931 #include <pthread.h>
12932 #if HAVE_PTHREADS < 7
12933 #include <errno.h>
12934 #endif
12935 #ifndef NULL
12936 #define NULL (void*)0
12937 #endif
12938
12939 static void *task(p)
12940         void *p;
12941 {
12942         return (void *) (p == NULL);
12943 }
12944
12945
12946 int main(argc, argv)
12947         int argc;
12948         char **argv;
12949 {
12950
12951         /* pthread test function */
12952 #ifndef PTHREAD_CREATE_DETACHED
12953 #define PTHREAD_CREATE_DETACHED 1
12954 #endif
12955         pthread_t t;
12956         int status;
12957         int detach = PTHREAD_CREATE_DETACHED;
12958
12959 #if HAVE_PTHREADS > 4
12960         /* Final pthreads */
12961         pthread_attr_t attr;
12962
12963         status = pthread_attr_init(&attr);
12964         if( status ) return status;
12965
12966 #if HAVE_PTHREADS < 7
12967         status = pthread_attr_setdetachstate(&attr, &detach);
12968         if( status < 0 ) status = errno;
12969 #else
12970         status = pthread_attr_setdetachstate(&attr, detach);
12971 #endif
12972         if( status ) return status;
12973         status = pthread_create( &t, &attr, task, NULL );
12974 #if HAVE_PTHREADS < 7
12975         if( status < 0 ) status = errno;
12976 #endif
12977         if( status ) return status;
12978 #else
12979         /* Draft 4 pthreads */
12980         status = pthread_create( &t, pthread_attr_default, task, NULL );
12981         if( status ) return errno;
12982
12983         /* give thread a chance to complete */
12984         /* it should remain joinable and hence detachable */
12985         sleep( 1 );
12986
12987         status = pthread_detach( &t );
12988         if( status ) return errno;
12989 #endif
12990
12991 #ifdef HAVE_LINUX_THREADS
12992         pthread_kill_other_threads_np();
12993 #endif
12994
12995         return 0;
12996
12997 }
12998
12999 EOF
13000 if { (eval echo configure:13001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13001 then
13002   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13003 else
13004   echo "configure: failed program was:" >&5
13005   cat conftest.$ac_ext >&5
13006   rm -fr conftest*
13007   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13008 fi
13009 rm -fr conftest*
13010 fi
13011
13012
13013                 # restore the LIBS
13014                 LIBS="$ol_LIBS"
13015         
13016 fi
13017
13018 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13019
13020         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13021                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13022                 ol_link_threads=posix
13023         fi
13024 fi
13025
13026                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13027 if test "$ol_link_threads" = no ; then
13028         # try -lpthread -lmach -lexc
13029         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13030 echo "configure:13031: checking for pthread link with -lpthread -lmach -lexc" >&5
13031 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13032   echo $ac_n "(cached) $ac_c" 1>&6
13033 else
13034   
13035                 # save the flags
13036                 ol_LIBS="$LIBS"
13037                 LIBS="-lpthread -lmach -lexc $LIBS"
13038
13039                 if test "$cross_compiling" = yes; then
13040   cat > conftest.$ac_ext <<EOF
13041 #line 13042 "configure"
13042 #include "confdefs.h"
13043 /* pthread test headers */
13044 #include <pthread.h>
13045 #if HAVE_PTHREADS < 7
13046 #include <errno.h>
13047 #endif
13048 #ifndef NULL
13049 #define NULL (void*)0
13050 #endif
13051
13052 static void *task(p)
13053         void *p;
13054 {
13055         return (void *) (p == NULL);
13056 }
13057
13058 int main() {
13059
13060         /* pthread test function */
13061 #ifndef PTHREAD_CREATE_DETACHED
13062 #define PTHREAD_CREATE_DETACHED 1
13063 #endif
13064         pthread_t t;
13065         int status;
13066         int detach = PTHREAD_CREATE_DETACHED;
13067
13068 #if HAVE_PTHREADS > 4
13069         /* Final pthreads */
13070         pthread_attr_t attr;
13071
13072         status = pthread_attr_init(&attr);
13073         if( status ) return status;
13074
13075 #if HAVE_PTHREADS < 7
13076         status = pthread_attr_setdetachstate(&attr, &detach);
13077         if( status < 0 ) status = errno;
13078 #else
13079         status = pthread_attr_setdetachstate(&attr, detach);
13080 #endif
13081         if( status ) return status;
13082         status = pthread_create( &t, &attr, task, NULL );
13083 #if HAVE_PTHREADS < 7
13084         if( status < 0 ) status = errno;
13085 #endif
13086         if( status ) return status;
13087 #else
13088         /* Draft 4 pthreads */
13089         status = pthread_create( &t, pthread_attr_default, task, NULL );
13090         if( status ) return errno;
13091
13092         /* give thread a chance to complete */
13093         /* it should remain joinable and hence detachable */
13094         sleep( 1 );
13095
13096         status = pthread_detach( &t );
13097         if( status ) return errno;
13098 #endif
13099
13100 #ifdef HAVE_LINUX_THREADS
13101         pthread_kill_other_threads_np();
13102 #endif
13103
13104         return 0;
13105
13106 ; return 0; }
13107 EOF
13108 if { (eval echo configure:13109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13109   rm -rf conftest*
13110   ol_cv_pthread_lpthread_lmach_lexc=yes
13111 else
13112   echo "configure: failed program was:" >&5
13113   cat conftest.$ac_ext >&5
13114   rm -rf conftest*
13115   ol_cv_pthread_lpthread_lmach_lexc=no
13116 fi
13117 rm -f conftest*
13118 else
13119   cat > conftest.$ac_ext <<EOF
13120 #line 13121 "configure"
13121 #include "confdefs.h"
13122 /* pthread test headers */
13123 #include <pthread.h>
13124 #if HAVE_PTHREADS < 7
13125 #include <errno.h>
13126 #endif
13127 #ifndef NULL
13128 #define NULL (void*)0
13129 #endif
13130
13131 static void *task(p)
13132         void *p;
13133 {
13134         return (void *) (p == NULL);
13135 }
13136
13137
13138 int main(argc, argv)
13139         int argc;
13140         char **argv;
13141 {
13142
13143         /* pthread test function */
13144 #ifndef PTHREAD_CREATE_DETACHED
13145 #define PTHREAD_CREATE_DETACHED 1
13146 #endif
13147         pthread_t t;
13148         int status;
13149         int detach = PTHREAD_CREATE_DETACHED;
13150
13151 #if HAVE_PTHREADS > 4
13152         /* Final pthreads */
13153         pthread_attr_t attr;
13154
13155         status = pthread_attr_init(&attr);
13156         if( status ) return status;
13157
13158 #if HAVE_PTHREADS < 7
13159         status = pthread_attr_setdetachstate(&attr, &detach);
13160         if( status < 0 ) status = errno;
13161 #else
13162         status = pthread_attr_setdetachstate(&attr, detach);
13163 #endif
13164         if( status ) return status;
13165         status = pthread_create( &t, &attr, task, NULL );
13166 #if HAVE_PTHREADS < 7
13167         if( status < 0 ) status = errno;
13168 #endif
13169         if( status ) return status;
13170 #else
13171         /* Draft 4 pthreads */
13172         status = pthread_create( &t, pthread_attr_default, task, NULL );
13173         if( status ) return errno;
13174
13175         /* give thread a chance to complete */
13176         /* it should remain joinable and hence detachable */
13177         sleep( 1 );
13178
13179         status = pthread_detach( &t );
13180         if( status ) return errno;
13181 #endif
13182
13183 #ifdef HAVE_LINUX_THREADS
13184         pthread_kill_other_threads_np();
13185 #endif
13186
13187         return 0;
13188
13189 }
13190
13191 EOF
13192 if { (eval echo configure:13193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13193 then
13194   ol_cv_pthread_lpthread_lmach_lexc=yes
13195 else
13196   echo "configure: failed program was:" >&5
13197   cat conftest.$ac_ext >&5
13198   rm -fr conftest*
13199   ol_cv_pthread_lpthread_lmach_lexc=no
13200 fi
13201 rm -fr conftest*
13202 fi
13203
13204
13205                 # restore the LIBS
13206                 LIBS="$ol_LIBS"
13207         
13208 fi
13209
13210 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13211
13212         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13213                 ol_link_pthreads="-lpthread -lmach -lexc"
13214                 ol_link_threads=posix
13215         fi
13216 fi
13217
13218
13219                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13220 if test "$ol_link_threads" = no ; then
13221         # try -lpthread -Wl,-woff,85
13222         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13223 echo "configure:13224: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13224 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13225   echo $ac_n "(cached) $ac_c" 1>&6
13226 else
13227   
13228                 # save the flags
13229                 ol_LIBS="$LIBS"
13230                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13231
13232                 if test "$cross_compiling" = yes; then
13233   cat > conftest.$ac_ext <<EOF
13234 #line 13235 "configure"
13235 #include "confdefs.h"
13236 /* pthread test headers */
13237 #include <pthread.h>
13238 #if HAVE_PTHREADS < 7
13239 #include <errno.h>
13240 #endif
13241 #ifndef NULL
13242 #define NULL (void*)0
13243 #endif
13244
13245 static void *task(p)
13246         void *p;
13247 {
13248         return (void *) (p == NULL);
13249 }
13250
13251 int main() {
13252
13253         /* pthread test function */
13254 #ifndef PTHREAD_CREATE_DETACHED
13255 #define PTHREAD_CREATE_DETACHED 1
13256 #endif
13257         pthread_t t;
13258         int status;
13259         int detach = PTHREAD_CREATE_DETACHED;
13260
13261 #if HAVE_PTHREADS > 4
13262         /* Final pthreads */
13263         pthread_attr_t attr;
13264
13265         status = pthread_attr_init(&attr);
13266         if( status ) return status;
13267
13268 #if HAVE_PTHREADS < 7
13269         status = pthread_attr_setdetachstate(&attr, &detach);
13270         if( status < 0 ) status = errno;
13271 #else
13272         status = pthread_attr_setdetachstate(&attr, detach);
13273 #endif
13274         if( status ) return status;
13275         status = pthread_create( &t, &attr, task, NULL );
13276 #if HAVE_PTHREADS < 7
13277         if( status < 0 ) status = errno;
13278 #endif
13279         if( status ) return status;
13280 #else
13281         /* Draft 4 pthreads */
13282         status = pthread_create( &t, pthread_attr_default, task, NULL );
13283         if( status ) return errno;
13284
13285         /* give thread a chance to complete */
13286         /* it should remain joinable and hence detachable */
13287         sleep( 1 );
13288
13289         status = pthread_detach( &t );
13290         if( status ) return errno;
13291 #endif
13292
13293 #ifdef HAVE_LINUX_THREADS
13294         pthread_kill_other_threads_np();
13295 #endif
13296
13297         return 0;
13298
13299 ; return 0; }
13300 EOF
13301 if { (eval echo configure:13302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13302   rm -rf conftest*
13303   ol_cv_pthread_lib_lpthread_woff=yes
13304 else
13305   echo "configure: failed program was:" >&5
13306   cat conftest.$ac_ext >&5
13307   rm -rf conftest*
13308   ol_cv_pthread_lib_lpthread_woff=no
13309 fi
13310 rm -f conftest*
13311 else
13312   cat > conftest.$ac_ext <<EOF
13313 #line 13314 "configure"
13314 #include "confdefs.h"
13315 /* pthread test headers */
13316 #include <pthread.h>
13317 #if HAVE_PTHREADS < 7
13318 #include <errno.h>
13319 #endif
13320 #ifndef NULL
13321 #define NULL (void*)0
13322 #endif
13323
13324 static void *task(p)
13325         void *p;
13326 {
13327         return (void *) (p == NULL);
13328 }
13329
13330
13331 int main(argc, argv)
13332         int argc;
13333         char **argv;
13334 {
13335
13336         /* pthread test function */
13337 #ifndef PTHREAD_CREATE_DETACHED
13338 #define PTHREAD_CREATE_DETACHED 1
13339 #endif
13340         pthread_t t;
13341         int status;
13342         int detach = PTHREAD_CREATE_DETACHED;
13343
13344 #if HAVE_PTHREADS > 4
13345         /* Final pthreads */
13346         pthread_attr_t attr;
13347
13348         status = pthread_attr_init(&attr);
13349         if( status ) return status;
13350
13351 #if HAVE_PTHREADS < 7
13352         status = pthread_attr_setdetachstate(&attr, &detach);
13353         if( status < 0 ) status = errno;
13354 #else
13355         status = pthread_attr_setdetachstate(&attr, detach);
13356 #endif
13357         if( status ) return status;
13358         status = pthread_create( &t, &attr, task, NULL );
13359 #if HAVE_PTHREADS < 7
13360         if( status < 0 ) status = errno;
13361 #endif
13362         if( status ) return status;
13363 #else
13364         /* Draft 4 pthreads */
13365         status = pthread_create( &t, pthread_attr_default, task, NULL );
13366         if( status ) return errno;
13367
13368         /* give thread a chance to complete */
13369         /* it should remain joinable and hence detachable */
13370         sleep( 1 );
13371
13372         status = pthread_detach( &t );
13373         if( status ) return errno;
13374 #endif
13375
13376 #ifdef HAVE_LINUX_THREADS
13377         pthread_kill_other_threads_np();
13378 #endif
13379
13380         return 0;
13381
13382 }
13383
13384 EOF
13385 if { (eval echo configure:13386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13386 then
13387   ol_cv_pthread_lib_lpthread_woff=yes
13388 else
13389   echo "configure: failed program was:" >&5
13390   cat conftest.$ac_ext >&5
13391   rm -fr conftest*
13392   ol_cv_pthread_lib_lpthread_woff=no
13393 fi
13394 rm -fr conftest*
13395 fi
13396
13397
13398                 # restore the LIBS
13399                 LIBS="$ol_LIBS"
13400         
13401 fi
13402
13403 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13404
13405         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13406                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13407                 ol_link_threads=posix
13408         fi
13409 fi
13410
13411
13412                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13413 if test "$ol_link_threads" = no ; then
13414         # try -lpthread
13415         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13416 echo "configure:13417: checking for pthread link with -lpthread" >&5
13417 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13418   echo $ac_n "(cached) $ac_c" 1>&6
13419 else
13420   
13421                 # save the flags
13422                 ol_LIBS="$LIBS"
13423                 LIBS="-lpthread $LIBS"
13424
13425                 if test "$cross_compiling" = yes; then
13426   cat > conftest.$ac_ext <<EOF
13427 #line 13428 "configure"
13428 #include "confdefs.h"
13429 /* pthread test headers */
13430 #include <pthread.h>
13431 #if HAVE_PTHREADS < 7
13432 #include <errno.h>
13433 #endif
13434 #ifndef NULL
13435 #define NULL (void*)0
13436 #endif
13437
13438 static void *task(p)
13439         void *p;
13440 {
13441         return (void *) (p == NULL);
13442 }
13443
13444 int main() {
13445
13446         /* pthread test function */
13447 #ifndef PTHREAD_CREATE_DETACHED
13448 #define PTHREAD_CREATE_DETACHED 1
13449 #endif
13450         pthread_t t;
13451         int status;
13452         int detach = PTHREAD_CREATE_DETACHED;
13453
13454 #if HAVE_PTHREADS > 4
13455         /* Final pthreads */
13456         pthread_attr_t attr;
13457
13458         status = pthread_attr_init(&attr);
13459         if( status ) return status;
13460
13461 #if HAVE_PTHREADS < 7
13462         status = pthread_attr_setdetachstate(&attr, &detach);
13463         if( status < 0 ) status = errno;
13464 #else
13465         status = pthread_attr_setdetachstate(&attr, detach);
13466 #endif
13467         if( status ) return status;
13468         status = pthread_create( &t, &attr, task, NULL );
13469 #if HAVE_PTHREADS < 7
13470         if( status < 0 ) status = errno;
13471 #endif
13472         if( status ) return status;
13473 #else
13474         /* Draft 4 pthreads */
13475         status = pthread_create( &t, pthread_attr_default, task, NULL );
13476         if( status ) return errno;
13477
13478         /* give thread a chance to complete */
13479         /* it should remain joinable and hence detachable */
13480         sleep( 1 );
13481
13482         status = pthread_detach( &t );
13483         if( status ) return errno;
13484 #endif
13485
13486 #ifdef HAVE_LINUX_THREADS
13487         pthread_kill_other_threads_np();
13488 #endif
13489
13490         return 0;
13491
13492 ; return 0; }
13493 EOF
13494 if { (eval echo configure:13495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13495   rm -rf conftest*
13496   ol_cv_pthread_lpthread=yes
13497 else
13498   echo "configure: failed program was:" >&5
13499   cat conftest.$ac_ext >&5
13500   rm -rf conftest*
13501   ol_cv_pthread_lpthread=no
13502 fi
13503 rm -f conftest*
13504 else
13505   cat > conftest.$ac_ext <<EOF
13506 #line 13507 "configure"
13507 #include "confdefs.h"
13508 /* pthread test headers */
13509 #include <pthread.h>
13510 #if HAVE_PTHREADS < 7
13511 #include <errno.h>
13512 #endif
13513 #ifndef NULL
13514 #define NULL (void*)0
13515 #endif
13516
13517 static void *task(p)
13518         void *p;
13519 {
13520         return (void *) (p == NULL);
13521 }
13522
13523
13524 int main(argc, argv)
13525         int argc;
13526         char **argv;
13527 {
13528
13529         /* pthread test function */
13530 #ifndef PTHREAD_CREATE_DETACHED
13531 #define PTHREAD_CREATE_DETACHED 1
13532 #endif
13533         pthread_t t;
13534         int status;
13535         int detach = PTHREAD_CREATE_DETACHED;
13536
13537 #if HAVE_PTHREADS > 4
13538         /* Final pthreads */
13539         pthread_attr_t attr;
13540
13541         status = pthread_attr_init(&attr);
13542         if( status ) return status;
13543
13544 #if HAVE_PTHREADS < 7
13545         status = pthread_attr_setdetachstate(&attr, &detach);
13546         if( status < 0 ) status = errno;
13547 #else
13548         status = pthread_attr_setdetachstate(&attr, detach);
13549 #endif
13550         if( status ) return status;
13551         status = pthread_create( &t, &attr, task, NULL );
13552 #if HAVE_PTHREADS < 7
13553         if( status < 0 ) status = errno;
13554 #endif
13555         if( status ) return status;
13556 #else
13557         /* Draft 4 pthreads */
13558         status = pthread_create( &t, pthread_attr_default, task, NULL );
13559         if( status ) return errno;
13560
13561         /* give thread a chance to complete */
13562         /* it should remain joinable and hence detachable */
13563         sleep( 1 );
13564
13565         status = pthread_detach( &t );
13566         if( status ) return errno;
13567 #endif
13568
13569 #ifdef HAVE_LINUX_THREADS
13570         pthread_kill_other_threads_np();
13571 #endif
13572
13573         return 0;
13574
13575 }
13576
13577 EOF
13578 if { (eval echo configure:13579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13579 then
13580   ol_cv_pthread_lpthread=yes
13581 else
13582   echo "configure: failed program was:" >&5
13583   cat conftest.$ac_ext >&5
13584   rm -fr conftest*
13585   ol_cv_pthread_lpthread=no
13586 fi
13587 rm -fr conftest*
13588 fi
13589
13590
13591                 # restore the LIBS
13592                 LIBS="$ol_LIBS"
13593         
13594 fi
13595
13596 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13597
13598         if test $ol_cv_pthread_lpthread = yes ; then
13599                 ol_link_pthreads="-lpthread"
13600                 ol_link_threads=posix
13601         fi
13602 fi
13603
13604                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13605 if test "$ol_link_threads" = no ; then
13606         # try -lc_r
13607         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13608 echo "configure:13609: checking for pthread link with -lc_r" >&5
13609 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13610   echo $ac_n "(cached) $ac_c" 1>&6
13611 else
13612   
13613                 # save the flags
13614                 ol_LIBS="$LIBS"
13615                 LIBS="-lc_r $LIBS"
13616
13617                 if test "$cross_compiling" = yes; then
13618   cat > conftest.$ac_ext <<EOF
13619 #line 13620 "configure"
13620 #include "confdefs.h"
13621 /* pthread test headers */
13622 #include <pthread.h>
13623 #if HAVE_PTHREADS < 7
13624 #include <errno.h>
13625 #endif
13626 #ifndef NULL
13627 #define NULL (void*)0
13628 #endif
13629
13630 static void *task(p)
13631         void *p;
13632 {
13633         return (void *) (p == NULL);
13634 }
13635
13636 int main() {
13637
13638         /* pthread test function */
13639 #ifndef PTHREAD_CREATE_DETACHED
13640 #define PTHREAD_CREATE_DETACHED 1
13641 #endif
13642         pthread_t t;
13643         int status;
13644         int detach = PTHREAD_CREATE_DETACHED;
13645
13646 #if HAVE_PTHREADS > 4
13647         /* Final pthreads */
13648         pthread_attr_t attr;
13649
13650         status = pthread_attr_init(&attr);
13651         if( status ) return status;
13652
13653 #if HAVE_PTHREADS < 7
13654         status = pthread_attr_setdetachstate(&attr, &detach);
13655         if( status < 0 ) status = errno;
13656 #else
13657         status = pthread_attr_setdetachstate(&attr, detach);
13658 #endif
13659         if( status ) return status;
13660         status = pthread_create( &t, &attr, task, NULL );
13661 #if HAVE_PTHREADS < 7
13662         if( status < 0 ) status = errno;
13663 #endif
13664         if( status ) return status;
13665 #else
13666         /* Draft 4 pthreads */
13667         status = pthread_create( &t, pthread_attr_default, task, NULL );
13668         if( status ) return errno;
13669
13670         /* give thread a chance to complete */
13671         /* it should remain joinable and hence detachable */
13672         sleep( 1 );
13673
13674         status = pthread_detach( &t );
13675         if( status ) return errno;
13676 #endif
13677
13678 #ifdef HAVE_LINUX_THREADS
13679         pthread_kill_other_threads_np();
13680 #endif
13681
13682         return 0;
13683
13684 ; return 0; }
13685 EOF
13686 if { (eval echo configure:13687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13687   rm -rf conftest*
13688   ol_cv_pthread_lc_r=yes
13689 else
13690   echo "configure: failed program was:" >&5
13691   cat conftest.$ac_ext >&5
13692   rm -rf conftest*
13693   ol_cv_pthread_lc_r=no
13694 fi
13695 rm -f conftest*
13696 else
13697   cat > conftest.$ac_ext <<EOF
13698 #line 13699 "configure"
13699 #include "confdefs.h"
13700 /* pthread test headers */
13701 #include <pthread.h>
13702 #if HAVE_PTHREADS < 7
13703 #include <errno.h>
13704 #endif
13705 #ifndef NULL
13706 #define NULL (void*)0
13707 #endif
13708
13709 static void *task(p)
13710         void *p;
13711 {
13712         return (void *) (p == NULL);
13713 }
13714
13715
13716 int main(argc, argv)
13717         int argc;
13718         char **argv;
13719 {
13720
13721         /* pthread test function */
13722 #ifndef PTHREAD_CREATE_DETACHED
13723 #define PTHREAD_CREATE_DETACHED 1
13724 #endif
13725         pthread_t t;
13726         int status;
13727         int detach = PTHREAD_CREATE_DETACHED;
13728
13729 #if HAVE_PTHREADS > 4
13730         /* Final pthreads */
13731         pthread_attr_t attr;
13732
13733         status = pthread_attr_init(&attr);
13734         if( status ) return status;
13735
13736 #if HAVE_PTHREADS < 7
13737         status = pthread_attr_setdetachstate(&attr, &detach);
13738         if( status < 0 ) status = errno;
13739 #else
13740         status = pthread_attr_setdetachstate(&attr, detach);
13741 #endif
13742         if( status ) return status;
13743         status = pthread_create( &t, &attr, task, NULL );
13744 #if HAVE_PTHREADS < 7
13745         if( status < 0 ) status = errno;
13746 #endif
13747         if( status ) return status;
13748 #else
13749         /* Draft 4 pthreads */
13750         status = pthread_create( &t, pthread_attr_default, task, NULL );
13751         if( status ) return errno;
13752
13753         /* give thread a chance to complete */
13754         /* it should remain joinable and hence detachable */
13755         sleep( 1 );
13756
13757         status = pthread_detach( &t );
13758         if( status ) return errno;
13759 #endif
13760
13761 #ifdef HAVE_LINUX_THREADS
13762         pthread_kill_other_threads_np();
13763 #endif
13764
13765         return 0;
13766
13767 }
13768
13769 EOF
13770 if { (eval echo configure:13771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13771 then
13772   ol_cv_pthread_lc_r=yes
13773 else
13774   echo "configure: failed program was:" >&5
13775   cat conftest.$ac_ext >&5
13776   rm -fr conftest*
13777   ol_cv_pthread_lc_r=no
13778 fi
13779 rm -fr conftest*
13780 fi
13781
13782
13783                 # restore the LIBS
13784                 LIBS="$ol_LIBS"
13785         
13786 fi
13787
13788 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13789
13790         if test $ol_cv_pthread_lc_r = yes ; then
13791                 ol_link_pthreads="-lc_r"
13792                 ol_link_threads=posix
13793         fi
13794 fi
13795
13796
13797                 # Pthread try link: -threads (ol_cv_pthread_threads)
13798 if test "$ol_link_threads" = no ; then
13799         # try -threads
13800         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13801 echo "configure:13802: checking for pthread link with -threads" >&5
13802 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13803   echo $ac_n "(cached) $ac_c" 1>&6
13804 else
13805   
13806                 # save the flags
13807                 ol_LIBS="$LIBS"
13808                 LIBS="-threads $LIBS"
13809
13810                 if test "$cross_compiling" = yes; then
13811   cat > conftest.$ac_ext <<EOF
13812 #line 13813 "configure"
13813 #include "confdefs.h"
13814 /* pthread test headers */
13815 #include <pthread.h>
13816 #if HAVE_PTHREADS < 7
13817 #include <errno.h>
13818 #endif
13819 #ifndef NULL
13820 #define NULL (void*)0
13821 #endif
13822
13823 static void *task(p)
13824         void *p;
13825 {
13826         return (void *) (p == NULL);
13827 }
13828
13829 int main() {
13830
13831         /* pthread test function */
13832 #ifndef PTHREAD_CREATE_DETACHED
13833 #define PTHREAD_CREATE_DETACHED 1
13834 #endif
13835         pthread_t t;
13836         int status;
13837         int detach = PTHREAD_CREATE_DETACHED;
13838
13839 #if HAVE_PTHREADS > 4
13840         /* Final pthreads */
13841         pthread_attr_t attr;
13842
13843         status = pthread_attr_init(&attr);
13844         if( status ) return status;
13845
13846 #if HAVE_PTHREADS < 7
13847         status = pthread_attr_setdetachstate(&attr, &detach);
13848         if( status < 0 ) status = errno;
13849 #else
13850         status = pthread_attr_setdetachstate(&attr, detach);
13851 #endif
13852         if( status ) return status;
13853         status = pthread_create( &t, &attr, task, NULL );
13854 #if HAVE_PTHREADS < 7
13855         if( status < 0 ) status = errno;
13856 #endif
13857         if( status ) return status;
13858 #else
13859         /* Draft 4 pthreads */
13860         status = pthread_create( &t, pthread_attr_default, task, NULL );
13861         if( status ) return errno;
13862
13863         /* give thread a chance to complete */
13864         /* it should remain joinable and hence detachable */
13865         sleep( 1 );
13866
13867         status = pthread_detach( &t );
13868         if( status ) return errno;
13869 #endif
13870
13871 #ifdef HAVE_LINUX_THREADS
13872         pthread_kill_other_threads_np();
13873 #endif
13874
13875         return 0;
13876
13877 ; return 0; }
13878 EOF
13879 if { (eval echo configure:13880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13880   rm -rf conftest*
13881   ol_cv_pthread_threads=yes
13882 else
13883   echo "configure: failed program was:" >&5
13884   cat conftest.$ac_ext >&5
13885   rm -rf conftest*
13886   ol_cv_pthread_threads=no
13887 fi
13888 rm -f conftest*
13889 else
13890   cat > conftest.$ac_ext <<EOF
13891 #line 13892 "configure"
13892 #include "confdefs.h"
13893 /* pthread test headers */
13894 #include <pthread.h>
13895 #if HAVE_PTHREADS < 7
13896 #include <errno.h>
13897 #endif
13898 #ifndef NULL
13899 #define NULL (void*)0
13900 #endif
13901
13902 static void *task(p)
13903         void *p;
13904 {
13905         return (void *) (p == NULL);
13906 }
13907
13908
13909 int main(argc, argv)
13910         int argc;
13911         char **argv;
13912 {
13913
13914         /* pthread test function */
13915 #ifndef PTHREAD_CREATE_DETACHED
13916 #define PTHREAD_CREATE_DETACHED 1
13917 #endif
13918         pthread_t t;
13919         int status;
13920         int detach = PTHREAD_CREATE_DETACHED;
13921
13922 #if HAVE_PTHREADS > 4
13923         /* Final pthreads */
13924         pthread_attr_t attr;
13925
13926         status = pthread_attr_init(&attr);
13927         if( status ) return status;
13928
13929 #if HAVE_PTHREADS < 7
13930         status = pthread_attr_setdetachstate(&attr, &detach);
13931         if( status < 0 ) status = errno;
13932 #else
13933         status = pthread_attr_setdetachstate(&attr, detach);
13934 #endif
13935         if( status ) return status;
13936         status = pthread_create( &t, &attr, task, NULL );
13937 #if HAVE_PTHREADS < 7
13938         if( status < 0 ) status = errno;
13939 #endif
13940         if( status ) return status;
13941 #else
13942         /* Draft 4 pthreads */
13943         status = pthread_create( &t, pthread_attr_default, task, NULL );
13944         if( status ) return errno;
13945
13946         /* give thread a chance to complete */
13947         /* it should remain joinable and hence detachable */
13948         sleep( 1 );
13949
13950         status = pthread_detach( &t );
13951         if( status ) return errno;
13952 #endif
13953
13954 #ifdef HAVE_LINUX_THREADS
13955         pthread_kill_other_threads_np();
13956 #endif
13957
13958         return 0;
13959
13960 }
13961
13962 EOF
13963 if { (eval echo configure:13964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13964 then
13965   ol_cv_pthread_threads=yes
13966 else
13967   echo "configure: failed program was:" >&5
13968   cat conftest.$ac_ext >&5
13969   rm -fr conftest*
13970   ol_cv_pthread_threads=no
13971 fi
13972 rm -fr conftest*
13973 fi
13974
13975
13976                 # restore the LIBS
13977                 LIBS="$ol_LIBS"
13978         
13979 fi
13980
13981 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13982
13983         if test $ol_cv_pthread_threads = yes ; then
13984                 ol_link_pthreads="-threads"
13985                 ol_link_threads=posix
13986         fi
13987 fi
13988
13989
13990                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13991 if test "$ol_link_threads" = no ; then
13992         # try -lpthreads -lmach -lexc -lc_r
13993         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13994 echo "configure:13995: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13995 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13996   echo $ac_n "(cached) $ac_c" 1>&6
13997 else
13998   
13999                 # save the flags
14000                 ol_LIBS="$LIBS"
14001                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14002
14003                 if test "$cross_compiling" = yes; then
14004   cat > conftest.$ac_ext <<EOF
14005 #line 14006 "configure"
14006 #include "confdefs.h"
14007 /* pthread test headers */
14008 #include <pthread.h>
14009 #if HAVE_PTHREADS < 7
14010 #include <errno.h>
14011 #endif
14012 #ifndef NULL
14013 #define NULL (void*)0
14014 #endif
14015
14016 static void *task(p)
14017         void *p;
14018 {
14019         return (void *) (p == NULL);
14020 }
14021
14022 int main() {
14023
14024         /* pthread test function */
14025 #ifndef PTHREAD_CREATE_DETACHED
14026 #define PTHREAD_CREATE_DETACHED 1
14027 #endif
14028         pthread_t t;
14029         int status;
14030         int detach = PTHREAD_CREATE_DETACHED;
14031
14032 #if HAVE_PTHREADS > 4
14033         /* Final pthreads */
14034         pthread_attr_t attr;
14035
14036         status = pthread_attr_init(&attr);
14037         if( status ) return status;
14038
14039 #if HAVE_PTHREADS < 7
14040         status = pthread_attr_setdetachstate(&attr, &detach);
14041         if( status < 0 ) status = errno;
14042 #else
14043         status = pthread_attr_setdetachstate(&attr, detach);
14044 #endif
14045         if( status ) return status;
14046         status = pthread_create( &t, &attr, task, NULL );
14047 #if HAVE_PTHREADS < 7
14048         if( status < 0 ) status = errno;
14049 #endif
14050         if( status ) return status;
14051 #else
14052         /* Draft 4 pthreads */
14053         status = pthread_create( &t, pthread_attr_default, task, NULL );
14054         if( status ) return errno;
14055
14056         /* give thread a chance to complete */
14057         /* it should remain joinable and hence detachable */
14058         sleep( 1 );
14059
14060         status = pthread_detach( &t );
14061         if( status ) return errno;
14062 #endif
14063
14064 #ifdef HAVE_LINUX_THREADS
14065         pthread_kill_other_threads_np();
14066 #endif
14067
14068         return 0;
14069
14070 ; return 0; }
14071 EOF
14072 if { (eval echo configure:14073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14073   rm -rf conftest*
14074   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14075 else
14076   echo "configure: failed program was:" >&5
14077   cat conftest.$ac_ext >&5
14078   rm -rf conftest*
14079   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14080 fi
14081 rm -f conftest*
14082 else
14083   cat > conftest.$ac_ext <<EOF
14084 #line 14085 "configure"
14085 #include "confdefs.h"
14086 /* pthread test headers */
14087 #include <pthread.h>
14088 #if HAVE_PTHREADS < 7
14089 #include <errno.h>
14090 #endif
14091 #ifndef NULL
14092 #define NULL (void*)0
14093 #endif
14094
14095 static void *task(p)
14096         void *p;
14097 {
14098         return (void *) (p == NULL);
14099 }
14100
14101
14102 int main(argc, argv)
14103         int argc;
14104         char **argv;
14105 {
14106
14107         /* pthread test function */
14108 #ifndef PTHREAD_CREATE_DETACHED
14109 #define PTHREAD_CREATE_DETACHED 1
14110 #endif
14111         pthread_t t;
14112         int status;
14113         int detach = PTHREAD_CREATE_DETACHED;
14114
14115 #if HAVE_PTHREADS > 4
14116         /* Final pthreads */
14117         pthread_attr_t attr;
14118
14119         status = pthread_attr_init(&attr);
14120         if( status ) return status;
14121
14122 #if HAVE_PTHREADS < 7
14123         status = pthread_attr_setdetachstate(&attr, &detach);
14124         if( status < 0 ) status = errno;
14125 #else
14126         status = pthread_attr_setdetachstate(&attr, detach);
14127 #endif
14128         if( status ) return status;
14129         status = pthread_create( &t, &attr, task, NULL );
14130 #if HAVE_PTHREADS < 7
14131         if( status < 0 ) status = errno;
14132 #endif
14133         if( status ) return status;
14134 #else
14135         /* Draft 4 pthreads */
14136         status = pthread_create( &t, pthread_attr_default, task, NULL );
14137         if( status ) return errno;
14138
14139         /* give thread a chance to complete */
14140         /* it should remain joinable and hence detachable */
14141         sleep( 1 );
14142
14143         status = pthread_detach( &t );
14144         if( status ) return errno;
14145 #endif
14146
14147 #ifdef HAVE_LINUX_THREADS
14148         pthread_kill_other_threads_np();
14149 #endif
14150
14151         return 0;
14152
14153 }
14154
14155 EOF
14156 if { (eval echo configure:14157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14157 then
14158   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14159 else
14160   echo "configure: failed program was:" >&5
14161   cat conftest.$ac_ext >&5
14162   rm -fr conftest*
14163   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14164 fi
14165 rm -fr conftest*
14166 fi
14167
14168
14169                 # restore the LIBS
14170                 LIBS="$ol_LIBS"
14171         
14172 fi
14173
14174 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14175
14176         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14177                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14178                 ol_link_threads=posix
14179         fi
14180 fi
14181
14182                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14183 if test "$ol_link_threads" = no ; then
14184         # try -lpthreads -lmach -lexc
14185         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14186 echo "configure:14187: checking for pthread link with -lpthreads -lmach -lexc" >&5
14187 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14188   echo $ac_n "(cached) $ac_c" 1>&6
14189 else
14190   
14191                 # save the flags
14192                 ol_LIBS="$LIBS"
14193                 LIBS="-lpthreads -lmach -lexc $LIBS"
14194
14195                 if test "$cross_compiling" = yes; then
14196   cat > conftest.$ac_ext <<EOF
14197 #line 14198 "configure"
14198 #include "confdefs.h"
14199 /* pthread test headers */
14200 #include <pthread.h>
14201 #if HAVE_PTHREADS < 7
14202 #include <errno.h>
14203 #endif
14204 #ifndef NULL
14205 #define NULL (void*)0
14206 #endif
14207
14208 static void *task(p)
14209         void *p;
14210 {
14211         return (void *) (p == NULL);
14212 }
14213
14214 int main() {
14215
14216         /* pthread test function */
14217 #ifndef PTHREAD_CREATE_DETACHED
14218 #define PTHREAD_CREATE_DETACHED 1
14219 #endif
14220         pthread_t t;
14221         int status;
14222         int detach = PTHREAD_CREATE_DETACHED;
14223
14224 #if HAVE_PTHREADS > 4
14225         /* Final pthreads */
14226         pthread_attr_t attr;
14227
14228         status = pthread_attr_init(&attr);
14229         if( status ) return status;
14230
14231 #if HAVE_PTHREADS < 7
14232         status = pthread_attr_setdetachstate(&attr, &detach);
14233         if( status < 0 ) status = errno;
14234 #else
14235         status = pthread_attr_setdetachstate(&attr, detach);
14236 #endif
14237         if( status ) return status;
14238         status = pthread_create( &t, &attr, task, NULL );
14239 #if HAVE_PTHREADS < 7
14240         if( status < 0 ) status = errno;
14241 #endif
14242         if( status ) return status;
14243 #else
14244         /* Draft 4 pthreads */
14245         status = pthread_create( &t, pthread_attr_default, task, NULL );
14246         if( status ) return errno;
14247
14248         /* give thread a chance to complete */
14249         /* it should remain joinable and hence detachable */
14250         sleep( 1 );
14251
14252         status = pthread_detach( &t );
14253         if( status ) return errno;
14254 #endif
14255
14256 #ifdef HAVE_LINUX_THREADS
14257         pthread_kill_other_threads_np();
14258 #endif
14259
14260         return 0;
14261
14262 ; return 0; }
14263 EOF
14264 if { (eval echo configure:14265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14265   rm -rf conftest*
14266   ol_cv_pthread_lpthreads_lmach_lexc=yes
14267 else
14268   echo "configure: failed program was:" >&5
14269   cat conftest.$ac_ext >&5
14270   rm -rf conftest*
14271   ol_cv_pthread_lpthreads_lmach_lexc=no
14272 fi
14273 rm -f conftest*
14274 else
14275   cat > conftest.$ac_ext <<EOF
14276 #line 14277 "configure"
14277 #include "confdefs.h"
14278 /* pthread test headers */
14279 #include <pthread.h>
14280 #if HAVE_PTHREADS < 7
14281 #include <errno.h>
14282 #endif
14283 #ifndef NULL
14284 #define NULL (void*)0
14285 #endif
14286
14287 static void *task(p)
14288         void *p;
14289 {
14290         return (void *) (p == NULL);
14291 }
14292
14293
14294 int main(argc, argv)
14295         int argc;
14296         char **argv;
14297 {
14298
14299         /* pthread test function */
14300 #ifndef PTHREAD_CREATE_DETACHED
14301 #define PTHREAD_CREATE_DETACHED 1
14302 #endif
14303         pthread_t t;
14304         int status;
14305         int detach = PTHREAD_CREATE_DETACHED;
14306
14307 #if HAVE_PTHREADS > 4
14308         /* Final pthreads */
14309         pthread_attr_t attr;
14310
14311         status = pthread_attr_init(&attr);
14312         if( status ) return status;
14313
14314 #if HAVE_PTHREADS < 7
14315         status = pthread_attr_setdetachstate(&attr, &detach);
14316         if( status < 0 ) status = errno;
14317 #else
14318         status = pthread_attr_setdetachstate(&attr, detach);
14319 #endif
14320         if( status ) return status;
14321         status = pthread_create( &t, &attr, task, NULL );
14322 #if HAVE_PTHREADS < 7
14323         if( status < 0 ) status = errno;
14324 #endif
14325         if( status ) return status;
14326 #else
14327         /* Draft 4 pthreads */
14328         status = pthread_create( &t, pthread_attr_default, task, NULL );
14329         if( status ) return errno;
14330
14331         /* give thread a chance to complete */
14332         /* it should remain joinable and hence detachable */
14333         sleep( 1 );
14334
14335         status = pthread_detach( &t );
14336         if( status ) return errno;
14337 #endif
14338
14339 #ifdef HAVE_LINUX_THREADS
14340         pthread_kill_other_threads_np();
14341 #endif
14342
14343         return 0;
14344
14345 }
14346
14347 EOF
14348 if { (eval echo configure:14349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14349 then
14350   ol_cv_pthread_lpthreads_lmach_lexc=yes
14351 else
14352   echo "configure: failed program was:" >&5
14353   cat conftest.$ac_ext >&5
14354   rm -fr conftest*
14355   ol_cv_pthread_lpthreads_lmach_lexc=no
14356 fi
14357 rm -fr conftest*
14358 fi
14359
14360
14361                 # restore the LIBS
14362                 LIBS="$ol_LIBS"
14363         
14364 fi
14365
14366 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14367
14368         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14369                 ol_link_pthreads="-lpthreads -lmach -lexc"
14370                 ol_link_threads=posix
14371         fi
14372 fi
14373
14374                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14375 if test "$ol_link_threads" = no ; then
14376         # try -lpthreads -lexc
14377         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14378 echo "configure:14379: checking for pthread link with -lpthreads -lexc" >&5
14379 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14380   echo $ac_n "(cached) $ac_c" 1>&6
14381 else
14382   
14383                 # save the flags
14384                 ol_LIBS="$LIBS"
14385                 LIBS="-lpthreads -lexc $LIBS"
14386
14387                 if test "$cross_compiling" = yes; then
14388   cat > conftest.$ac_ext <<EOF
14389 #line 14390 "configure"
14390 #include "confdefs.h"
14391 /* pthread test headers */
14392 #include <pthread.h>
14393 #if HAVE_PTHREADS < 7
14394 #include <errno.h>
14395 #endif
14396 #ifndef NULL
14397 #define NULL (void*)0
14398 #endif
14399
14400 static void *task(p)
14401         void *p;
14402 {
14403         return (void *) (p == NULL);
14404 }
14405
14406 int main() {
14407
14408         /* pthread test function */
14409 #ifndef PTHREAD_CREATE_DETACHED
14410 #define PTHREAD_CREATE_DETACHED 1
14411 #endif
14412         pthread_t t;
14413         int status;
14414         int detach = PTHREAD_CREATE_DETACHED;
14415
14416 #if HAVE_PTHREADS > 4
14417         /* Final pthreads */
14418         pthread_attr_t attr;
14419
14420         status = pthread_attr_init(&attr);
14421         if( status ) return status;
14422
14423 #if HAVE_PTHREADS < 7
14424         status = pthread_attr_setdetachstate(&attr, &detach);
14425         if( status < 0 ) status = errno;
14426 #else
14427         status = pthread_attr_setdetachstate(&attr, detach);
14428 #endif
14429         if( status ) return status;
14430         status = pthread_create( &t, &attr, task, NULL );
14431 #if HAVE_PTHREADS < 7
14432         if( status < 0 ) status = errno;
14433 #endif
14434         if( status ) return status;
14435 #else
14436         /* Draft 4 pthreads */
14437         status = pthread_create( &t, pthread_attr_default, task, NULL );
14438         if( status ) return errno;
14439
14440         /* give thread a chance to complete */
14441         /* it should remain joinable and hence detachable */
14442         sleep( 1 );
14443
14444         status = pthread_detach( &t );
14445         if( status ) return errno;
14446 #endif
14447
14448 #ifdef HAVE_LINUX_THREADS
14449         pthread_kill_other_threads_np();
14450 #endif
14451
14452         return 0;
14453
14454 ; return 0; }
14455 EOF
14456 if { (eval echo configure:14457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14457   rm -rf conftest*
14458   ol_cv_pthread_lpthreads_lexc=yes
14459 else
14460   echo "configure: failed program was:" >&5
14461   cat conftest.$ac_ext >&5
14462   rm -rf conftest*
14463   ol_cv_pthread_lpthreads_lexc=no
14464 fi
14465 rm -f conftest*
14466 else
14467   cat > conftest.$ac_ext <<EOF
14468 #line 14469 "configure"
14469 #include "confdefs.h"
14470 /* pthread test headers */
14471 #include <pthread.h>
14472 #if HAVE_PTHREADS < 7
14473 #include <errno.h>
14474 #endif
14475 #ifndef NULL
14476 #define NULL (void*)0
14477 #endif
14478
14479 static void *task(p)
14480         void *p;
14481 {
14482         return (void *) (p == NULL);
14483 }
14484
14485
14486 int main(argc, argv)
14487         int argc;
14488         char **argv;
14489 {
14490
14491         /* pthread test function */
14492 #ifndef PTHREAD_CREATE_DETACHED
14493 #define PTHREAD_CREATE_DETACHED 1
14494 #endif
14495         pthread_t t;
14496         int status;
14497         int detach = PTHREAD_CREATE_DETACHED;
14498
14499 #if HAVE_PTHREADS > 4
14500         /* Final pthreads */
14501         pthread_attr_t attr;
14502
14503         status = pthread_attr_init(&attr);
14504         if( status ) return status;
14505
14506 #if HAVE_PTHREADS < 7
14507         status = pthread_attr_setdetachstate(&attr, &detach);
14508         if( status < 0 ) status = errno;
14509 #else
14510         status = pthread_attr_setdetachstate(&attr, detach);
14511 #endif
14512         if( status ) return status;
14513         status = pthread_create( &t, &attr, task, NULL );
14514 #if HAVE_PTHREADS < 7
14515         if( status < 0 ) status = errno;
14516 #endif
14517         if( status ) return status;
14518 #else
14519         /* Draft 4 pthreads */
14520         status = pthread_create( &t, pthread_attr_default, task, NULL );
14521         if( status ) return errno;
14522
14523         /* give thread a chance to complete */
14524         /* it should remain joinable and hence detachable */
14525         sleep( 1 );
14526
14527         status = pthread_detach( &t );
14528         if( status ) return errno;
14529 #endif
14530
14531 #ifdef HAVE_LINUX_THREADS
14532         pthread_kill_other_threads_np();
14533 #endif
14534
14535         return 0;
14536
14537 }
14538
14539 EOF
14540 if { (eval echo configure:14541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14541 then
14542   ol_cv_pthread_lpthreads_lexc=yes
14543 else
14544   echo "configure: failed program was:" >&5
14545   cat conftest.$ac_ext >&5
14546   rm -fr conftest*
14547   ol_cv_pthread_lpthreads_lexc=no
14548 fi
14549 rm -fr conftest*
14550 fi
14551
14552
14553                 # restore the LIBS
14554                 LIBS="$ol_LIBS"
14555         
14556 fi
14557
14558 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14559
14560         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14561                 ol_link_pthreads="-lpthreads -lexc"
14562                 ol_link_threads=posix
14563         fi
14564 fi
14565
14566
14567                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14568 if test "$ol_link_threads" = no ; then
14569         # try -lpthreads
14570         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14571 echo "configure:14572: checking for pthread link with -lpthreads" >&5
14572 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14573   echo $ac_n "(cached) $ac_c" 1>&6
14574 else
14575   
14576                 # save the flags
14577                 ol_LIBS="$LIBS"
14578                 LIBS="-lpthreads $LIBS"
14579
14580                 if test "$cross_compiling" = yes; then
14581   cat > conftest.$ac_ext <<EOF
14582 #line 14583 "configure"
14583 #include "confdefs.h"
14584 /* pthread test headers */
14585 #include <pthread.h>
14586 #if HAVE_PTHREADS < 7
14587 #include <errno.h>
14588 #endif
14589 #ifndef NULL
14590 #define NULL (void*)0
14591 #endif
14592
14593 static void *task(p)
14594         void *p;
14595 {
14596         return (void *) (p == NULL);
14597 }
14598
14599 int main() {
14600
14601         /* pthread test function */
14602 #ifndef PTHREAD_CREATE_DETACHED
14603 #define PTHREAD_CREATE_DETACHED 1
14604 #endif
14605         pthread_t t;
14606         int status;
14607         int detach = PTHREAD_CREATE_DETACHED;
14608
14609 #if HAVE_PTHREADS > 4
14610         /* Final pthreads */
14611         pthread_attr_t attr;
14612
14613         status = pthread_attr_init(&attr);
14614         if( status ) return status;
14615
14616 #if HAVE_PTHREADS < 7
14617         status = pthread_attr_setdetachstate(&attr, &detach);
14618         if( status < 0 ) status = errno;
14619 #else
14620         status = pthread_attr_setdetachstate(&attr, detach);
14621 #endif
14622         if( status ) return status;
14623         status = pthread_create( &t, &attr, task, NULL );
14624 #if HAVE_PTHREADS < 7
14625         if( status < 0 ) status = errno;
14626 #endif
14627         if( status ) return status;
14628 #else
14629         /* Draft 4 pthreads */
14630         status = pthread_create( &t, pthread_attr_default, task, NULL );
14631         if( status ) return errno;
14632
14633         /* give thread a chance to complete */
14634         /* it should remain joinable and hence detachable */
14635         sleep( 1 );
14636
14637         status = pthread_detach( &t );
14638         if( status ) return errno;
14639 #endif
14640
14641 #ifdef HAVE_LINUX_THREADS
14642         pthread_kill_other_threads_np();
14643 #endif
14644
14645         return 0;
14646
14647 ; return 0; }
14648 EOF
14649 if { (eval echo configure:14650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14650   rm -rf conftest*
14651   ol_cv_pthread_lib_lpthreads=yes
14652 else
14653   echo "configure: failed program was:" >&5
14654   cat conftest.$ac_ext >&5
14655   rm -rf conftest*
14656   ol_cv_pthread_lib_lpthreads=no
14657 fi
14658 rm -f conftest*
14659 else
14660   cat > conftest.$ac_ext <<EOF
14661 #line 14662 "configure"
14662 #include "confdefs.h"
14663 /* pthread test headers */
14664 #include <pthread.h>
14665 #if HAVE_PTHREADS < 7
14666 #include <errno.h>
14667 #endif
14668 #ifndef NULL
14669 #define NULL (void*)0
14670 #endif
14671
14672 static void *task(p)
14673         void *p;
14674 {
14675         return (void *) (p == NULL);
14676 }
14677
14678
14679 int main(argc, argv)
14680         int argc;
14681         char **argv;
14682 {
14683
14684         /* pthread test function */
14685 #ifndef PTHREAD_CREATE_DETACHED
14686 #define PTHREAD_CREATE_DETACHED 1
14687 #endif
14688         pthread_t t;
14689         int status;
14690         int detach = PTHREAD_CREATE_DETACHED;
14691
14692 #if HAVE_PTHREADS > 4
14693         /* Final pthreads */
14694         pthread_attr_t attr;
14695
14696         status = pthread_attr_init(&attr);
14697         if( status ) return status;
14698
14699 #if HAVE_PTHREADS < 7
14700         status = pthread_attr_setdetachstate(&attr, &detach);
14701         if( status < 0 ) status = errno;
14702 #else
14703         status = pthread_attr_setdetachstate(&attr, detach);
14704 #endif
14705         if( status ) return status;
14706         status = pthread_create( &t, &attr, task, NULL );
14707 #if HAVE_PTHREADS < 7
14708         if( status < 0 ) status = errno;
14709 #endif
14710         if( status ) return status;
14711 #else
14712         /* Draft 4 pthreads */
14713         status = pthread_create( &t, pthread_attr_default, task, NULL );
14714         if( status ) return errno;
14715
14716         /* give thread a chance to complete */
14717         /* it should remain joinable and hence detachable */
14718         sleep( 1 );
14719
14720         status = pthread_detach( &t );
14721         if( status ) return errno;
14722 #endif
14723
14724 #ifdef HAVE_LINUX_THREADS
14725         pthread_kill_other_threads_np();
14726 #endif
14727
14728         return 0;
14729
14730 }
14731
14732 EOF
14733 if { (eval echo configure:14734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14734 then
14735   ol_cv_pthread_lib_lpthreads=yes
14736 else
14737   echo "configure: failed program was:" >&5
14738   cat conftest.$ac_ext >&5
14739   rm -fr conftest*
14740   ol_cv_pthread_lib_lpthreads=no
14741 fi
14742 rm -fr conftest*
14743 fi
14744
14745
14746                 # restore the LIBS
14747                 LIBS="$ol_LIBS"
14748         
14749 fi
14750
14751 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14752
14753         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14754                 ol_link_pthreads="-lpthreads"
14755                 ol_link_threads=posix
14756         fi
14757 fi
14758
14759
14760                 if test $ol_link_threads != no ; then
14761                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14762
14763                                                 save_CPPFLAGS="$CPPFLAGS"
14764                         save_LIBS="$LIBS"
14765                         LIBS="$LTHREAD_LIBS $LIBS"
14766
14767                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14768 do
14769 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14770 echo "configure:14771: checking for $ac_func" >&5
14771 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14772   echo $ac_n "(cached) $ac_c" 1>&6
14773 else
14774   cat > conftest.$ac_ext <<EOF
14775 #line 14776 "configure"
14776 #include "confdefs.h"
14777 /* System header to define __stub macros and hopefully few prototypes,
14778     which can conflict with char $ac_func(); below.  */
14779 #include <assert.h>
14780 /* Override any gcc2 internal prototype to avoid an error.  */
14781 /* We use char because int might match the return type of a gcc2
14782     builtin and then its argument prototype would still apply.  */
14783 char $ac_func();
14784 char (*f)();
14785
14786 int main() {
14787
14788 /* The GNU C library defines this for functions which it implements
14789     to always fail with ENOSYS.  Some functions are actually named
14790     something starting with __ and the normal name is an alias.  */
14791 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14792 choke me
14793 #else
14794 f = $ac_func;
14795 #endif
14796
14797 ; return 0; }
14798 EOF
14799 if { (eval echo configure:14800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14800   rm -rf conftest*
14801   eval "ac_cv_func_$ac_func=yes"
14802 else
14803   echo "configure: failed program was:" >&5
14804   cat conftest.$ac_ext >&5
14805   rm -rf conftest*
14806   eval "ac_cv_func_$ac_func=no"
14807 fi
14808 rm -f conftest*
14809 fi
14810
14811 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14812   echo "$ac_t""yes" 1>&6
14813     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14814   cat >> confdefs.h <<EOF
14815 #define $ac_tr_func 1
14816 EOF
14817  
14818 else
14819   echo "$ac_t""no" 1>&6
14820 fi
14821 done
14822
14823
14824                         if test $ac_cv_func_sched_yield = no -a \
14825                                 $ac_cv_func_pthread_yield = no -a \
14826                                 $ac_cv_func_thr_yield = no ; then
14827                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14828 echo "configure:14829: checking for sched_yield in -lrt" >&5
14829 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14830 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14831   echo $ac_n "(cached) $ac_c" 1>&6
14832 else
14833   ac_save_LIBS="$LIBS"
14834 LIBS="-lrt  $LIBS"
14835 cat > conftest.$ac_ext <<EOF
14836 #line 14837 "configure"
14837 #include "confdefs.h"
14838 /* Override any gcc2 internal prototype to avoid an error.  */
14839 /* We use char because int might match the return type of a gcc2
14840     builtin and then its argument prototype would still apply.  */
14841 char sched_yield();
14842
14843 int main() {
14844 sched_yield()
14845 ; return 0; }
14846 EOF
14847 if { (eval echo configure:14848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14848   rm -rf conftest*
14849   eval "ac_cv_lib_$ac_lib_var=yes"
14850 else
14851   echo "configure: failed program was:" >&5
14852   cat conftest.$ac_ext >&5
14853   rm -rf conftest*
14854   eval "ac_cv_lib_$ac_lib_var=no"
14855 fi
14856 rm -f conftest*
14857 LIBS="$ac_save_LIBS"
14858
14859 fi
14860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14861   echo "$ac_t""yes" 1>&6
14862   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14863                                         cat >> confdefs.h <<\EOF
14864 #define HAVE_SCHED_YIELD 1
14865 EOF
14866
14867                                         ac_cv_func_sched_yield=yes
14868 else
14869   echo "$ac_t""no" 1>&6
14870 ac_cv_func_sched_yield=no
14871 fi
14872
14873                         fi
14874                         if test $ac_cv_func_sched_yield = no -a \
14875                                 $ac_cv_func_pthread_yield = no -a \
14876                                 "$ac_cv_func_thr_yield" = no ; then
14877                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14878                         fi
14879
14880                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14881 do
14882 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14883 echo "configure:14884: checking for $ac_func" >&5
14884 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14885   echo $ac_n "(cached) $ac_c" 1>&6
14886 else
14887   cat > conftest.$ac_ext <<EOF
14888 #line 14889 "configure"
14889 #include "confdefs.h"
14890 /* System header to define __stub macros and hopefully few prototypes,
14891     which can conflict with char $ac_func(); below.  */
14892 #include <assert.h>
14893 /* Override any gcc2 internal prototype to avoid an error.  */
14894 /* We use char because int might match the return type of a gcc2
14895     builtin and then its argument prototype would still apply.  */
14896 char $ac_func();
14897 char (*f)();
14898
14899 int main() {
14900
14901 /* The GNU C library defines this for functions which it implements
14902     to always fail with ENOSYS.  Some functions are actually named
14903     something starting with __ and the normal name is an alias.  */
14904 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14905 choke me
14906 #else
14907 f = $ac_func;
14908 #endif
14909
14910 ; return 0; }
14911 EOF
14912 if { (eval echo configure:14913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14913   rm -rf conftest*
14914   eval "ac_cv_func_$ac_func=yes"
14915 else
14916   echo "configure: failed program was:" >&5
14917   cat conftest.$ac_ext >&5
14918   rm -rf conftest*
14919   eval "ac_cv_func_$ac_func=no"
14920 fi
14921 rm -f conftest*
14922 fi
14923
14924 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14925   echo "$ac_t""yes" 1>&6
14926     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14927   cat >> confdefs.h <<EOF
14928 #define $ac_tr_func 1
14929 EOF
14930  
14931 else
14932   echo "$ac_t""no" 1>&6
14933 fi
14934 done
14935
14936
14937                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14938 echo "configure:14939: checking for pthread_detach with <pthread.h>" >&5
14939 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14940   echo $ac_n "(cached) $ac_c" 1>&6
14941 else
14942   
14943                                                                 cat > conftest.$ac_ext <<EOF
14944 #line 14945 "configure"
14945 #include "confdefs.h"
14946
14947 #include <pthread.h>
14948 #ifndef NULL
14949 #define NULL (void*)0
14950 #endif
14951
14952 int main() {
14953 pthread_detach(NULL);
14954 ; return 0; }
14955 EOF
14956 if { (eval echo configure:14957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14957   rm -rf conftest*
14958   ol_cv_func_pthread_detach=yes
14959 else
14960   echo "configure: failed program was:" >&5
14961   cat conftest.$ac_ext >&5
14962   rm -rf conftest*
14963   ol_cv_func_pthread_detach=no
14964 fi
14965 rm -f conftest*
14966                         
14967 fi
14968
14969 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14970
14971                         if test $ol_cv_func_pthread_detach = no ; then
14972                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14973                         fi
14974
14975                         cat >> confdefs.h <<\EOF
14976 #define HAVE_PTHREAD_DETACH 1
14977 EOF
14978
14979
14980                                                 for ac_func in \
14981                                 pthread_setconcurrency \
14982                                 pthread_getconcurrency \
14983                                 thr_setconcurrency \
14984                                 thr_getconcurrency \
14985                         
14986 do
14987 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14988 echo "configure:14989: checking for $ac_func" >&5
14989 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14990   echo $ac_n "(cached) $ac_c" 1>&6
14991 else
14992   cat > conftest.$ac_ext <<EOF
14993 #line 14994 "configure"
14994 #include "confdefs.h"
14995 /* System header to define __stub macros and hopefully few prototypes,
14996     which can conflict with char $ac_func(); below.  */
14997 #include <assert.h>
14998 /* Override any gcc2 internal prototype to avoid an error.  */
14999 /* We use char because int might match the return type of a gcc2
15000     builtin and then its argument prototype would still apply.  */
15001 char $ac_func();
15002 char (*f)();
15003
15004 int main() {
15005
15006 /* The GNU C library defines this for functions which it implements
15007     to always fail with ENOSYS.  Some functions are actually named
15008     something starting with __ and the normal name is an alias.  */
15009 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15010 choke me
15011 #else
15012 f = $ac_func;
15013 #endif
15014
15015 ; return 0; }
15016 EOF
15017 if { (eval echo configure:15018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15018   rm -rf conftest*
15019   eval "ac_cv_func_$ac_func=yes"
15020 else
15021   echo "configure: failed program was:" >&5
15022   cat conftest.$ac_ext >&5
15023   rm -rf conftest*
15024   eval "ac_cv_func_$ac_func=no"
15025 fi
15026 rm -f conftest*
15027 fi
15028
15029 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15030   echo "$ac_t""yes" 1>&6
15031     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15032   cat >> confdefs.h <<EOF
15033 #define $ac_tr_func 1
15034 EOF
15035  
15036 else
15037   echo "$ac_t""no" 1>&6
15038 fi
15039 done
15040
15041
15042                         
15043         for ac_func in pthread_kill_other_threads_np
15044 do
15045 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15046 echo "configure:15047: checking for $ac_func" >&5
15047 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15048   echo $ac_n "(cached) $ac_c" 1>&6
15049 else
15050   cat > conftest.$ac_ext <<EOF
15051 #line 15052 "configure"
15052 #include "confdefs.h"
15053 /* System header to define __stub macros and hopefully few prototypes,
15054     which can conflict with char $ac_func(); below.  */
15055 #include <assert.h>
15056 /* Override any gcc2 internal prototype to avoid an error.  */
15057 /* We use char because int might match the return type of a gcc2
15058     builtin and then its argument prototype would still apply.  */
15059 char $ac_func();
15060 char (*f)();
15061
15062 int main() {
15063
15064 /* The GNU C library defines this for functions which it implements
15065     to always fail with ENOSYS.  Some functions are actually named
15066     something starting with __ and the normal name is an alias.  */
15067 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15068 choke me
15069 #else
15070 f = $ac_func;
15071 #endif
15072
15073 ; return 0; }
15074 EOF
15075 if { (eval echo configure:15076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15076   rm -rf conftest*
15077   eval "ac_cv_func_$ac_func=yes"
15078 else
15079   echo "configure: failed program was:" >&5
15080   cat conftest.$ac_ext >&5
15081   rm -rf conftest*
15082   eval "ac_cv_func_$ac_func=no"
15083 fi
15084 rm -f conftest*
15085 fi
15086
15087 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15088   echo "$ac_t""yes" 1>&6
15089     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15090   cat >> confdefs.h <<EOF
15091 #define $ac_tr_func 1
15092 EOF
15093  
15094 else
15095   echo "$ac_t""no" 1>&6
15096 fi
15097 done
15098
15099         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15100 echo "configure:15101: checking for LinuxThreads implementation" >&5
15101 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15102   echo $ac_n "(cached) $ac_c" 1>&6
15103 else
15104   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15105 fi
15106
15107 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15108
15109                         
15110         
15111         
15112         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15113 echo "configure:15114: checking for LinuxThreads consistency" >&5
15114 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15115   echo $ac_n "(cached) $ac_c" 1>&6
15116 else
15117   
15118                 if test $ol_cv_header_linux_threads = yes -a \
15119                         $ol_cv_sys_linux_threads = yes; then
15120                         ol_cv_linux_threads=yes
15121                 elif test $ol_cv_header_linux_threads = no -a \
15122                         $ol_cv_sys_linux_threads = no; then
15123                         ol_cv_linux_threads=no
15124                 else
15125                         ol_cv_linux_threads=error
15126                 fi
15127         
15128 fi
15129
15130 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15131
15132
15133                         if test $ol_cv_linux_threads = error; then
15134                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15135                         fi
15136
15137                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15138 echo "configure:15139: checking if pthread_create() works" >&5
15139 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15140   echo $ac_n "(cached) $ac_c" 1>&6
15141 else
15142   
15143                         if test "$cross_compiling" = yes; then
15144                                 ol_cv_pthread_create_works=yes
15145 else
15146   cat > conftest.$ac_ext <<EOF
15147 #line 15148 "configure"
15148 #include "confdefs.h"
15149 /* pthread test headers */
15150 #include <pthread.h>
15151 #if HAVE_PTHREADS < 7
15152 #include <errno.h>
15153 #endif
15154 #ifndef NULL
15155 #define NULL (void*)0
15156 #endif
15157
15158 static void *task(p)
15159         void *p;
15160 {
15161         return (void *) (p == NULL);
15162 }
15163
15164
15165 int main(argc, argv)
15166         int argc;
15167         char **argv;
15168 {
15169
15170         /* pthread test function */
15171 #ifndef PTHREAD_CREATE_DETACHED
15172 #define PTHREAD_CREATE_DETACHED 1
15173 #endif
15174         pthread_t t;
15175         int status;
15176         int detach = PTHREAD_CREATE_DETACHED;
15177
15178 #if HAVE_PTHREADS > 4
15179         /* Final pthreads */
15180         pthread_attr_t attr;
15181
15182         status = pthread_attr_init(&attr);
15183         if( status ) return status;
15184
15185 #if HAVE_PTHREADS < 7
15186         status = pthread_attr_setdetachstate(&attr, &detach);
15187         if( status < 0 ) status = errno;
15188 #else
15189         status = pthread_attr_setdetachstate(&attr, detach);
15190 #endif
15191         if( status ) return status;
15192         status = pthread_create( &t, &attr, task, NULL );
15193 #if HAVE_PTHREADS < 7
15194         if( status < 0 ) status = errno;
15195 #endif
15196         if( status ) return status;
15197 #else
15198         /* Draft 4 pthreads */
15199         status = pthread_create( &t, pthread_attr_default, task, NULL );
15200         if( status ) return errno;
15201
15202         /* give thread a chance to complete */
15203         /* it should remain joinable and hence detachable */
15204         sleep( 1 );
15205
15206         status = pthread_detach( &t );
15207         if( status ) return errno;
15208 #endif
15209
15210 #ifdef HAVE_LINUX_THREADS
15211         pthread_kill_other_threads_np();
15212 #endif
15213
15214         return 0;
15215
15216 }
15217
15218 EOF
15219 if { (eval echo configure:15220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15220 then
15221   ol_cv_pthread_create_works=yes
15222 else
15223   echo "configure: failed program was:" >&5
15224   cat conftest.$ac_ext >&5
15225   rm -fr conftest*
15226   ol_cv_pthread_create_works=no
15227 fi
15228 rm -fr conftest*
15229 fi
15230
15231 fi
15232
15233 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15234
15235                         if test $ol_cv_pthread_create_works = no ; then
15236                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15237                         fi
15238
15239                                                 if test $ol_with_yielding_select = auto ; then
15240                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15241 echo "configure:15242: checking if select yields when using pthreads" >&5
15242 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15243   echo $ac_n "(cached) $ac_c" 1>&6
15244 else
15245   
15246                                 if test "$cross_compiling" = yes; then
15247   ol_cv_pthread_select_yields=cross
15248 else
15249   cat > conftest.$ac_ext <<EOF
15250 #line 15251 "configure"
15251 #include "confdefs.h"
15252
15253 #include <sys/types.h>
15254 #include <sys/time.h>
15255 #include <unistd.h>
15256 #include <pthread.h>
15257 #ifndef NULL
15258 #define NULL (void*) 0
15259 #endif
15260
15261 static int fildes[2];
15262
15263 static void *task(p)
15264         void *p;
15265 {
15266         int i;
15267         struct timeval tv;
15268
15269         fd_set rfds;
15270
15271         tv.tv_sec=10;
15272         tv.tv_usec=0;
15273
15274         FD_ZERO(&rfds);
15275         FD_SET(fildes[0], &rfds);
15276
15277         /* we're not interested in any fds */
15278         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15279
15280         if(i < 0) {
15281                 perror("select");
15282                 exit(10);
15283         }
15284
15285         exit(0); /* if we exit here, the select blocked the whole process */
15286 }
15287
15288 int main(argc, argv)
15289         int argc;
15290         char **argv;
15291 {
15292         pthread_t t;
15293
15294         /* create a pipe to select */
15295         if(pipe(&fildes[0])) {
15296                 perror("select");
15297                 exit(1);
15298         }
15299
15300 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15301         (void) pthread_setconcurrency(2);
15302 #else
15303 #ifdef HAVE_THR_SETCONCURRENCY
15304         /* Set Solaris LWP concurrency to 2 */
15305         thr_setconcurrency(2);
15306 #endif
15307 #endif
15308
15309 #if HAVE_PTHREADS < 6
15310         pthread_create(&t, pthread_attr_default, task, NULL);
15311 #else
15312         pthread_create(&t, NULL, task, NULL);
15313 #endif
15314
15315         /* make sure task runs first */
15316 #if HAVE_THR_YIELD
15317         thr_yield();
15318 #elif defined( HAVE_SCHED_YIELD )
15319         sched_yield();
15320 #elif defined( HAVE_PTHREAD_YIELD )
15321         pthread_yield();
15322 #endif
15323
15324         exit(2);
15325 }
15326 EOF
15327 if { (eval echo configure:15328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15328 then
15329   ol_cv_pthread_select_yields=no
15330 else
15331   echo "configure: failed program was:" >&5
15332   cat conftest.$ac_ext >&5
15333   rm -fr conftest*
15334   ol_cv_pthread_select_yields=yes
15335 fi
15336 rm -fr conftest*
15337 fi
15338
15339 fi
15340
15341 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15342
15343                                 if test $ol_cv_pthread_select_yields = cross ; then
15344                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15345                                 fi
15346
15347                                 if test $ol_cv_pthread_select_yields = yes ; then
15348                                         ol_with_yielding_select=yes
15349                                 fi
15350                         fi
15351
15352                                                 CPPFLAGS="$save_CPPFLAGS"
15353                         LIBS="$save_LIBS"
15354                 else
15355                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15356                 fi
15357         fi
15358
15359         if test $ol_with_threads = posix ; then
15360                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15361         fi
15362 fi
15363
15364 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15365         -o $ol_with_threads = mach ; then
15366
15367                 for ac_hdr in mach/cthreads.h cthreads.h
15368 do
15369 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15370 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15371 echo "configure:15372: checking for $ac_hdr" >&5
15372 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15373   echo $ac_n "(cached) $ac_c" 1>&6
15374 else
15375   cat > conftest.$ac_ext <<EOF
15376 #line 15377 "configure"
15377 #include "confdefs.h"
15378 #include <$ac_hdr>
15379 EOF
15380 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15381 { (eval echo configure:15382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15382 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15383 if test -z "$ac_err"; then
15384   rm -rf conftest*
15385   eval "ac_cv_header_$ac_safe=yes"
15386 else
15387   echo "$ac_err" >&5
15388   echo "configure: failed program was:" >&5
15389   cat conftest.$ac_ext >&5
15390   rm -rf conftest*
15391   eval "ac_cv_header_$ac_safe=no"
15392 fi
15393 rm -f conftest*
15394 fi
15395 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15396   echo "$ac_t""yes" 1>&6
15397     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15398   cat >> confdefs.h <<EOF
15399 #define $ac_tr_hdr 1
15400 EOF
15401  
15402 else
15403   echo "$ac_t""no" 1>&6
15404 fi
15405 done
15406
15407         if test $ac_cv_header_mach_cthreads_h = yes ; then
15408                 ol_with_threads=found
15409
15410                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15411 echo "configure:15412: checking for cthread_fork" >&5
15412 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15413   echo $ac_n "(cached) $ac_c" 1>&6
15414 else
15415   cat > conftest.$ac_ext <<EOF
15416 #line 15417 "configure"
15417 #include "confdefs.h"
15418 /* System header to define __stub macros and hopefully few prototypes,
15419     which can conflict with char cthread_fork(); below.  */
15420 #include <assert.h>
15421 /* Override any gcc2 internal prototype to avoid an error.  */
15422 /* We use char because int might match the return type of a gcc2
15423     builtin and then its argument prototype would still apply.  */
15424 char cthread_fork();
15425 char (*f)();
15426
15427 int main() {
15428
15429 /* The GNU C library defines this for functions which it implements
15430     to always fail with ENOSYS.  Some functions are actually named
15431     something starting with __ and the normal name is an alias.  */
15432 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15433 choke me
15434 #else
15435 f = cthread_fork;
15436 #endif
15437
15438 ; return 0; }
15439 EOF
15440 if { (eval echo configure:15441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15441   rm -rf conftest*
15442   eval "ac_cv_func_cthread_fork=yes"
15443 else
15444   echo "configure: failed program was:" >&5
15445   cat conftest.$ac_ext >&5
15446   rm -rf conftest*
15447   eval "ac_cv_func_cthread_fork=no"
15448 fi
15449 rm -f conftest*
15450 fi
15451
15452 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15453   echo "$ac_t""yes" 1>&6
15454   ol_link_threads=yes
15455 else
15456   echo "$ac_t""no" 1>&6
15457 fi
15458
15459
15460                 if test $ol_link_threads = no ; then
15461                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15462 echo "configure:15463: checking for cthread_fork with -all_load" >&5
15463 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15464   echo $ac_n "(cached) $ac_c" 1>&6
15465 else
15466   
15467                                                                 save_LIBS="$LIBS"
15468                                 LIBS="-all_load $LIBS"
15469                                 cat > conftest.$ac_ext <<EOF
15470 #line 15471 "configure"
15471 #include "confdefs.h"
15472 #include <mach/cthreads.h>
15473 int main() {
15474
15475                                         cthread_fork((void *)0, (void *)0);
15476                                         
15477 ; return 0; }
15478 EOF
15479 if { (eval echo configure:15480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15480   rm -rf conftest*
15481   ol_cv_cthread_all_load=yes
15482 else
15483   echo "configure: failed program was:" >&5
15484   cat conftest.$ac_ext >&5
15485   rm -rf conftest*
15486   ol_cv_cthread_all_load=no
15487 fi
15488 rm -f conftest*
15489                                                                 LIBS="$save_LIBS"
15490                         
15491 fi
15492
15493 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15494
15495                         if test $ol_cv_cthread_all_load = yes ; then
15496                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15497                                 ol_link_threads=mach
15498                                 ol_with_threads=found
15499                         fi
15500                 fi
15501
15502         elif test $ac_cv_header_cthreads_h = yes ; then
15503                                 
15504                 ol_with_threads=found
15505  
15506                                 save_LIBS="$LIBS"
15507                 LIBS="$LIBS -lthreads"
15508                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15509 echo "configure:15510: checking for cthread_fork" >&5
15510 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15511   echo $ac_n "(cached) $ac_c" 1>&6
15512 else
15513   cat > conftest.$ac_ext <<EOF
15514 #line 15515 "configure"
15515 #include "confdefs.h"
15516 /* System header to define __stub macros and hopefully few prototypes,
15517     which can conflict with char cthread_fork(); below.  */
15518 #include <assert.h>
15519 /* Override any gcc2 internal prototype to avoid an error.  */
15520 /* We use char because int might match the return type of a gcc2
15521     builtin and then its argument prototype would still apply.  */
15522 char cthread_fork();
15523 char (*f)();
15524
15525 int main() {
15526
15527 /* The GNU C library defines this for functions which it implements
15528     to always fail with ENOSYS.  Some functions are actually named
15529     something starting with __ and the normal name is an alias.  */
15530 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15531 choke me
15532 #else
15533 f = cthread_fork;
15534 #endif
15535
15536 ; return 0; }
15537 EOF
15538 if { (eval echo configure:15539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15539   rm -rf conftest*
15540   eval "ac_cv_func_cthread_fork=yes"
15541 else
15542   echo "configure: failed program was:" >&5
15543   cat conftest.$ac_ext >&5
15544   rm -rf conftest*
15545   eval "ac_cv_func_cthread_fork=no"
15546 fi
15547 rm -f conftest*
15548 fi
15549
15550 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15551   echo "$ac_t""yes" 1>&6
15552   ol_link_threads=yes
15553 else
15554   echo "$ac_t""no" 1>&6
15555 fi
15556
15557                 LIBS="$save_LIBS"
15558
15559                 if test $ol_link_threads = yes ; then
15560                         LTHREAD_LIBS="-lthreads"
15561                         ol_link_threads=mach
15562                         ol_with_threads=found
15563                 else
15564                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15565                 fi
15566
15567         elif test $ol_with_threads = mach ; then
15568                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15569         fi
15570
15571         if test $ol_link_threads = mach ; then
15572                 cat >> confdefs.h <<\EOF
15573 #define HAVE_MACH_CTHREADS 1
15574 EOF
15575
15576         elif test $ol_with_threads = found ; then
15577                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15578         fi
15579 fi
15580
15581 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15582         -o $ol_with_threads = pth ; then
15583
15584         for ac_hdr in pth.h
15585 do
15586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15587 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15588 echo "configure:15589: checking for $ac_hdr" >&5
15589 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15590   echo $ac_n "(cached) $ac_c" 1>&6
15591 else
15592   cat > conftest.$ac_ext <<EOF
15593 #line 15594 "configure"
15594 #include "confdefs.h"
15595 #include <$ac_hdr>
15596 EOF
15597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15598 { (eval echo configure:15599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15600 if test -z "$ac_err"; then
15601   rm -rf conftest*
15602   eval "ac_cv_header_$ac_safe=yes"
15603 else
15604   echo "$ac_err" >&5
15605   echo "configure: failed program was:" >&5
15606   cat conftest.$ac_ext >&5
15607   rm -rf conftest*
15608   eval "ac_cv_header_$ac_safe=no"
15609 fi
15610 rm -f conftest*
15611 fi
15612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15613   echo "$ac_t""yes" 1>&6
15614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15615   cat >> confdefs.h <<EOF
15616 #define $ac_tr_hdr 1
15617 EOF
15618  
15619 else
15620   echo "$ac_t""no" 1>&6
15621 fi
15622 done
15623
15624
15625         if test $ac_cv_header_pth_h = yes ; then
15626                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15627 echo "configure:15628: checking for pth_version in -lpth" >&5
15628 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15629 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15630   echo $ac_n "(cached) $ac_c" 1>&6
15631 else
15632   ac_save_LIBS="$LIBS"
15633 LIBS="-lpth  $LIBS"
15634 cat > conftest.$ac_ext <<EOF
15635 #line 15636 "configure"
15636 #include "confdefs.h"
15637 /* Override any gcc2 internal prototype to avoid an error.  */
15638 /* We use char because int might match the return type of a gcc2
15639     builtin and then its argument prototype would still apply.  */
15640 char pth_version();
15641
15642 int main() {
15643 pth_version()
15644 ; return 0; }
15645 EOF
15646 if { (eval echo configure:15647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15647   rm -rf conftest*
15648   eval "ac_cv_lib_$ac_lib_var=yes"
15649 else
15650   echo "configure: failed program was:" >&5
15651   cat conftest.$ac_ext >&5
15652   rm -rf conftest*
15653   eval "ac_cv_lib_$ac_lib_var=no"
15654 fi
15655 rm -f conftest*
15656 LIBS="$ac_save_LIBS"
15657
15658 fi
15659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15660   echo "$ac_t""yes" 1>&6
15661   have_pth=yes
15662 else
15663   echo "$ac_t""no" 1>&6
15664 have_pth=no
15665 fi
15666
15667
15668                 if test $have_pth = yes ; then
15669                         cat >> confdefs.h <<\EOF
15670 #define HAVE_GNU_PTH 1
15671 EOF
15672
15673                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15674                         ol_link_threads=pth
15675                         ol_with_threads=found
15676
15677                         if test $ol_with_yielding_select = auto ; then
15678                                 ol_with_yielding_select=yes
15679                         fi
15680                 fi
15681         fi
15682 fi
15683
15684 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15685         -o $ol_with_threads = lwp ; then
15686
15687                 for ac_hdr in thread.h synch.h
15688 do
15689 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15690 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15691 echo "configure:15692: checking for $ac_hdr" >&5
15692 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15693   echo $ac_n "(cached) $ac_c" 1>&6
15694 else
15695   cat > conftest.$ac_ext <<EOF
15696 #line 15697 "configure"
15697 #include "confdefs.h"
15698 #include <$ac_hdr>
15699 EOF
15700 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15701 { (eval echo configure:15702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15702 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15703 if test -z "$ac_err"; then
15704   rm -rf conftest*
15705   eval "ac_cv_header_$ac_safe=yes"
15706 else
15707   echo "$ac_err" >&5
15708   echo "configure: failed program was:" >&5
15709   cat conftest.$ac_ext >&5
15710   rm -rf conftest*
15711   eval "ac_cv_header_$ac_safe=no"
15712 fi
15713 rm -f conftest*
15714 fi
15715 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15716   echo "$ac_t""yes" 1>&6
15717     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15718   cat >> confdefs.h <<EOF
15719 #define $ac_tr_hdr 1
15720 EOF
15721  
15722 else
15723   echo "$ac_t""no" 1>&6
15724 fi
15725 done
15726
15727         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15728                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15729 echo "configure:15730: checking for thr_create in -lthread" >&5
15730 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15731 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15732   echo $ac_n "(cached) $ac_c" 1>&6
15733 else
15734   ac_save_LIBS="$LIBS"
15735 LIBS="-lthread  $LIBS"
15736 cat > conftest.$ac_ext <<EOF
15737 #line 15738 "configure"
15738 #include "confdefs.h"
15739 /* Override any gcc2 internal prototype to avoid an error.  */
15740 /* We use char because int might match the return type of a gcc2
15741     builtin and then its argument prototype would still apply.  */
15742 char thr_create();
15743
15744 int main() {
15745 thr_create()
15746 ; return 0; }
15747 EOF
15748 if { (eval echo configure:15749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15749   rm -rf conftest*
15750   eval "ac_cv_lib_$ac_lib_var=yes"
15751 else
15752   echo "configure: failed program was:" >&5
15753   cat conftest.$ac_ext >&5
15754   rm -rf conftest*
15755   eval "ac_cv_lib_$ac_lib_var=no"
15756 fi
15757 rm -f conftest*
15758 LIBS="$ac_save_LIBS"
15759
15760 fi
15761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15762   echo "$ac_t""yes" 1>&6
15763   have_thr=yes
15764 else
15765   echo "$ac_t""no" 1>&6
15766 have_thr=no
15767 fi
15768
15769
15770                 if test $have_thr = yes ; then
15771                         cat >> confdefs.h <<\EOF
15772 #define HAVE_THR 1
15773 EOF
15774
15775                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15776                         ol_link_threads=thr
15777
15778                         if test $ol_with_yielding_select = auto ; then
15779                                 ol_with_yielding_select=yes
15780                         fi
15781
15782                                                 for ac_func in \
15783                                 thr_setconcurrency \
15784                                 thr_getconcurrency \
15785                         
15786 do
15787 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15788 echo "configure:15789: checking for $ac_func" >&5
15789 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15790   echo $ac_n "(cached) $ac_c" 1>&6
15791 else
15792   cat > conftest.$ac_ext <<EOF
15793 #line 15794 "configure"
15794 #include "confdefs.h"
15795 /* System header to define __stub macros and hopefully few prototypes,
15796     which can conflict with char $ac_func(); below.  */
15797 #include <assert.h>
15798 /* Override any gcc2 internal prototype to avoid an error.  */
15799 /* We use char because int might match the return type of a gcc2
15800     builtin and then its argument prototype would still apply.  */
15801 char $ac_func();
15802 char (*f)();
15803
15804 int main() {
15805
15806 /* The GNU C library defines this for functions which it implements
15807     to always fail with ENOSYS.  Some functions are actually named
15808     something starting with __ and the normal name is an alias.  */
15809 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15810 choke me
15811 #else
15812 f = $ac_func;
15813 #endif
15814
15815 ; return 0; }
15816 EOF
15817 if { (eval echo configure:15818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15818   rm -rf conftest*
15819   eval "ac_cv_func_$ac_func=yes"
15820 else
15821   echo "configure: failed program was:" >&5
15822   cat conftest.$ac_ext >&5
15823   rm -rf conftest*
15824   eval "ac_cv_func_$ac_func=no"
15825 fi
15826 rm -f conftest*
15827 fi
15828
15829 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15830   echo "$ac_t""yes" 1>&6
15831     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15832   cat >> confdefs.h <<EOF
15833 #define $ac_tr_func 1
15834 EOF
15835  
15836 else
15837   echo "$ac_t""no" 1>&6
15838 fi
15839 done
15840
15841                 fi
15842         fi
15843
15844                 for ac_hdr in lwp/lwp.h
15845 do
15846 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15847 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15848 echo "configure:15849: checking for $ac_hdr" >&5
15849 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15850   echo $ac_n "(cached) $ac_c" 1>&6
15851 else
15852   cat > conftest.$ac_ext <<EOF
15853 #line 15854 "configure"
15854 #include "confdefs.h"
15855 #include <$ac_hdr>
15856 EOF
15857 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15858 { (eval echo configure:15859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15859 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15860 if test -z "$ac_err"; then
15861   rm -rf conftest*
15862   eval "ac_cv_header_$ac_safe=yes"
15863 else
15864   echo "$ac_err" >&5
15865   echo "configure: failed program was:" >&5
15866   cat conftest.$ac_ext >&5
15867   rm -rf conftest*
15868   eval "ac_cv_header_$ac_safe=no"
15869 fi
15870 rm -f conftest*
15871 fi
15872 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15873   echo "$ac_t""yes" 1>&6
15874     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15875   cat >> confdefs.h <<EOF
15876 #define $ac_tr_hdr 1
15877 EOF
15878  
15879 else
15880   echo "$ac_t""no" 1>&6
15881 fi
15882 done
15883
15884         if test $ac_cv_header_lwp_lwp_h = yes ; then
15885                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15886 echo "configure:15887: checking for lwp_create in -llwp" >&5
15887 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15888 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15889   echo $ac_n "(cached) $ac_c" 1>&6
15890 else
15891   ac_save_LIBS="$LIBS"
15892 LIBS="-llwp  $LIBS"
15893 cat > conftest.$ac_ext <<EOF
15894 #line 15895 "configure"
15895 #include "confdefs.h"
15896 /* Override any gcc2 internal prototype to avoid an error.  */
15897 /* We use char because int might match the return type of a gcc2
15898     builtin and then its argument prototype would still apply.  */
15899 char lwp_create();
15900
15901 int main() {
15902 lwp_create()
15903 ; return 0; }
15904 EOF
15905 if { (eval echo configure:15906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15906   rm -rf conftest*
15907   eval "ac_cv_lib_$ac_lib_var=yes"
15908 else
15909   echo "configure: failed program was:" >&5
15910   cat conftest.$ac_ext >&5
15911   rm -rf conftest*
15912   eval "ac_cv_lib_$ac_lib_var=no"
15913 fi
15914 rm -f conftest*
15915 LIBS="$ac_save_LIBS"
15916
15917 fi
15918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15919   echo "$ac_t""yes" 1>&6
15920   have_lwp=yes
15921 else
15922   echo "$ac_t""no" 1>&6
15923 have_lwp=no
15924 fi
15925
15926
15927                 if test $have_lwp = yes ; then
15928                         cat >> confdefs.h <<\EOF
15929 #define HAVE_LWP 1
15930 EOF
15931
15932                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15933                         ol_link_threads=lwp
15934
15935                         if test $ol_with_yielding_select = auto ; then
15936                                 ol_with_yielding_select=no
15937                         fi
15938                 fi
15939         fi
15940 fi
15941
15942 if test $ol_with_yielding_select = yes ; then
15943         cat >> confdefs.h <<\EOF
15944 #define HAVE_YIELDING_SELECT 1
15945 EOF
15946
15947 fi
15948
15949 if test $ol_with_threads = manual ; then
15950                 ol_link_threads=yes
15951
15952         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15953
15954         for ac_hdr in pthread.h sched.h
15955 do
15956 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15957 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15958 echo "configure:15959: checking for $ac_hdr" >&5
15959 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15960   echo $ac_n "(cached) $ac_c" 1>&6
15961 else
15962   cat > conftest.$ac_ext <<EOF
15963 #line 15964 "configure"
15964 #include "confdefs.h"
15965 #include <$ac_hdr>
15966 EOF
15967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15968 { (eval echo configure:15969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15970 if test -z "$ac_err"; then
15971   rm -rf conftest*
15972   eval "ac_cv_header_$ac_safe=yes"
15973 else
15974   echo "$ac_err" >&5
15975   echo "configure: failed program was:" >&5
15976   cat conftest.$ac_ext >&5
15977   rm -rf conftest*
15978   eval "ac_cv_header_$ac_safe=no"
15979 fi
15980 rm -f conftest*
15981 fi
15982 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15983   echo "$ac_t""yes" 1>&6
15984     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15985   cat >> confdefs.h <<EOF
15986 #define $ac_tr_hdr 1
15987 EOF
15988  
15989 else
15990   echo "$ac_t""no" 1>&6
15991 fi
15992 done
15993
15994         for ac_func in sched_yield pthread_yield
15995 do
15996 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15997 echo "configure:15998: checking for $ac_func" >&5
15998 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15999   echo $ac_n "(cached) $ac_c" 1>&6
16000 else
16001   cat > conftest.$ac_ext <<EOF
16002 #line 16003 "configure"
16003 #include "confdefs.h"
16004 /* System header to define __stub macros and hopefully few prototypes,
16005     which can conflict with char $ac_func(); below.  */
16006 #include <assert.h>
16007 /* Override any gcc2 internal prototype to avoid an error.  */
16008 /* We use char because int might match the return type of a gcc2
16009     builtin and then its argument prototype would still apply.  */
16010 char $ac_func();
16011 char (*f)();
16012
16013 int main() {
16014
16015 /* The GNU C library defines this for functions which it implements
16016     to always fail with ENOSYS.  Some functions are actually named
16017     something starting with __ and the normal name is an alias.  */
16018 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16019 choke me
16020 #else
16021 f = $ac_func;
16022 #endif
16023
16024 ; return 0; }
16025 EOF
16026 if { (eval echo configure:16027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16027   rm -rf conftest*
16028   eval "ac_cv_func_$ac_func=yes"
16029 else
16030   echo "configure: failed program was:" >&5
16031   cat conftest.$ac_ext >&5
16032   rm -rf conftest*
16033   eval "ac_cv_func_$ac_func=no"
16034 fi
16035 rm -f conftest*
16036 fi
16037
16038 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16039   echo "$ac_t""yes" 1>&6
16040     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16041   cat >> confdefs.h <<EOF
16042 #define $ac_tr_func 1
16043 EOF
16044  
16045 else
16046   echo "$ac_t""no" 1>&6
16047 fi
16048 done
16049
16050         
16051         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16052 echo "configure:16053: checking for LinuxThreads pthread.h" >&5
16053 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16054   echo $ac_n "(cached) $ac_c" 1>&6
16055 else
16056   cat > conftest.$ac_ext <<EOF
16057 #line 16058 "configure"
16058 #include "confdefs.h"
16059 #include <pthread.h>
16060 EOF
16061 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16062   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16063   rm -rf conftest*
16064   ol_cv_header_linux_threads=yes
16065 else
16066   rm -rf conftest*
16067   ol_cv_header_linux_threads=no
16068 fi
16069 rm -f conftest*
16070
16071                 
16072 fi
16073
16074 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16075         if test $ol_cv_header_linux_threads = yes; then
16076                 cat >> confdefs.h <<\EOF
16077 #define HAVE_LINUX_THREADS 1
16078 EOF
16079
16080         fi
16081
16082
16083         for ac_hdr in mach/cthreads.h
16084 do
16085 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16086 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16087 echo "configure:16088: checking for $ac_hdr" >&5
16088 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16089   echo $ac_n "(cached) $ac_c" 1>&6
16090 else
16091   cat > conftest.$ac_ext <<EOF
16092 #line 16093 "configure"
16093 #include "confdefs.h"
16094 #include <$ac_hdr>
16095 EOF
16096 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16097 { (eval echo configure:16098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16098 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16099 if test -z "$ac_err"; then
16100   rm -rf conftest*
16101   eval "ac_cv_header_$ac_safe=yes"
16102 else
16103   echo "$ac_err" >&5
16104   echo "configure: failed program was:" >&5
16105   cat conftest.$ac_ext >&5
16106   rm -rf conftest*
16107   eval "ac_cv_header_$ac_safe=no"
16108 fi
16109 rm -f conftest*
16110 fi
16111 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16112   echo "$ac_t""yes" 1>&6
16113     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16114   cat >> confdefs.h <<EOF
16115 #define $ac_tr_hdr 1
16116 EOF
16117  
16118 else
16119   echo "$ac_t""no" 1>&6
16120 fi
16121 done
16122
16123         for ac_hdr in lwp/lwp.h
16124 do
16125 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16126 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16127 echo "configure:16128: checking for $ac_hdr" >&5
16128 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16129   echo $ac_n "(cached) $ac_c" 1>&6
16130 else
16131   cat > conftest.$ac_ext <<EOF
16132 #line 16133 "configure"
16133 #include "confdefs.h"
16134 #include <$ac_hdr>
16135 EOF
16136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16137 { (eval echo configure:16138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16139 if test -z "$ac_err"; then
16140   rm -rf conftest*
16141   eval "ac_cv_header_$ac_safe=yes"
16142 else
16143   echo "$ac_err" >&5
16144   echo "configure: failed program was:" >&5
16145   cat conftest.$ac_ext >&5
16146   rm -rf conftest*
16147   eval "ac_cv_header_$ac_safe=no"
16148 fi
16149 rm -f conftest*
16150 fi
16151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16152   echo "$ac_t""yes" 1>&6
16153     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16154   cat >> confdefs.h <<EOF
16155 #define $ac_tr_hdr 1
16156 EOF
16157  
16158 else
16159   echo "$ac_t""no" 1>&6
16160 fi
16161 done
16162
16163         for ac_hdr in thread.h synch.h
16164 do
16165 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16166 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16167 echo "configure:16168: checking for $ac_hdr" >&5
16168 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16169   echo $ac_n "(cached) $ac_c" 1>&6
16170 else
16171   cat > conftest.$ac_ext <<EOF
16172 #line 16173 "configure"
16173 #include "confdefs.h"
16174 #include <$ac_hdr>
16175 EOF
16176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16177 { (eval echo configure:16178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16179 if test -z "$ac_err"; then
16180   rm -rf conftest*
16181   eval "ac_cv_header_$ac_safe=yes"
16182 else
16183   echo "$ac_err" >&5
16184   echo "configure: failed program was:" >&5
16185   cat conftest.$ac_ext >&5
16186   rm -rf conftest*
16187   eval "ac_cv_header_$ac_safe=no"
16188 fi
16189 rm -f conftest*
16190 fi
16191 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16192   echo "$ac_t""yes" 1>&6
16193     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16194   cat >> confdefs.h <<EOF
16195 #define $ac_tr_hdr 1
16196 EOF
16197  
16198 else
16199   echo "$ac_t""no" 1>&6
16200 fi
16201 done
16202
16203 fi
16204
16205 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16206                         cat >> confdefs.h <<\EOF
16207 #define REENTRANT 1
16208 EOF
16209
16210         cat >> confdefs.h <<\EOF
16211 #define _REENTRANT 1
16212 EOF
16213
16214         cat >> confdefs.h <<\EOF
16215 #define THREAD_SAFE 1
16216 EOF
16217
16218         cat >> confdefs.h <<\EOF
16219 #define _THREAD_SAFE 1
16220 EOF
16221
16222         cat >> confdefs.h <<\EOF
16223 #define THREADSAFE 1
16224 EOF
16225
16226         cat >> confdefs.h <<\EOF
16227 #define _THREADSAFE 1
16228 EOF
16229
16230         cat >> confdefs.h <<\EOF
16231 #define _SGI_MP_SOURCE 1
16232 EOF
16233
16234
16235                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16236 echo "configure:16237: checking for thread specific errno" >&5
16237 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16238   echo $ac_n "(cached) $ac_c" 1>&6
16239 else
16240   
16241                 cat > conftest.$ac_ext <<EOF
16242 #line 16243 "configure"
16243 #include "confdefs.h"
16244 #include <errno.h>
16245 int main() {
16246 errno = 0;
16247 ; return 0; }
16248 EOF
16249 if { (eval echo configure:16250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16250   rm -rf conftest*
16251   ol_cv_errno_thread_specific=yes
16252 else
16253   echo "configure: failed program was:" >&5
16254   cat conftest.$ac_ext >&5
16255   rm -rf conftest*
16256   ol_cv_errno_thread_specific=no
16257 fi
16258 rm -f conftest*
16259         
16260 fi
16261
16262 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16263
16264                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16265 echo "configure:16266: checking for thread specific h_errno" >&5
16266 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16267   echo $ac_n "(cached) $ac_c" 1>&6
16268 else
16269   
16270                 cat > conftest.$ac_ext <<EOF
16271 #line 16272 "configure"
16272 #include "confdefs.h"
16273 #include <netdb.h>
16274 int main() {
16275 h_errno = 0;
16276 ; return 0; }
16277 EOF
16278 if { (eval echo configure:16279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16279   rm -rf conftest*
16280   ol_cv_h_errno_thread_specific=yes
16281 else
16282   echo "configure: failed program was:" >&5
16283   cat conftest.$ac_ext >&5
16284   rm -rf conftest*
16285   ol_cv_h_errno_thread_specific=no
16286 fi
16287 rm -f conftest*
16288         
16289 fi
16290
16291 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16292
16293         if test $ol_cv_errno_thread_specific != yes \
16294                 -o $ol_cv_h_errno_thread_specific != yes ; then
16295                 LIBS="$LTHREAD_LIBS $LIBS"
16296                 LTHREAD_LIBS=""
16297         fi
16298
16299 fi  
16300
16301 if test $ol_link_threads = no ; then
16302         if test $ol_with_threads = yes ; then
16303                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16304         fi
16305
16306         if test $ol_with_threads = auto ; then
16307                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16308                 ol_with_threads=no
16309         fi
16310
16311         cat >> confdefs.h <<\EOF
16312 #define NO_THREADS 1
16313 EOF
16314
16315         LTHREAD_LIBS=""
16316 fi
16317
16318 if test $ol_link_threads != no ; then
16319         cat >> confdefs.h <<\EOF
16320 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16321 EOF
16322
16323 fi
16324
16325 for ac_func in \
16326         ctime_r                 \
16327         gethostbyname_r gethostbyaddr_r \
16328
16329 do
16330 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16331 echo "configure:16332: checking for $ac_func" >&5
16332 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16333   echo $ac_n "(cached) $ac_c" 1>&6
16334 else
16335   cat > conftest.$ac_ext <<EOF
16336 #line 16337 "configure"
16337 #include "confdefs.h"
16338 /* System header to define __stub macros and hopefully few prototypes,
16339     which can conflict with char $ac_func(); below.  */
16340 #include <assert.h>
16341 /* Override any gcc2 internal prototype to avoid an error.  */
16342 /* We use char because int might match the return type of a gcc2
16343     builtin and then its argument prototype would still apply.  */
16344 char $ac_func();
16345 char (*f)();
16346
16347 int main() {
16348
16349 /* The GNU C library defines this for functions which it implements
16350     to always fail with ENOSYS.  Some functions are actually named
16351     something starting with __ and the normal name is an alias.  */
16352 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16353 choke me
16354 #else
16355 f = $ac_func;
16356 #endif
16357
16358 ; return 0; }
16359 EOF
16360 if { (eval echo configure:16361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16361   rm -rf conftest*
16362   eval "ac_cv_func_$ac_func=yes"
16363 else
16364   echo "configure: failed program was:" >&5
16365   cat conftest.$ac_ext >&5
16366   rm -rf conftest*
16367   eval "ac_cv_func_$ac_func=no"
16368 fi
16369 rm -f conftest*
16370 fi
16371
16372 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16373   echo "$ac_t""yes" 1>&6
16374     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16375   cat >> confdefs.h <<EOF
16376 #define $ac_tr_func 1
16377 EOF
16378  
16379 else
16380   echo "$ac_t""no" 1>&6
16381 fi
16382 done
16383
16384
16385 if test "$ac_cv_func_ctime_r" = no ; then
16386         ol_cv_func_ctime_r_nargs=0
16387 else
16388         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16389 echo "configure:16390: checking number of arguments of ctime_r" >&5
16390 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16391   echo $ac_n "(cached) $ac_c" 1>&6
16392 else
16393   cat > conftest.$ac_ext <<EOF
16394 #line 16395 "configure"
16395 #include "confdefs.h"
16396 #include <time.h>
16397 int main() {
16398 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16399 ; return 0; }
16400 EOF
16401 if { (eval echo configure:16402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16402   rm -rf conftest*
16403   ol_cv_func_ctime_r_nargs3=yes
16404 else
16405   echo "configure: failed program was:" >&5
16406   cat conftest.$ac_ext >&5
16407   rm -rf conftest*
16408   ol_cv_func_ctime_r_nargs3=no
16409 fi
16410 rm -f conftest*
16411
16412         cat > conftest.$ac_ext <<EOF
16413 #line 16414 "configure"
16414 #include "confdefs.h"
16415 #include <time.h>
16416 int main() {
16417 time_t ti; char *buffer; ctime_r(&ti,buffer);
16418 ; return 0; }
16419 EOF
16420 if { (eval echo configure:16421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16421   rm -rf conftest*
16422   ol_cv_func_ctime_r_nargs2=yes
16423 else
16424   echo "configure: failed program was:" >&5
16425   cat conftest.$ac_ext >&5
16426   rm -rf conftest*
16427   ol_cv_func_ctime_r_nargs2=no
16428 fi
16429 rm -f conftest*
16430
16431         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16432                 $ol_cv_func_ctime_r_nargs2 = no ; then
16433
16434                 ol_cv_func_ctime_r_nargs=3
16435
16436         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16437                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16438
16439                 ol_cv_func_ctime_r_nargs=2
16440
16441         else
16442                 ol_cv_func_ctime_r_nargs=0
16443         fi
16444   
16445 fi
16446
16447 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16448
16449   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16450         cat >> confdefs.h <<EOF
16451 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16452 EOF
16453
16454   fi
16455
16456 fi
16457
16458 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16459         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16460 echo "configure:16461: checking number of arguments of gethostbyname_r" >&5
16461 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16462   echo $ac_n "(cached) $ac_c" 1>&6
16463 else
16464   cat > conftest.$ac_ext <<EOF
16465 #line 16466 "configure"
16466 #include "confdefs.h"
16467 #include <sys/types.h>
16468 #include <sys/socket.h>
16469 #include <netinet/in.h>
16470 #include <netdb.h>
16471 #define BUFSIZE (sizeof(struct hostent)+10)
16472 int main() {
16473 struct hostent hent; char buffer[BUFSIZE];
16474                 int bufsize=BUFSIZE;int h_errno;
16475                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16476                         buffer, bufsize, &h_errno);
16477 ; return 0; }
16478 EOF
16479 if { (eval echo configure:16480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16480   rm -rf conftest*
16481   ol_cv_func_gethostbyname_r_nargs5=yes
16482 else
16483   echo "configure: failed program was:" >&5
16484   cat conftest.$ac_ext >&5
16485   rm -rf conftest*
16486   ol_cv_func_gethostbyname_r_nargs5=no
16487 fi
16488 rm -f conftest*
16489
16490         cat > conftest.$ac_ext <<EOF
16491 #line 16492 "configure"
16492 #include "confdefs.h"
16493 #include <sys/types.h>
16494 #include <sys/socket.h>
16495 #include <netinet/in.h>
16496 #include <netdb.h>
16497 #define BUFSIZE (sizeof(struct hostent)+10)
16498 int main() {
16499 struct hostent hent;struct hostent *rhent;
16500                 char buffer[BUFSIZE];
16501                 int bufsize=BUFSIZE;int h_errno;
16502                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16503                         &rhent, &h_errno);
16504 ; return 0; }
16505 EOF
16506 if { (eval echo configure:16507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16507   rm -rf conftest*
16508   ol_cv_func_gethostbyname_r_nargs6=yes
16509 else
16510   echo "configure: failed program was:" >&5
16511   cat conftest.$ac_ext >&5
16512   rm -rf conftest*
16513   ol_cv_func_gethostbyname_r_nargs6=no
16514 fi
16515 rm -f conftest*
16516
16517         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16518                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16519
16520                 ol_cv_func_gethostbyname_r_nargs=5
16521
16522         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16523                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16524
16525                 ol_cv_func_gethostbyname_r_nargs=6
16526
16527         else
16528                 ol_cv_func_gethostbyname_r_nargs=0
16529         fi
16530   
16531 fi
16532
16533 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16534   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16535         cat >> confdefs.h <<EOF
16536 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16537 EOF
16538
16539   fi
16540
16541 else
16542         ol_cv_func_gethostbyname_r_nargs=0
16543 fi
16544  
16545 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16546         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16547 echo "configure:16548: checking number of arguments of gethostbyaddr_r" >&5
16548 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16549   echo $ac_n "(cached) $ac_c" 1>&6
16550 else
16551   cat > conftest.$ac_ext <<EOF
16552 #line 16553 "configure"
16553 #include "confdefs.h"
16554 #include <sys/types.h>
16555 #include <sys/socket.h>
16556 #include <netinet/in.h>
16557 #include <netdb.h>
16558 #define BUFSIZE (sizeof(struct hostent)+10)
16559 int main() {
16560 struct hostent hent; char buffer[BUFSIZE]; 
16561             struct in_addr add;
16562             size_t alen=sizeof(struct in_addr);
16563             int bufsize=BUFSIZE;int h_errno;
16564                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16565                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16566 ; return 0; }
16567 EOF
16568 if { (eval echo configure:16569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16569   rm -rf conftest*
16570   ol_cv_func_gethostbyaddr_r_nargs7=yes
16571 else
16572   echo "configure: failed program was:" >&5
16573   cat conftest.$ac_ext >&5
16574   rm -rf conftest*
16575   ol_cv_func_gethostbyaddr_r_nargs7=no
16576 fi
16577 rm -f conftest*
16578
16579         cat > conftest.$ac_ext <<EOF
16580 #line 16581 "configure"
16581 #include "confdefs.h"
16582 #include <sys/types.h>
16583 #include <sys/socket.h>
16584 #include <netinet/in.h>
16585 #include <netdb.h>
16586 #define BUFSIZE (sizeof(struct hostent)+10)
16587 int main() {
16588 struct hostent hent;
16589                 struct hostent *rhent; char buffer[BUFSIZE]; 
16590                 struct in_addr add;
16591                 size_t alen=sizeof(struct in_addr);
16592                 int bufsize=BUFSIZE;int h_errno;
16593                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16594                         alen, AF_INET, &hent, buffer, bufsize, 
16595                         &rhent, &h_errno);
16596 ; return 0; }
16597 EOF
16598 if { (eval echo configure:16599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16599   rm -rf conftest*
16600   ol_cv_func_gethostbyaddr_r_nargs8=yes
16601 else
16602   echo "configure: failed program was:" >&5
16603   cat conftest.$ac_ext >&5
16604   rm -rf conftest*
16605   ol_cv_func_gethostbyaddr_r_nargs8=no
16606 fi
16607 rm -f conftest*
16608
16609         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16610                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16611
16612                 ol_cv_func_gethostbyaddr_r_nargs=7
16613
16614         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16615                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16616
16617                 ol_cv_func_gethostbyaddr_r_nargs=8
16618
16619         else
16620                 ol_cv_func_gethostbyaddr_r_nargs=0
16621         fi
16622   
16623 fi
16624
16625 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16626   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16627     cat >> confdefs.h <<EOF
16628 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16629 EOF
16630
16631   fi
16632
16633 else
16634         ol_cv_func_gethostbyaddr_r_nargs=0
16635 fi
16636
16637 ol_link_ldbm=no 
16638
16639 if test $ol_with_ldbm_api = auto \
16640         -o $ol_with_ldbm_api = berkeley \
16641         -o $ol_with_ldbm_api = bcompat ; then
16642
16643         if test $ol_with_ldbm_api = bcompat; then \
16644                 for ac_hdr in db_185.h db.h
16645 do
16646 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16647 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16648 echo "configure:16649: checking for $ac_hdr" >&5
16649 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16650   echo $ac_n "(cached) $ac_c" 1>&6
16651 else
16652   cat > conftest.$ac_ext <<EOF
16653 #line 16654 "configure"
16654 #include "confdefs.h"
16655 #include <$ac_hdr>
16656 EOF
16657 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16658 { (eval echo configure:16659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16659 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16660 if test -z "$ac_err"; then
16661   rm -rf conftest*
16662   eval "ac_cv_header_$ac_safe=yes"
16663 else
16664   echo "$ac_err" >&5
16665   echo "configure: failed program was:" >&5
16666   cat conftest.$ac_ext >&5
16667   rm -rf conftest*
16668   eval "ac_cv_header_$ac_safe=no"
16669 fi
16670 rm -f conftest*
16671 fi
16672 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16673   echo "$ac_t""yes" 1>&6
16674     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16675   cat >> confdefs.h <<EOF
16676 #define $ac_tr_hdr 1
16677 EOF
16678  
16679 else
16680   echo "$ac_t""no" 1>&6
16681 fi
16682 done
16683
16684 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16685         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16686 echo "configure:16687: checking if Berkeley DB header compatibility" >&5
16687 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16688   echo $ac_n "(cached) $ac_c" 1>&6
16689 else
16690   
16691                 cat > conftest.$ac_ext <<EOF
16692 #line 16693 "configure"
16693 #include "confdefs.h"
16694
16695 #if HAVE_DB_185_H
16696 #       include <db_185.h>
16697 #else
16698 #       include <db.h>
16699 #endif
16700
16701  /* this check could be improved */
16702 #ifndef DB_VERSION_MAJOR
16703 #       define DB_VERSION_MAJOR 1
16704 #endif
16705
16706 #if DB_VERSION_MAJOR == 1 
16707         __db_version_1
16708 #endif
16709
16710 EOF
16711 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16712   egrep "__db_version_1" >/dev/null 2>&1; then
16713   rm -rf conftest*
16714   ol_cv_header_db1=yes
16715 else
16716   rm -rf conftest*
16717   ol_cv_header_db1=no
16718 fi
16719 rm -f conftest*
16720
16721 fi
16722
16723 echo "$ac_t""$ol_cv_header_db1" 1>&6
16724
16725         if test $ol_cv_header_db1 = yes ; then
16726                 ol_cv_lib_db=no
16727 if test $ol_cv_lib_db = no ; then
16728         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16729 echo "configure:16730: checking for Berkeley DB link (default)" >&5
16730 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16731   echo $ac_n "(cached) $ac_c" 1>&6
16732 else
16733   
16734         ol_DB_LIB=
16735         ol_LIBS=$LIBS
16736         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16737
16738         cat > conftest.$ac_ext <<EOF
16739 #line 16740 "configure"
16740 #include "confdefs.h"
16741
16742 #ifdef HAVE_DB_185_H
16743 # include <db_185.h>
16744 #else
16745 # include <db.h>
16746 #endif
16747
16748 #ifndef DB_VERSION_MAJOR
16749 # define DB_VERSION_MAJOR 1
16750 #endif
16751
16752 #ifndef NULL
16753 #define NULL ((void*)0)
16754 #endif
16755
16756 int main() {
16757
16758 #if DB_VERSION_MAJOR > 1
16759         {
16760                 char *version;
16761                 int major, minor, patch;
16762
16763                 version = db_version( &major, &minor, &patch );
16764
16765                 if( major != DB_VERSION_MAJOR ||
16766                         minor < DB_VERSION_MINOR )
16767                 {
16768                         printf("Berkeley DB version mismatch\n"
16769                                 "\texpected: %s\n\tgot: %s\n",
16770                                 DB_VERSION_STRING, version);
16771                         return 1;
16772                 }
16773         }
16774 #endif
16775
16776 #if DB_VERSION_MAJOR > 2
16777         db_env_create( NULL, 0 );
16778 #elif DB_VERSION_MAJOR > 1
16779         db_appexit( NULL );
16780 #else
16781         (void) dbopen( NULL, 0, 0, 0, NULL);
16782 #endif
16783
16784 ; return 0; }
16785 EOF
16786 if { (eval echo configure:16787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16787   rm -rf conftest*
16788   ol_cv_db_none=yes
16789 else
16790   echo "configure: failed program was:" >&5
16791   cat conftest.$ac_ext >&5
16792   rm -rf conftest*
16793   ol_cv_db_none=no
16794 fi
16795 rm -f conftest*
16796
16797         LIBS="$ol_LIBS"
16798
16799 fi
16800
16801 echo "$ac_t""$ol_cv_db_none" 1>&6
16802
16803         if test $ol_cv_db_none = yes ; then
16804                 ol_cv_lib_db=yes
16805         fi
16806 fi
16807
16808 if test $ol_cv_lib_db = no ; then
16809         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16810 echo "configure:16811: checking for Berkeley DB link (-ldb41)" >&5
16811 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16812   echo $ac_n "(cached) $ac_c" 1>&6
16813 else
16814   
16815         ol_DB_LIB=-ldb41
16816         ol_LIBS=$LIBS
16817         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16818
16819         cat > conftest.$ac_ext <<EOF
16820 #line 16821 "configure"
16821 #include "confdefs.h"
16822
16823 #ifdef HAVE_DB_185_H
16824 # include <db_185.h>
16825 #else
16826 # include <db.h>
16827 #endif
16828
16829 #ifndef DB_VERSION_MAJOR
16830 # define DB_VERSION_MAJOR 1
16831 #endif
16832
16833 #ifndef NULL
16834 #define NULL ((void*)0)
16835 #endif
16836
16837 int main() {
16838
16839 #if DB_VERSION_MAJOR > 1
16840         {
16841                 char *version;
16842                 int major, minor, patch;
16843
16844                 version = db_version( &major, &minor, &patch );
16845
16846                 if( major != DB_VERSION_MAJOR ||
16847                         minor < DB_VERSION_MINOR )
16848                 {
16849                         printf("Berkeley DB version mismatch\n"
16850                                 "\texpected: %s\n\tgot: %s\n",
16851                                 DB_VERSION_STRING, version);
16852                         return 1;
16853                 }
16854         }
16855 #endif
16856
16857 #if DB_VERSION_MAJOR > 2
16858         db_env_create( NULL, 0 );
16859 #elif DB_VERSION_MAJOR > 1
16860         db_appexit( NULL );
16861 #else
16862         (void) dbopen( NULL, 0, 0, 0, NULL);
16863 #endif
16864
16865 ; return 0; }
16866 EOF
16867 if { (eval echo configure:16868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16868   rm -rf conftest*
16869   ol_cv_db_db41=yes
16870 else
16871   echo "configure: failed program was:" >&5
16872   cat conftest.$ac_ext >&5
16873   rm -rf conftest*
16874   ol_cv_db_db41=no
16875 fi
16876 rm -f conftest*
16877
16878         LIBS="$ol_LIBS"
16879
16880 fi
16881
16882 echo "$ac_t""$ol_cv_db_db41" 1>&6
16883
16884         if test $ol_cv_db_db41 = yes ; then
16885                 ol_cv_lib_db=-ldb41
16886         fi
16887 fi
16888
16889 if test $ol_cv_lib_db = no ; then
16890         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16891 echo "configure:16892: checking for Berkeley DB link (-ldb-41)" >&5
16892 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16893   echo $ac_n "(cached) $ac_c" 1>&6
16894 else
16895   
16896         ol_DB_LIB=-ldb-41
16897         ol_LIBS=$LIBS
16898         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16899
16900         cat > conftest.$ac_ext <<EOF
16901 #line 16902 "configure"
16902 #include "confdefs.h"
16903
16904 #ifdef HAVE_DB_185_H
16905 # include <db_185.h>
16906 #else
16907 # include <db.h>
16908 #endif
16909
16910 #ifndef DB_VERSION_MAJOR
16911 # define DB_VERSION_MAJOR 1
16912 #endif
16913
16914 #ifndef NULL
16915 #define NULL ((void*)0)
16916 #endif
16917
16918 int main() {
16919
16920 #if DB_VERSION_MAJOR > 1
16921         {
16922                 char *version;
16923                 int major, minor, patch;
16924
16925                 version = db_version( &major, &minor, &patch );
16926
16927                 if( major != DB_VERSION_MAJOR ||
16928                         minor < DB_VERSION_MINOR )
16929                 {
16930                         printf("Berkeley DB version mismatch\n"
16931                                 "\texpected: %s\n\tgot: %s\n",
16932                                 DB_VERSION_STRING, version);
16933                         return 1;
16934                 }
16935         }
16936 #endif
16937
16938 #if DB_VERSION_MAJOR > 2
16939         db_env_create( NULL, 0 );
16940 #elif DB_VERSION_MAJOR > 1
16941         db_appexit( NULL );
16942 #else
16943         (void) dbopen( NULL, 0, 0, 0, NULL);
16944 #endif
16945
16946 ; return 0; }
16947 EOF
16948 if { (eval echo configure:16949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16949   rm -rf conftest*
16950   ol_cv_db_db_41=yes
16951 else
16952   echo "configure: failed program was:" >&5
16953   cat conftest.$ac_ext >&5
16954   rm -rf conftest*
16955   ol_cv_db_db_41=no
16956 fi
16957 rm -f conftest*
16958
16959         LIBS="$ol_LIBS"
16960
16961 fi
16962
16963 echo "$ac_t""$ol_cv_db_db_41" 1>&6
16964
16965         if test $ol_cv_db_db_41 = yes ; then
16966                 ol_cv_lib_db=-ldb-41
16967         fi
16968 fi
16969
16970 if test $ol_cv_lib_db = no ; then
16971         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16972 echo "configure:16973: checking for Berkeley DB link (-ldb4)" >&5
16973 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16974   echo $ac_n "(cached) $ac_c" 1>&6
16975 else
16976   
16977         ol_DB_LIB=-ldb4
16978         ol_LIBS=$LIBS
16979         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16980
16981         cat > conftest.$ac_ext <<EOF
16982 #line 16983 "configure"
16983 #include "confdefs.h"
16984
16985 #ifdef HAVE_DB_185_H
16986 # include <db_185.h>
16987 #else
16988 # include <db.h>
16989 #endif
16990
16991 #ifndef DB_VERSION_MAJOR
16992 # define DB_VERSION_MAJOR 1
16993 #endif
16994
16995 #ifndef NULL
16996 #define NULL ((void*)0)
16997 #endif
16998
16999 int main() {
17000
17001 #if DB_VERSION_MAJOR > 1
17002         {
17003                 char *version;
17004                 int major, minor, patch;
17005
17006                 version = db_version( &major, &minor, &patch );
17007
17008                 if( major != DB_VERSION_MAJOR ||
17009                         minor < DB_VERSION_MINOR )
17010                 {
17011                         printf("Berkeley DB version mismatch\n"
17012                                 "\texpected: %s\n\tgot: %s\n",
17013                                 DB_VERSION_STRING, version);
17014                         return 1;
17015                 }
17016         }
17017 #endif
17018
17019 #if DB_VERSION_MAJOR > 2
17020         db_env_create( NULL, 0 );
17021 #elif DB_VERSION_MAJOR > 1
17022         db_appexit( NULL );
17023 #else
17024         (void) dbopen( NULL, 0, 0, 0, NULL);
17025 #endif
17026
17027 ; return 0; }
17028 EOF
17029 if { (eval echo configure:17030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17030   rm -rf conftest*
17031   ol_cv_db_db4=yes
17032 else
17033   echo "configure: failed program was:" >&5
17034   cat conftest.$ac_ext >&5
17035   rm -rf conftest*
17036   ol_cv_db_db4=no
17037 fi
17038 rm -f conftest*
17039
17040         LIBS="$ol_LIBS"
17041
17042 fi
17043
17044 echo "$ac_t""$ol_cv_db_db4" 1>&6
17045
17046         if test $ol_cv_db_db4 = yes ; then
17047                 ol_cv_lib_db=-ldb4
17048         fi
17049 fi
17050
17051 if test $ol_cv_lib_db = no ; then
17052         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17053 echo "configure:17054: checking for Berkeley DB link (-ldb-4)" >&5
17054 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17055   echo $ac_n "(cached) $ac_c" 1>&6
17056 else
17057   
17058         ol_DB_LIB=-ldb-4
17059         ol_LIBS=$LIBS
17060         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17061
17062         cat > conftest.$ac_ext <<EOF
17063 #line 17064 "configure"
17064 #include "confdefs.h"
17065
17066 #ifdef HAVE_DB_185_H
17067 # include <db_185.h>
17068 #else
17069 # include <db.h>
17070 #endif
17071
17072 #ifndef DB_VERSION_MAJOR
17073 # define DB_VERSION_MAJOR 1
17074 #endif
17075
17076 #ifndef NULL
17077 #define NULL ((void*)0)
17078 #endif
17079
17080 int main() {
17081
17082 #if DB_VERSION_MAJOR > 1
17083         {
17084                 char *version;
17085                 int major, minor, patch;
17086
17087                 version = db_version( &major, &minor, &patch );
17088
17089                 if( major != DB_VERSION_MAJOR ||
17090                         minor < DB_VERSION_MINOR )
17091                 {
17092                         printf("Berkeley DB version mismatch\n"
17093                                 "\texpected: %s\n\tgot: %s\n",
17094                                 DB_VERSION_STRING, version);
17095                         return 1;
17096                 }
17097         }
17098 #endif
17099
17100 #if DB_VERSION_MAJOR > 2
17101         db_env_create( NULL, 0 );
17102 #elif DB_VERSION_MAJOR > 1
17103         db_appexit( NULL );
17104 #else
17105         (void) dbopen( NULL, 0, 0, 0, NULL);
17106 #endif
17107
17108 ; return 0; }
17109 EOF
17110 if { (eval echo configure:17111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17111   rm -rf conftest*
17112   ol_cv_db_db_4=yes
17113 else
17114   echo "configure: failed program was:" >&5
17115   cat conftest.$ac_ext >&5
17116   rm -rf conftest*
17117   ol_cv_db_db_4=no
17118 fi
17119 rm -f conftest*
17120
17121         LIBS="$ol_LIBS"
17122
17123 fi
17124
17125 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17126
17127         if test $ol_cv_db_db_4 = yes ; then
17128                 ol_cv_lib_db=-ldb-4
17129         fi
17130 fi
17131
17132 if test $ol_cv_lib_db = no ; then
17133         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17134 echo "configure:17135: checking for Berkeley DB link (-ldb)" >&5
17135 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17136   echo $ac_n "(cached) $ac_c" 1>&6
17137 else
17138   
17139         ol_DB_LIB=-ldb
17140         ol_LIBS=$LIBS
17141         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17142
17143         cat > conftest.$ac_ext <<EOF
17144 #line 17145 "configure"
17145 #include "confdefs.h"
17146
17147 #ifdef HAVE_DB_185_H
17148 # include <db_185.h>
17149 #else
17150 # include <db.h>
17151 #endif
17152
17153 #ifndef DB_VERSION_MAJOR
17154 # define DB_VERSION_MAJOR 1
17155 #endif
17156
17157 #ifndef NULL
17158 #define NULL ((void*)0)
17159 #endif
17160
17161 int main() {
17162
17163 #if DB_VERSION_MAJOR > 1
17164         {
17165                 char *version;
17166                 int major, minor, patch;
17167
17168                 version = db_version( &major, &minor, &patch );
17169
17170                 if( major != DB_VERSION_MAJOR ||
17171                         minor < DB_VERSION_MINOR )
17172                 {
17173                         printf("Berkeley DB version mismatch\n"
17174                                 "\texpected: %s\n\tgot: %s\n",
17175                                 DB_VERSION_STRING, version);
17176                         return 1;
17177                 }
17178         }
17179 #endif
17180
17181 #if DB_VERSION_MAJOR > 2
17182         db_env_create( NULL, 0 );
17183 #elif DB_VERSION_MAJOR > 1
17184         db_appexit( NULL );
17185 #else
17186         (void) dbopen( NULL, 0, 0, 0, NULL);
17187 #endif
17188
17189 ; return 0; }
17190 EOF
17191 if { (eval echo configure:17192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17192   rm -rf conftest*
17193   ol_cv_db_db=yes
17194 else
17195   echo "configure: failed program was:" >&5
17196   cat conftest.$ac_ext >&5
17197   rm -rf conftest*
17198   ol_cv_db_db=no
17199 fi
17200 rm -f conftest*
17201
17202         LIBS="$ol_LIBS"
17203
17204 fi
17205
17206 echo "$ac_t""$ol_cv_db_db" 1>&6
17207
17208         if test $ol_cv_db_db = yes ; then
17209                 ol_cv_lib_db=-ldb
17210         fi
17211 fi
17212
17213 if test $ol_cv_lib_db = no ; then
17214         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17215 echo "configure:17216: checking for Berkeley DB link (-ldb3)" >&5
17216 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17217   echo $ac_n "(cached) $ac_c" 1>&6
17218 else
17219   
17220         ol_DB_LIB=-ldb3
17221         ol_LIBS=$LIBS
17222         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17223
17224         cat > conftest.$ac_ext <<EOF
17225 #line 17226 "configure"
17226 #include "confdefs.h"
17227
17228 #ifdef HAVE_DB_185_H
17229 # include <db_185.h>
17230 #else
17231 # include <db.h>
17232 #endif
17233
17234 #ifndef DB_VERSION_MAJOR
17235 # define DB_VERSION_MAJOR 1
17236 #endif
17237
17238 #ifndef NULL
17239 #define NULL ((void*)0)
17240 #endif
17241
17242 int main() {
17243
17244 #if DB_VERSION_MAJOR > 1
17245         {
17246                 char *version;
17247                 int major, minor, patch;
17248
17249                 version = db_version( &major, &minor, &patch );
17250
17251                 if( major != DB_VERSION_MAJOR ||
17252                         minor < DB_VERSION_MINOR )
17253                 {
17254                         printf("Berkeley DB version mismatch\n"
17255                                 "\texpected: %s\n\tgot: %s\n",
17256                                 DB_VERSION_STRING, version);
17257                         return 1;
17258                 }
17259         }
17260 #endif
17261
17262 #if DB_VERSION_MAJOR > 2
17263         db_env_create( NULL, 0 );
17264 #elif DB_VERSION_MAJOR > 1
17265         db_appexit( NULL );
17266 #else
17267         (void) dbopen( NULL, 0, 0, 0, NULL);
17268 #endif
17269
17270 ; return 0; }
17271 EOF
17272 if { (eval echo configure:17273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17273   rm -rf conftest*
17274   ol_cv_db_db3=yes
17275 else
17276   echo "configure: failed program was:" >&5
17277   cat conftest.$ac_ext >&5
17278   rm -rf conftest*
17279   ol_cv_db_db3=no
17280 fi
17281 rm -f conftest*
17282
17283         LIBS="$ol_LIBS"
17284
17285 fi
17286
17287 echo "$ac_t""$ol_cv_db_db3" 1>&6
17288
17289         if test $ol_cv_db_db3 = yes ; then
17290                 ol_cv_lib_db=-ldb3
17291         fi
17292 fi
17293
17294 if test $ol_cv_lib_db = no ; then
17295         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17296 echo "configure:17297: checking for Berkeley DB link (-ldb-3)" >&5
17297 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17298   echo $ac_n "(cached) $ac_c" 1>&6
17299 else
17300   
17301         ol_DB_LIB=-ldb-3
17302         ol_LIBS=$LIBS
17303         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17304
17305         cat > conftest.$ac_ext <<EOF
17306 #line 17307 "configure"
17307 #include "confdefs.h"
17308
17309 #ifdef HAVE_DB_185_H
17310 # include <db_185.h>
17311 #else
17312 # include <db.h>
17313 #endif
17314
17315 #ifndef DB_VERSION_MAJOR
17316 # define DB_VERSION_MAJOR 1
17317 #endif
17318
17319 #ifndef NULL
17320 #define NULL ((void*)0)
17321 #endif
17322
17323 int main() {
17324
17325 #if DB_VERSION_MAJOR > 1
17326         {
17327                 char *version;
17328                 int major, minor, patch;
17329
17330                 version = db_version( &major, &minor, &patch );
17331
17332                 if( major != DB_VERSION_MAJOR ||
17333                         minor < DB_VERSION_MINOR )
17334                 {
17335                         printf("Berkeley DB version mismatch\n"
17336                                 "\texpected: %s\n\tgot: %s\n",
17337                                 DB_VERSION_STRING, version);
17338                         return 1;
17339                 }
17340         }
17341 #endif
17342
17343 #if DB_VERSION_MAJOR > 2
17344         db_env_create( NULL, 0 );
17345 #elif DB_VERSION_MAJOR > 1
17346         db_appexit( NULL );
17347 #else
17348         (void) dbopen( NULL, 0, 0, 0, NULL);
17349 #endif
17350
17351 ; return 0; }
17352 EOF
17353 if { (eval echo configure:17354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17354   rm -rf conftest*
17355   ol_cv_db_db_3=yes
17356 else
17357   echo "configure: failed program was:" >&5
17358   cat conftest.$ac_ext >&5
17359   rm -rf conftest*
17360   ol_cv_db_db_3=no
17361 fi
17362 rm -f conftest*
17363
17364         LIBS="$ol_LIBS"
17365
17366 fi
17367
17368 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17369
17370         if test $ol_cv_db_db_3 = yes ; then
17371                 ol_cv_lib_db=-ldb-3
17372         fi
17373 fi
17374
17375 if test $ol_cv_lib_db = no ; then
17376         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17377 echo "configure:17378: checking for Berkeley DB link (-ldb2)" >&5
17378 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17379   echo $ac_n "(cached) $ac_c" 1>&6
17380 else
17381   
17382         ol_DB_LIB=-ldb2
17383         ol_LIBS=$LIBS
17384         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17385
17386         cat > conftest.$ac_ext <<EOF
17387 #line 17388 "configure"
17388 #include "confdefs.h"
17389
17390 #ifdef HAVE_DB_185_H
17391 # include <db_185.h>
17392 #else
17393 # include <db.h>
17394 #endif
17395
17396 #ifndef DB_VERSION_MAJOR
17397 # define DB_VERSION_MAJOR 1
17398 #endif
17399
17400 #ifndef NULL
17401 #define NULL ((void*)0)
17402 #endif
17403
17404 int main() {
17405
17406 #if DB_VERSION_MAJOR > 1
17407         {
17408                 char *version;
17409                 int major, minor, patch;
17410
17411                 version = db_version( &major, &minor, &patch );
17412
17413                 if( major != DB_VERSION_MAJOR ||
17414                         minor < DB_VERSION_MINOR )
17415                 {
17416                         printf("Berkeley DB version mismatch\n"
17417                                 "\texpected: %s\n\tgot: %s\n",
17418                                 DB_VERSION_STRING, version);
17419                         return 1;
17420                 }
17421         }
17422 #endif
17423
17424 #if DB_VERSION_MAJOR > 2
17425         db_env_create( NULL, 0 );
17426 #elif DB_VERSION_MAJOR > 1
17427         db_appexit( NULL );
17428 #else
17429         (void) dbopen( NULL, 0, 0, 0, NULL);
17430 #endif
17431
17432 ; return 0; }
17433 EOF
17434 if { (eval echo configure:17435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17435   rm -rf conftest*
17436   ol_cv_db_db2=yes
17437 else
17438   echo "configure: failed program was:" >&5
17439   cat conftest.$ac_ext >&5
17440   rm -rf conftest*
17441   ol_cv_db_db2=no
17442 fi
17443 rm -f conftest*
17444
17445         LIBS="$ol_LIBS"
17446
17447 fi
17448
17449 echo "$ac_t""$ol_cv_db_db2" 1>&6
17450
17451         if test $ol_cv_db_db2 = yes ; then
17452                 ol_cv_lib_db=-ldb2
17453         fi
17454 fi
17455
17456 if test $ol_cv_lib_db = no ; then
17457         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17458 echo "configure:17459: checking for Berkeley DB link (-ldb-2)" >&5
17459 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17460   echo $ac_n "(cached) $ac_c" 1>&6
17461 else
17462   
17463         ol_DB_LIB=-ldb-2
17464         ol_LIBS=$LIBS
17465         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17466
17467         cat > conftest.$ac_ext <<EOF
17468 #line 17469 "configure"
17469 #include "confdefs.h"
17470
17471 #ifdef HAVE_DB_185_H
17472 # include <db_185.h>
17473 #else
17474 # include <db.h>
17475 #endif
17476
17477 #ifndef DB_VERSION_MAJOR
17478 # define DB_VERSION_MAJOR 1
17479 #endif
17480
17481 #ifndef NULL
17482 #define NULL ((void*)0)
17483 #endif
17484
17485 int main() {
17486
17487 #if DB_VERSION_MAJOR > 1
17488         {
17489                 char *version;
17490                 int major, minor, patch;
17491
17492                 version = db_version( &major, &minor, &patch );
17493
17494                 if( major != DB_VERSION_MAJOR ||
17495                         minor < DB_VERSION_MINOR )
17496                 {
17497                         printf("Berkeley DB version mismatch\n"
17498                                 "\texpected: %s\n\tgot: %s\n",
17499                                 DB_VERSION_STRING, version);
17500                         return 1;
17501                 }
17502         }
17503 #endif
17504
17505 #if DB_VERSION_MAJOR > 2
17506         db_env_create( NULL, 0 );
17507 #elif DB_VERSION_MAJOR > 1
17508         db_appexit( NULL );
17509 #else
17510         (void) dbopen( NULL, 0, 0, 0, NULL);
17511 #endif
17512
17513 ; return 0; }
17514 EOF
17515 if { (eval echo configure:17516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17516   rm -rf conftest*
17517   ol_cv_db_db_2=yes
17518 else
17519   echo "configure: failed program was:" >&5
17520   cat conftest.$ac_ext >&5
17521   rm -rf conftest*
17522   ol_cv_db_db_2=no
17523 fi
17524 rm -f conftest*
17525
17526         LIBS="$ol_LIBS"
17527
17528 fi
17529
17530 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17531
17532         if test $ol_cv_db_db_2 = yes ; then
17533                 ol_cv_lib_db=-ldb-2
17534         fi
17535 fi
17536
17537 if test $ol_cv_lib_db = no ; then
17538         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17539 echo "configure:17540: checking for Berkeley DB link (-ldb1)" >&5
17540 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17541   echo $ac_n "(cached) $ac_c" 1>&6
17542 else
17543   
17544         ol_DB_LIB=-ldb1
17545         ol_LIBS=$LIBS
17546         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17547
17548         cat > conftest.$ac_ext <<EOF
17549 #line 17550 "configure"
17550 #include "confdefs.h"
17551
17552 #ifdef HAVE_DB_185_H
17553 # include <db_185.h>
17554 #else
17555 # include <db.h>
17556 #endif
17557
17558 #ifndef DB_VERSION_MAJOR
17559 # define DB_VERSION_MAJOR 1
17560 #endif
17561
17562 #ifndef NULL
17563 #define NULL ((void*)0)
17564 #endif
17565
17566 int main() {
17567
17568 #if DB_VERSION_MAJOR > 1
17569         {
17570                 char *version;
17571                 int major, minor, patch;
17572
17573                 version = db_version( &major, &minor, &patch );
17574
17575                 if( major != DB_VERSION_MAJOR ||
17576                         minor < DB_VERSION_MINOR )
17577                 {
17578                         printf("Berkeley DB version mismatch\n"
17579                                 "\texpected: %s\n\tgot: %s\n",
17580                                 DB_VERSION_STRING, version);
17581                         return 1;
17582                 }
17583         }
17584 #endif
17585
17586 #if DB_VERSION_MAJOR > 2
17587         db_env_create( NULL, 0 );
17588 #elif DB_VERSION_MAJOR > 1
17589         db_appexit( NULL );
17590 #else
17591         (void) dbopen( NULL, 0, 0, 0, NULL);
17592 #endif
17593
17594 ; return 0; }
17595 EOF
17596 if { (eval echo configure:17597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17597   rm -rf conftest*
17598   ol_cv_db_db1=yes
17599 else
17600   echo "configure: failed program was:" >&5
17601   cat conftest.$ac_ext >&5
17602   rm -rf conftest*
17603   ol_cv_db_db1=no
17604 fi
17605 rm -f conftest*
17606
17607         LIBS="$ol_LIBS"
17608
17609 fi
17610
17611 echo "$ac_t""$ol_cv_db_db1" 1>&6
17612
17613         if test $ol_cv_db_db1 = yes ; then
17614                 ol_cv_lib_db=-ldb1
17615         fi
17616 fi
17617
17618 if test $ol_cv_lib_db = no ; then
17619         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17620 echo "configure:17621: checking for Berkeley DB link (-ldb-1)" >&5
17621 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17622   echo $ac_n "(cached) $ac_c" 1>&6
17623 else
17624   
17625         ol_DB_LIB=-ldb-1
17626         ol_LIBS=$LIBS
17627         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17628
17629         cat > conftest.$ac_ext <<EOF
17630 #line 17631 "configure"
17631 #include "confdefs.h"
17632
17633 #ifdef HAVE_DB_185_H
17634 # include <db_185.h>
17635 #else
17636 # include <db.h>
17637 #endif
17638
17639 #ifndef DB_VERSION_MAJOR
17640 # define DB_VERSION_MAJOR 1
17641 #endif
17642
17643 #ifndef NULL
17644 #define NULL ((void*)0)
17645 #endif
17646
17647 int main() {
17648
17649 #if DB_VERSION_MAJOR > 1
17650         {
17651                 char *version;
17652                 int major, minor, patch;
17653
17654                 version = db_version( &major, &minor, &patch );
17655
17656                 if( major != DB_VERSION_MAJOR ||
17657                         minor < DB_VERSION_MINOR )
17658                 {
17659                         printf("Berkeley DB version mismatch\n"
17660                                 "\texpected: %s\n\tgot: %s\n",
17661                                 DB_VERSION_STRING, version);
17662                         return 1;
17663                 }
17664         }
17665 #endif
17666
17667 #if DB_VERSION_MAJOR > 2
17668         db_env_create( NULL, 0 );
17669 #elif DB_VERSION_MAJOR > 1
17670         db_appexit( NULL );
17671 #else
17672         (void) dbopen( NULL, 0, 0, 0, NULL);
17673 #endif
17674
17675 ; return 0; }
17676 EOF
17677 if { (eval echo configure:17678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17678   rm -rf conftest*
17679   ol_cv_db_db_1=yes
17680 else
17681   echo "configure: failed program was:" >&5
17682   cat conftest.$ac_ext >&5
17683   rm -rf conftest*
17684   ol_cv_db_db_1=no
17685 fi
17686 rm -f conftest*
17687
17688         LIBS="$ol_LIBS"
17689
17690 fi
17691
17692 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17693
17694         if test $ol_cv_db_db_1 = yes ; then
17695                 ol_cv_lib_db=-ldb-1
17696         fi
17697 fi
17698
17699
17700                 if test "$ol_cv_lib_db" != no ; then
17701                         ol_cv_berkeley_db=yes
17702                 fi
17703         fi
17704 fi
17705
17706         else
17707                 ol_cv_berkeley_db=no
17708 for ac_hdr in db.h
17709 do
17710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17712 echo "configure:17713: checking for $ac_hdr" >&5
17713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17714   echo $ac_n "(cached) $ac_c" 1>&6
17715 else
17716   cat > conftest.$ac_ext <<EOF
17717 #line 17718 "configure"
17718 #include "confdefs.h"
17719 #include <$ac_hdr>
17720 EOF
17721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17722 { (eval echo configure:17723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17724 if test -z "$ac_err"; then
17725   rm -rf conftest*
17726   eval "ac_cv_header_$ac_safe=yes"
17727 else
17728   echo "$ac_err" >&5
17729   echo "configure: failed program was:" >&5
17730   cat conftest.$ac_ext >&5
17731   rm -rf conftest*
17732   eval "ac_cv_header_$ac_safe=no"
17733 fi
17734 rm -f conftest*
17735 fi
17736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17737   echo "$ac_t""yes" 1>&6
17738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17739   cat >> confdefs.h <<EOF
17740 #define $ac_tr_hdr 1
17741 EOF
17742  
17743 else
17744   echo "$ac_t""no" 1>&6
17745 fi
17746 done
17747
17748 if test $ac_cv_header_db_h = yes; then
17749         ol_cv_lib_db=no
17750 if test $ol_cv_lib_db = no ; then
17751         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17752 echo "configure:17753: checking for Berkeley DB link (default)" >&5
17753 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17754   echo $ac_n "(cached) $ac_c" 1>&6
17755 else
17756   
17757         ol_DB_LIB=
17758         ol_LIBS=$LIBS
17759         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17760
17761         cat > conftest.$ac_ext <<EOF
17762 #line 17763 "configure"
17763 #include "confdefs.h"
17764
17765 #ifdef HAVE_DB_185_H
17766 # include <db_185.h>
17767 #else
17768 # include <db.h>
17769 #endif
17770
17771 #ifndef DB_VERSION_MAJOR
17772 # define DB_VERSION_MAJOR 1
17773 #endif
17774
17775 #ifndef NULL
17776 #define NULL ((void*)0)
17777 #endif
17778
17779 int main() {
17780
17781 #if DB_VERSION_MAJOR > 1
17782         {
17783                 char *version;
17784                 int major, minor, patch;
17785
17786                 version = db_version( &major, &minor, &patch );
17787
17788                 if( major != DB_VERSION_MAJOR ||
17789                         minor < DB_VERSION_MINOR )
17790                 {
17791                         printf("Berkeley DB version mismatch\n"
17792                                 "\texpected: %s\n\tgot: %s\n",
17793                                 DB_VERSION_STRING, version);
17794                         return 1;
17795                 }
17796         }
17797 #endif
17798
17799 #if DB_VERSION_MAJOR > 2
17800         db_env_create( NULL, 0 );
17801 #elif DB_VERSION_MAJOR > 1
17802         db_appexit( NULL );
17803 #else
17804         (void) dbopen( NULL, 0, 0, 0, NULL);
17805 #endif
17806
17807 ; return 0; }
17808 EOF
17809 if { (eval echo configure:17810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17810   rm -rf conftest*
17811   ol_cv_db_none=yes
17812 else
17813   echo "configure: failed program was:" >&5
17814   cat conftest.$ac_ext >&5
17815   rm -rf conftest*
17816   ol_cv_db_none=no
17817 fi
17818 rm -f conftest*
17819
17820         LIBS="$ol_LIBS"
17821
17822 fi
17823
17824 echo "$ac_t""$ol_cv_db_none" 1>&6
17825
17826         if test $ol_cv_db_none = yes ; then
17827                 ol_cv_lib_db=yes
17828         fi
17829 fi
17830
17831 if test $ol_cv_lib_db = no ; then
17832         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17833 echo "configure:17834: checking for Berkeley DB link (-ldb41)" >&5
17834 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17835   echo $ac_n "(cached) $ac_c" 1>&6
17836 else
17837   
17838         ol_DB_LIB=-ldb41
17839         ol_LIBS=$LIBS
17840         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17841
17842         cat > conftest.$ac_ext <<EOF
17843 #line 17844 "configure"
17844 #include "confdefs.h"
17845
17846 #ifdef HAVE_DB_185_H
17847 # include <db_185.h>
17848 #else
17849 # include <db.h>
17850 #endif
17851
17852 #ifndef DB_VERSION_MAJOR
17853 # define DB_VERSION_MAJOR 1
17854 #endif
17855
17856 #ifndef NULL
17857 #define NULL ((void*)0)
17858 #endif
17859
17860 int main() {
17861
17862 #if DB_VERSION_MAJOR > 1
17863         {
17864                 char *version;
17865                 int major, minor, patch;
17866
17867                 version = db_version( &major, &minor, &patch );
17868
17869                 if( major != DB_VERSION_MAJOR ||
17870                         minor < DB_VERSION_MINOR )
17871                 {
17872                         printf("Berkeley DB version mismatch\n"
17873                                 "\texpected: %s\n\tgot: %s\n",
17874                                 DB_VERSION_STRING, version);
17875                         return 1;
17876                 }
17877         }
17878 #endif
17879
17880 #if DB_VERSION_MAJOR > 2
17881         db_env_create( NULL, 0 );
17882 #elif DB_VERSION_MAJOR > 1
17883         db_appexit( NULL );
17884 #else
17885         (void) dbopen( NULL, 0, 0, 0, NULL);
17886 #endif
17887
17888 ; return 0; }
17889 EOF
17890 if { (eval echo configure:17891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17891   rm -rf conftest*
17892   ol_cv_db_db41=yes
17893 else
17894   echo "configure: failed program was:" >&5
17895   cat conftest.$ac_ext >&5
17896   rm -rf conftest*
17897   ol_cv_db_db41=no
17898 fi
17899 rm -f conftest*
17900
17901         LIBS="$ol_LIBS"
17902
17903 fi
17904
17905 echo "$ac_t""$ol_cv_db_db41" 1>&6
17906
17907         if test $ol_cv_db_db41 = yes ; then
17908                 ol_cv_lib_db=-ldb41
17909         fi
17910 fi
17911
17912 if test $ol_cv_lib_db = no ; then
17913         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17914 echo "configure:17915: checking for Berkeley DB link (-ldb-41)" >&5
17915 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17916   echo $ac_n "(cached) $ac_c" 1>&6
17917 else
17918   
17919         ol_DB_LIB=-ldb-41
17920         ol_LIBS=$LIBS
17921         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17922
17923         cat > conftest.$ac_ext <<EOF
17924 #line 17925 "configure"
17925 #include "confdefs.h"
17926
17927 #ifdef HAVE_DB_185_H
17928 # include <db_185.h>
17929 #else
17930 # include <db.h>
17931 #endif
17932
17933 #ifndef DB_VERSION_MAJOR
17934 # define DB_VERSION_MAJOR 1
17935 #endif
17936
17937 #ifndef NULL
17938 #define NULL ((void*)0)
17939 #endif
17940
17941 int main() {
17942
17943 #if DB_VERSION_MAJOR > 1
17944         {
17945                 char *version;
17946                 int major, minor, patch;
17947
17948                 version = db_version( &major, &minor, &patch );
17949
17950                 if( major != DB_VERSION_MAJOR ||
17951                         minor < DB_VERSION_MINOR )
17952                 {
17953                         printf("Berkeley DB version mismatch\n"
17954                                 "\texpected: %s\n\tgot: %s\n",
17955                                 DB_VERSION_STRING, version);
17956                         return 1;
17957                 }
17958         }
17959 #endif
17960
17961 #if DB_VERSION_MAJOR > 2
17962         db_env_create( NULL, 0 );
17963 #elif DB_VERSION_MAJOR > 1
17964         db_appexit( NULL );
17965 #else
17966         (void) dbopen( NULL, 0, 0, 0, NULL);
17967 #endif
17968
17969 ; return 0; }
17970 EOF
17971 if { (eval echo configure:17972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17972   rm -rf conftest*
17973   ol_cv_db_db_41=yes
17974 else
17975   echo "configure: failed program was:" >&5
17976   cat conftest.$ac_ext >&5
17977   rm -rf conftest*
17978   ol_cv_db_db_41=no
17979 fi
17980 rm -f conftest*
17981
17982         LIBS="$ol_LIBS"
17983
17984 fi
17985
17986 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17987
17988         if test $ol_cv_db_db_41 = yes ; then
17989                 ol_cv_lib_db=-ldb-41
17990         fi
17991 fi
17992
17993 if test $ol_cv_lib_db = no ; then
17994         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17995 echo "configure:17996: checking for Berkeley DB link (-ldb4)" >&5
17996 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17997   echo $ac_n "(cached) $ac_c" 1>&6
17998 else
17999   
18000         ol_DB_LIB=-ldb4
18001         ol_LIBS=$LIBS
18002         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18003
18004         cat > conftest.$ac_ext <<EOF
18005 #line 18006 "configure"
18006 #include "confdefs.h"
18007
18008 #ifdef HAVE_DB_185_H
18009 # include <db_185.h>
18010 #else
18011 # include <db.h>
18012 #endif
18013
18014 #ifndef DB_VERSION_MAJOR
18015 # define DB_VERSION_MAJOR 1
18016 #endif
18017
18018 #ifndef NULL
18019 #define NULL ((void*)0)
18020 #endif
18021
18022 int main() {
18023
18024 #if DB_VERSION_MAJOR > 1
18025         {
18026                 char *version;
18027                 int major, minor, patch;
18028
18029                 version = db_version( &major, &minor, &patch );
18030
18031                 if( major != DB_VERSION_MAJOR ||
18032                         minor < DB_VERSION_MINOR )
18033                 {
18034                         printf("Berkeley DB version mismatch\n"
18035                                 "\texpected: %s\n\tgot: %s\n",
18036                                 DB_VERSION_STRING, version);
18037                         return 1;
18038                 }
18039         }
18040 #endif
18041
18042 #if DB_VERSION_MAJOR > 2
18043         db_env_create( NULL, 0 );
18044 #elif DB_VERSION_MAJOR > 1
18045         db_appexit( NULL );
18046 #else
18047         (void) dbopen( NULL, 0, 0, 0, NULL);
18048 #endif
18049
18050 ; return 0; }
18051 EOF
18052 if { (eval echo configure:18053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18053   rm -rf conftest*
18054   ol_cv_db_db4=yes
18055 else
18056   echo "configure: failed program was:" >&5
18057   cat conftest.$ac_ext >&5
18058   rm -rf conftest*
18059   ol_cv_db_db4=no
18060 fi
18061 rm -f conftest*
18062
18063         LIBS="$ol_LIBS"
18064
18065 fi
18066
18067 echo "$ac_t""$ol_cv_db_db4" 1>&6
18068
18069         if test $ol_cv_db_db4 = yes ; then
18070                 ol_cv_lib_db=-ldb4
18071         fi
18072 fi
18073
18074 if test $ol_cv_lib_db = no ; then
18075         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18076 echo "configure:18077: checking for Berkeley DB link (-ldb-4)" >&5
18077 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18078   echo $ac_n "(cached) $ac_c" 1>&6
18079 else
18080   
18081         ol_DB_LIB=-ldb-4
18082         ol_LIBS=$LIBS
18083         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18084
18085         cat > conftest.$ac_ext <<EOF
18086 #line 18087 "configure"
18087 #include "confdefs.h"
18088
18089 #ifdef HAVE_DB_185_H
18090 # include <db_185.h>
18091 #else
18092 # include <db.h>
18093 #endif
18094
18095 #ifndef DB_VERSION_MAJOR
18096 # define DB_VERSION_MAJOR 1
18097 #endif
18098
18099 #ifndef NULL
18100 #define NULL ((void*)0)
18101 #endif
18102
18103 int main() {
18104
18105 #if DB_VERSION_MAJOR > 1
18106         {
18107                 char *version;
18108                 int major, minor, patch;
18109
18110                 version = db_version( &major, &minor, &patch );
18111
18112                 if( major != DB_VERSION_MAJOR ||
18113                         minor < DB_VERSION_MINOR )
18114                 {
18115                         printf("Berkeley DB version mismatch\n"
18116                                 "\texpected: %s\n\tgot: %s\n",
18117                                 DB_VERSION_STRING, version);
18118                         return 1;
18119                 }
18120         }
18121 #endif
18122
18123 #if DB_VERSION_MAJOR > 2
18124         db_env_create( NULL, 0 );
18125 #elif DB_VERSION_MAJOR > 1
18126         db_appexit( NULL );
18127 #else
18128         (void) dbopen( NULL, 0, 0, 0, NULL);
18129 #endif
18130
18131 ; return 0; }
18132 EOF
18133 if { (eval echo configure:18134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18134   rm -rf conftest*
18135   ol_cv_db_db_4=yes
18136 else
18137   echo "configure: failed program was:" >&5
18138   cat conftest.$ac_ext >&5
18139   rm -rf conftest*
18140   ol_cv_db_db_4=no
18141 fi
18142 rm -f conftest*
18143
18144         LIBS="$ol_LIBS"
18145
18146 fi
18147
18148 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18149
18150         if test $ol_cv_db_db_4 = yes ; then
18151                 ol_cv_lib_db=-ldb-4
18152         fi
18153 fi
18154
18155 if test $ol_cv_lib_db = no ; then
18156         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18157 echo "configure:18158: checking for Berkeley DB link (-ldb)" >&5
18158 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18159   echo $ac_n "(cached) $ac_c" 1>&6
18160 else
18161   
18162         ol_DB_LIB=-ldb
18163         ol_LIBS=$LIBS
18164         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18165
18166         cat > conftest.$ac_ext <<EOF
18167 #line 18168 "configure"
18168 #include "confdefs.h"
18169
18170 #ifdef HAVE_DB_185_H
18171 # include <db_185.h>
18172 #else
18173 # include <db.h>
18174 #endif
18175
18176 #ifndef DB_VERSION_MAJOR
18177 # define DB_VERSION_MAJOR 1
18178 #endif
18179
18180 #ifndef NULL
18181 #define NULL ((void*)0)
18182 #endif
18183
18184 int main() {
18185
18186 #if DB_VERSION_MAJOR > 1
18187         {
18188                 char *version;
18189                 int major, minor, patch;
18190
18191                 version = db_version( &major, &minor, &patch );
18192
18193                 if( major != DB_VERSION_MAJOR ||
18194                         minor < DB_VERSION_MINOR )
18195                 {
18196                         printf("Berkeley DB version mismatch\n"
18197                                 "\texpected: %s\n\tgot: %s\n",
18198                                 DB_VERSION_STRING, version);
18199                         return 1;
18200                 }
18201         }
18202 #endif
18203
18204 #if DB_VERSION_MAJOR > 2
18205         db_env_create( NULL, 0 );
18206 #elif DB_VERSION_MAJOR > 1
18207         db_appexit( NULL );
18208 #else
18209         (void) dbopen( NULL, 0, 0, 0, NULL);
18210 #endif
18211
18212 ; return 0; }
18213 EOF
18214 if { (eval echo configure:18215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18215   rm -rf conftest*
18216   ol_cv_db_db=yes
18217 else
18218   echo "configure: failed program was:" >&5
18219   cat conftest.$ac_ext >&5
18220   rm -rf conftest*
18221   ol_cv_db_db=no
18222 fi
18223 rm -f conftest*
18224
18225         LIBS="$ol_LIBS"
18226
18227 fi
18228
18229 echo "$ac_t""$ol_cv_db_db" 1>&6
18230
18231         if test $ol_cv_db_db = yes ; then
18232                 ol_cv_lib_db=-ldb
18233         fi
18234 fi
18235
18236 if test $ol_cv_lib_db = no ; then
18237         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18238 echo "configure:18239: checking for Berkeley DB link (-ldb3)" >&5
18239 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18240   echo $ac_n "(cached) $ac_c" 1>&6
18241 else
18242   
18243         ol_DB_LIB=-ldb3
18244         ol_LIBS=$LIBS
18245         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18246
18247         cat > conftest.$ac_ext <<EOF
18248 #line 18249 "configure"
18249 #include "confdefs.h"
18250
18251 #ifdef HAVE_DB_185_H
18252 # include <db_185.h>
18253 #else
18254 # include <db.h>
18255 #endif
18256
18257 #ifndef DB_VERSION_MAJOR
18258 # define DB_VERSION_MAJOR 1
18259 #endif
18260
18261 #ifndef NULL
18262 #define NULL ((void*)0)
18263 #endif
18264
18265 int main() {
18266
18267 #if DB_VERSION_MAJOR > 1
18268         {
18269                 char *version;
18270                 int major, minor, patch;
18271
18272                 version = db_version( &major, &minor, &patch );
18273
18274                 if( major != DB_VERSION_MAJOR ||
18275                         minor < DB_VERSION_MINOR )
18276                 {
18277                         printf("Berkeley DB version mismatch\n"
18278                                 "\texpected: %s\n\tgot: %s\n",
18279                                 DB_VERSION_STRING, version);
18280                         return 1;
18281                 }
18282         }
18283 #endif
18284
18285 #if DB_VERSION_MAJOR > 2
18286         db_env_create( NULL, 0 );
18287 #elif DB_VERSION_MAJOR > 1
18288         db_appexit( NULL );
18289 #else
18290         (void) dbopen( NULL, 0, 0, 0, NULL);
18291 #endif
18292
18293 ; return 0; }
18294 EOF
18295 if { (eval echo configure:18296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18296   rm -rf conftest*
18297   ol_cv_db_db3=yes
18298 else
18299   echo "configure: failed program was:" >&5
18300   cat conftest.$ac_ext >&5
18301   rm -rf conftest*
18302   ol_cv_db_db3=no
18303 fi
18304 rm -f conftest*
18305
18306         LIBS="$ol_LIBS"
18307
18308 fi
18309
18310 echo "$ac_t""$ol_cv_db_db3" 1>&6
18311
18312         if test $ol_cv_db_db3 = yes ; then
18313                 ol_cv_lib_db=-ldb3
18314         fi
18315 fi
18316
18317 if test $ol_cv_lib_db = no ; then
18318         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18319 echo "configure:18320: checking for Berkeley DB link (-ldb-3)" >&5
18320 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18321   echo $ac_n "(cached) $ac_c" 1>&6
18322 else
18323   
18324         ol_DB_LIB=-ldb-3
18325         ol_LIBS=$LIBS
18326         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18327
18328         cat > conftest.$ac_ext <<EOF
18329 #line 18330 "configure"
18330 #include "confdefs.h"
18331
18332 #ifdef HAVE_DB_185_H
18333 # include <db_185.h>
18334 #else
18335 # include <db.h>
18336 #endif
18337
18338 #ifndef DB_VERSION_MAJOR
18339 # define DB_VERSION_MAJOR 1
18340 #endif
18341
18342 #ifndef NULL
18343 #define NULL ((void*)0)
18344 #endif
18345
18346 int main() {
18347
18348 #if DB_VERSION_MAJOR > 1
18349         {
18350                 char *version;
18351                 int major, minor, patch;
18352
18353                 version = db_version( &major, &minor, &patch );
18354
18355                 if( major != DB_VERSION_MAJOR ||
18356                         minor < DB_VERSION_MINOR )
18357                 {
18358                         printf("Berkeley DB version mismatch\n"
18359                                 "\texpected: %s\n\tgot: %s\n",
18360                                 DB_VERSION_STRING, version);
18361                         return 1;
18362                 }
18363         }
18364 #endif
18365
18366 #if DB_VERSION_MAJOR > 2
18367         db_env_create( NULL, 0 );
18368 #elif DB_VERSION_MAJOR > 1
18369         db_appexit( NULL );
18370 #else
18371         (void) dbopen( NULL, 0, 0, 0, NULL);
18372 #endif
18373
18374 ; return 0; }
18375 EOF
18376 if { (eval echo configure:18377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18377   rm -rf conftest*
18378   ol_cv_db_db_3=yes
18379 else
18380   echo "configure: failed program was:" >&5
18381   cat conftest.$ac_ext >&5
18382   rm -rf conftest*
18383   ol_cv_db_db_3=no
18384 fi
18385 rm -f conftest*
18386
18387         LIBS="$ol_LIBS"
18388
18389 fi
18390
18391 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18392
18393         if test $ol_cv_db_db_3 = yes ; then
18394                 ol_cv_lib_db=-ldb-3
18395         fi
18396 fi
18397
18398 if test $ol_cv_lib_db = no ; then
18399         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18400 echo "configure:18401: checking for Berkeley DB link (-ldb2)" >&5
18401 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18402   echo $ac_n "(cached) $ac_c" 1>&6
18403 else
18404   
18405         ol_DB_LIB=-ldb2
18406         ol_LIBS=$LIBS
18407         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18408
18409         cat > conftest.$ac_ext <<EOF
18410 #line 18411 "configure"
18411 #include "confdefs.h"
18412
18413 #ifdef HAVE_DB_185_H
18414 # include <db_185.h>
18415 #else
18416 # include <db.h>
18417 #endif
18418
18419 #ifndef DB_VERSION_MAJOR
18420 # define DB_VERSION_MAJOR 1
18421 #endif
18422
18423 #ifndef NULL
18424 #define NULL ((void*)0)
18425 #endif
18426
18427 int main() {
18428
18429 #if DB_VERSION_MAJOR > 1
18430         {
18431                 char *version;
18432                 int major, minor, patch;
18433
18434                 version = db_version( &major, &minor, &patch );
18435
18436                 if( major != DB_VERSION_MAJOR ||
18437                         minor < DB_VERSION_MINOR )
18438                 {
18439                         printf("Berkeley DB version mismatch\n"
18440                                 "\texpected: %s\n\tgot: %s\n",
18441                                 DB_VERSION_STRING, version);
18442                         return 1;
18443                 }
18444         }
18445 #endif
18446
18447 #if DB_VERSION_MAJOR > 2
18448         db_env_create( NULL, 0 );
18449 #elif DB_VERSION_MAJOR > 1
18450         db_appexit( NULL );
18451 #else
18452         (void) dbopen( NULL, 0, 0, 0, NULL);
18453 #endif
18454
18455 ; return 0; }
18456 EOF
18457 if { (eval echo configure:18458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18458   rm -rf conftest*
18459   ol_cv_db_db2=yes
18460 else
18461   echo "configure: failed program was:" >&5
18462   cat conftest.$ac_ext >&5
18463   rm -rf conftest*
18464   ol_cv_db_db2=no
18465 fi
18466 rm -f conftest*
18467
18468         LIBS="$ol_LIBS"
18469
18470 fi
18471
18472 echo "$ac_t""$ol_cv_db_db2" 1>&6
18473
18474         if test $ol_cv_db_db2 = yes ; then
18475                 ol_cv_lib_db=-ldb2
18476         fi
18477 fi
18478
18479 if test $ol_cv_lib_db = no ; then
18480         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18481 echo "configure:18482: checking for Berkeley DB link (-ldb-2)" >&5
18482 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18483   echo $ac_n "(cached) $ac_c" 1>&6
18484 else
18485   
18486         ol_DB_LIB=-ldb-2
18487         ol_LIBS=$LIBS
18488         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18489
18490         cat > conftest.$ac_ext <<EOF
18491 #line 18492 "configure"
18492 #include "confdefs.h"
18493
18494 #ifdef HAVE_DB_185_H
18495 # include <db_185.h>
18496 #else
18497 # include <db.h>
18498 #endif
18499
18500 #ifndef DB_VERSION_MAJOR
18501 # define DB_VERSION_MAJOR 1
18502 #endif
18503
18504 #ifndef NULL
18505 #define NULL ((void*)0)
18506 #endif
18507
18508 int main() {
18509
18510 #if DB_VERSION_MAJOR > 1
18511         {
18512                 char *version;
18513                 int major, minor, patch;
18514
18515                 version = db_version( &major, &minor, &patch );
18516
18517                 if( major != DB_VERSION_MAJOR ||
18518                         minor < DB_VERSION_MINOR )
18519                 {
18520                         printf("Berkeley DB version mismatch\n"
18521                                 "\texpected: %s\n\tgot: %s\n",
18522                                 DB_VERSION_STRING, version);
18523                         return 1;
18524                 }
18525         }
18526 #endif
18527
18528 #if DB_VERSION_MAJOR > 2
18529         db_env_create( NULL, 0 );
18530 #elif DB_VERSION_MAJOR > 1
18531         db_appexit( NULL );
18532 #else
18533         (void) dbopen( NULL, 0, 0, 0, NULL);
18534 #endif
18535
18536 ; return 0; }
18537 EOF
18538 if { (eval echo configure:18539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18539   rm -rf conftest*
18540   ol_cv_db_db_2=yes
18541 else
18542   echo "configure: failed program was:" >&5
18543   cat conftest.$ac_ext >&5
18544   rm -rf conftest*
18545   ol_cv_db_db_2=no
18546 fi
18547 rm -f conftest*
18548
18549         LIBS="$ol_LIBS"
18550
18551 fi
18552
18553 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18554
18555         if test $ol_cv_db_db_2 = yes ; then
18556                 ol_cv_lib_db=-ldb-2
18557         fi
18558 fi
18559
18560 if test $ol_cv_lib_db = no ; then
18561         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18562 echo "configure:18563: checking for Berkeley DB link (-ldb1)" >&5
18563 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18564   echo $ac_n "(cached) $ac_c" 1>&6
18565 else
18566   
18567         ol_DB_LIB=-ldb1
18568         ol_LIBS=$LIBS
18569         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18570
18571         cat > conftest.$ac_ext <<EOF
18572 #line 18573 "configure"
18573 #include "confdefs.h"
18574
18575 #ifdef HAVE_DB_185_H
18576 # include <db_185.h>
18577 #else
18578 # include <db.h>
18579 #endif
18580
18581 #ifndef DB_VERSION_MAJOR
18582 # define DB_VERSION_MAJOR 1
18583 #endif
18584
18585 #ifndef NULL
18586 #define NULL ((void*)0)
18587 #endif
18588
18589 int main() {
18590
18591 #if DB_VERSION_MAJOR > 1
18592         {
18593                 char *version;
18594                 int major, minor, patch;
18595
18596                 version = db_version( &major, &minor, &patch );
18597
18598                 if( major != DB_VERSION_MAJOR ||
18599                         minor < DB_VERSION_MINOR )
18600                 {
18601                         printf("Berkeley DB version mismatch\n"
18602                                 "\texpected: %s\n\tgot: %s\n",
18603                                 DB_VERSION_STRING, version);
18604                         return 1;
18605                 }
18606         }
18607 #endif
18608
18609 #if DB_VERSION_MAJOR > 2
18610         db_env_create( NULL, 0 );
18611 #elif DB_VERSION_MAJOR > 1
18612         db_appexit( NULL );
18613 #else
18614         (void) dbopen( NULL, 0, 0, 0, NULL);
18615 #endif
18616
18617 ; return 0; }
18618 EOF
18619 if { (eval echo configure:18620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18620   rm -rf conftest*
18621   ol_cv_db_db1=yes
18622 else
18623   echo "configure: failed program was:" >&5
18624   cat conftest.$ac_ext >&5
18625   rm -rf conftest*
18626   ol_cv_db_db1=no
18627 fi
18628 rm -f conftest*
18629
18630         LIBS="$ol_LIBS"
18631
18632 fi
18633
18634 echo "$ac_t""$ol_cv_db_db1" 1>&6
18635
18636         if test $ol_cv_db_db1 = yes ; then
18637                 ol_cv_lib_db=-ldb1
18638         fi
18639 fi
18640
18641 if test $ol_cv_lib_db = no ; then
18642         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18643 echo "configure:18644: checking for Berkeley DB link (-ldb-1)" >&5
18644 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18645   echo $ac_n "(cached) $ac_c" 1>&6
18646 else
18647   
18648         ol_DB_LIB=-ldb-1
18649         ol_LIBS=$LIBS
18650         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18651
18652         cat > conftest.$ac_ext <<EOF
18653 #line 18654 "configure"
18654 #include "confdefs.h"
18655
18656 #ifdef HAVE_DB_185_H
18657 # include <db_185.h>
18658 #else
18659 # include <db.h>
18660 #endif
18661
18662 #ifndef DB_VERSION_MAJOR
18663 # define DB_VERSION_MAJOR 1
18664 #endif
18665
18666 #ifndef NULL
18667 #define NULL ((void*)0)
18668 #endif
18669
18670 int main() {
18671
18672 #if DB_VERSION_MAJOR > 1
18673         {
18674                 char *version;
18675                 int major, minor, patch;
18676
18677                 version = db_version( &major, &minor, &patch );
18678
18679                 if( major != DB_VERSION_MAJOR ||
18680                         minor < DB_VERSION_MINOR )
18681                 {
18682                         printf("Berkeley DB version mismatch\n"
18683                                 "\texpected: %s\n\tgot: %s\n",
18684                                 DB_VERSION_STRING, version);
18685                         return 1;
18686                 }
18687         }
18688 #endif
18689
18690 #if DB_VERSION_MAJOR > 2
18691         db_env_create( NULL, 0 );
18692 #elif DB_VERSION_MAJOR > 1
18693         db_appexit( NULL );
18694 #else
18695         (void) dbopen( NULL, 0, 0, 0, NULL);
18696 #endif
18697
18698 ; return 0; }
18699 EOF
18700 if { (eval echo configure:18701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18701   rm -rf conftest*
18702   ol_cv_db_db_1=yes
18703 else
18704   echo "configure: failed program was:" >&5
18705   cat conftest.$ac_ext >&5
18706   rm -rf conftest*
18707   ol_cv_db_db_1=no
18708 fi
18709 rm -f conftest*
18710
18711         LIBS="$ol_LIBS"
18712
18713 fi
18714
18715 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18716
18717         if test $ol_cv_db_db_1 = yes ; then
18718                 ol_cv_lib_db=-ldb-1
18719         fi
18720 fi
18721
18722
18723         if test "$ol_cv_lib_db" != no ; then
18724                 ol_cv_berkeley_db=yes
18725                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18726 echo "configure:18727: checking for Berkeley DB thread support" >&5
18727 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18728   echo $ac_n "(cached) $ac_c" 1>&6
18729 else
18730   
18731         ol_LIBS="$LIBS"
18732         LIBS="$LTHREAD_LIBS $LIBS"
18733         if test $ol_cv_lib_db != yes ; then
18734                 LIBS="$ol_cv_lib_db $LIBS"
18735         fi
18736
18737         if test "$cross_compiling" = yes; then
18738   ol_cv_berkeley_db_thread=cross
18739 else
18740   cat > conftest.$ac_ext <<EOF
18741 #line 18742 "configure"
18742 #include "confdefs.h"
18743
18744 #ifdef HAVE_DB_185_H
18745         choke me;
18746 #else
18747 #include <db.h>
18748 #endif
18749 #ifndef NULL
18750 #define NULL ((void *)0)
18751 #endif
18752 main()
18753 {
18754         int rc;
18755         u_int32_t flags = DB_CREATE |
18756 #ifdef DB_PRIVATE
18757                 DB_PRIVATE |
18758 #endif
18759                 DB_THREAD;
18760
18761 #if DB_VERSION_MAJOR > 2
18762         DB_ENV *env = NULL;
18763
18764         rc = db_env_create( &env, 0 );
18765
18766         flags |= DB_INIT_MPOOL;
18767 #ifdef DB_MPOOL_PRIVATE
18768         flags |= DB_MPOOL_PRIVATE;
18769 #endif
18770
18771         if( rc ) {
18772                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18773                 return rc;
18774         }
18775
18776 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18777         rc = env->open( env, NULL, flags, 0 );
18778 #else
18779         rc = env->open( env, NULL, NULL, flags, 0 );
18780 #endif
18781
18782         if ( rc == 0 ) {
18783                 rc = env->close( env, 0 );
18784         }
18785
18786         if( rc ) {
18787                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18788                 return rc;
18789         }
18790
18791 #else
18792         DB_ENV env;
18793         memset( &env, '\0', sizeof(env) );
18794
18795         rc = db_appinit( NULL, NULL, &env, flags );
18796
18797         if( rc == 0 ) {
18798                 db_appexit( &env );
18799         }
18800
18801         unlink("__db_mpool.share");
18802         unlink("__db_lock.share");
18803 #endif
18804
18805         return rc;
18806 }
18807 EOF
18808 if { (eval echo configure:18809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18809 then
18810   ol_cv_berkeley_db_thread=yes
18811 else
18812   echo "configure: failed program was:" >&5
18813   cat conftest.$ac_ext >&5
18814   rm -fr conftest*
18815   ol_cv_berkeley_db_thread=no
18816 fi
18817 rm -fr conftest*
18818 fi
18819
18820
18821         LIBS="$ol_LIBS"
18822
18823 fi
18824
18825 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18826
18827         if test $ol_cv_berkeley_db_thread != no ; then
18828                 cat >> confdefs.h <<\EOF
18829 #define HAVE_BERKELEY_DB_THREAD 1
18830 EOF
18831
18832         fi
18833
18834         fi
18835 fi
18836
18837         fi
18838
18839         if test $ol_cv_berkeley_db != no ; then
18840                 cat >> confdefs.h <<\EOF
18841 #define HAVE_BERKELEY_DB 1
18842 EOF
18843
18844
18845                 ol_link_ldbm=berkeley
18846                 ol_with_ldbm_api=berkeley
18847
18848                 if test $ol_with_ldbm_type = hash ; then
18849                         cat >> confdefs.h <<\EOF
18850 #define LDBM_USE_DBHASH 1
18851 EOF
18852
18853                 else
18854                         cat >> confdefs.h <<\EOF
18855 #define LDBM_USE_DBBTREE 1
18856 EOF
18857
18858                 fi
18859
18860                                                 if test $ol_cv_lib_db != yes ; then
18861                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18862                 fi
18863         fi
18864 fi
18865
18866 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18867         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18868 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18869         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18870 echo "configure:18871: checking Berkeley DB version for BDB backend" >&5
18871 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18872   echo $ac_n "(cached) $ac_c" 1>&6
18873 else
18874   
18875         cat > conftest.$ac_ext <<EOF
18876 #line 18877 "configure"
18877 #include "confdefs.h"
18878
18879 #include <db.h>
18880
18881  /* this check could be improved */
18882 #ifndef DB_VERSION_MAJOR
18883 #       define DB_VERSION_MAJOR 1
18884 #endif
18885 #ifndef DB_VERSION_MINOR
18886 #       define DB_VERSION_MINOR 0
18887 #endif
18888
18889 /* require 4.0 or later */
18890 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
18891         __db_version_compat
18892 #endif
18893         
18894 EOF
18895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18896   egrep "__db_version_compat" >/dev/null 2>&1; then
18897   rm -rf conftest*
18898   ol_cv_bdb_compat=yes
18899 else
18900   rm -rf conftest*
18901   ol_cv_bdb_compat=no
18902 fi
18903 rm -f conftest*
18904
18905 fi
18906
18907 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18908
18909
18910         if test $ol_cv_bdb_compat = yes ; then
18911                 ol_enable_bdb=yes
18912         elif test $ol_enable_bdb = yes ; then
18913                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18914         else
18915                 ol_enable_bdb=no
18916         fi
18917 fi
18918
18919 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18920         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18921         ol_with_ldbm_api=none
18922 fi
18923
18924 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18925         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18926 echo "configure:18927: checking for MDBM library" >&5
18927 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18928   echo $ac_n "(cached) $ac_c" 1>&6
18929 else
18930         ol_LIBS="$LIBS"
18931         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18932 echo "configure:18933: checking for mdbm_set_chain" >&5
18933 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18934   echo $ac_n "(cached) $ac_c" 1>&6
18935 else
18936   cat > conftest.$ac_ext <<EOF
18937 #line 18938 "configure"
18938 #include "confdefs.h"
18939 /* System header to define __stub macros and hopefully few prototypes,
18940     which can conflict with char mdbm_set_chain(); below.  */
18941 #include <assert.h>
18942 /* Override any gcc2 internal prototype to avoid an error.  */
18943 /* We use char because int might match the return type of a gcc2
18944     builtin and then its argument prototype would still apply.  */
18945 char mdbm_set_chain();
18946 char (*f)();
18947
18948 int main() {
18949
18950 /* The GNU C library defines this for functions which it implements
18951     to always fail with ENOSYS.  Some functions are actually named
18952     something starting with __ and the normal name is an alias.  */
18953 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18954 choke me
18955 #else
18956 f = mdbm_set_chain;
18957 #endif
18958
18959 ; return 0; }
18960 EOF
18961 if { (eval echo configure:18962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18962   rm -rf conftest*
18963   eval "ac_cv_func_mdbm_set_chain=yes"
18964 else
18965   echo "configure: failed program was:" >&5
18966   cat conftest.$ac_ext >&5
18967   rm -rf conftest*
18968   eval "ac_cv_func_mdbm_set_chain=no"
18969 fi
18970 rm -f conftest*
18971 fi
18972
18973 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18974   echo "$ac_t""yes" 1>&6
18975   ol_cv_lib_mdbm=yes
18976 else
18977   echo "$ac_t""no" 1>&6
18978
18979                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18980 echo "configure:18981: checking for mdbm_set_chain in -lmdbm" >&5
18981 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18982 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18983   echo $ac_n "(cached) $ac_c" 1>&6
18984 else
18985   ac_save_LIBS="$LIBS"
18986 LIBS="-lmdbm  $LIBS"
18987 cat > conftest.$ac_ext <<EOF
18988 #line 18989 "configure"
18989 #include "confdefs.h"
18990 /* Override any gcc2 internal prototype to avoid an error.  */
18991 /* We use char because int might match the return type of a gcc2
18992     builtin and then its argument prototype would still apply.  */
18993 char mdbm_set_chain();
18994
18995 int main() {
18996 mdbm_set_chain()
18997 ; return 0; }
18998 EOF
18999 if { (eval echo configure:19000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19000   rm -rf conftest*
19001   eval "ac_cv_lib_$ac_lib_var=yes"
19002 else
19003   echo "configure: failed program was:" >&5
19004   cat conftest.$ac_ext >&5
19005   rm -rf conftest*
19006   eval "ac_cv_lib_$ac_lib_var=no"
19007 fi
19008 rm -f conftest*
19009 LIBS="$ac_save_LIBS"
19010
19011 fi
19012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19013   echo "$ac_t""yes" 1>&6
19014   ol_cv_lib_mdbm=-lmdbm
19015 else
19016   echo "$ac_t""no" 1>&6
19017 ol_cv_lib_mdbm=no
19018 fi
19019
19020         
19021 fi
19022
19023         LIBS="$ol_LIBS"
19024
19025 fi
19026
19027 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19028
19029
19030  for ac_hdr in mdbm.h
19031 do
19032 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19033 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19034 echo "configure:19035: checking for $ac_hdr" >&5
19035 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19036   echo $ac_n "(cached) $ac_c" 1>&6
19037 else
19038   cat > conftest.$ac_ext <<EOF
19039 #line 19040 "configure"
19040 #include "confdefs.h"
19041 #include <$ac_hdr>
19042 EOF
19043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19044 { (eval echo configure:19045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19046 if test -z "$ac_err"; then
19047   rm -rf conftest*
19048   eval "ac_cv_header_$ac_safe=yes"
19049 else
19050   echo "$ac_err" >&5
19051   echo "configure: failed program was:" >&5
19052   cat conftest.$ac_ext >&5
19053   rm -rf conftest*
19054   eval "ac_cv_header_$ac_safe=no"
19055 fi
19056 rm -f conftest*
19057 fi
19058 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19059   echo "$ac_t""yes" 1>&6
19060     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19061   cat >> confdefs.h <<EOF
19062 #define $ac_tr_hdr 1
19063 EOF
19064  
19065 else
19066   echo "$ac_t""no" 1>&6
19067 fi
19068 done
19069
19070  echo $ac_n "checking for db""... $ac_c" 1>&6
19071 echo "configure:19072: checking for db" >&5
19072 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19073   echo $ac_n "(cached) $ac_c" 1>&6
19074 else
19075   
19076         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19077                 ol_cv_mdbm=no
19078         else
19079                 ol_cv_mdbm=yes
19080         fi
19081
19082 fi
19083
19084 echo "$ac_t""$ol_cv_mdbm" 1>&6
19085  if test $ol_cv_mdbm = yes ; then
19086         cat >> confdefs.h <<\EOF
19087 #define HAVE_MDBM 1
19088 EOF
19089
19090  fi
19091
19092
19093         if test $ol_cv_mdbm = yes ; then
19094                 ol_link_ldbm=mdbm
19095                 ol_with_ldbm_api=mdbm
19096                 if test $ol_cv_lib_mdbm != yes ; then
19097                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19098                 fi
19099         fi
19100 fi
19101
19102 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19103         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19104 echo "configure:19105: checking for GDBM library" >&5
19105 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19106   echo $ac_n "(cached) $ac_c" 1>&6
19107 else
19108         ol_LIBS="$LIBS"
19109         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19110 echo "configure:19111: checking for gdbm_open" >&5
19111 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19112   echo $ac_n "(cached) $ac_c" 1>&6
19113 else
19114   cat > conftest.$ac_ext <<EOF
19115 #line 19116 "configure"
19116 #include "confdefs.h"
19117 /* System header to define __stub macros and hopefully few prototypes,
19118     which can conflict with char gdbm_open(); below.  */
19119 #include <assert.h>
19120 /* Override any gcc2 internal prototype to avoid an error.  */
19121 /* We use char because int might match the return type of a gcc2
19122     builtin and then its argument prototype would still apply.  */
19123 char gdbm_open();
19124 char (*f)();
19125
19126 int main() {
19127
19128 /* The GNU C library defines this for functions which it implements
19129     to always fail with ENOSYS.  Some functions are actually named
19130     something starting with __ and the normal name is an alias.  */
19131 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19132 choke me
19133 #else
19134 f = gdbm_open;
19135 #endif
19136
19137 ; return 0; }
19138 EOF
19139 if { (eval echo configure:19140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19140   rm -rf conftest*
19141   eval "ac_cv_func_gdbm_open=yes"
19142 else
19143   echo "configure: failed program was:" >&5
19144   cat conftest.$ac_ext >&5
19145   rm -rf conftest*
19146   eval "ac_cv_func_gdbm_open=no"
19147 fi
19148 rm -f conftest*
19149 fi
19150
19151 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19152   echo "$ac_t""yes" 1>&6
19153   ol_cv_lib_gdbm=yes
19154 else
19155   echo "$ac_t""no" 1>&6
19156
19157                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19158 echo "configure:19159: checking for gdbm_open in -lgdbm" >&5
19159 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19160 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19161   echo $ac_n "(cached) $ac_c" 1>&6
19162 else
19163   ac_save_LIBS="$LIBS"
19164 LIBS="-lgdbm  $LIBS"
19165 cat > conftest.$ac_ext <<EOF
19166 #line 19167 "configure"
19167 #include "confdefs.h"
19168 /* Override any gcc2 internal prototype to avoid an error.  */
19169 /* We use char because int might match the return type of a gcc2
19170     builtin and then its argument prototype would still apply.  */
19171 char gdbm_open();
19172
19173 int main() {
19174 gdbm_open()
19175 ; return 0; }
19176 EOF
19177 if { (eval echo configure:19178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19178   rm -rf conftest*
19179   eval "ac_cv_lib_$ac_lib_var=yes"
19180 else
19181   echo "configure: failed program was:" >&5
19182   cat conftest.$ac_ext >&5
19183   rm -rf conftest*
19184   eval "ac_cv_lib_$ac_lib_var=no"
19185 fi
19186 rm -f conftest*
19187 LIBS="$ac_save_LIBS"
19188
19189 fi
19190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19191   echo "$ac_t""yes" 1>&6
19192   ol_cv_lib_gdbm=-lgdbm
19193 else
19194   echo "$ac_t""no" 1>&6
19195 ol_cv_lib_gdbm=no
19196 fi
19197
19198         
19199 fi
19200
19201         LIBS="$ol_LIBS"
19202
19203 fi
19204
19205 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19206
19207
19208  for ac_hdr in gdbm.h
19209 do
19210 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19211 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19212 echo "configure:19213: checking for $ac_hdr" >&5
19213 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19214   echo $ac_n "(cached) $ac_c" 1>&6
19215 else
19216   cat > conftest.$ac_ext <<EOF
19217 #line 19218 "configure"
19218 #include "confdefs.h"
19219 #include <$ac_hdr>
19220 EOF
19221 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19222 { (eval echo configure:19223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19223 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19224 if test -z "$ac_err"; then
19225   rm -rf conftest*
19226   eval "ac_cv_header_$ac_safe=yes"
19227 else
19228   echo "$ac_err" >&5
19229   echo "configure: failed program was:" >&5
19230   cat conftest.$ac_ext >&5
19231   rm -rf conftest*
19232   eval "ac_cv_header_$ac_safe=no"
19233 fi
19234 rm -f conftest*
19235 fi
19236 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19237   echo "$ac_t""yes" 1>&6
19238     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19239   cat >> confdefs.h <<EOF
19240 #define $ac_tr_hdr 1
19241 EOF
19242  
19243 else
19244   echo "$ac_t""no" 1>&6
19245 fi
19246 done
19247
19248  echo $ac_n "checking for db""... $ac_c" 1>&6
19249 echo "configure:19250: checking for db" >&5
19250 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19251   echo $ac_n "(cached) $ac_c" 1>&6
19252 else
19253   
19254         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19255                 ol_cv_gdbm=no
19256         else
19257                 ol_cv_gdbm=yes
19258         fi
19259
19260 fi
19261
19262 echo "$ac_t""$ol_cv_gdbm" 1>&6
19263  if test $ol_cv_gdbm = yes ; then
19264         cat >> confdefs.h <<\EOF
19265 #define HAVE_GDBM 1
19266 EOF
19267
19268  fi
19269
19270
19271         if test $ol_cv_gdbm = yes ; then
19272                 ol_link_ldbm=gdbm
19273                 ol_with_ldbm_api=gdbm
19274
19275                 if test $ol_cv_lib_gdbm != yes ; then
19276                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19277                 fi
19278         fi
19279 fi
19280
19281 if test $ol_with_ldbm_api = ndbm ; then
19282         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19283 echo "configure:19284: checking for NDBM library" >&5
19284 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19285   echo $ac_n "(cached) $ac_c" 1>&6
19286 else
19287         ol_LIBS="$LIBS"
19288         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19289 echo "configure:19290: checking for dbm_open" >&5
19290 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19291   echo $ac_n "(cached) $ac_c" 1>&6
19292 else
19293   cat > conftest.$ac_ext <<EOF
19294 #line 19295 "configure"
19295 #include "confdefs.h"
19296 /* System header to define __stub macros and hopefully few prototypes,
19297     which can conflict with char dbm_open(); below.  */
19298 #include <assert.h>
19299 /* Override any gcc2 internal prototype to avoid an error.  */
19300 /* We use char because int might match the return type of a gcc2
19301     builtin and then its argument prototype would still apply.  */
19302 char dbm_open();
19303 char (*f)();
19304
19305 int main() {
19306
19307 /* The GNU C library defines this for functions which it implements
19308     to always fail with ENOSYS.  Some functions are actually named
19309     something starting with __ and the normal name is an alias.  */
19310 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19311 choke me
19312 #else
19313 f = dbm_open;
19314 #endif
19315
19316 ; return 0; }
19317 EOF
19318 if { (eval echo configure:19319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19319   rm -rf conftest*
19320   eval "ac_cv_func_dbm_open=yes"
19321 else
19322   echo "configure: failed program was:" >&5
19323   cat conftest.$ac_ext >&5
19324   rm -rf conftest*
19325   eval "ac_cv_func_dbm_open=no"
19326 fi
19327 rm -f conftest*
19328 fi
19329
19330 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19331   echo "$ac_t""yes" 1>&6
19332   ol_cv_lib_ndbm=yes
19333 else
19334   echo "$ac_t""no" 1>&6
19335
19336                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19337 echo "configure:19338: checking for dbm_open in -lndbm" >&5
19338 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19339 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19340   echo $ac_n "(cached) $ac_c" 1>&6
19341 else
19342   ac_save_LIBS="$LIBS"
19343 LIBS="-lndbm  $LIBS"
19344 cat > conftest.$ac_ext <<EOF
19345 #line 19346 "configure"
19346 #include "confdefs.h"
19347 /* Override any gcc2 internal prototype to avoid an error.  */
19348 /* We use char because int might match the return type of a gcc2
19349     builtin and then its argument prototype would still apply.  */
19350 char dbm_open();
19351
19352 int main() {
19353 dbm_open()
19354 ; return 0; }
19355 EOF
19356 if { (eval echo configure:19357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19357   rm -rf conftest*
19358   eval "ac_cv_lib_$ac_lib_var=yes"
19359 else
19360   echo "configure: failed program was:" >&5
19361   cat conftest.$ac_ext >&5
19362   rm -rf conftest*
19363   eval "ac_cv_lib_$ac_lib_var=no"
19364 fi
19365 rm -f conftest*
19366 LIBS="$ac_save_LIBS"
19367
19368 fi
19369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19370   echo "$ac_t""yes" 1>&6
19371   ol_cv_lib_ndbm=-lndbm
19372 else
19373   echo "$ac_t""no" 1>&6
19374
19375                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19376 echo "configure:19377: checking for dbm_open in -ldbm" >&5
19377 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19378 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19379   echo $ac_n "(cached) $ac_c" 1>&6
19380 else
19381   ac_save_LIBS="$LIBS"
19382 LIBS="-ldbm  $LIBS"
19383 cat > conftest.$ac_ext <<EOF
19384 #line 19385 "configure"
19385 #include "confdefs.h"
19386 /* Override any gcc2 internal prototype to avoid an error.  */
19387 /* We use char because int might match the return type of a gcc2
19388     builtin and then its argument prototype would still apply.  */
19389 char dbm_open();
19390
19391 int main() {
19392 dbm_open()
19393 ; return 0; }
19394 EOF
19395 if { (eval echo configure:19396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19396   rm -rf conftest*
19397   eval "ac_cv_lib_$ac_lib_var=yes"
19398 else
19399   echo "configure: failed program was:" >&5
19400   cat conftest.$ac_ext >&5
19401   rm -rf conftest*
19402   eval "ac_cv_lib_$ac_lib_var=no"
19403 fi
19404 rm -f conftest*
19405 LIBS="$ac_save_LIBS"
19406
19407 fi
19408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19409   echo "$ac_t""yes" 1>&6
19410   ol_cv_lib_ndbm=-ldbm
19411 else
19412   echo "$ac_t""no" 1>&6
19413 ol_cv_lib_ndbm=no
19414 fi
19415                 
19416 fi
19417
19418         
19419 fi
19420
19421         LIBS="$ol_LIBS"
19422
19423 fi
19424
19425 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19426
19427
19428  for ac_hdr in ndbm.h
19429 do
19430 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19431 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19432 echo "configure:19433: checking for $ac_hdr" >&5
19433 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19434   echo $ac_n "(cached) $ac_c" 1>&6
19435 else
19436   cat > conftest.$ac_ext <<EOF
19437 #line 19438 "configure"
19438 #include "confdefs.h"
19439 #include <$ac_hdr>
19440 EOF
19441 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19442 { (eval echo configure:19443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19443 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19444 if test -z "$ac_err"; then
19445   rm -rf conftest*
19446   eval "ac_cv_header_$ac_safe=yes"
19447 else
19448   echo "$ac_err" >&5
19449   echo "configure: failed program was:" >&5
19450   cat conftest.$ac_ext >&5
19451   rm -rf conftest*
19452   eval "ac_cv_header_$ac_safe=no"
19453 fi
19454 rm -f conftest*
19455 fi
19456 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19457   echo "$ac_t""yes" 1>&6
19458     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19459   cat >> confdefs.h <<EOF
19460 #define $ac_tr_hdr 1
19461 EOF
19462  
19463 else
19464   echo "$ac_t""no" 1>&6
19465 fi
19466 done
19467
19468  echo $ac_n "checking for db""... $ac_c" 1>&6
19469 echo "configure:19470: checking for db" >&5
19470 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19471   echo $ac_n "(cached) $ac_c" 1>&6
19472 else
19473   
19474         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19475                 ol_cv_ndbm=no
19476         else
19477                 ol_cv_ndbm=yes
19478         fi
19479
19480 fi
19481
19482 echo "$ac_t""$ol_cv_ndbm" 1>&6
19483  if test $ol_cv_ndbm = yes ; then
19484         cat >> confdefs.h <<\EOF
19485 #define HAVE_NDBM 1
19486 EOF
19487
19488  fi
19489
19490
19491         if test $ol_cv_ndbm = yes ; then
19492                 ol_link_ldbm=ndbm
19493                 ol_with_ldbm_api=ndbm
19494
19495                 if test $ol_cv_lib_ndbm != yes ; then
19496                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19497                 fi
19498         fi
19499 fi
19500
19501 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19502         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19503         if test $ol_enable_ldbm = yes ; then
19504                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19505         fi
19506
19507         echo "configure: warning: disabling LDBM" 1>&2
19508         ol_enable_ldbm=no
19509 fi
19510
19511 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19512         BUILD_LIBS_DYNAMIC=shared
19513         cat >> confdefs.h <<\EOF
19514 #define LDAP_LIBS_DYNAMIC 1
19515 EOF
19516
19517 else
19518         BUILD_LIBS_DYNAMIC=static
19519 fi
19520
19521 if test $ol_enable_wrappers != no ; then
19522         for ac_hdr in tcpd.h
19523 do
19524 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19525 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19526 echo "configure:19527: checking for $ac_hdr" >&5
19527 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19528   echo $ac_n "(cached) $ac_c" 1>&6
19529 else
19530   cat > conftest.$ac_ext <<EOF
19531 #line 19532 "configure"
19532 #include "confdefs.h"
19533 #include <$ac_hdr>
19534 EOF
19535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19536 { (eval echo configure:19537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19538 if test -z "$ac_err"; then
19539   rm -rf conftest*
19540   eval "ac_cv_header_$ac_safe=yes"
19541 else
19542   echo "$ac_err" >&5
19543   echo "configure: failed program was:" >&5
19544   cat conftest.$ac_ext >&5
19545   rm -rf conftest*
19546   eval "ac_cv_header_$ac_safe=no"
19547 fi
19548 rm -f conftest*
19549 fi
19550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19551   echo "$ac_t""yes" 1>&6
19552     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19553   cat >> confdefs.h <<EOF
19554 #define $ac_tr_hdr 1
19555 EOF
19556  
19557                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19558 echo "configure:19559: checking for TCP wrappers library" >&5
19559                 save_LIBS="$LIBS"
19560                 LIBS="$LIBS -lwrap"
19561                 cat > conftest.$ac_ext <<EOF
19562 #line 19563 "configure"
19563 #include "confdefs.h"
19564
19565 #include <tcpd.h>
19566 int allow_severity = 0;
19567 int deny_severity  = 0;
19568
19569 struct request_info *req;
19570                 
19571 int main() {
19572
19573 hosts_access(req)
19574                 
19575 ; return 0; }
19576 EOF
19577 if { (eval echo configure:19578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19578   rm -rf conftest*
19579   echo "$ac_t""-lwrap" 1>&6
19580                 have_wrappers=yes
19581                 LIBS="$save_LIBS"
19582 else
19583   echo "configure: failed program was:" >&5
19584   cat conftest.$ac_ext >&5
19585   rm -rf conftest*
19586   
19587                                 LIBS="$LIBS -lnsl"
19588                 cat > conftest.$ac_ext <<EOF
19589 #line 19590 "configure"
19590 #include "confdefs.h"
19591
19592 #include <tcpd.h>
19593 int allow_severity = 0;
19594 int deny_severity  = 0;
19595
19596 struct request_info *req;
19597                 
19598 int main() {
19599
19600 hosts_access(req)
19601                 
19602 ; return 0; }
19603 EOF
19604 if { (eval echo configure:19605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19605   rm -rf conftest*
19606   echo "$ac_t""-lwrap -lnsl" 1>&6
19607                 have_wrappers=yes
19608                 LIBS="$save_LIBS -lnsl"
19609 else
19610   echo "configure: failed program was:" >&5
19611   cat conftest.$ac_ext >&5
19612   rm -rf conftest*
19613   
19614                 echo "$ac_t""no" 1>&6
19615                 have_wrappers=no
19616                 LIBS=$save_LIBS
19617 fi
19618 rm -f conftest*
19619 fi
19620 rm -f conftest*
19621 else
19622   echo "$ac_t""no" 1>&6
19623 have_wrappers=no
19624 fi
19625 done
19626
19627
19628         if test $have_wrappers = yes ; then
19629                 cat >> confdefs.h <<\EOF
19630 #define HAVE_TCPD 1
19631 EOF
19632
19633                 WRAP_LIBS="-lwrap"
19634         elif test $ol_enable_wrappers = yes ; then
19635                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19636         else
19637                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19638                 WRAP_LIBS=""
19639         fi
19640 fi
19641
19642 if test $ol_enable_syslog != no ; then
19643         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19644 echo "configure:19645: checking for openlog" >&5
19645 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19646   echo $ac_n "(cached) $ac_c" 1>&6
19647 else
19648   cat > conftest.$ac_ext <<EOF
19649 #line 19650 "configure"
19650 #include "confdefs.h"
19651 /* System header to define __stub macros and hopefully few prototypes,
19652     which can conflict with char openlog(); below.  */
19653 #include <assert.h>
19654 /* Override any gcc2 internal prototype to avoid an error.  */
19655 /* We use char because int might match the return type of a gcc2
19656     builtin and then its argument prototype would still apply.  */
19657 char openlog();
19658 char (*f)();
19659
19660 int main() {
19661
19662 /* The GNU C library defines this for functions which it implements
19663     to always fail with ENOSYS.  Some functions are actually named
19664     something starting with __ and the normal name is an alias.  */
19665 #if defined (__stub_openlog) || defined (__stub___openlog)
19666 choke me
19667 #else
19668 f = openlog;
19669 #endif
19670
19671 ; return 0; }
19672 EOF
19673 if { (eval echo configure:19674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19674   rm -rf conftest*
19675   eval "ac_cv_func_openlog=yes"
19676 else
19677   echo "configure: failed program was:" >&5
19678   cat conftest.$ac_ext >&5
19679   rm -rf conftest*
19680   eval "ac_cv_func_openlog=no"
19681 fi
19682 rm -f conftest*
19683 fi
19684
19685 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19686   echo "$ac_t""yes" 1>&6
19687   :
19688 else
19689   echo "$ac_t""no" 1>&6
19690 fi
19691
19692         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19693                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19694         fi
19695         ol_enable_syslog=$ac_cv_func_openlog
19696 fi
19697
19698
19699 ol_link_sql=no
19700 if test $ol_enable_sql != no ; then
19701         for ac_hdr in sql.h sqlext.h
19702 do
19703 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19704 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19705 echo "configure:19706: checking for $ac_hdr" >&5
19706 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19707   echo $ac_n "(cached) $ac_c" 1>&6
19708 else
19709   cat > conftest.$ac_ext <<EOF
19710 #line 19711 "configure"
19711 #include "confdefs.h"
19712 #include <$ac_hdr>
19713 EOF
19714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19715 { (eval echo configure:19716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19717 if test -z "$ac_err"; then
19718   rm -rf conftest*
19719   eval "ac_cv_header_$ac_safe=yes"
19720 else
19721   echo "$ac_err" >&5
19722   echo "configure: failed program was:" >&5
19723   cat conftest.$ac_ext >&5
19724   rm -rf conftest*
19725   eval "ac_cv_header_$ac_safe=no"
19726 fi
19727 rm -f conftest*
19728 fi
19729 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19730   echo "$ac_t""yes" 1>&6
19731     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19732   cat >> confdefs.h <<EOF
19733 #define $ac_tr_hdr 1
19734 EOF
19735  
19736 else
19737   echo "$ac_t""no" 1>&6
19738 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
19739         
19740 fi
19741 done
19742
19743
19744         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19745 echo "configure:19746: checking for SQLDriverConnect in -liodbc" >&5
19746 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19747 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19748   echo $ac_n "(cached) $ac_c" 1>&6
19749 else
19750   ac_save_LIBS="$LIBS"
19751 LIBS="-liodbc  $LIBS"
19752 cat > conftest.$ac_ext <<EOF
19753 #line 19754 "configure"
19754 #include "confdefs.h"
19755 /* Override any gcc2 internal prototype to avoid an error.  */
19756 /* We use char because int might match the return type of a gcc2
19757     builtin and then its argument prototype would still apply.  */
19758 char SQLDriverConnect();
19759
19760 int main() {
19761 SQLDriverConnect()
19762 ; return 0; }
19763 EOF
19764 if { (eval echo configure:19765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19765   rm -rf conftest*
19766   eval "ac_cv_lib_$ac_lib_var=yes"
19767 else
19768   echo "configure: failed program was:" >&5
19769   cat conftest.$ac_ext >&5
19770   rm -rf conftest*
19771   eval "ac_cv_lib_$ac_lib_var=no"
19772 fi
19773 rm -f conftest*
19774 LIBS="$ac_save_LIBS"
19775
19776 fi
19777 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19778   echo "$ac_t""yes" 1>&6
19779   have_iodbc=yes
19780 else
19781   echo "$ac_t""no" 1>&6
19782 have_iodbc=no
19783 fi
19784
19785         if test $have_iodbc = yes ; then
19786                 ol_link_sql="-liodbc"
19787         else
19788                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19789 echo "configure:19790: checking for SQLDriverConnect in -lodbc" >&5
19790 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19791 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19792   echo $ac_n "(cached) $ac_c" 1>&6
19793 else
19794   ac_save_LIBS="$LIBS"
19795 LIBS="-lodbc  $LIBS"
19796 cat > conftest.$ac_ext <<EOF
19797 #line 19798 "configure"
19798 #include "confdefs.h"
19799 /* Override any gcc2 internal prototype to avoid an error.  */
19800 /* We use char because int might match the return type of a gcc2
19801     builtin and then its argument prototype would still apply.  */
19802 char SQLDriverConnect();
19803
19804 int main() {
19805 SQLDriverConnect()
19806 ; return 0; }
19807 EOF
19808 if { (eval echo configure:19809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19809   rm -rf conftest*
19810   eval "ac_cv_lib_$ac_lib_var=yes"
19811 else
19812   echo "configure: failed program was:" >&5
19813   cat conftest.$ac_ext >&5
19814   rm -rf conftest*
19815   eval "ac_cv_lib_$ac_lib_var=no"
19816 fi
19817 rm -f conftest*
19818 LIBS="$ac_save_LIBS"
19819
19820 fi
19821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19822   echo "$ac_t""yes" 1>&6
19823   have_odbc=yes
19824 else
19825   echo "$ac_t""no" 1>&6
19826 have_odbc=no
19827 fi
19828
19829                 if test $have_odbc = yes ; then
19830                         ol_link_sql="-lodbc"
19831                 fi
19832         fi
19833
19834         if test $ol_link_sql != no ; then
19835                 SLAPD_SQL_LIBS="$ol_link_sql"
19836
19837         elif test $ol_enable_sql != auto ; then
19838                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19839         fi
19840 fi
19841
19842 if test $ol_enable_tcl != no ; then
19843         for ac_hdr in tcl.h
19844 do
19845 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19846 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19847 echo "configure:19848: checking for $ac_hdr" >&5
19848 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19849   echo $ac_n "(cached) $ac_c" 1>&6
19850 else
19851   cat > conftest.$ac_ext <<EOF
19852 #line 19853 "configure"
19853 #include "confdefs.h"
19854 #include <$ac_hdr>
19855 EOF
19856 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19857 { (eval echo configure:19858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19858 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19859 if test -z "$ac_err"; then
19860   rm -rf conftest*
19861   eval "ac_cv_header_$ac_safe=yes"
19862 else
19863   echo "$ac_err" >&5
19864   echo "configure: failed program was:" >&5
19865   cat conftest.$ac_ext >&5
19866   rm -rf conftest*
19867   eval "ac_cv_header_$ac_safe=no"
19868 fi
19869 rm -f conftest*
19870 fi
19871 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19872   echo "$ac_t""yes" 1>&6
19873     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19874   cat >> confdefs.h <<EOF
19875 #define $ac_tr_hdr 1
19876 EOF
19877  
19878 else
19879   echo "$ac_t""no" 1>&6
19880 fi
19881 done
19882
19883
19884         if test $ac_cv_header_tcl_h != yes ; then
19885                 have_tcl=no
19886         else
19887                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19888                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19889 echo "configure:19890: checking for main in -l$lib" >&5
19890 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19891 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19892   echo $ac_n "(cached) $ac_c" 1>&6
19893 else
19894   ac_save_LIBS="$LIBS"
19895 LIBS="-l$lib  $LIBS"
19896 cat > conftest.$ac_ext <<EOF
19897 #line 19898 "configure"
19898 #include "confdefs.h"
19899
19900 int main() {
19901 main()
19902 ; return 0; }
19903 EOF
19904 if { (eval echo configure:19905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19905   rm -rf conftest*
19906   eval "ac_cv_lib_$ac_lib_var=yes"
19907 else
19908   echo "configure: failed program was:" >&5
19909   cat conftest.$ac_ext >&5
19910   rm -rf conftest*
19911   eval "ac_cv_lib_$ac_lib_var=no"
19912 fi
19913 rm -f conftest*
19914 LIBS="$ac_save_LIBS"
19915
19916 fi
19917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19918   echo "$ac_t""yes" 1>&6
19919   have_tcl=yes
19920                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19921                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19922                            else
19923                                         MOD_TCL_LIB="-l${lib}"
19924                            fi;break
19925 else
19926   echo "$ac_t""no" 1>&6
19927 have_tcl=no
19928 fi
19929
19930                 done
19931         fi
19932
19933         if test $have_tcl != yes ; then
19934                 echo "configure: warning: could not find -ltcl" 1>&2
19935                 if test $ol_enable_tcl = yes ; then
19936                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19937                 fi
19938
19939                 ol_enable_tcl=no
19940         fi
19941 fi
19942
19943 ol_link_termcap=no
19944 for ac_hdr in termcap.h ncurses.h
19945 do
19946 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19947 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19948 echo "configure:19949: checking for $ac_hdr" >&5
19949 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19950   echo $ac_n "(cached) $ac_c" 1>&6
19951 else
19952   cat > conftest.$ac_ext <<EOF
19953 #line 19954 "configure"
19954 #include "confdefs.h"
19955 #include <$ac_hdr>
19956 EOF
19957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19958 { (eval echo configure:19959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19960 if test -z "$ac_err"; then
19961   rm -rf conftest*
19962   eval "ac_cv_header_$ac_safe=yes"
19963 else
19964   echo "$ac_err" >&5
19965   echo "configure: failed program was:" >&5
19966   cat conftest.$ac_ext >&5
19967   rm -rf conftest*
19968   eval "ac_cv_header_$ac_safe=no"
19969 fi
19970 rm -f conftest*
19971 fi
19972 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19973   echo "$ac_t""yes" 1>&6
19974     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19975   cat >> confdefs.h <<EOF
19976 #define $ac_tr_hdr 1
19977 EOF
19978  
19979 else
19980   echo "$ac_t""no" 1>&6
19981 fi
19982 done
19983
19984
19985 if test $ol_link_termcap = no ; then
19986         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19987 echo "configure:19988: checking for tputs in -ltermcap" >&5
19988 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19989 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19990   echo $ac_n "(cached) $ac_c" 1>&6
19991 else
19992   ac_save_LIBS="$LIBS"
19993 LIBS="-ltermcap  $LIBS"
19994 cat > conftest.$ac_ext <<EOF
19995 #line 19996 "configure"
19996 #include "confdefs.h"
19997 /* Override any gcc2 internal prototype to avoid an error.  */
19998 /* We use char because int might match the return type of a gcc2
19999     builtin and then its argument prototype would still apply.  */
20000 char tputs();
20001
20002 int main() {
20003 tputs()
20004 ; return 0; }
20005 EOF
20006 if { (eval echo configure:20007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20007   rm -rf conftest*
20008   eval "ac_cv_lib_$ac_lib_var=yes"
20009 else
20010   echo "configure: failed program was:" >&5
20011   cat conftest.$ac_ext >&5
20012   rm -rf conftest*
20013   eval "ac_cv_lib_$ac_lib_var=no"
20014 fi
20015 rm -f conftest*
20016 LIBS="$ac_save_LIBS"
20017
20018 fi
20019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20020   echo "$ac_t""yes" 1>&6
20021   have_termcap=yes
20022 else
20023   echo "$ac_t""no" 1>&6
20024 have_termcap=no
20025 fi
20026
20027         if test $have_termcap = yes ; then
20028                 cat >> confdefs.h <<\EOF
20029 #define HAVE_TERMCAP 1
20030 EOF
20031
20032                 ol_link_termcap=yes
20033                 TERMCAP_LIBS=-ltermcap
20034         fi
20035 fi
20036
20037 if test $ol_link_termcap = no ; then
20038         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20039 echo "configure:20040: checking for initscr in -lncurses" >&5
20040 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20041 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20042   echo $ac_n "(cached) $ac_c" 1>&6
20043 else
20044   ac_save_LIBS="$LIBS"
20045 LIBS="-lncurses  $LIBS"
20046 cat > conftest.$ac_ext <<EOF
20047 #line 20048 "configure"
20048 #include "confdefs.h"
20049 /* Override any gcc2 internal prototype to avoid an error.  */
20050 /* We use char because int might match the return type of a gcc2
20051     builtin and then its argument prototype would still apply.  */
20052 char initscr();
20053
20054 int main() {
20055 initscr()
20056 ; return 0; }
20057 EOF
20058 if { (eval echo configure:20059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20059   rm -rf conftest*
20060   eval "ac_cv_lib_$ac_lib_var=yes"
20061 else
20062   echo "configure: failed program was:" >&5
20063   cat conftest.$ac_ext >&5
20064   rm -rf conftest*
20065   eval "ac_cv_lib_$ac_lib_var=no"
20066 fi
20067 rm -f conftest*
20068 LIBS="$ac_save_LIBS"
20069
20070 fi
20071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20072   echo "$ac_t""yes" 1>&6
20073   have_ncurses=yes
20074 else
20075   echo "$ac_t""no" 1>&6
20076 have_ncurses=no
20077 fi
20078
20079         if test $have_ncurses = yes ; then
20080                 cat >> confdefs.h <<\EOF
20081 #define HAVE_NCURSES 1
20082 EOF
20083
20084                 ol_link_termcap=yes
20085                 TERMCAP_LIBS=-lncurses
20086         fi
20087 fi
20088
20089 if test $ol_link_termcap = no ; then
20090         cat >> confdefs.h <<\EOF
20091 #define NO_TERMCAP 1
20092 EOF
20093
20094         TERMCAP_LIBS=
20095 fi
20096
20097 ol_link_sasl=no
20098 ol_link_spasswd=no
20099 if test $ol_with_cyrus_sasl != no ; then
20100         for ac_hdr in sasl/sasl.h sasl.h
20101 do
20102 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20103 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20104 echo "configure:20105: checking for $ac_hdr" >&5
20105 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20106   echo $ac_n "(cached) $ac_c" 1>&6
20107 else
20108   cat > conftest.$ac_ext <<EOF
20109 #line 20110 "configure"
20110 #include "confdefs.h"
20111 #include <$ac_hdr>
20112 EOF
20113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20114 { (eval echo configure:20115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20115 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20116 if test -z "$ac_err"; then
20117   rm -rf conftest*
20118   eval "ac_cv_header_$ac_safe=yes"
20119 else
20120   echo "$ac_err" >&5
20121   echo "configure: failed program was:" >&5
20122   cat conftest.$ac_ext >&5
20123   rm -rf conftest*
20124   eval "ac_cv_header_$ac_safe=no"
20125 fi
20126 rm -f conftest*
20127 fi
20128 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20129   echo "$ac_t""yes" 1>&6
20130     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20131   cat >> confdefs.h <<EOF
20132 #define $ac_tr_hdr 1
20133 EOF
20134  
20135 else
20136   echo "$ac_t""no" 1>&6
20137 fi
20138 done
20139
20140
20141         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20142                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20143 echo "configure:20144: checking for sasl_client_init in -lsasl2" >&5
20144 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20145 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20146   echo $ac_n "(cached) $ac_c" 1>&6
20147 else
20148   ac_save_LIBS="$LIBS"
20149 LIBS="-lsasl2  $LIBS"
20150 cat > conftest.$ac_ext <<EOF
20151 #line 20152 "configure"
20152 #include "confdefs.h"
20153 /* Override any gcc2 internal prototype to avoid an error.  */
20154 /* We use char because int might match the return type of a gcc2
20155     builtin and then its argument prototype would still apply.  */
20156 char sasl_client_init();
20157
20158 int main() {
20159 sasl_client_init()
20160 ; return 0; }
20161 EOF
20162 if { (eval echo configure:20163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20163   rm -rf conftest*
20164   eval "ac_cv_lib_$ac_lib_var=yes"
20165 else
20166   echo "configure: failed program was:" >&5
20167   cat conftest.$ac_ext >&5
20168   rm -rf conftest*
20169   eval "ac_cv_lib_$ac_lib_var=no"
20170 fi
20171 rm -f conftest*
20172 LIBS="$ac_save_LIBS"
20173
20174 fi
20175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20176   echo "$ac_t""yes" 1>&6
20177   ol_link_sasl="-lsasl2"
20178 else
20179   echo "$ac_t""no" 1>&6
20180 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20181 echo "configure:20182: checking for sasl_client_init in -lsasl" >&5
20182 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20183 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20184   echo $ac_n "(cached) $ac_c" 1>&6
20185 else
20186   ac_save_LIBS="$LIBS"
20187 LIBS="-lsasl  $LIBS"
20188 cat > conftest.$ac_ext <<EOF
20189 #line 20190 "configure"
20190 #include "confdefs.h"
20191 /* Override any gcc2 internal prototype to avoid an error.  */
20192 /* We use char because int might match the return type of a gcc2
20193     builtin and then its argument prototype would still apply.  */
20194 char sasl_client_init();
20195
20196 int main() {
20197 sasl_client_init()
20198 ; return 0; }
20199 EOF
20200 if { (eval echo configure:20201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20201   rm -rf conftest*
20202   eval "ac_cv_lib_$ac_lib_var=yes"
20203 else
20204   echo "configure: failed program was:" >&5
20205   cat conftest.$ac_ext >&5
20206   rm -rf conftest*
20207   eval "ac_cv_lib_$ac_lib_var=no"
20208 fi
20209 rm -f conftest*
20210 LIBS="$ac_save_LIBS"
20211
20212 fi
20213 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20214   echo "$ac_t""yes" 1>&6
20215   ol_link_sasl="-lsasl"
20216 else
20217   echo "$ac_t""no" 1>&6
20218 fi
20219
20220 fi
20221
20222         fi
20223
20224         if test $ol_link_sasl = no ; then
20225                 if test $ol_with_cyrus_sasl != auto ; then
20226                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20227                 else
20228                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20229                         echo "configure: warning: SASL authentication not supported!" 1>&2
20230                         if test $ol_link_tls = no ; then
20231                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20232                         fi
20233                 fi
20234         else
20235                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20236 echo "configure:20237: checking Cyrus SASL library version" >&5
20237 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20238   echo $ac_n "(cached) $ac_c" 1>&6
20239 else
20240   
20241         cat > conftest.$ac_ext <<EOF
20242 #line 20243 "configure"
20243 #include "confdefs.h"
20244
20245 #ifdef HAVE_SASL_SASL_H
20246 #include <sasl/sasl.h>
20247 #else
20248 #include <sasl.h>
20249 #endif
20250
20251 /* require 2.1.3 or later */
20252 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20253         char *__sasl_compat = "1.5.x okay";
20254 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20255         __sasl_compat "2.2+ or better okay (we guess)";
20256 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20257         && SASL_VERSION_STEP >=3
20258         __sasl_compat = "2.1.3+ or better okay";
20259 #endif
20260         
20261 EOF
20262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20263   egrep "__sasl_compat" >/dev/null 2>&1; then
20264   rm -rf conftest*
20265   ol_cv_sasl_compat=yes
20266 else
20267   rm -rf conftest*
20268   ol_cv_sasl_compat=no
20269 fi
20270 rm -f conftest*
20271
20272 fi
20273
20274 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20275
20276                 if test $ol_cv_sasl_compat = no ; then
20277                         ol_link_sasl=no
20278                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20279                 fi
20280
20281                 cat >> confdefs.h <<\EOF
20282 #define HAVE_CYRUS_SASL 1
20283 EOF
20284
20285                 SASL_LIBS="$ol_link_sasl"
20286                 if test $ol_enable_spasswd != no ; then
20287                         ol_link_spasswd=yes
20288                 fi
20289
20290                 ac_save_LIBS="$LIBS"
20291                 LIBS="$LIBS $ol_link_sasl"
20292                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20293 echo "configure:20294: checking for sasl_version" >&5
20294 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20295   echo $ac_n "(cached) $ac_c" 1>&6
20296 else
20297   cat > conftest.$ac_ext <<EOF
20298 #line 20299 "configure"
20299 #include "confdefs.h"
20300 /* System header to define __stub macros and hopefully few prototypes,
20301     which can conflict with char sasl_version(); below.  */
20302 #include <assert.h>
20303 /* Override any gcc2 internal prototype to avoid an error.  */
20304 /* We use char because int might match the return type of a gcc2
20305     builtin and then its argument prototype would still apply.  */
20306 char sasl_version();
20307 char (*f)();
20308
20309 int main() {
20310
20311 /* The GNU C library defines this for functions which it implements
20312     to always fail with ENOSYS.  Some functions are actually named
20313     something starting with __ and the normal name is an alias.  */
20314 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20315 choke me
20316 #else
20317 f = sasl_version;
20318 #endif
20319
20320 ; return 0; }
20321 EOF
20322 if { (eval echo configure:20323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20323   rm -rf conftest*
20324   eval "ac_cv_func_sasl_version=yes"
20325 else
20326   echo "configure: failed program was:" >&5
20327   cat conftest.$ac_ext >&5
20328   rm -rf conftest*
20329   eval "ac_cv_func_sasl_version=no"
20330 fi
20331 rm -f conftest*
20332 fi
20333
20334 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20335   echo "$ac_t""yes" 1>&6
20336   cat >> confdefs.h <<\EOF
20337 #define HAVE_SASL_VERSION 1
20338 EOF
20339
20340 else
20341   echo "$ac_t""no" 1>&6
20342 fi
20343
20344                 LIBS="$ac_save_LIBS"
20345         fi
20346
20347 else
20348         echo "configure: warning: SASL authentication not supported!" 1>&2
20349         if test $ol_link_tls = no ; then
20350                 echo "configure: warning: Strong authentication not supported!" 1>&2
20351         fi
20352 fi
20353
20354 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20355         dev=no
20356         if test -r /dev/urandom ; then
20357                 dev="/dev/urandom";
20358         elif test -r /idev/urandom ; then
20359                 dev="/idev/urandom";
20360         elif test -r /dev/srandom ; then
20361                 dev="/dev/srandom";
20362         elif test -r /dev/random ; then
20363                 dev="/dev/random";
20364         elif test -r /idev/random ; then
20365                 dev="/idev/random";
20366         fi
20367
20368         if test $dev != no ; then
20369                 cat >> confdefs.h <<EOF
20370 #define URANDOM_DEVICE "$dev"
20371 EOF
20372
20373         fi
20374 fi
20375
20376 ol_link_fetch=no
20377 if test $ol_with_fetch != no ; then
20378         ol_LIBS=$LIBS
20379 LIBS="-lfetch -lcom_err $LIBS"
20380 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20381 echo "configure:20382: checking fetch(3) library" >&5
20382 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20383   echo $ac_n "(cached) $ac_c" 1>&6
20384 else
20385   
20386         cat > conftest.$ac_ext <<EOF
20387 #line 20388 "configure"
20388 #include "confdefs.h"
20389
20390 #include <sys/param.h>
20391 #include <stdio.h>
20392 #include <fetch.h>
20393 int main() {
20394 struct url *u = fetchParseURL("file:///"); 
20395 ; return 0; }
20396 EOF
20397 if { (eval echo configure:20398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20398   rm -rf conftest*
20399   ol_cv_lib_fetch=yes
20400 else
20401   echo "configure: failed program was:" >&5
20402   cat conftest.$ac_ext >&5
20403   rm -rf conftest*
20404   ol_cv_lib_fetch=no
20405 fi
20406 rm -f conftest*
20407 fi
20408
20409 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20410 LIBS=$ol_LIBS
20411 if test $ol_cv_lib_fetch != no ; then
20412         ol_link_fetch="-lfetch -lcom_err"
20413         cat >> confdefs.h <<\EOF
20414 #define HAVE_FETCH 1
20415 EOF
20416
20417 fi
20418
20419
20420         if test $ol_cv_lib_fetch != no ; then
20421                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20422                 ol_link_fetch=freebsd
20423
20424         elif test $ol_with_fetch != auto ; then
20425                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20426         fi 
20427 fi
20428
20429 ol_link_readline=no
20430 if test $ol_with_readline != no ; then
20431         for ac_hdr in readline/readline.h readline/history.h
20432 do
20433 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20434 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20435 echo "configure:20436: checking for $ac_hdr" >&5
20436 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20437   echo $ac_n "(cached) $ac_c" 1>&6
20438 else
20439   cat > conftest.$ac_ext <<EOF
20440 #line 20441 "configure"
20441 #include "confdefs.h"
20442 #include <$ac_hdr>
20443 EOF
20444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20445 { (eval echo configure:20446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20447 if test -z "$ac_err"; then
20448   rm -rf conftest*
20449   eval "ac_cv_header_$ac_safe=yes"
20450 else
20451   echo "$ac_err" >&5
20452   echo "configure: failed program was:" >&5
20453   cat conftest.$ac_ext >&5
20454   rm -rf conftest*
20455   eval "ac_cv_header_$ac_safe=no"
20456 fi
20457 rm -f conftest*
20458 fi
20459 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20460   echo "$ac_t""yes" 1>&6
20461     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20462   cat >> confdefs.h <<EOF
20463 #define $ac_tr_hdr 1
20464 EOF
20465  
20466 else
20467   echo "$ac_t""no" 1>&6
20468 fi
20469 done
20470
20471
20472         if test $ac_cv_header_readline_readline_h = yes ; then
20473                 save_LIBS="$LIBS"
20474                 LIBS="$TERMCAP_LIBS $LIBS"
20475                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
20476 echo "configure:20477: checking for readline in -lreadline" >&5
20477 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
20478 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20479   echo $ac_n "(cached) $ac_c" 1>&6
20480 else
20481   ac_save_LIBS="$LIBS"
20482 LIBS="-lreadline  $LIBS"
20483 cat > conftest.$ac_ext <<EOF
20484 #line 20485 "configure"
20485 #include "confdefs.h"
20486 /* Override any gcc2 internal prototype to avoid an error.  */
20487 /* We use char because int might match the return type of a gcc2
20488     builtin and then its argument prototype would still apply.  */
20489 char readline();
20490
20491 int main() {
20492 readline()
20493 ; return 0; }
20494 EOF
20495 if { (eval echo configure:20496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20496   rm -rf conftest*
20497   eval "ac_cv_lib_$ac_lib_var=yes"
20498 else
20499   echo "configure: failed program was:" >&5
20500   cat conftest.$ac_ext >&5
20501   rm -rf conftest*
20502   eval "ac_cv_lib_$ac_lib_var=no"
20503 fi
20504 rm -f conftest*
20505 LIBS="$ac_save_LIBS"
20506
20507 fi
20508 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20509   echo "$ac_t""yes" 1>&6
20510   have_readline=yes
20511 else
20512   echo "$ac_t""no" 1>&6
20513 have_readline=no
20514 fi
20515
20516                 LIBS="$save_LIBS"
20517                         
20518                 if test $have_readline = yes ; then
20519                         ol_with_readline=found
20520                         ol_link_readline=yes
20521
20522                         READLINE_LIBS="-lreadline"
20523                 fi
20524         fi
20525 fi
20526
20527 if test $ol_link_readline = yes ; then
20528         cat >> confdefs.h <<\EOF
20529 #define HAVE_READLINE 1
20530 EOF
20531
20532 fi
20533
20534
20535 if test $ol_enable_crypt != no ; then
20536         save_LIBS="$LIBS"
20537         LIBS="$TLS_LIBS $LIBS"
20538
20539         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20540 echo "configure:20541: checking for crypt" >&5
20541 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20542   echo $ac_n "(cached) $ac_c" 1>&6
20543 else
20544   cat > conftest.$ac_ext <<EOF
20545 #line 20546 "configure"
20546 #include "confdefs.h"
20547 /* System header to define __stub macros and hopefully few prototypes,
20548     which can conflict with char crypt(); below.  */
20549 #include <assert.h>
20550 /* Override any gcc2 internal prototype to avoid an error.  */
20551 /* We use char because int might match the return type of a gcc2
20552     builtin and then its argument prototype would still apply.  */
20553 char crypt();
20554 char (*f)();
20555
20556 int main() {
20557
20558 /* The GNU C library defines this for functions which it implements
20559     to always fail with ENOSYS.  Some functions are actually named
20560     something starting with __ and the normal name is an alias.  */
20561 #if defined (__stub_crypt) || defined (__stub___crypt)
20562 choke me
20563 #else
20564 f = crypt;
20565 #endif
20566
20567 ; return 0; }
20568 EOF
20569 if { (eval echo configure:20570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20570   rm -rf conftest*
20571   eval "ac_cv_func_crypt=yes"
20572 else
20573   echo "configure: failed program was:" >&5
20574   cat conftest.$ac_ext >&5
20575   rm -rf conftest*
20576   eval "ac_cv_func_crypt=no"
20577 fi
20578 rm -f conftest*
20579 fi
20580
20581 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20582   echo "$ac_t""yes" 1>&6
20583   have_crypt=yes
20584 else
20585   echo "$ac_t""no" 1>&6
20586
20587                 LIBS="$save_LIBS"
20588                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20589 echo "configure:20590: checking for crypt in -lcrypt" >&5
20590 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20591 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20592   echo $ac_n "(cached) $ac_c" 1>&6
20593 else
20594   ac_save_LIBS="$LIBS"
20595 LIBS="-lcrypt  $LIBS"
20596 cat > conftest.$ac_ext <<EOF
20597 #line 20598 "configure"
20598 #include "confdefs.h"
20599 /* Override any gcc2 internal prototype to avoid an error.  */
20600 /* We use char because int might match the return type of a gcc2
20601     builtin and then its argument prototype would still apply.  */
20602 char crypt();
20603
20604 int main() {
20605 crypt()
20606 ; return 0; }
20607 EOF
20608 if { (eval echo configure:20609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20609   rm -rf conftest*
20610   eval "ac_cv_lib_$ac_lib_var=yes"
20611 else
20612   echo "configure: failed program was:" >&5
20613   cat conftest.$ac_ext >&5
20614   rm -rf conftest*
20615   eval "ac_cv_lib_$ac_lib_var=no"
20616 fi
20617 rm -f conftest*
20618 LIBS="$ac_save_LIBS"
20619
20620 fi
20621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20622   echo "$ac_t""yes" 1>&6
20623   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20624                         have_crypt=yes
20625 else
20626   echo "$ac_t""no" 1>&6
20627 have_crypt=no
20628 fi
20629
20630 fi
20631
20632
20633         LIBS="$save_LIBS"
20634
20635         if test $have_crypt = yes ; then
20636                 cat >> confdefs.h <<\EOF
20637 #define HAVE_CRYPT 1
20638 EOF
20639
20640         else
20641                 echo "configure: warning: could not find crypt" 1>&2
20642                 if test $ol_enable_crypt = yes ; then
20643                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20644                 fi
20645
20646                 echo "configure: warning: disabling crypt support" 1>&2
20647                 ol_enable_crypt=no
20648         fi
20649 fi
20650
20651 if test $ol_enable_proctitle != no ; then
20652         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20653 echo "configure:20654: checking for setproctitle" >&5
20654 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20655   echo $ac_n "(cached) $ac_c" 1>&6
20656 else
20657   cat > conftest.$ac_ext <<EOF
20658 #line 20659 "configure"
20659 #include "confdefs.h"
20660 /* System header to define __stub macros and hopefully few prototypes,
20661     which can conflict with char setproctitle(); below.  */
20662 #include <assert.h>
20663 /* Override any gcc2 internal prototype to avoid an error.  */
20664 /* We use char because int might match the return type of a gcc2
20665     builtin and then its argument prototype would still apply.  */
20666 char setproctitle();
20667 char (*f)();
20668
20669 int main() {
20670
20671 /* The GNU C library defines this for functions which it implements
20672     to always fail with ENOSYS.  Some functions are actually named
20673     something starting with __ and the normal name is an alias.  */
20674 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20675 choke me
20676 #else
20677 f = setproctitle;
20678 #endif
20679
20680 ; return 0; }
20681 EOF
20682 if { (eval echo configure:20683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20683   rm -rf conftest*
20684   eval "ac_cv_func_setproctitle=yes"
20685 else
20686   echo "configure: failed program was:" >&5
20687   cat conftest.$ac_ext >&5
20688   rm -rf conftest*
20689   eval "ac_cv_func_setproctitle=no"
20690 fi
20691 rm -f conftest*
20692 fi
20693
20694 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20695   echo "$ac_t""yes" 1>&6
20696   have_setproctitle=yes
20697 else
20698   echo "$ac_t""no" 1>&6
20699
20700                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20701 echo "configure:20702: checking for setproctitle in -lutil" >&5
20702 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20703 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20704   echo $ac_n "(cached) $ac_c" 1>&6
20705 else
20706   ac_save_LIBS="$LIBS"
20707 LIBS="-lutil  $LIBS"
20708 cat > conftest.$ac_ext <<EOF
20709 #line 20710 "configure"
20710 #include "confdefs.h"
20711 /* Override any gcc2 internal prototype to avoid an error.  */
20712 /* We use char because int might match the return type of a gcc2
20713     builtin and then its argument prototype would still apply.  */
20714 char setproctitle();
20715
20716 int main() {
20717 setproctitle()
20718 ; return 0; }
20719 EOF
20720 if { (eval echo configure:20721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20721   rm -rf conftest*
20722   eval "ac_cv_lib_$ac_lib_var=yes"
20723 else
20724   echo "configure: failed program was:" >&5
20725   cat conftest.$ac_ext >&5
20726   rm -rf conftest*
20727   eval "ac_cv_lib_$ac_lib_var=no"
20728 fi
20729 rm -f conftest*
20730 LIBS="$ac_save_LIBS"
20731
20732 fi
20733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20734   echo "$ac_t""yes" 1>&6
20735   have_setproctitle=yes
20736                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20737 else
20738   echo "$ac_t""no" 1>&6
20739 have_setproctitle=no
20740                         LIBOBJS="$LIBOBJS setproctitle.o"
20741                         LIBSRCS="$LIBSRCS setproctitle.c"
20742 fi
20743
20744 fi
20745
20746
20747         if test $have_setproctitle = yes ; then
20748                 cat >> confdefs.h <<\EOF
20749 #define HAVE_SETPROCTITLE 1
20750 EOF
20751
20752         fi
20753 fi
20754
20755 if test $ol_enable_slp != no ; then
20756         for ac_hdr in slp.h 
20757 do
20758 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20759 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20760 echo "configure:20761: checking for $ac_hdr" >&5
20761 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20762   echo $ac_n "(cached) $ac_c" 1>&6
20763 else
20764   cat > conftest.$ac_ext <<EOF
20765 #line 20766 "configure"
20766 #include "confdefs.h"
20767 #include <$ac_hdr>
20768 EOF
20769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20770 { (eval echo configure:20771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20772 if test -z "$ac_err"; then
20773   rm -rf conftest*
20774   eval "ac_cv_header_$ac_safe=yes"
20775 else
20776   echo "$ac_err" >&5
20777   echo "configure: failed program was:" >&5
20778   cat conftest.$ac_ext >&5
20779   rm -rf conftest*
20780   eval "ac_cv_header_$ac_safe=no"
20781 fi
20782 rm -f conftest*
20783 fi
20784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20785   echo "$ac_t""yes" 1>&6
20786     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20787   cat >> confdefs.h <<EOF
20788 #define $ac_tr_hdr 1
20789 EOF
20790  
20791 else
20792   echo "$ac_t""no" 1>&6
20793 fi
20794 done
20795
20796
20797         if test $ac_cv_header_slp_h = yes ; then
20798                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20799 echo "configure:20800: checking for SLPOpen in -lslp" >&5
20800 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20801 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20802   echo $ac_n "(cached) $ac_c" 1>&6
20803 else
20804   ac_save_LIBS="$LIBS"
20805 LIBS="-lslp  $LIBS"
20806 cat > conftest.$ac_ext <<EOF
20807 #line 20808 "configure"
20808 #include "confdefs.h"
20809 /* Override any gcc2 internal prototype to avoid an error.  */
20810 /* We use char because int might match the return type of a gcc2
20811     builtin and then its argument prototype would still apply.  */
20812 char SLPOpen();
20813
20814 int main() {
20815 SLPOpen()
20816 ; return 0; }
20817 EOF
20818 if { (eval echo configure:20819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20819   rm -rf conftest*
20820   eval "ac_cv_lib_$ac_lib_var=yes"
20821 else
20822   echo "configure: failed program was:" >&5
20823   cat conftest.$ac_ext >&5
20824   rm -rf conftest*
20825   eval "ac_cv_lib_$ac_lib_var=no"
20826 fi
20827 rm -f conftest*
20828 LIBS="$ac_save_LIBS"
20829
20830 fi
20831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20832   echo "$ac_t""yes" 1>&6
20833   have_slp=yes
20834 else
20835   echo "$ac_t""no" 1>&6
20836 have_slp=no
20837 fi
20838
20839                 if test $have_slp = yes ; then
20840                         cat >> confdefs.h <<\EOF
20841 #define HAVE_SLP 1
20842 EOF
20843
20844                         SLAPD_SLP_LIBS=-lslp
20845                 fi
20846
20847         elif test $ol_enable_slp = yes ; then
20848                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20849         fi
20850 fi
20851
20852 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20853 echo "configure:20854: checking for ANSI C header files" >&5
20854 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20855   echo $ac_n "(cached) $ac_c" 1>&6
20856 else
20857   cat > conftest.$ac_ext <<EOF
20858 #line 20859 "configure"
20859 #include "confdefs.h"
20860 #include <stdlib.h>
20861 #include <stdarg.h>
20862 #include <string.h>
20863 #include <float.h>
20864 EOF
20865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20866 { (eval echo configure:20867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20868 if test -z "$ac_err"; then
20869   rm -rf conftest*
20870   ac_cv_header_stdc=yes
20871 else
20872   echo "$ac_err" >&5
20873   echo "configure: failed program was:" >&5
20874   cat conftest.$ac_ext >&5
20875   rm -rf conftest*
20876   ac_cv_header_stdc=no
20877 fi
20878 rm -f conftest*
20879
20880 if test $ac_cv_header_stdc = yes; then
20881   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20882 cat > conftest.$ac_ext <<EOF
20883 #line 20884 "configure"
20884 #include "confdefs.h"
20885 #include <string.h>
20886 EOF
20887 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20888   egrep "memchr" >/dev/null 2>&1; then
20889   :
20890 else
20891   rm -rf conftest*
20892   ac_cv_header_stdc=no
20893 fi
20894 rm -f conftest*
20895
20896 fi
20897
20898 if test $ac_cv_header_stdc = yes; then
20899   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20900 cat > conftest.$ac_ext <<EOF
20901 #line 20902 "configure"
20902 #include "confdefs.h"
20903 #include <stdlib.h>
20904 EOF
20905 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20906   egrep "free" >/dev/null 2>&1; then
20907   :
20908 else
20909   rm -rf conftest*
20910   ac_cv_header_stdc=no
20911 fi
20912 rm -f conftest*
20913
20914 fi
20915
20916 if test $ac_cv_header_stdc = yes; then
20917   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20918 if test "$cross_compiling" = yes; then
20919   :
20920 else
20921   cat > conftest.$ac_ext <<EOF
20922 #line 20923 "configure"
20923 #include "confdefs.h"
20924 #include <ctype.h>
20925 #if ((' ' & 0x0FF) == 0x020)
20926 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20927 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20928 #else
20929 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20930  || ('j' <= (c) && (c) <= 'r') \
20931  || ('s' <= (c) && (c) <= 'z'))
20932 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20933 #endif
20934 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20935 int main () { int i; for (i = 0; i < 256; i++)
20936 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20937 exit (0); }
20938
20939 EOF
20940 if { (eval echo configure:20941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20941 then
20942   :
20943 else
20944   echo "configure: failed program was:" >&5
20945   cat conftest.$ac_ext >&5
20946   rm -fr conftest*
20947   ac_cv_header_stdc=no
20948 fi
20949 rm -fr conftest*
20950 fi
20951
20952 fi
20953 fi
20954
20955 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20956 if test $ac_cv_header_stdc = yes; then
20957   cat >> confdefs.h <<\EOF
20958 #define STDC_HEADERS 1
20959 EOF
20960
20961 fi
20962
20963 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20964 echo "configure:20965: checking for mode_t" >&5
20965 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20966   echo $ac_n "(cached) $ac_c" 1>&6
20967 else
20968   cat > conftest.$ac_ext <<EOF
20969 #line 20970 "configure"
20970 #include "confdefs.h"
20971 #include <sys/types.h>
20972 #if STDC_HEADERS
20973 #include <stdlib.h>
20974 #include <stddef.h>
20975 #endif
20976
20977 EOF
20978 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20979   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20980   rm -rf conftest*
20981   eval "ac_cv_type_mode_t=yes"
20982 else
20983   rm -rf conftest*
20984   eval "ac_cv_type_mode_t=no"
20985 fi
20986 rm -f conftest*
20987
20988 fi
20989 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20990   echo "$ac_t""yes" 1>&6
20991 else
20992   echo "$ac_t""no" 1>&6
20993   cat >> confdefs.h <<EOF
20994 #define mode_t int
20995 EOF
20996
20997 fi
20998
20999 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21000 echo "configure:21001: checking for off_t" >&5
21001 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21002   echo $ac_n "(cached) $ac_c" 1>&6
21003 else
21004   cat > conftest.$ac_ext <<EOF
21005 #line 21006 "configure"
21006 #include "confdefs.h"
21007 #include <sys/types.h>
21008 #if STDC_HEADERS
21009 #include <stdlib.h>
21010 #include <stddef.h>
21011 #endif
21012
21013 EOF
21014 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21015   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21016   rm -rf conftest*
21017   eval "ac_cv_type_off_t=yes"
21018 else
21019   rm -rf conftest*
21020   eval "ac_cv_type_off_t=no"
21021 fi
21022 rm -f conftest*
21023
21024 fi
21025 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21026   echo "$ac_t""yes" 1>&6
21027 else
21028   echo "$ac_t""no" 1>&6
21029   cat >> confdefs.h <<EOF
21030 #define off_t long
21031 EOF
21032
21033 fi
21034
21035 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21036 echo "configure:21037: checking for pid_t" >&5
21037 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21038   echo $ac_n "(cached) $ac_c" 1>&6
21039 else
21040   cat > conftest.$ac_ext <<EOF
21041 #line 21042 "configure"
21042 #include "confdefs.h"
21043 #include <sys/types.h>
21044 #if STDC_HEADERS
21045 #include <stdlib.h>
21046 #include <stddef.h>
21047 #endif
21048
21049 EOF
21050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21051   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21052   rm -rf conftest*
21053   eval "ac_cv_type_pid_t=yes"
21054 else
21055   rm -rf conftest*
21056   eval "ac_cv_type_pid_t=no"
21057 fi
21058 rm -f conftest*
21059
21060 fi
21061 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21062   echo "$ac_t""yes" 1>&6
21063 else
21064   echo "$ac_t""no" 1>&6
21065   cat >> confdefs.h <<EOF
21066 #define pid_t int
21067 EOF
21068
21069 fi
21070
21071 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21072 echo "configure:21073: checking for ptrdiff_t" >&5
21073 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21074   echo $ac_n "(cached) $ac_c" 1>&6
21075 else
21076   cat > conftest.$ac_ext <<EOF
21077 #line 21078 "configure"
21078 #include "confdefs.h"
21079 #include <stddef.h>
21080 int main() {
21081 ptrdiff_t p
21082 ; return 0; }
21083 EOF
21084 if { (eval echo configure:21085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21085   rm -rf conftest*
21086   am_cv_type_ptrdiff_t=yes
21087 else
21088   echo "configure: failed program was:" >&5
21089   cat conftest.$ac_ext >&5
21090   rm -rf conftest*
21091   am_cv_type_ptrdiff_t=no
21092 fi
21093 rm -f conftest*
21094 fi
21095
21096 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21097    if test $am_cv_type_ptrdiff_t = yes; then
21098      cat >> confdefs.h <<\EOF
21099 #define HAVE_PTRDIFF_T 1
21100 EOF
21101
21102    fi
21103
21104 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21105 echo "configure:21106: checking return type of signal handlers" >&5
21106 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21107   echo $ac_n "(cached) $ac_c" 1>&6
21108 else
21109   cat > conftest.$ac_ext <<EOF
21110 #line 21111 "configure"
21111 #include "confdefs.h"
21112 #include <sys/types.h>
21113 #include <signal.h>
21114 #ifdef signal
21115 #undef signal
21116 #endif
21117 #ifdef __cplusplus
21118 extern "C" void (*signal (int, void (*)(int)))(int);
21119 #else
21120 void (*signal ()) ();
21121 #endif
21122
21123 int main() {
21124 int i;
21125 ; return 0; }
21126 EOF
21127 if { (eval echo configure:21128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21128   rm -rf conftest*
21129   ac_cv_type_signal=void
21130 else
21131   echo "configure: failed program was:" >&5
21132   cat conftest.$ac_ext >&5
21133   rm -rf conftest*
21134   ac_cv_type_signal=int
21135 fi
21136 rm -f conftest*
21137 fi
21138
21139 echo "$ac_t""$ac_cv_type_signal" 1>&6
21140 cat >> confdefs.h <<EOF
21141 #define RETSIGTYPE $ac_cv_type_signal
21142 EOF
21143
21144
21145 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21146 echo "configure:21147: checking for size_t" >&5
21147 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21148   echo $ac_n "(cached) $ac_c" 1>&6
21149 else
21150   cat > conftest.$ac_ext <<EOF
21151 #line 21152 "configure"
21152 #include "confdefs.h"
21153 #include <sys/types.h>
21154 #if STDC_HEADERS
21155 #include <stdlib.h>
21156 #include <stddef.h>
21157 #endif
21158
21159 EOF
21160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21161   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21162   rm -rf conftest*
21163   eval "ac_cv_type_size_t=yes"
21164 else
21165   rm -rf conftest*
21166   eval "ac_cv_type_size_t=no"
21167 fi
21168 rm -f conftest*
21169
21170 fi
21171 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21172   echo "$ac_t""yes" 1>&6
21173 else
21174   echo "$ac_t""no" 1>&6
21175   cat >> confdefs.h <<EOF
21176 #define size_t unsigned
21177 EOF
21178
21179 fi
21180
21181
21182 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21183 echo "configure:21184: checking for ssize_t" >&5
21184 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21185   echo $ac_n "(cached) $ac_c" 1>&6
21186 else
21187   cat > conftest.$ac_ext <<EOF
21188 #line 21189 "configure"
21189 #include "confdefs.h"
21190 #include <sys/types.h>
21191 #if STDC_HEADERS
21192 #include <stdlib.h>
21193 #include <stddef.h>
21194 #endif
21195
21196 EOF
21197 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21198   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21199   rm -rf conftest*
21200   eval "ac_cv_type_ssize_t=yes"
21201 else
21202   rm -rf conftest*
21203   eval "ac_cv_type_ssize_t=no"
21204 fi
21205 rm -f conftest*
21206
21207 fi
21208 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21209   echo "$ac_t""yes" 1>&6
21210 else
21211   echo "$ac_t""no" 1>&6
21212   cat >> confdefs.h <<EOF
21213 #define ssize_t signed int
21214 EOF
21215
21216 fi
21217
21218 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21219 echo "configure:21220: checking for caddr_t" >&5
21220 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21221   echo $ac_n "(cached) $ac_c" 1>&6
21222 else
21223   cat > conftest.$ac_ext <<EOF
21224 #line 21225 "configure"
21225 #include "confdefs.h"
21226 #include <sys/types.h>
21227 #if STDC_HEADERS
21228 #include <stdlib.h>
21229 #include <stddef.h>
21230 #endif
21231
21232 EOF
21233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21234   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21235   rm -rf conftest*
21236   eval "ac_cv_type_caddr_t=yes"
21237 else
21238   rm -rf conftest*
21239   eval "ac_cv_type_caddr_t=no"
21240 fi
21241 rm -f conftest*
21242
21243 fi
21244 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21245   echo "$ac_t""yes" 1>&6
21246 else
21247   echo "$ac_t""no" 1>&6
21248   cat >> confdefs.h <<EOF
21249 #define caddr_t char *
21250 EOF
21251
21252 fi
21253
21254
21255 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21256 echo "configure:21257: checking for socklen_t" >&5
21257 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21258   echo $ac_n "(cached) $ac_c" 1>&6
21259 else
21260   cat > conftest.$ac_ext <<EOF
21261 #line 21262 "configure"
21262 #include "confdefs.h"
21263
21264 #ifdef HAVE_SYS_TYPES_H
21265 #include <sys/types.h>
21266 #endif
21267 #ifdef HAVE_SYS_SOCKET_H
21268 #include <sys/socket.h>
21269 #endif
21270
21271 int main() {
21272 socklen_t len;
21273 ; return 0; }
21274 EOF
21275 if { (eval echo configure:21276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21276   rm -rf conftest*
21277   ol_cv_type_socklen_t=yes
21278 else
21279   echo "configure: failed program was:" >&5
21280   cat conftest.$ac_ext >&5
21281   rm -rf conftest*
21282   ol_cv_type_socklen_t=no
21283 fi
21284 rm -f conftest*
21285 fi
21286
21287 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21288   if test $ol_cv_type_socklen_t = no; then
21289     cat >> confdefs.h <<\EOF
21290 #define socklen_t int
21291 EOF
21292
21293   fi
21294  
21295 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21296 echo "configure:21297: checking for member st_blksize in aggregate type struct stat" >&5
21297 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21298   echo $ac_n "(cached) $ac_c" 1>&6
21299 else
21300   cat > conftest.$ac_ext <<EOF
21301 #line 21302 "configure"
21302 #include "confdefs.h"
21303 #include <sys/types.h>
21304 #include <sys/stat.h>
21305 int main() {
21306 struct stat foo; foo.st_blksize;
21307 ; return 0; }
21308 EOF
21309 if { (eval echo configure:21310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21310   rm -rf conftest*
21311   ac_cv_c_struct_member_st_blksize=yes
21312 else
21313   echo "configure: failed program was:" >&5
21314   cat conftest.$ac_ext >&5
21315   rm -rf conftest*
21316   ac_cv_c_struct_member_st_blksize=no
21317 fi
21318 rm -f conftest*
21319 fi
21320
21321 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21322 st_blksize="$ac_cv_c_struct_member_st_blksize"
21323 if test $ac_cv_c_struct_member_st_blksize = yes; then
21324   cat >> confdefs.h <<\EOF
21325 #define HAVE_ST_BLKSIZE 1
21326 EOF
21327
21328 fi
21329
21330 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21331 echo "configure:21332: checking whether time.h and sys/time.h may both be included" >&5
21332 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21333   echo $ac_n "(cached) $ac_c" 1>&6
21334 else
21335   cat > conftest.$ac_ext <<EOF
21336 #line 21337 "configure"
21337 #include "confdefs.h"
21338 #include <sys/types.h>
21339 #include <sys/time.h>
21340 #include <time.h>
21341 int main() {
21342 struct tm *tp;
21343 ; return 0; }
21344 EOF
21345 if { (eval echo configure:21346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21346   rm -rf conftest*
21347   ac_cv_header_time=yes
21348 else
21349   echo "configure: failed program was:" >&5
21350   cat conftest.$ac_ext >&5
21351   rm -rf conftest*
21352   ac_cv_header_time=no
21353 fi
21354 rm -f conftest*
21355 fi
21356
21357 echo "$ac_t""$ac_cv_header_time" 1>&6
21358 if test $ac_cv_header_time = yes; then
21359   cat >> confdefs.h <<\EOF
21360 #define TIME_WITH_SYS_TIME 1
21361 EOF
21362
21363 fi
21364
21365 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21366 echo "configure:21367: checking whether struct tm is in sys/time.h or time.h" >&5
21367 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21368   echo $ac_n "(cached) $ac_c" 1>&6
21369 else
21370   cat > conftest.$ac_ext <<EOF
21371 #line 21372 "configure"
21372 #include "confdefs.h"
21373 #include <sys/types.h>
21374 #include <time.h>
21375 int main() {
21376 struct tm *tp; tp->tm_sec;
21377 ; return 0; }
21378 EOF
21379 if { (eval echo configure:21380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21380   rm -rf conftest*
21381   ac_cv_struct_tm=time.h
21382 else
21383   echo "configure: failed program was:" >&5
21384   cat conftest.$ac_ext >&5
21385   rm -rf conftest*
21386   ac_cv_struct_tm=sys/time.h
21387 fi
21388 rm -f conftest*
21389 fi
21390
21391 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21392 if test $ac_cv_struct_tm = sys/time.h; then
21393   cat >> confdefs.h <<\EOF
21394 #define TM_IN_SYS_TIME 1
21395 EOF
21396
21397 fi
21398
21399 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21400 echo "configure:21401: checking for uid_t in sys/types.h" >&5
21401 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21402   echo $ac_n "(cached) $ac_c" 1>&6
21403 else
21404   cat > conftest.$ac_ext <<EOF
21405 #line 21406 "configure"
21406 #include "confdefs.h"
21407 #include <sys/types.h>
21408 EOF
21409 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21410   egrep "uid_t" >/dev/null 2>&1; then
21411   rm -rf conftest*
21412   ac_cv_type_uid_t=yes
21413 else
21414   rm -rf conftest*
21415   ac_cv_type_uid_t=no
21416 fi
21417 rm -f conftest*
21418
21419 fi
21420
21421 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21422 if test $ac_cv_type_uid_t = no; then
21423   cat >> confdefs.h <<\EOF
21424 #define uid_t int
21425 EOF
21426
21427   cat >> confdefs.h <<\EOF
21428 #define gid_t int
21429 EOF
21430
21431 fi
21432
21433 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21434 echo "configure:21435: checking for sig_atomic_t" >&5
21435 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21436   echo $ac_n "(cached) $ac_c" 1>&6
21437 else
21438   cat > conftest.$ac_ext <<EOF
21439 #line 21440 "configure"
21440 #include "confdefs.h"
21441 #include <signal.h>
21442 int main() {
21443 sig_atomic_t atomic;
21444 ; return 0; }
21445 EOF
21446 if { (eval echo configure:21447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21447   rm -rf conftest*
21448   ol_cv_type_sig_atomic_t=yes
21449 else
21450   echo "configure: failed program was:" >&5
21451   cat conftest.$ac_ext >&5
21452   rm -rf conftest*
21453   ol_cv_type_sig_atomic_t=no
21454 fi
21455 rm -f conftest*
21456 fi
21457
21458 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21459   if test $ol_cv_type_sig_atomic_t = no; then
21460     cat >> confdefs.h <<\EOF
21461 #define sig_atomic_t int
21462 EOF
21463
21464   fi
21465  
21466
21467
21468 # test for pw_gecos in struct passwd
21469 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21470 echo "configure:21471: checking struct passwd for pw_gecos" >&5
21471 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21472   echo $ac_n "(cached) $ac_c" 1>&6
21473 else
21474   
21475         cat > conftest.$ac_ext <<EOF
21476 #line 21477 "configure"
21477 #include "confdefs.h"
21478 #include <pwd.h>
21479 int main() {
21480
21481         struct passwd pwd;
21482         pwd.pw_gecos = pwd.pw_name;
21483
21484 ; return 0; }
21485 EOF
21486 if { (eval echo configure:21487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21487   rm -rf conftest*
21488   ol_cv_struct_passwd_pw_gecos=yes
21489 else
21490   echo "configure: failed program was:" >&5
21491   cat conftest.$ac_ext >&5
21492   rm -rf conftest*
21493   ol_cv_struct_passwd_pw_gecos=no
21494 fi
21495 rm -f conftest*
21496 fi
21497
21498 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21499 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21500         cat >> confdefs.h <<\EOF
21501 #define HAVE_PW_GECOS 1
21502 EOF
21503
21504 fi
21505
21506 # test for pw_passwd in struct passwd
21507 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21508 echo "configure:21509: checking struct passwd for pw_passwd" >&5
21509 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21510   echo $ac_n "(cached) $ac_c" 1>&6
21511 else
21512   
21513         cat > conftest.$ac_ext <<EOF
21514 #line 21515 "configure"
21515 #include "confdefs.h"
21516 #include <pwd.h>
21517 int main() {
21518
21519         struct passwd pwd;
21520         pwd.pw_passwd = pwd.pw_name;
21521
21522 ; return 0; }
21523 EOF
21524 if { (eval echo configure:21525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21525   rm -rf conftest*
21526   ol_cv_struct_passwd_pw_passwd=yes
21527 else
21528   echo "configure: failed program was:" >&5
21529   cat conftest.$ac_ext >&5
21530   rm -rf conftest*
21531   ol_cv_struct_passwd_pw_passwd=no
21532 fi
21533 rm -f conftest*
21534 fi
21535
21536 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21537 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21538         cat >> confdefs.h <<\EOF
21539 #define HAVE_PW_PASSWD 1
21540 EOF
21541
21542 fi
21543
21544
21545 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21546 echo "configure:21547: checking if toupper() requires islower()" >&5
21547 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21548   echo $ac_n "(cached) $ac_c" 1>&6
21549 else
21550   
21551         if test "$cross_compiling" = yes; then
21552   ol_cv_c_upper_lower=safe
21553 else
21554   cat > conftest.$ac_ext <<EOF
21555 #line 21556 "configure"
21556 #include "confdefs.h"
21557
21558 #include <ctype.h>
21559 main()
21560 {
21561         if ('C' == toupper('C'))
21562                 exit(0);
21563         else
21564                 exit(1);
21565 }
21566 EOF
21567 if { (eval echo configure:21568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21568 then
21569   ol_cv_c_upper_lower=no
21570 else
21571   echo "configure: failed program was:" >&5
21572   cat conftest.$ac_ext >&5
21573   rm -fr conftest*
21574   ol_cv_c_upper_lower=yes
21575 fi
21576 rm -fr conftest*
21577 fi
21578
21579 fi
21580
21581 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21582 if test $ol_cv_c_upper_lower != no ; then
21583         cat >> confdefs.h <<\EOF
21584 #define C_UPPER_LOWER 1
21585 EOF
21586
21587 fi
21588
21589 echo $ac_n "checking for working const""... $ac_c" 1>&6
21590 echo "configure:21591: checking for working const" >&5
21591 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21592   echo $ac_n "(cached) $ac_c" 1>&6
21593 else
21594   cat > conftest.$ac_ext <<EOF
21595 #line 21596 "configure"
21596 #include "confdefs.h"
21597
21598 int main() {
21599
21600 /* Ultrix mips cc rejects this.  */
21601 typedef int charset[2]; const charset x;
21602 /* SunOS 4.1.1 cc rejects this.  */
21603 char const *const *ccp;
21604 char **p;
21605 /* NEC SVR4.0.2 mips cc rejects this.  */
21606 struct point {int x, y;};
21607 static struct point const zero = {0,0};
21608 /* AIX XL C 1.02.0.0 rejects this.
21609    It does not let you subtract one const X* pointer from another in an arm
21610    of an if-expression whose if-part is not a constant expression */
21611 const char *g = "string";
21612 ccp = &g + (g ? g-g : 0);
21613 /* HPUX 7.0 cc rejects these. */
21614 ++ccp;
21615 p = (char**) ccp;
21616 ccp = (char const *const *) p;
21617 { /* SCO 3.2v4 cc rejects this.  */
21618   char *t;
21619   char const *s = 0 ? (char *) 0 : (char const *) 0;
21620
21621   *t++ = 0;
21622 }
21623 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21624   int x[] = {25, 17};
21625   const int *foo = &x[0];
21626   ++foo;
21627 }
21628 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21629   typedef const int *iptr;
21630   iptr p = 0;
21631   ++p;
21632 }
21633 { /* AIX XL C 1.02.0.0 rejects this saying
21634      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21635   struct s { int j; const int *ap[3]; };
21636   struct s *b; b->j = 5;
21637 }
21638 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21639   const int foo = 10;
21640 }
21641
21642 ; return 0; }
21643 EOF
21644 if { (eval echo configure:21645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21645   rm -rf conftest*
21646   ac_cv_c_const=yes
21647 else
21648   echo "configure: failed program was:" >&5
21649   cat conftest.$ac_ext >&5
21650   rm -rf conftest*
21651   ac_cv_c_const=no
21652 fi
21653 rm -f conftest*
21654 fi
21655
21656 echo "$ac_t""$ac_cv_c_const" 1>&6
21657 if test $ac_cv_c_const = no; then
21658   cat >> confdefs.h <<\EOF
21659 #define const 
21660 EOF
21661
21662 fi
21663
21664 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21665 echo "configure:21666: checking if compiler understands volatile" >&5
21666 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21667   echo $ac_n "(cached) $ac_c" 1>&6
21668 else
21669   cat > conftest.$ac_ext <<EOF
21670 #line 21671 "configure"
21671 #include "confdefs.h"
21672 int x, y, z;
21673 int main() {
21674 volatile int a; int * volatile b = x ? &y : &z;
21675       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21676       *b = 0;
21677 ; return 0; }
21678 EOF
21679 if { (eval echo configure:21680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21680   rm -rf conftest*
21681   ol_cv_c_volatile=yes
21682 else
21683   echo "configure: failed program was:" >&5
21684   cat conftest.$ac_ext >&5
21685   rm -rf conftest*
21686   ol_cv_c_volatile=no
21687 fi
21688 rm -f conftest*
21689 fi
21690
21691 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21692   if test $ol_cv_c_volatile = yes; then
21693     : 
21694   else
21695     cat >> confdefs.h <<\EOF
21696 #define volatile 
21697 EOF
21698
21699   fi
21700  
21701
21702 if test $cross_compiling = yes ; then
21703         cat >> confdefs.h <<\EOF
21704 #define CROSS_COMPILING 1
21705 EOF
21706
21707 else
21708         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21709 echo "configure:21710: checking whether byte ordering is bigendian" >&5
21710 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21711   echo $ac_n "(cached) $ac_c" 1>&6
21712 else
21713   ac_cv_c_bigendian=unknown
21714 # See if sys/param.h defines the BYTE_ORDER macro.
21715 cat > conftest.$ac_ext <<EOF
21716 #line 21717 "configure"
21717 #include "confdefs.h"
21718 #include <sys/types.h>
21719 #include <sys/param.h>
21720 int main() {
21721
21722 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21723  bogus endian macros
21724 #endif
21725 ; return 0; }
21726 EOF
21727 if { (eval echo configure:21728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21728   rm -rf conftest*
21729   # It does; now see whether it defined to BIG_ENDIAN or not.
21730 cat > conftest.$ac_ext <<EOF
21731 #line 21732 "configure"
21732 #include "confdefs.h"
21733 #include <sys/types.h>
21734 #include <sys/param.h>
21735 int main() {
21736
21737 #if BYTE_ORDER != BIG_ENDIAN
21738  not big endian
21739 #endif
21740 ; return 0; }
21741 EOF
21742 if { (eval echo configure:21743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21743   rm -rf conftest*
21744   ac_cv_c_bigendian=yes
21745 else
21746   echo "configure: failed program was:" >&5
21747   cat conftest.$ac_ext >&5
21748   rm -rf conftest*
21749   ac_cv_c_bigendian=no
21750 fi
21751 rm -f conftest*
21752 else
21753   echo "configure: failed program was:" >&5
21754   cat conftest.$ac_ext >&5
21755 fi
21756 rm -f conftest*
21757 if test $ac_cv_c_bigendian = unknown; then
21758 if test "$cross_compiling" = yes; then
21759     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21760 else
21761   cat > conftest.$ac_ext <<EOF
21762 #line 21763 "configure"
21763 #include "confdefs.h"
21764 main () {
21765   /* Are we little or big endian?  From Harbison&Steele.  */
21766   union
21767   {
21768     long l;
21769     char c[sizeof (long)];
21770   } u;
21771   u.l = 1;
21772   exit (u.c[sizeof (long) - 1] == 1);
21773 }
21774 EOF
21775 if { (eval echo configure:21776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21776 then
21777   ac_cv_c_bigendian=no
21778 else
21779   echo "configure: failed program was:" >&5
21780   cat conftest.$ac_ext >&5
21781   rm -fr conftest*
21782   ac_cv_c_bigendian=yes
21783 fi
21784 rm -fr conftest*
21785 fi
21786
21787 fi
21788 fi
21789
21790 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21791 if test $ac_cv_c_bigendian = yes; then
21792   cat >> confdefs.h <<\EOF
21793 #define WORDS_BIGENDIAN 1
21794 EOF
21795
21796 fi
21797
21798 fi
21799
21800 echo $ac_n "checking size of short""... $ac_c" 1>&6
21801 echo "configure:21802: checking size of short" >&5 
21802 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21803   echo $ac_n "(cached) $ac_c" 1>&6
21804 else
21805   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21806   cat > conftest.$ac_ext <<EOF
21807 #line 21808 "configure"
21808 #include "confdefs.h"
21809 #include "confdefs.h" 
21810 #include <sys/types.h> 
21811  
21812
21813 int main() {
21814 switch (0) case 0: case (sizeof (short) == $ac_size):;
21815 ; return 0; }
21816 EOF
21817 if { (eval echo configure:21818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21818   rm -rf conftest*
21819   ac_cv_sizeof_short=$ac_size
21820 else
21821   echo "configure: failed program was:" >&5
21822   cat conftest.$ac_ext >&5
21823 fi
21824 rm -f conftest* 
21825   if test x$ac_cv_sizeof_short != x ; then break; fi 
21826 done 
21827
21828 fi
21829  
21830 if test x$ac_cv_sizeof_short = x ; then 
21831   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21832 fi 
21833 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21834 cat >> confdefs.h <<EOF
21835 #define SIZEOF_SHORT $ac_cv_sizeof_short
21836 EOF
21837  
21838  
21839 echo $ac_n "checking size of int""... $ac_c" 1>&6
21840 echo "configure:21841: checking size of int" >&5 
21841 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21842   echo $ac_n "(cached) $ac_c" 1>&6
21843 else
21844   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21845   cat > conftest.$ac_ext <<EOF
21846 #line 21847 "configure"
21847 #include "confdefs.h"
21848 #include "confdefs.h" 
21849 #include <sys/types.h> 
21850  
21851
21852 int main() {
21853 switch (0) case 0: case (sizeof (int) == $ac_size):;
21854 ; return 0; }
21855 EOF
21856 if { (eval echo configure:21857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21857   rm -rf conftest*
21858   ac_cv_sizeof_int=$ac_size
21859 else
21860   echo "configure: failed program was:" >&5
21861   cat conftest.$ac_ext >&5
21862 fi
21863 rm -f conftest* 
21864   if test x$ac_cv_sizeof_int != x ; then break; fi 
21865 done 
21866
21867 fi
21868  
21869 if test x$ac_cv_sizeof_int = x ; then 
21870   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21871 fi 
21872 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21873 cat >> confdefs.h <<EOF
21874 #define SIZEOF_INT $ac_cv_sizeof_int
21875 EOF
21876  
21877  
21878 echo $ac_n "checking size of long""... $ac_c" 1>&6
21879 echo "configure:21880: checking size of long" >&5 
21880 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21881   echo $ac_n "(cached) $ac_c" 1>&6
21882 else
21883   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21884   cat > conftest.$ac_ext <<EOF
21885 #line 21886 "configure"
21886 #include "confdefs.h"
21887 #include "confdefs.h" 
21888 #include <sys/types.h> 
21889  
21890
21891 int main() {
21892 switch (0) case 0: case (sizeof (long) == $ac_size):;
21893 ; return 0; }
21894 EOF
21895 if { (eval echo configure:21896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21896   rm -rf conftest*
21897   ac_cv_sizeof_long=$ac_size
21898 else
21899   echo "configure: failed program was:" >&5
21900   cat conftest.$ac_ext >&5
21901 fi
21902 rm -f conftest* 
21903   if test x$ac_cv_sizeof_long != x ; then break; fi 
21904 done 
21905
21906 fi
21907  
21908 if test x$ac_cv_sizeof_long = x ; then 
21909   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21910 fi 
21911 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21912 cat >> confdefs.h <<EOF
21913 #define SIZEOF_LONG $ac_cv_sizeof_long
21914 EOF
21915  
21916
21917
21918 if test "$ac_cv_sizeof_int" -lt 4 ; then
21919         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21920
21921         cat >> confdefs.h <<\EOF
21922 #define LBER_INT_T long
21923 EOF
21924
21925 else
21926         cat >> confdefs.h <<\EOF
21927 #define LBER_INT_T int
21928 EOF
21929
21930 fi
21931
21932 cat >> confdefs.h <<\EOF
21933 #define LBER_LEN_T long
21934 EOF
21935
21936 cat >> confdefs.h <<\EOF
21937 #define LBER_SOCKET_T int
21938 EOF
21939
21940 cat >> confdefs.h <<\EOF
21941 #define LBER_TAG_T long
21942 EOF
21943
21944
21945 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21946 echo "configure:21947: checking for 8-bit clean memcmp" >&5
21947 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21948   echo $ac_n "(cached) $ac_c" 1>&6
21949 else
21950   if test "$cross_compiling" = yes; then
21951   ac_cv_func_memcmp_clean=no
21952 else
21953   cat > conftest.$ac_ext <<EOF
21954 #line 21955 "configure"
21955 #include "confdefs.h"
21956
21957 main()
21958 {
21959   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21960   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21961 }
21962
21963 EOF
21964 if { (eval echo configure:21965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21965 then
21966   ac_cv_func_memcmp_clean=yes
21967 else
21968   echo "configure: failed program was:" >&5
21969   cat conftest.$ac_ext >&5
21970   rm -fr conftest*
21971   ac_cv_func_memcmp_clean=no
21972 fi
21973 rm -fr conftest*
21974 fi
21975
21976 fi
21977
21978 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21979 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21980
21981 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21982 echo "configure:21983: checking for strftime" >&5
21983 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21984   echo $ac_n "(cached) $ac_c" 1>&6
21985 else
21986   cat > conftest.$ac_ext <<EOF
21987 #line 21988 "configure"
21988 #include "confdefs.h"
21989 /* System header to define __stub macros and hopefully few prototypes,
21990     which can conflict with char strftime(); below.  */
21991 #include <assert.h>
21992 /* Override any gcc2 internal prototype to avoid an error.  */
21993 /* We use char because int might match the return type of a gcc2
21994     builtin and then its argument prototype would still apply.  */
21995 char strftime();
21996 char (*f)();
21997
21998 int main() {
21999
22000 /* The GNU C library defines this for functions which it implements
22001     to always fail with ENOSYS.  Some functions are actually named
22002     something starting with __ and the normal name is an alias.  */
22003 #if defined (__stub_strftime) || defined (__stub___strftime)
22004 choke me
22005 #else
22006 f = strftime;
22007 #endif
22008
22009 ; return 0; }
22010 EOF
22011 if { (eval echo configure:22012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22012   rm -rf conftest*
22013   eval "ac_cv_func_strftime=yes"
22014 else
22015   echo "configure: failed program was:" >&5
22016   cat conftest.$ac_ext >&5
22017   rm -rf conftest*
22018   eval "ac_cv_func_strftime=no"
22019 fi
22020 rm -f conftest*
22021 fi
22022
22023 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22024   echo "$ac_t""yes" 1>&6
22025   cat >> confdefs.h <<\EOF
22026 #define HAVE_STRFTIME 1
22027 EOF
22028
22029 else
22030   echo "$ac_t""no" 1>&6
22031 # strftime is in -lintl on SCO UNIX.
22032 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22033 echo "configure:22034: checking for strftime in -lintl" >&5
22034 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22035 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22036   echo $ac_n "(cached) $ac_c" 1>&6
22037 else
22038   ac_save_LIBS="$LIBS"
22039 LIBS="-lintl  $LIBS"
22040 cat > conftest.$ac_ext <<EOF
22041 #line 22042 "configure"
22042 #include "confdefs.h"
22043 /* Override any gcc2 internal prototype to avoid an error.  */
22044 /* We use char because int might match the return type of a gcc2
22045     builtin and then its argument prototype would still apply.  */
22046 char strftime();
22047
22048 int main() {
22049 strftime()
22050 ; return 0; }
22051 EOF
22052 if { (eval echo configure:22053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22053   rm -rf conftest*
22054   eval "ac_cv_lib_$ac_lib_var=yes"
22055 else
22056   echo "configure: failed program was:" >&5
22057   cat conftest.$ac_ext >&5
22058   rm -rf conftest*
22059   eval "ac_cv_lib_$ac_lib_var=no"
22060 fi
22061 rm -f conftest*
22062 LIBS="$ac_save_LIBS"
22063
22064 fi
22065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22066   echo "$ac_t""yes" 1>&6
22067   cat >> confdefs.h <<\EOF
22068 #define HAVE_STRFTIME 1
22069 EOF
22070
22071 LIBS="-lintl $LIBS"
22072 else
22073   echo "$ac_t""no" 1>&6
22074 fi
22075
22076 fi
22077
22078
22079 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22080 echo "configure:22081: checking for inet_aton()" >&5
22081 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22082   echo $ac_n "(cached) $ac_c" 1>&6
22083 else
22084   cat > conftest.$ac_ext <<EOF
22085 #line 22086 "configure"
22086 #include "confdefs.h"
22087
22088 #ifdef HAVE_SYS_TYPES_H
22089 #       include <sys/types.h>
22090 #endif
22091 #ifdef HAVE_SYS_SOCKET_H
22092 #       include <sys/socket.h>
22093 #       ifdef HAVE_SYS_SELECT_H
22094 #               include <sys/select.h>
22095 #       endif
22096 #       include <netinet/in.h>
22097 #       ifdef HAVE_ARPA_INET_H
22098 #               include <arpa/inet.h>
22099 #       endif
22100 #endif
22101
22102 int main() {
22103 struct in_addr in;
22104 int rc = inet_aton( "255.255.255.255", &in );
22105 ; return 0; }
22106 EOF
22107 if { (eval echo configure:22108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22108   rm -rf conftest*
22109   ol_cv_func_inet_aton=yes
22110 else
22111   echo "configure: failed program was:" >&5
22112   cat conftest.$ac_ext >&5
22113   rm -rf conftest*
22114   ol_cv_func_inet_aton=no
22115 fi
22116 rm -f conftest*
22117 fi
22118
22119 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22120   if test $ol_cv_func_inet_aton != no; then
22121     cat >> confdefs.h <<\EOF
22122 #define HAVE_INET_ATON 1
22123 EOF
22124
22125   fi
22126  
22127
22128 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22129 echo "configure:22130: checking for _spawnlp" >&5
22130 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22131   echo $ac_n "(cached) $ac_c" 1>&6
22132 else
22133   cat > conftest.$ac_ext <<EOF
22134 #line 22135 "configure"
22135 #include "confdefs.h"
22136 /* System header to define __stub macros and hopefully few prototypes,
22137     which can conflict with char _spawnlp(); below.  */
22138 #include <assert.h>
22139 /* Override any gcc2 internal prototype to avoid an error.  */
22140 /* We use char because int might match the return type of a gcc2
22141     builtin and then its argument prototype would still apply.  */
22142 char _spawnlp();
22143 char (*f)();
22144
22145 int main() {
22146
22147 /* The GNU C library defines this for functions which it implements
22148     to always fail with ENOSYS.  Some functions are actually named
22149     something starting with __ and the normal name is an alias.  */
22150 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22151 choke me
22152 #else
22153 f = _spawnlp;
22154 #endif
22155
22156 ; return 0; }
22157 EOF
22158 if { (eval echo configure:22159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22159   rm -rf conftest*
22160   eval "ac_cv_func__spawnlp=yes"
22161 else
22162   echo "configure: failed program was:" >&5
22163   cat conftest.$ac_ext >&5
22164   rm -rf conftest*
22165   eval "ac_cv_func__spawnlp=no"
22166 fi
22167 rm -f conftest*
22168 fi
22169
22170 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22171   echo "$ac_t""yes" 1>&6
22172   cat >> confdefs.h <<\EOF
22173 #define HAVE_SPAWNLP 1
22174 EOF
22175
22176 else
22177   echo "$ac_t""no" 1>&6
22178 fi
22179
22180
22181 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22182 echo "configure:22183: checking for _snprintf" >&5
22183 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22184   echo $ac_n "(cached) $ac_c" 1>&6
22185 else
22186   cat > conftest.$ac_ext <<EOF
22187 #line 22188 "configure"
22188 #include "confdefs.h"
22189 /* System header to define __stub macros and hopefully few prototypes,
22190     which can conflict with char _snprintf(); below.  */
22191 #include <assert.h>
22192 /* Override any gcc2 internal prototype to avoid an error.  */
22193 /* We use char because int might match the return type of a gcc2
22194     builtin and then its argument prototype would still apply.  */
22195 char _snprintf();
22196 char (*f)();
22197
22198 int main() {
22199
22200 /* The GNU C library defines this for functions which it implements
22201     to always fail with ENOSYS.  Some functions are actually named
22202     something starting with __ and the normal name is an alias.  */
22203 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22204 choke me
22205 #else
22206 f = _snprintf;
22207 #endif
22208
22209 ; return 0; }
22210 EOF
22211 if { (eval echo configure:22212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22212   rm -rf conftest*
22213   eval "ac_cv_func__snprintf=yes"
22214 else
22215   echo "configure: failed program was:" >&5
22216   cat conftest.$ac_ext >&5
22217   rm -rf conftest*
22218   eval "ac_cv_func__snprintf=no"
22219 fi
22220 rm -f conftest*
22221 fi
22222
22223 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22224   echo "$ac_t""yes" 1>&6
22225   ac_cv_func_snprintf=yes
22226         cat >> confdefs.h <<\EOF
22227 #define snprintf _snprintf
22228 EOF
22229
22230
22231 else
22232   echo "$ac_t""no" 1>&6
22233 fi
22234
22235
22236 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22237 echo "configure:22238: checking for _vsnprintf" >&5
22238 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22239   echo $ac_n "(cached) $ac_c" 1>&6
22240 else
22241   cat > conftest.$ac_ext <<EOF
22242 #line 22243 "configure"
22243 #include "confdefs.h"
22244 /* System header to define __stub macros and hopefully few prototypes,
22245     which can conflict with char _vsnprintf(); below.  */
22246 #include <assert.h>
22247 /* Override any gcc2 internal prototype to avoid an error.  */
22248 /* We use char because int might match the return type of a gcc2
22249     builtin and then its argument prototype would still apply.  */
22250 char _vsnprintf();
22251 char (*f)();
22252
22253 int main() {
22254
22255 /* The GNU C library defines this for functions which it implements
22256     to always fail with ENOSYS.  Some functions are actually named
22257     something starting with __ and the normal name is an alias.  */
22258 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22259 choke me
22260 #else
22261 f = _vsnprintf;
22262 #endif
22263
22264 ; return 0; }
22265 EOF
22266 if { (eval echo configure:22267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22267   rm -rf conftest*
22268   eval "ac_cv_func__vsnprintf=yes"
22269 else
22270   echo "configure: failed program was:" >&5
22271   cat conftest.$ac_ext >&5
22272   rm -rf conftest*
22273   eval "ac_cv_func__vsnprintf=no"
22274 fi
22275 rm -f conftest*
22276 fi
22277
22278 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22279   echo "$ac_t""yes" 1>&6
22280   ac_cv_func_vsnprintf=yes
22281         cat >> confdefs.h <<\EOF
22282 #define vsnprintf _vsnprintf
22283 EOF
22284
22285
22286 else
22287   echo "$ac_t""no" 1>&6
22288 fi
22289
22290
22291 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22292 echo "configure:22293: checking for vprintf" >&5
22293 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22294   echo $ac_n "(cached) $ac_c" 1>&6
22295 else
22296   cat > conftest.$ac_ext <<EOF
22297 #line 22298 "configure"
22298 #include "confdefs.h"
22299 /* System header to define __stub macros and hopefully few prototypes,
22300     which can conflict with char vprintf(); below.  */
22301 #include <assert.h>
22302 /* Override any gcc2 internal prototype to avoid an error.  */
22303 /* We use char because int might match the return type of a gcc2
22304     builtin and then its argument prototype would still apply.  */
22305 char vprintf();
22306 char (*f)();
22307
22308 int main() {
22309
22310 /* The GNU C library defines this for functions which it implements
22311     to always fail with ENOSYS.  Some functions are actually named
22312     something starting with __ and the normal name is an alias.  */
22313 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22314 choke me
22315 #else
22316 f = vprintf;
22317 #endif
22318
22319 ; return 0; }
22320 EOF
22321 if { (eval echo configure:22322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22322   rm -rf conftest*
22323   eval "ac_cv_func_vprintf=yes"
22324 else
22325   echo "configure: failed program was:" >&5
22326   cat conftest.$ac_ext >&5
22327   rm -rf conftest*
22328   eval "ac_cv_func_vprintf=no"
22329 fi
22330 rm -f conftest*
22331 fi
22332
22333 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22334   echo "$ac_t""yes" 1>&6
22335   cat >> confdefs.h <<\EOF
22336 #define HAVE_VPRINTF 1
22337 EOF
22338
22339 else
22340   echo "$ac_t""no" 1>&6
22341 fi
22342
22343 if test "$ac_cv_func_vprintf" != yes; then
22344 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22345 echo "configure:22346: checking for _doprnt" >&5
22346 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22347   echo $ac_n "(cached) $ac_c" 1>&6
22348 else
22349   cat > conftest.$ac_ext <<EOF
22350 #line 22351 "configure"
22351 #include "confdefs.h"
22352 /* System header to define __stub macros and hopefully few prototypes,
22353     which can conflict with char _doprnt(); below.  */
22354 #include <assert.h>
22355 /* Override any gcc2 internal prototype to avoid an error.  */
22356 /* We use char because int might match the return type of a gcc2
22357     builtin and then its argument prototype would still apply.  */
22358 char _doprnt();
22359 char (*f)();
22360
22361 int main() {
22362
22363 /* The GNU C library defines this for functions which it implements
22364     to always fail with ENOSYS.  Some functions are actually named
22365     something starting with __ and the normal name is an alias.  */
22366 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22367 choke me
22368 #else
22369 f = _doprnt;
22370 #endif
22371
22372 ; return 0; }
22373 EOF
22374 if { (eval echo configure:22375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22375   rm -rf conftest*
22376   eval "ac_cv_func__doprnt=yes"
22377 else
22378   echo "configure: failed program was:" >&5
22379   cat conftest.$ac_ext >&5
22380   rm -rf conftest*
22381   eval "ac_cv_func__doprnt=no"
22382 fi
22383 rm -f conftest*
22384 fi
22385
22386 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22387   echo "$ac_t""yes" 1>&6
22388   cat >> confdefs.h <<\EOF
22389 #define HAVE_DOPRNT 1
22390 EOF
22391
22392 else
22393   echo "$ac_t""no" 1>&6
22394 fi
22395
22396 fi
22397
22398
22399 if test $ac_cv_func_vprintf = yes ; then
22400                 for ac_func in snprintf vsnprintf
22401 do
22402 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22403 echo "configure:22404: checking for $ac_func" >&5
22404 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22405   echo $ac_n "(cached) $ac_c" 1>&6
22406 else
22407   cat > conftest.$ac_ext <<EOF
22408 #line 22409 "configure"
22409 #include "confdefs.h"
22410 /* System header to define __stub macros and hopefully few prototypes,
22411     which can conflict with char $ac_func(); below.  */
22412 #include <assert.h>
22413 /* Override any gcc2 internal prototype to avoid an error.  */
22414 /* We use char because int might match the return type of a gcc2
22415     builtin and then its argument prototype would still apply.  */
22416 char $ac_func();
22417 char (*f)();
22418
22419 int main() {
22420
22421 /* The GNU C library defines this for functions which it implements
22422     to always fail with ENOSYS.  Some functions are actually named
22423     something starting with __ and the normal name is an alias.  */
22424 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22425 choke me
22426 #else
22427 f = $ac_func;
22428 #endif
22429
22430 ; return 0; }
22431 EOF
22432 if { (eval echo configure:22433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22433   rm -rf conftest*
22434   eval "ac_cv_func_$ac_func=yes"
22435 else
22436   echo "configure: failed program was:" >&5
22437   cat conftest.$ac_ext >&5
22438   rm -rf conftest*
22439   eval "ac_cv_func_$ac_func=no"
22440 fi
22441 rm -f conftest*
22442 fi
22443
22444 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22445   echo "$ac_t""yes" 1>&6
22446     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22447   cat >> confdefs.h <<EOF
22448 #define $ac_tr_func 1
22449 EOF
22450  
22451 else
22452   echo "$ac_t""no" 1>&6
22453 fi
22454 done
22455
22456 fi
22457
22458 for ac_func in \
22459         bcopy                   \
22460         closesocket             \
22461         chroot                  \
22462         endgrent                \
22463         endpwent                \
22464         fcntl                   \
22465         flock                   \
22466         fstat                   \
22467         getdtablesize   \
22468         getgrgid                \
22469         gethostname             \
22470         getpass                 \
22471         getpassphrase   \
22472         getpwuid                \
22473         getpwnam                \
22474         getspnam                \
22475         gettimeofday    \
22476         initgroups              \
22477         lockf                   \
22478         memcpy                  \
22479         memmove                 \
22480         mkstemp                 \
22481         mktemp                  \
22482         pipe                    \
22483         read                    \
22484         recv                    \
22485         recvfrom                \
22486         setpwfile               \
22487         setgid                  \
22488         setegid                 \
22489         setsid                  \
22490         setuid                  \
22491         seteuid                 \
22492         sigaction               \
22493         signal                  \
22494         sigset                  \
22495         strdup                  \
22496         strerror                \
22497         strpbrk                 \
22498         strrchr                 \
22499         strsep                  \
22500         strstr                  \
22501         strtol                  \
22502         strtoul                 \
22503         strspn                  \
22504         sysconf                 \
22505         usleep                  \
22506         waitpid                 \
22507         wait4                   \
22508         write                   \
22509         send                    \
22510         sendmsg                 \
22511         sendto                  \
22512
22513 do
22514 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22515 echo "configure:22516: checking for $ac_func" >&5
22516 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22517   echo $ac_n "(cached) $ac_c" 1>&6
22518 else
22519   cat > conftest.$ac_ext <<EOF
22520 #line 22521 "configure"
22521 #include "confdefs.h"
22522 /* System header to define __stub macros and hopefully few prototypes,
22523     which can conflict with char $ac_func(); below.  */
22524 #include <assert.h>
22525 /* Override any gcc2 internal prototype to avoid an error.  */
22526 /* We use char because int might match the return type of a gcc2
22527     builtin and then its argument prototype would still apply.  */
22528 char $ac_func();
22529 char (*f)();
22530
22531 int main() {
22532
22533 /* The GNU C library defines this for functions which it implements
22534     to always fail with ENOSYS.  Some functions are actually named
22535     something starting with __ and the normal name is an alias.  */
22536 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22537 choke me
22538 #else
22539 f = $ac_func;
22540 #endif
22541
22542 ; return 0; }
22543 EOF
22544 if { (eval echo configure:22545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22545   rm -rf conftest*
22546   eval "ac_cv_func_$ac_func=yes"
22547 else
22548   echo "configure: failed program was:" >&5
22549   cat conftest.$ac_ext >&5
22550   rm -rf conftest*
22551   eval "ac_cv_func_$ac_func=no"
22552 fi
22553 rm -f conftest*
22554 fi
22555
22556 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22557   echo "$ac_t""yes" 1>&6
22558     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22559   cat >> confdefs.h <<EOF
22560 #define $ac_tr_func 1
22561 EOF
22562  
22563 else
22564   echo "$ac_t""no" 1>&6
22565 fi
22566 done
22567
22568
22569 for ac_func in getopt getpeereid
22570 do
22571 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22572 echo "configure:22573: checking for $ac_func" >&5
22573 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22574   echo $ac_n "(cached) $ac_c" 1>&6
22575 else
22576   cat > conftest.$ac_ext <<EOF
22577 #line 22578 "configure"
22578 #include "confdefs.h"
22579 /* System header to define __stub macros and hopefully few prototypes,
22580     which can conflict with char $ac_func(); below.  */
22581 #include <assert.h>
22582 /* Override any gcc2 internal prototype to avoid an error.  */
22583 /* We use char because int might match the return type of a gcc2
22584     builtin and then its argument prototype would still apply.  */
22585 char $ac_func();
22586 char (*f)();
22587
22588 int main() {
22589
22590 /* The GNU C library defines this for functions which it implements
22591     to always fail with ENOSYS.  Some functions are actually named
22592     something starting with __ and the normal name is an alias.  */
22593 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22594 choke me
22595 #else
22596 f = $ac_func;
22597 #endif
22598
22599 ; return 0; }
22600 EOF
22601 if { (eval echo configure:22602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22602   rm -rf conftest*
22603   eval "ac_cv_func_$ac_func=yes"
22604 else
22605   echo "configure: failed program was:" >&5
22606   cat conftest.$ac_ext >&5
22607   rm -rf conftest*
22608   eval "ac_cv_func_$ac_func=no"
22609 fi
22610 rm -f conftest*
22611 fi
22612
22613 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22614   echo "$ac_t""yes" 1>&6
22615     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22616   cat >> confdefs.h <<EOF
22617 #define $ac_tr_func 1
22618 EOF
22619  
22620 else
22621   echo "$ac_t""no" 1>&6
22622 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22623 fi
22624 done
22625
22626
22627
22628 if test "$ac_cv_func_getopt" != yes; then
22629         LIBSRCS="$LIBSRCS getopt.c"
22630 fi
22631 if test "$ac_cv_func_getpeereid" != yes; then
22632         LIBSRCS="$LIBSRCS getpeereid.c"
22633 fi
22634 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22635         if test "$ac_cv_func_snprintf" != yes; then
22636                 cat >> confdefs.h <<\EOF
22637 #define snprintf ber_pvt_snprintf
22638 EOF
22639
22640         fi
22641         if test "$ac_cv_func_vsnprintf" != yes; then
22642                 cat >> confdefs.h <<\EOF
22643 #define vsnprintf ber_pvt_vsnprintf
22644 EOF
22645
22646         fi
22647 fi
22648
22649 # Check Configuration
22650 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22651 echo "configure:22652: checking declaration of sys_errlist" >&5
22652 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22653   echo $ac_n "(cached) $ac_c" 1>&6
22654 else
22655   
22656         cat > conftest.$ac_ext <<EOF
22657 #line 22658 "configure"
22658 #include "confdefs.h"
22659
22660 #include <stdio.h>
22661 #include <sys/types.h>
22662 #include <errno.h>
22663 #ifdef WINNT
22664 #include <stdlib.h>
22665 #endif 
22666 int main() {
22667 char *c = (char *) *sys_errlist
22668 ; return 0; }
22669 EOF
22670 if { (eval echo configure:22671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22671   rm -rf conftest*
22672   ol_cv_dcl_sys_errlist=yes
22673         ol_cv_have_sys_errlist=yes
22674 else
22675   echo "configure: failed program was:" >&5
22676   cat conftest.$ac_ext >&5
22677   rm -rf conftest*
22678   ol_cv_dcl_sys_errlist=no
22679 fi
22680 rm -f conftest*
22681 fi
22682
22683 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22684 #
22685 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22686 if test $ol_cv_dcl_sys_errlist = no ; then
22687         cat >> confdefs.h <<\EOF
22688 #define DECL_SYS_ERRLIST 1
22689 EOF
22690
22691
22692         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22693 echo "configure:22694: checking existence of sys_errlist" >&5
22694 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22695   echo $ac_n "(cached) $ac_c" 1>&6
22696 else
22697   
22698                 cat > conftest.$ac_ext <<EOF
22699 #line 22700 "configure"
22700 #include "confdefs.h"
22701 #include <errno.h>
22702 int main() {
22703 char *c = (char *) *sys_errlist
22704 ; return 0; }
22705 EOF
22706 if { (eval echo configure:22707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22707   rm -rf conftest*
22708   ol_cv_have_sys_errlist=yes
22709 else
22710   echo "configure: failed program was:" >&5
22711   cat conftest.$ac_ext >&5
22712   rm -rf conftest*
22713   ol_cv_have_sys_errlist=no
22714 fi
22715 rm -f conftest*
22716 fi
22717
22718 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22719 fi
22720 if test $ol_cv_have_sys_errlist = yes ; then
22721         cat >> confdefs.h <<\EOF
22722 #define HAVE_SYS_ERRLIST 1
22723 EOF
22724
22725 fi
22726
22727
22728
22729 if test "$ol_enable_slapi" != no ; then
22730                         for ac_hdr in ltdl.h
22731 do
22732 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22733 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22734 echo "configure:22735: checking for $ac_hdr" >&5
22735 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22736   echo $ac_n "(cached) $ac_c" 1>&6
22737 else
22738   cat > conftest.$ac_ext <<EOF
22739 #line 22740 "configure"
22740 #include "confdefs.h"
22741 #include <$ac_hdr>
22742 EOF
22743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22744 { (eval echo configure:22745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22746 if test -z "$ac_err"; then
22747   rm -rf conftest*
22748   eval "ac_cv_header_$ac_safe=yes"
22749 else
22750   echo "$ac_err" >&5
22751   echo "configure: failed program was:" >&5
22752   cat conftest.$ac_ext >&5
22753   rm -rf conftest*
22754   eval "ac_cv_header_$ac_safe=no"
22755 fi
22756 rm -f conftest*
22757 fi
22758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22759   echo "$ac_t""yes" 1>&6
22760     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22761   cat >> confdefs.h <<EOF
22762 #define $ac_tr_hdr 1
22763 EOF
22764  
22765 else
22766   echo "$ac_t""no" 1>&6
22767 fi
22768 done
22769
22770
22771         if test $ac_cv_header_ltdl_h != yes ; then
22772                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
22773         fi
22774         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
22775 echo "configure:22776: checking for lt_dlinit in -lltdl" >&5
22776 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
22777 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22778   echo $ac_n "(cached) $ac_c" 1>&6
22779 else
22780   ac_save_LIBS="$LIBS"
22781 LIBS="-lltdl  $LIBS"
22782 cat > conftest.$ac_ext <<EOF
22783 #line 22784 "configure"
22784 #include "confdefs.h"
22785 /* Override any gcc2 internal prototype to avoid an error.  */
22786 /* We use char because int might match the return type of a gcc2
22787     builtin and then its argument prototype would still apply.  */
22788 char lt_dlinit();
22789
22790 int main() {
22791 lt_dlinit()
22792 ; return 0; }
22793 EOF
22794 if { (eval echo configure:22795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22795   rm -rf conftest*
22796   eval "ac_cv_lib_$ac_lib_var=yes"
22797 else
22798   echo "configure: failed program was:" >&5
22799   cat conftest.$ac_ext >&5
22800   rm -rf conftest*
22801   eval "ac_cv_lib_$ac_lib_var=no"
22802 fi
22803 rm -f conftest*
22804 LIBS="$ac_save_LIBS"
22805
22806 fi
22807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22808   echo "$ac_t""yes" 1>&6
22809   
22810                 SLAPI_LIBS=-lltdl
22811                 LIBSLAPI=./libslapi.a
22812                 LIBSLAPITOOLS=../libslapi.a
22813                 cat >> confdefs.h <<\EOF
22814 #define HAVE_LIBLTDL 1
22815 EOF
22816
22817         
22818 else
22819   echo "$ac_t""no" 1>&6
22820 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
22821 fi
22822
22823
22824         cat >> confdefs.h <<\EOF
22825 #define LDAP_SLAPI 1
22826 EOF
22827
22828 fi
22829
22830 if test "$ol_enable_debug" != no ; then
22831         cat >> confdefs.h <<\EOF
22832 #define LDAP_DEBUG 1
22833 EOF
22834
22835 fi
22836 if test "$ol_enable_syslog" = yes ; then
22837         cat >> confdefs.h <<\EOF
22838 #define LDAP_SYSLOG 1
22839 EOF
22840
22841 fi
22842 if test "$ol_enable_cache" = no ; then
22843         cat >> confdefs.h <<\EOF
22844 #define LDAP_NOCACHE 1
22845 EOF
22846
22847 fi
22848 if test "$ol_link_kbind" != no ; then
22849         cat >> confdefs.h <<\EOF
22850 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22851 EOF
22852
22853 fi
22854 if test "$ol_enable_proctitle" != no ; then
22855         cat >> confdefs.h <<\EOF
22856 #define LDAP_PROCTITLE 1
22857 EOF
22858
22859 fi
22860 if test "$ol_enable_referrals" != no ; then
22861         cat >> confdefs.h <<\EOF
22862 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22863 EOF
22864
22865 fi
22866 if test "$ol_enable_local" != no; then
22867         cat >> confdefs.h <<\EOF
22868 #define LDAP_PF_LOCAL 1
22869 EOF
22870
22871 fi
22872 if test "$ol_link_ipv6" != no; then
22873         cat >> confdefs.h <<\EOF
22874 #define LDAP_PF_INET6 1
22875 EOF
22876
22877 fi
22878 if test "$ol_enable_cleartext" != no ; then
22879         cat >> confdefs.h <<\EOF
22880 #define SLAPD_CLEARTEXT 1
22881 EOF
22882
22883 fi
22884 if test "$ol_enable_crypt" != no ; then
22885         cat >> confdefs.h <<\EOF
22886 #define SLAPD_CRYPT 1
22887 EOF
22888
22889 fi
22890 if test "$ol_link_kpasswd" != no ; then
22891         cat >> confdefs.h <<\EOF
22892 #define SLAPD_KPASSWD 1
22893 EOF
22894
22895 fi
22896 if test "$ol_link_spasswd" != no ; then
22897         cat >> confdefs.h <<\EOF
22898 #define SLAPD_SPASSWD 1
22899 EOF
22900
22901 fi
22902 if test "$ol_enable_multimaster" != no ; then
22903         cat >> confdefs.h <<\EOF
22904 #define SLAPD_MULTIMASTER 1
22905 EOF
22906
22907 fi
22908 if test "$ol_enable_phonetic" != no ; then
22909         cat >> confdefs.h <<\EOF
22910 #define SLAPD_PHONETIC 1
22911 EOF
22912
22913 fi
22914 if test "$ol_enable_rlookups" != no ; then
22915         cat >> confdefs.h <<\EOF
22916 #define SLAPD_RLOOKUPS 1
22917 EOF
22918
22919 fi
22920 if test "$ol_enable_aci" != no ; then
22921         cat >> confdefs.h <<\EOF
22922 #define SLAPD_ACI_ENABLED 1
22923 EOF
22924
22925 fi
22926
22927 if test "$ol_link_modules" != no ; then
22928         cat >> confdefs.h <<\EOF
22929 #define SLAPD_MODULES 1
22930 EOF
22931
22932         BUILD_SLAPD=yes
22933         SLAPD_MODULES_LDFLAGS="-dlopen self"
22934 fi
22935
22936 if test "$ol_enable_bdb" != no ; then
22937         cat >> confdefs.h <<\EOF
22938 #define SLAPD_BDB 1
22939 EOF
22940
22941         BUILD_SLAPD=yes
22942         BUILD_BDB=yes
22943         if test "$ol_with_bdb_module" != static ; then
22944                 cat >> confdefs.h <<\EOF
22945 #define SLAPD_BDB_DYNAMIC 1
22946 EOF
22947
22948                 BUILD_BDB=mod
22949                 BUILD_BDB_DYNAMIC=shared
22950                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22951         else
22952                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22953         fi
22954 fi
22955
22956 if test "$ol_link_dnssrv" != no ; then
22957         cat >> confdefs.h <<\EOF
22958 #define SLAPD_DNSSRV 1
22959 EOF
22960
22961         BUILD_SLAPD=yes
22962         BUILD_DNSSRV=yes
22963         if test "$ol_with_dnssrv_module" != static ; then
22964                 cat >> confdefs.h <<\EOF
22965 #define SLAPD_DNSSRV_DYNAMIC 1
22966 EOF
22967
22968                 BUILD_DNSSRV=mod
22969                 BUILD_DNSSRV_DYNAMIC=shared
22970                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22971         else
22972                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22973         fi
22974 fi
22975
22976 if test "$ol_enable_ldap" != no ; then
22977         cat >> confdefs.h <<\EOF
22978 #define SLAPD_LDAP 1
22979 EOF
22980
22981         BUILD_SLAPD=yes
22982         BUILD_LDAP=yes
22983         if test "$ol_with_ldap_module" != static ; then
22984                 cat >> confdefs.h <<\EOF
22985 #define SLAPD_LDAP_DYNAMIC 1
22986 EOF
22987
22988                 BUILD_LDAP=mod
22989                 BUILD_LDAP_DYNAMIC=shared
22990                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22991         else
22992                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22993         fi
22994 fi
22995
22996 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22997         cat >> confdefs.h <<\EOF
22998 #define SLAPD_LDBM 1
22999 EOF
23000
23001         BUILD_SLAPD=yes
23002         BUILD_LDBM=yes
23003         if test "$ol_with_ldbm_module" != static ; then
23004                 cat >> confdefs.h <<\EOF
23005 #define SLAPD_LDBM_DYNAMIC 1
23006 EOF
23007
23008                 BUILD_LDBM=mod
23009                 BUILD_LDBM_DYNAMIC=shared
23010                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23011         else
23012                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23013         fi
23014 fi
23015
23016 if test "$ol_enable_meta" != no ; then
23017         if test "$ol_enable_ldap" = no ; then
23018                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23019         fi
23020         if test "$ol_enable_rewrite" = no ; then
23021                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23022         fi
23023         cat >> confdefs.h <<\EOF
23024 #define SLAPD_META 1
23025 EOF
23026
23027         BUILD_SLAPD=yes
23028         BUILD_META=yes
23029         BUILD_LDAP=yes
23030         BUILD_REWRITE=yes
23031         if test "$ol_with_meta_module" != static ; then
23032                 cat >> confdefs.h <<\EOF
23033 #define SLAPD_META_DYNAMIC 1
23034 EOF
23035
23036                 BUILD_META=mod
23037                 BUILD_META_DYNAMIC=shared
23038                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23039         else
23040                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23041         fi
23042 fi
23043
23044 if test "$ol_enable_monitor" != no ; then
23045         cat >> confdefs.h <<\EOF
23046 #define SLAPD_MONITOR 1
23047 EOF
23048
23049         BUILD_SLAPD=yes
23050         BUILD_MONITOR=yes
23051         if test "$ol_with_monitor_module" != static ; then
23052                 cat >> confdefs.h <<\EOF
23053 #define SLAPD_MONITOR_DYNAMIC 1
23054 EOF
23055
23056                 BUILD_MONITOR=mod
23057                 BUILD_MONITOR_DYNAMIC=shared
23058                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23059         else
23060                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23061         fi
23062 fi
23063
23064 if test "$ol_enable_null" != no ; then
23065         cat >> confdefs.h <<\EOF
23066 #define SLAPD_NULL 1
23067 EOF
23068
23069         BUILD_SLAPD=yes
23070         BUILD_NULL=yes
23071         if test "$ol_with_null_module" != static ; then
23072                 cat >> confdefs.h <<\EOF
23073 #define SLAPD_NULL_DYNAMIC 1
23074 EOF
23075
23076                 BUILD_NULL=mod
23077                 BUILD_NULL_DYNAMIC=shared
23078                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23079         else
23080                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23081         fi
23082 fi
23083
23084 if test "$ol_enable_passwd" != no ; then
23085         cat >> confdefs.h <<\EOF
23086 #define SLAPD_PASSWD 1
23087 EOF
23088
23089         BUILD_SLAPD=yes
23090         BUILD_PASSWD=yes
23091         if test "$ol_with_passwd_module" != static ; then
23092                 cat >> confdefs.h <<\EOF
23093 #define SLAPD_PASSWD_DYNAMIC 1
23094 EOF
23095
23096                 BUILD_PASSWD=mod
23097                 BUILD_PASSWD_DYNAMIC=shared
23098                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23099         else
23100                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23101         fi
23102 fi
23103
23104 if test "$ol_link_perl" != no ; then
23105         cat >> confdefs.h <<\EOF
23106 #define SLAPD_PERL 1
23107 EOF
23108
23109         BUILD_SLAPD=yes
23110         BUILD_PERL=yes
23111         if test "$ol_with_perl_module" != static ; then
23112                 cat >> confdefs.h <<\EOF
23113 #define SLAPD_PERL_DYNAMIC 1
23114 EOF
23115
23116                 BUILD_PERL=mod
23117                 BUILD_PERL_DYNAMIC=shared
23118                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23119         else
23120                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23121         fi
23122 fi
23123
23124 if test "$ol_enable_shell" != no ; then
23125         if test "$ol_link_thread" != no ; then
23126                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23127         fi
23128         cat >> confdefs.h <<\EOF
23129 #define SLAPD_SHELL 1
23130 EOF
23131
23132         BUILD_SLAPD=yes
23133         BUILD_SHELL=yes
23134         if test "$ol_with_shell_module" != static ; then
23135                 cat >> confdefs.h <<\EOF
23136 #define SLAPD_SHELL_DYNAMIC 1
23137 EOF
23138
23139                 BUILD_SHELL=mod
23140                 BUILD_SHELL_DYNAMIC=shared
23141                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23142         else
23143                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23144         fi
23145 fi
23146
23147 if test "$ol_enable_tcl" != no ; then
23148         cat >> confdefs.h <<\EOF
23149 #define SLAPD_TCL 1
23150 EOF
23151
23152         BUILD_SLAPD=yes
23153         BUILD_TCL=yes
23154         if test "$ol_with_tcl_module" != static; then
23155                 cat >> confdefs.h <<\EOF
23156 #define SLAPD_TCL_DYNAMIC 1
23157 EOF
23158
23159                 BUILD_TCL=mod
23160                 BUILD_TCL_DYNAMIC=shared
23161                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
23162         else
23163                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
23164         fi
23165 fi
23166
23167 if test "$ol_link_sql" != no ; then
23168         cat >> confdefs.h <<\EOF
23169 #define SLAPD_SQL 1
23170 EOF
23171
23172         BUILD_SLAPD=yes
23173         BUILD_SQL=yes
23174         if test "$ol_with_sql_module" != static; then
23175                 cat >> confdefs.h <<\EOF
23176 #define SLAPD_SQL_DYNAMIC 1
23177 EOF
23178
23179                 BUILD_SQL=mod
23180                 BUILD_SQL_DYNAMIC=shared
23181                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23182         else
23183                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23184         fi
23185 fi
23186
23187 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23188         $BUILD_SLAPD = yes ; then
23189         BUILD_SLURPD=yes
23190 fi
23191
23192 if test "$ol_enable_rewrite" != no ; then
23193         cat >> confdefs.h <<\EOF
23194 #define ENABLE_REWRITE 1
23195 EOF
23196
23197         BUILD_REWRITE=yes
23198 fi
23199
23200 if test "$ol_enable_slapi" != no ; then
23201         cat >> confdefs.h <<\EOF
23202 #define ENABLE_SLAPI 1
23203 EOF
23204
23205         BUILD_SLAPI=yes
23206         SLAPD_SLAPI_DEPEND=libslapi.a
23207 fi
23208
23209
23210
23211 if test "$ac_cv_mingw32" = yes ; then
23212         PLAT=NT
23213         SLAPD_MODULES_LDFLAGS=
23214 else
23215         PLAT=UNIX
23216 fi
23217
23218 if test -z "$SLAPD_STATIC_BACKENDS"; then
23219         SLAPD_NO_STATIC='#'
23220 else
23221         SLAPD_NO_STATIC=
23222 fi
23223
23224
23225
23226
23227
23228
23229   
23230   
23231   
23232   
23233   
23234   
23235   
23236   
23237   
23238   
23239   
23240   
23241   
23242   
23243   
23244   
23245   
23246   
23247   
23248   
23249   
23250   
23251   
23252   
23253   
23254   
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288
23289
23290
23291
23292
23293
23294
23295
23296 # Check whether --with-xxinstall or --without-xxinstall was given.
23297 if test "${with_xxinstall+set}" = set; then
23298   withval="$with_xxinstall"
23299   :
23300 fi
23301
23302
23303
23304 trap '' 1 2 15
23305
23306 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23307
23308 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23309 # Let make expand exec_prefix.
23310 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23311
23312 # Any assignment to VPATH causes Sun make to only execute
23313 # the first set of double-colon rules, so remove it if not needed.
23314 # If there is a colon in the path, we need to keep it.
23315 if test "x$srcdir" = x.; then
23316   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23317 fi
23318
23319 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23320
23321 DEFS=-DHAVE_CONFIG_H
23322
23323 # Without the "./", some shells look in PATH for config.status.
23324 : ${CONFIG_STATUS=./config.status}
23325
23326 echo creating $CONFIG_STATUS
23327 rm -f $CONFIG_STATUS
23328 cat > $CONFIG_STATUS <<EOF
23329 #! /bin/sh
23330 # Generated automatically by configure.
23331 # Run this file to recreate the current configuration.
23332 # This directory was configured as follows,
23333 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23334 #
23335 # $0 $ac_configure_args
23336 #
23337 # Compiler output produced by configure, useful for debugging
23338 # configure, is in ./config.log if it exists.
23339
23340 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23341 for ac_option
23342 do
23343   case "\$ac_option" in
23344   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23345     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23346     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23347   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23348     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23349     exit 0 ;;
23350   -help | --help | --hel | --he | --h)
23351     echo "\$ac_cs_usage"; exit 0 ;;
23352   *) echo "\$ac_cs_usage"; exit 1 ;;
23353   esac
23354 done
23355
23356 ac_given_srcdir=$srcdir
23357 ac_given_INSTALL="$INSTALL"
23358
23359 trap 'rm -fr `echo "\
23360 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23361 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23362 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23363 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23364 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23365 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23366 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23367 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23368 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23369 include/Makefile:build/top.mk:include/Makefile.in \
23370 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23371 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23372 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23373 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23374 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23375 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23376 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23377 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23378 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23379 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23380 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23381 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23382 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23383 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23384 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23385 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23386 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23387 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23388 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23389 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23390 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23391 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23392 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23393 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23394 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23395 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23396 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23397 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23398 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23399 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23400  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23401 EOF
23402 cat >> $CONFIG_STATUS <<EOF
23403
23404 # Protect against being on the right side of a sed subst in config.status.
23405 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23406  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23407 $ac_vpsub
23408 $extrasub
23409 s%@SHELL@%$SHELL%g
23410 s%@CFLAGS@%$CFLAGS%g
23411 s%@CPPFLAGS@%$CPPFLAGS%g
23412 s%@CXXFLAGS@%$CXXFLAGS%g
23413 s%@FFLAGS@%$FFLAGS%g
23414 s%@DEFS@%$DEFS%g
23415 s%@LDFLAGS@%$LDFLAGS%g
23416 s%@LIBS@%$LIBS%g
23417 s%@exec_prefix@%$exec_prefix%g
23418 s%@prefix@%$prefix%g
23419 s%@program_transform_name@%$program_transform_name%g
23420 s%@bindir@%$bindir%g
23421 s%@sbindir@%$sbindir%g
23422 s%@libexecdir@%$libexecdir%g
23423 s%@datadir@%$datadir%g
23424 s%@sysconfdir@%$sysconfdir%g
23425 s%@sharedstatedir@%$sharedstatedir%g
23426 s%@localstatedir@%$localstatedir%g
23427 s%@libdir@%$libdir%g
23428 s%@includedir@%$includedir%g
23429 s%@oldincludedir@%$oldincludedir%g
23430 s%@infodir@%$infodir%g
23431 s%@mandir@%$mandir%g
23432 s%@host@%$host%g
23433 s%@host_alias@%$host_alias%g
23434 s%@host_cpu@%$host_cpu%g
23435 s%@host_vendor@%$host_vendor%g
23436 s%@host_os@%$host_os%g
23437 s%@target@%$target%g
23438 s%@target_alias@%$target_alias%g
23439 s%@target_cpu@%$target_cpu%g
23440 s%@target_vendor@%$target_vendor%g
23441 s%@target_os@%$target_os%g
23442 s%@build@%$build%g
23443 s%@build_alias@%$build_alias%g
23444 s%@build_cpu@%$build_cpu%g
23445 s%@build_vendor@%$build_vendor%g
23446 s%@build_os@%$build_os%g
23447 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23448 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23449 s%@INSTALL_DATA@%$INSTALL_DATA%g
23450 s%@PACKAGE@%$PACKAGE%g
23451 s%@VERSION@%$VERSION%g
23452 s%@ACLOCAL@%$ACLOCAL%g
23453 s%@AUTOCONF@%$AUTOCONF%g
23454 s%@AUTOMAKE@%$AUTOMAKE%g
23455 s%@AUTOHEADER@%$AUTOHEADER%g
23456 s%@MAKEINFO@%$MAKEINFO%g
23457 s%@install_sh@%$install_sh%g
23458 s%@AMTAR@%$AMTAR%g
23459 s%@AWK@%$AWK%g
23460 s%@AMTARFLAGS@%$AMTARFLAGS%g
23461 s%@SET_MAKE@%$SET_MAKE%g
23462 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23463 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23464 s%@top_builddir@%$top_builddir%g
23465 s%@ldap_subdir@%$ldap_subdir%g
23466 s%@CC@%$CC%g
23467 s%@AR@%$AR%g
23468 s%@LN_S@%$LN_S%g
23469 s%@OBJEXT@%$OBJEXT%g
23470 s%@EXEEXT@%$EXEEXT%g
23471 s%@ECHO@%$ECHO%g
23472 s%@RANLIB@%$RANLIB%g
23473 s%@STRIP@%$STRIP%g
23474 s%@DLLTOOL@%$DLLTOOL%g
23475 s%@AS@%$AS%g
23476 s%@OBJDUMP@%$OBJDUMP%g
23477 s%@CPP@%$CPP%g
23478 s%@LIBTOOL@%$LIBTOOL%g
23479 s%@LTSTATIC@%$LTSTATIC%g
23480 s%@LN_H@%$LN_H%g
23481 s%@PERLBIN@%$PERLBIN%g
23482 s%@OL_MKDEP@%$OL_MKDEP%g
23483 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23484 s%@LIBOBJS@%$LIBOBJS%g
23485 s%@LIBSRCS@%$LIBSRCS%g
23486 s%@PLAT@%$PLAT%g
23487 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23488 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23489 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23490 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23491 s%@BUILD_BDB@%$BUILD_BDB%g
23492 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23493 s%@BUILD_LDAP@%$BUILD_LDAP%g
23494 s%@BUILD_LDBM@%$BUILD_LDBM%g
23495 s%@BUILD_META@%$BUILD_META%g
23496 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23497 s%@BUILD_NULL@%$BUILD_NULL%g
23498 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23499 s%@BUILD_PERL@%$BUILD_PERL%g
23500 s%@BUILD_SHELL@%$BUILD_SHELL%g
23501 s%@BUILD_SQL@%$BUILD_SQL%g
23502 s%@BUILD_TCL@%$BUILD_TCL%g
23503 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23504 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23505 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23506 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23507 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23508 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23509 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23510 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23511 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23512 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23513 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23514 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
23515 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23516 s%@LDAP_LIBS@%$LDAP_LIBS%g
23517 s%@LDIF_LIBS@%$LDIF_LIBS%g
23518 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23519 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23520 s%@LDBM_LIBS@%$LDBM_LIBS%g
23521 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23522 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23523 s%@WRAP_LIBS@%$WRAP_LIBS%g
23524 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
23525 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23526 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23527 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23528 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23529 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23530 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23531 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23532 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23533 s%@KRB4_LIBS@%$KRB4_LIBS%g
23534 s%@KRB5_LIBS@%$KRB5_LIBS%g
23535 s%@READLINE_LIBS@%$READLINE_LIBS%g
23536 s%@SASL_LIBS@%$SASL_LIBS%g
23537 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23538 s%@TLS_LIBS@%$TLS_LIBS%g
23539 s%@MODULES_LIBS@%$MODULES_LIBS%g
23540 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
23541 s%@LIBSLAPI@%$LIBSLAPI%g
23542 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
23543 s%@AUTH_LIBS@%$AUTH_LIBS%g
23544 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23545 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23546 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23547 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23548
23549 CEOF
23550 EOF
23551
23552 cat >> $CONFIG_STATUS <<\EOF
23553
23554 # Split the substitutions into bite-sized pieces for seds with
23555 # small command number limits, like on Digital OSF/1 and HP-UX.
23556 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23557 ac_file=1 # Number of current file.
23558 ac_beg=1 # First line for current file.
23559 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23560 ac_more_lines=:
23561 ac_sed_cmds=""
23562 while $ac_more_lines; do
23563   if test $ac_beg -gt 1; then
23564     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23565   else
23566     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23567   fi
23568   if test ! -s conftest.s$ac_file; then
23569     ac_more_lines=false
23570     rm -f conftest.s$ac_file
23571   else
23572     if test -z "$ac_sed_cmds"; then
23573       ac_sed_cmds="sed -f conftest.s$ac_file"
23574     else
23575       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23576     fi
23577     ac_file=`expr $ac_file + 1`
23578     ac_beg=$ac_end
23579     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23580   fi
23581 done
23582 if test -z "$ac_sed_cmds"; then
23583   ac_sed_cmds=cat
23584 fi
23585 EOF
23586
23587 cat >> $CONFIG_STATUS <<EOF
23588
23589 CONFIG_FILES=\${CONFIG_FILES-"\
23590 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23591 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23592 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23593 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23594 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23595 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23596 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23597 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23598 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23599 include/Makefile:build/top.mk:include/Makefile.in \
23600 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23601 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23602 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23603 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23604 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23605 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23606 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23607 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23608 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23609 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23610 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23611 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23612 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23613 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23614 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23615 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23616 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23617 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23618 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23619 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23620 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23621 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23622 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23623 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23624 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23625 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23626 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23627 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23628 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23629 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23630 "}
23631 EOF
23632 cat >> $CONFIG_STATUS <<\EOF
23633 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23634   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23635   case "$ac_file" in
23636   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23637        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23638   *) ac_file_in="${ac_file}.in" ;;
23639   esac
23640
23641   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23642
23643   # Remove last slash and all that follows it.  Not all systems have dirname.
23644   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23645   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23646     # The file is in a subdirectory.
23647     test ! -d "$ac_dir" && mkdir "$ac_dir"
23648     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23649     # A "../" for each directory in $ac_dir_suffix.
23650     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23651   else
23652     ac_dir_suffix= ac_dots=
23653   fi
23654
23655   case "$ac_given_srcdir" in
23656   .)  srcdir=.
23657       if test -z "$ac_dots"; then top_srcdir=.
23658       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23659   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23660   *) # Relative path.
23661     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23662     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23663   esac
23664
23665   case "$ac_given_INSTALL" in
23666   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23667   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23668   esac
23669
23670   echo creating "$ac_file"
23671   rm -f "$ac_file"
23672   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23673   case "$ac_file" in
23674   *[Mm]akefile*) ac_comsub="1i\\
23675 # $configure_input" ;;
23676   *) ac_comsub= ;;
23677   esac
23678
23679   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23680   sed -e "$ac_comsub
23681 s%@configure_input@%$configure_input%g
23682 s%@srcdir@%$srcdir%g
23683 s%@top_srcdir@%$top_srcdir%g
23684 s%@INSTALL@%$INSTALL%g
23685 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23686 fi; done
23687 rm -f conftest.s*
23688
23689 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23690 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23691 #
23692 # ac_d sets the value in "#define NAME VALUE" lines.
23693 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23694 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23695 ac_dC='\3'
23696 ac_dD='%g'
23697 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23698 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23699 ac_uB='\([      ]\)%\1#\2define\3'
23700 ac_uC=' '
23701 ac_uD='\4%g'
23702 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23703 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23704 ac_eB='$%\1#\2define\3'
23705 ac_eC=' '
23706 ac_eD='%g'
23707
23708 if test "${CONFIG_HEADERS+set}" != set; then
23709 EOF
23710 cat >> $CONFIG_STATUS <<EOF
23711   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23712 EOF
23713 cat >> $CONFIG_STATUS <<\EOF
23714 fi
23715 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23716   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23717   case "$ac_file" in
23718   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23719        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23720   *) ac_file_in="${ac_file}.in" ;;
23721   esac
23722
23723   echo creating $ac_file
23724
23725   rm -f conftest.frag conftest.in conftest.out
23726   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23727   cat $ac_file_inputs > conftest.in
23728
23729 EOF
23730
23731 # Transform confdefs.h into a sed script conftest.vals that substitutes
23732 # the proper values into config.h.in to produce config.h.  And first:
23733 # Protect against being on the right side of a sed subst in config.status.
23734 # Protect against being in an unquoted here document in config.status.
23735 rm -f conftest.vals
23736 cat > conftest.hdr <<\EOF
23737 s/[\\&%]/\\&/g
23738 s%[\\$`]%\\&%g
23739 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23740 s%ac_d%ac_u%gp
23741 s%ac_u%ac_e%gp
23742 EOF
23743 sed -n -f conftest.hdr confdefs.h > conftest.vals
23744 rm -f conftest.hdr
23745
23746 # This sed command replaces #undef with comments.  This is necessary, for
23747 # example, in the case of _POSIX_SOURCE, which is predefined and required
23748 # on some systems where configure will not decide to define it.
23749 cat >> conftest.vals <<\EOF
23750 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23751 EOF
23752
23753 # Break up conftest.vals because some shells have a limit on
23754 # the size of here documents, and old seds have small limits too.
23755
23756 rm -f conftest.tail
23757 while :
23758 do
23759   ac_lines=`grep -c . conftest.vals`
23760   # grep -c gives empty output for an empty file on some AIX systems.
23761   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23762   # Write a limited-size here document to conftest.frag.
23763   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23764   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23765   echo 'CEOF
23766   sed -f conftest.frag conftest.in > conftest.out
23767   rm -f conftest.in
23768   mv conftest.out conftest.in
23769 ' >> $CONFIG_STATUS
23770   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23771   rm -f conftest.vals
23772   mv conftest.tail conftest.vals
23773 done
23774 rm -f conftest.vals
23775
23776 cat >> $CONFIG_STATUS <<\EOF
23777   rm -f conftest.frag conftest.h
23778   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23779   cat conftest.in >> conftest.h
23780   rm -f conftest.in
23781   if cmp -s $ac_file conftest.h 2>/dev/null; then
23782     echo "$ac_file is unchanged"
23783     rm -f conftest.h
23784   else
23785     # Remove last slash and all that follows it.  Not all systems have dirname.
23786       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23787       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23788       # The file is in a subdirectory.
23789       test ! -d "$ac_dir" && mkdir "$ac_dir"
23790     fi
23791     rm -f $ac_file
23792     mv conftest.h $ac_file
23793   fi
23794 fi; done
23795
23796 EOF
23797 cat >> $CONFIG_STATUS <<EOF
23798
23799 EOF
23800 cat >> $CONFIG_STATUS <<\EOF
23801
23802 date > stamp-h
23803 echo Please run \"make depend\" to build dependencies
23804
23805 exit 0
23806 EOF
23807 chmod +x $CONFIG_STATUS
23808 rm -fr confdefs* $ac_clean_files
23809 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23810