]> git.sur5r.net Git - openldap/blob - configure
return to releng
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.478.2.24 2005/03/14 17:06:26 kurt Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2005 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2005 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58
59 SLAPD (Standalone LDAP Daemon) Options:"
60 ac_help="$ac_help
61   --enable-slapd          enable building slapd [yes]"
62 ac_help="$ac_help
63     --enable-aci          enable per-object ACIs (experimental) [no]"
64 ac_help="$ac_help
65     --enable-cleartext    enable cleartext passwords [yes]"
66 ac_help="$ac_help
67     --enable-crypt        enable crypt(3) passwords [no]"
68 ac_help="$ac_help
69     --enable-lmpasswd     enable LAN Manager passwords [no]"
70 ac_help="$ac_help
71     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
72 ac_help="$ac_help
73     --enable-modules      enable dynamic module support [no]"
74 ac_help="$ac_help
75     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
76 ac_help="$ac_help
77     --enable-rlookups     enable reverse lookups of client hostnames [no]"
78 ac_help="$ac_help
79     --enable-slapi        enable SLAPI support (experimental) [no]"
80 ac_help="$ac_help
81     --enable-slp          enable SLPv2 support [no]"
82 ac_help="$ac_help
83     --enable-wrappers     enable tcp wrapper support [no]"
84 ac_help="$ac_help
85
86 SLAPD Backend Options:"
87 ac_help="$ac_help
88     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
89 ac_help="$ac_help
90     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
91 ac_help="$ac_help
92     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-ldap         enable ldap backend no|yes|mod [no]"
95 ac_help="$ac_help
96     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
97 ac_help="$ac_help
98       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
99 ac_help="$ac_help
100       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
101 ac_help="$ac_help
102     --enable-meta         enable metadirectory backend no|yes|mod [no]"
103 ac_help="$ac_help
104     --enable-monitor      enable monitor backend no|yes|mod [yes]"
105 ac_help="$ac_help
106     --enable-null         enable null backend no|yes|mod [no]"
107 ac_help="$ac_help
108     --enable-passwd       enable passwd backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-perl         enable perl backend no|yes|mod [no]"
111 ac_help="$ac_help
112     --enable-shell        enable shell backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-sql          enable sql backend no|yes|mod [no]"
115 ac_help="$ac_help
116
117 SLAPD Overlay Options:"
118 ac_help="$ac_help
119     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
120 ac_help="$ac_help
121     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
122 ac_help="$ac_help
123
124 SLURPD (Replication Daemon) Options:"
125 ac_help="$ac_help
126   --enable-slurpd         enable building slurpd [auto]"
127 ac_help="$ac_help
128
129 Library Generation & Linking Options"
130 ac_help="$ac_help
131   --enable-static[=PKGS]  build static libraries [default=yes]"
132 ac_help="$ac_help
133   --enable-shared[=PKGS]  build shared libraries [default=yes]"
134 ac_help="$ac_help
135   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
136 ac_help="$ac_help
137   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
138
139 # Find the correct PATH separator.  Usually this is `:', but
140 # DJGPP uses `;' like DOS.
141 if test "X${PATH_SEPARATOR+set}" != Xset; then
142   UNAME=${UNAME-`uname 2>/dev/null`}
143   case X$UNAME in
144     *-DOS) lt_cv_sys_path_separator=';' ;;
145     *)     lt_cv_sys_path_separator=':' ;;
146   esac
147   PATH_SEPARATOR=$lt_cv_sys_path_separator
148 fi
149
150
151 # Check that we are running under the correct shell.
152 SHELL=${CONFIG_SHELL-/bin/sh}
153
154 case X$ECHO in
155 X*--fallback-echo)
156   # Remove one level of quotation (which was required for Make).
157   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
158   ;;
159 esac
160
161 echo=${ECHO-echo}
162 if test "X$1" = X--no-reexec; then
163   # Discard the --no-reexec flag, and continue.
164   shift
165 elif test "X$1" = X--fallback-echo; then
166   # Avoid inline document here, it may be left over
167   :
168 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
169   # Yippee, $echo works!
170   :
171 else
172   # Restart under the correct shell.
173   exec $SHELL "$0" --no-reexec ${1+"$@"}
174 fi
175
176 if test "X$1" = X--fallback-echo; then
177   # used as fallback echo
178   shift
179   cat <<EOF
180
181 EOF
182   exit 0
183 fi
184
185 # The HP-UX ksh and POSIX shell print the target directory to stdout
186 # if CDPATH is set.
187 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
188
189 if test -z "$ECHO"; then
190 if test "X${echo_test_string+set}" != Xset; then
191 # find a string as large as possible, as long as the shell can cope with it
192   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
193     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
194     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
195        echo_test_string="`eval $cmd`" &&
196        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
197     then
198       break
199     fi
200   done
201 fi
202
203 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
204    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
205    test "X$echo_testing_string" = "X$echo_test_string"; then
206   :
207 else
208   # The Solaris, AIX, and Digital Unix default echo programs unquote
209   # backslashes.  This makes it impossible to quote backslashes using
210   #   echo "$something" | sed 's/\\/\\\\/g'
211   #
212   # So, first we look for a working echo in the user's PATH.
213
214   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
215   for dir in $PATH /usr/ucb; do
216     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
217        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
218        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
219        test "X$echo_testing_string" = "X$echo_test_string"; then
220       echo="$dir/echo"
221       break
222     fi
223   done
224   IFS="$save_ifs"
225
226   if test "X$echo" = Xecho; then
227     # We didn't find a better echo, so look for alternatives.
228     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
229        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
230        test "X$echo_testing_string" = "X$echo_test_string"; then
231       # This shell has a builtin print -r that does the trick.
232       echo='print -r'
233     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
234          test "X$CONFIG_SHELL" != X/bin/ksh; then
235       # If we have ksh, try running configure again with it.
236       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
237       export ORIGINAL_CONFIG_SHELL
238       CONFIG_SHELL=/bin/ksh
239       export CONFIG_SHELL
240       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
241     else
242       # Try using printf.
243       echo='printf %s\n'
244       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
245          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
246          test "X$echo_testing_string" = "X$echo_test_string"; then
247         # Cool, printf works
248         :
249       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
250            test "X$echo_testing_string" = 'X\t' &&
251            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
252            test "X$echo_testing_string" = "X$echo_test_string"; then
253         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
254         export CONFIG_SHELL
255         SHELL="$CONFIG_SHELL"
256         export SHELL
257         echo="$CONFIG_SHELL $0 --fallback-echo"
258       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
259            test "X$echo_testing_string" = 'X\t' &&
260            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
261            test "X$echo_testing_string" = "X$echo_test_string"; then
262         echo="$CONFIG_SHELL $0 --fallback-echo"
263       else
264         # maybe with a smaller string...
265         prev=:
266
267         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
268           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
269           then
270             break
271           fi
272           prev="$cmd"
273         done
274
275         if test "$prev" != 'sed 50q "$0"'; then
276           echo_test_string=`eval $prev`
277           export echo_test_string
278           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
279         else
280           # Oops.  We lost completely, so just stick with echo.
281           echo=echo
282         fi
283       fi
284     fi
285   fi
286 fi
287 fi
288
289 # Copy echo and quote the copy suitably for passing to libtool from
290 # the Makefile, instead of quoting the original, which is used later.
291 ECHO=$echo
292 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
293    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
294 fi
295
296
297 ac_help="$ac_help
298   --disable-libtool-lock  avoid locking (might break parallel builds)"
299 ac_help="$ac_help
300   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
301 ac_help="$ac_help
302
303 See INSTALL file for further details."
304
305 # Initialize some variables set by options.
306 # The variables have the same names as the options, with
307 # dashes changed to underlines.
308 build=NONE
309 cache_file=./config.cache
310 exec_prefix=NONE
311 host=NONE
312 no_create=
313 nonopt=NONE
314 no_recursion=
315 prefix=NONE
316 program_prefix=NONE
317 program_suffix=NONE
318 program_transform_name=s,x,x,
319 silent=
320 site=
321 srcdir=
322 target=NONE
323 verbose=
324 x_includes=NONE
325 x_libraries=NONE
326 bindir='${exec_prefix}/bin'
327 sbindir='${exec_prefix}/sbin'
328 libexecdir='${exec_prefix}/libexec'
329 datadir='${prefix}/share'
330 sysconfdir='${prefix}/etc'
331 sharedstatedir='${prefix}/com'
332 localstatedir='${prefix}/var'
333 libdir='${exec_prefix}/lib'
334 includedir='${prefix}/include'
335 oldincludedir='/usr/include'
336 infodir='${prefix}/info'
337 mandir='${prefix}/man'
338
339 # Initialize some other variables.
340 subdirs=
341 MFLAGS= MAKEFLAGS=
342 SHELL=${CONFIG_SHELL-/bin/sh}
343 # Maximum number of lines to put in a shell here document.
344 ac_max_here_lines=12
345
346 ac_prev=
347 for ac_option
348 do
349
350   # If the previous option needs an argument, assign it.
351   if test -n "$ac_prev"; then
352     eval "$ac_prev=\$ac_option"
353     ac_prev=
354     continue
355   fi
356
357   case "$ac_option" in
358   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
359   *) ac_optarg= ;;
360   esac
361
362   # Accept the important Cygnus configure options, so we can diagnose typos.
363
364   case "$ac_option" in
365
366   -bindir | --bindir | --bindi | --bind | --bin | --bi)
367     ac_prev=bindir ;;
368   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
369     bindir="$ac_optarg" ;;
370
371   -build | --build | --buil | --bui | --bu)
372     ac_prev=build ;;
373   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
374     build="$ac_optarg" ;;
375
376   -cache-file | --cache-file | --cache-fil | --cache-fi \
377   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
378     ac_prev=cache_file ;;
379   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
380   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
381     cache_file="$ac_optarg" ;;
382
383   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
384     ac_prev=datadir ;;
385   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
386   | --da=*)
387     datadir="$ac_optarg" ;;
388
389   -disable-* | --disable-*)
390     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
391     # Reject names that are not valid shell variable names.
392     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
393       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
394     fi
395     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
396     eval "enable_${ac_feature}=no" ;;
397
398   -enable-* | --enable-*)
399     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
400     # Reject names that are not valid shell variable names.
401     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
402       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
403     fi
404     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
405     case "$ac_option" in
406       *=*) ;;
407       *) ac_optarg=yes ;;
408     esac
409     eval "enable_${ac_feature}='$ac_optarg'" ;;
410
411   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
412   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
413   | --exec | --exe | --ex)
414     ac_prev=exec_prefix ;;
415   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
416   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
417   | --exec=* | --exe=* | --ex=*)
418     exec_prefix="$ac_optarg" ;;
419
420   -gas | --gas | --ga | --g)
421     # Obsolete; use --with-gas.
422     with_gas=yes ;;
423
424   -help | --help | --hel | --he)
425     # Omit some internal or obsolete options to make the list less imposing.
426     # This message is too long to be a string in the A/UX 3.1 sh.
427     cat << EOF
428 Usage: configure [options] [host]
429 Options: [defaults in brackets after descriptions]
430 Configuration:
431   --cache-file=FILE       cache test results in FILE
432   --help                  print this message
433   --no-create             do not create output files
434   --quiet, --silent       do not print \`checking...' messages
435   --version               print the version of autoconf that created configure
436 Directory and file names:
437   --prefix=PREFIX         install architecture-independent files in PREFIX
438                           [$ac_default_prefix]
439   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
440                           [same as prefix]
441   --bindir=DIR            user executables in DIR [EPREFIX/bin]
442   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
443   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
444   --datadir=DIR           read-only architecture-independent data in DIR
445                           [PREFIX/share]
446   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
447   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
448                           [PREFIX/com]
449   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
450   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
451   --includedir=DIR        C header files in DIR [PREFIX/include]
452   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
453   --infodir=DIR           info documentation in DIR [PREFIX/info]
454   --mandir=DIR            man documentation in DIR [PREFIX/man]
455   --srcdir=DIR            find the sources in DIR [configure dir or ..]
456   --program-prefix=PREFIX prepend PREFIX to installed program names
457   --program-suffix=SUFFIX append SUFFIX to installed program names
458   --program-transform-name=PROGRAM
459                           run sed PROGRAM on installed program names
460 EOF
461     cat << EOF
462 Host type:
463   --build=BUILD           configure for building on BUILD [BUILD=HOST]
464   --host=HOST             configure for HOST [guessed]
465   --target=TARGET         configure for TARGET [TARGET=HOST]
466 Features and packages:
467   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
468   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
469   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
470   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
471   --x-includes=DIR        X include files are in DIR
472   --x-libraries=DIR       X library files are in DIR
473 EOF
474     if test -n "$ac_help"; then
475       echo "--enable and --with options recognized:$ac_help"
476     fi
477     exit 0 ;;
478
479   -host | --host | --hos | --ho)
480     ac_prev=host ;;
481   -host=* | --host=* | --hos=* | --ho=*)
482     host="$ac_optarg" ;;
483
484   -includedir | --includedir | --includedi | --included | --include \
485   | --includ | --inclu | --incl | --inc)
486     ac_prev=includedir ;;
487   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
488   | --includ=* | --inclu=* | --incl=* | --inc=*)
489     includedir="$ac_optarg" ;;
490
491   -infodir | --infodir | --infodi | --infod | --info | --inf)
492     ac_prev=infodir ;;
493   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
494     infodir="$ac_optarg" ;;
495
496   -libdir | --libdir | --libdi | --libd)
497     ac_prev=libdir ;;
498   -libdir=* | --libdir=* | --libdi=* | --libd=*)
499     libdir="$ac_optarg" ;;
500
501   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
502   | --libexe | --libex | --libe)
503     ac_prev=libexecdir ;;
504   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
505   | --libexe=* | --libex=* | --libe=*)
506     libexecdir="$ac_optarg" ;;
507
508   -localstatedir | --localstatedir | --localstatedi | --localstated \
509   | --localstate | --localstat | --localsta | --localst \
510   | --locals | --local | --loca | --loc | --lo)
511     ac_prev=localstatedir ;;
512   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
513   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
514   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
515     localstatedir="$ac_optarg" ;;
516
517   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
518     ac_prev=mandir ;;
519   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
520     mandir="$ac_optarg" ;;
521
522   -nfp | --nfp | --nf)
523     # Obsolete; use --without-fp.
524     with_fp=no ;;
525
526   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
527   | --no-cr | --no-c)
528     no_create=yes ;;
529
530   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
531   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
532     no_recursion=yes ;;
533
534   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
535   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
536   | --oldin | --oldi | --old | --ol | --o)
537     ac_prev=oldincludedir ;;
538   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
539   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
540   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
541     oldincludedir="$ac_optarg" ;;
542
543   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
544     ac_prev=prefix ;;
545   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
546     prefix="$ac_optarg" ;;
547
548   -program-prefix | --program-prefix | --program-prefi | --program-pref \
549   | --program-pre | --program-pr | --program-p)
550     ac_prev=program_prefix ;;
551   -program-prefix=* | --program-prefix=* | --program-prefi=* \
552   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
553     program_prefix="$ac_optarg" ;;
554
555   -program-suffix | --program-suffix | --program-suffi | --program-suff \
556   | --program-suf | --program-su | --program-s)
557     ac_prev=program_suffix ;;
558   -program-suffix=* | --program-suffix=* | --program-suffi=* \
559   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
560     program_suffix="$ac_optarg" ;;
561
562   -program-transform-name | --program-transform-name \
563   | --program-transform-nam | --program-transform-na \
564   | --program-transform-n | --program-transform- \
565   | --program-transform | --program-transfor \
566   | --program-transfo | --program-transf \
567   | --program-trans | --program-tran \
568   | --progr-tra | --program-tr | --program-t)
569     ac_prev=program_transform_name ;;
570   -program-transform-name=* | --program-transform-name=* \
571   | --program-transform-nam=* | --program-transform-na=* \
572   | --program-transform-n=* | --program-transform-=* \
573   | --program-transform=* | --program-transfor=* \
574   | --program-transfo=* | --program-transf=* \
575   | --program-trans=* | --program-tran=* \
576   | --progr-tra=* | --program-tr=* | --program-t=*)
577     program_transform_name="$ac_optarg" ;;
578
579   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
580   | -silent | --silent | --silen | --sile | --sil)
581     silent=yes ;;
582
583   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
584     ac_prev=sbindir ;;
585   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
586   | --sbi=* | --sb=*)
587     sbindir="$ac_optarg" ;;
588
589   -sharedstatedir | --sharedstatedir | --sharedstatedi \
590   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
591   | --sharedst | --shareds | --shared | --share | --shar \
592   | --sha | --sh)
593     ac_prev=sharedstatedir ;;
594   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
595   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
596   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
597   | --sha=* | --sh=*)
598     sharedstatedir="$ac_optarg" ;;
599
600   -site | --site | --sit)
601     ac_prev=site ;;
602   -site=* | --site=* | --sit=*)
603     site="$ac_optarg" ;;
604
605   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
606     ac_prev=srcdir ;;
607   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
608     srcdir="$ac_optarg" ;;
609
610   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
611   | --syscon | --sysco | --sysc | --sys | --sy)
612     ac_prev=sysconfdir ;;
613   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
614   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
615     sysconfdir="$ac_optarg" ;;
616
617   -target | --target | --targe | --targ | --tar | --ta | --t)
618     ac_prev=target ;;
619   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
620     target="$ac_optarg" ;;
621
622   -v | -verbose | --verbose | --verbos | --verbo | --verb)
623     verbose=yes ;;
624
625   -version | --version | --versio | --versi | --vers)
626     echo "configure generated by autoconf version 2.13.1"
627     exit 0 ;;
628
629   -with-* | --with-*)
630     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
631     # Reject names that are not valid shell variable names.
632     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
633       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
634     fi
635     ac_package=`echo $ac_package| sed 's/-/_/g'`
636     case "$ac_option" in
637       *=*) ;;
638       *) ac_optarg=yes ;;
639     esac
640     eval "with_${ac_package}='$ac_optarg'" ;;
641
642   -without-* | --without-*)
643     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
644     # Reject names that are not valid shell variable names.
645     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
646       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
647     fi
648     ac_package=`echo $ac_package| sed 's/-/_/g'`
649     eval "with_${ac_package}=no" ;;
650
651   --x)
652     # Obsolete; use --with-x.
653     with_x=yes ;;
654
655   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
656   | --x-incl | --x-inc | --x-in | --x-i)
657     ac_prev=x_includes ;;
658   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
659   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
660     x_includes="$ac_optarg" ;;
661
662   -x-libraries | --x-libraries | --x-librarie | --x-librari \
663   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
664     ac_prev=x_libraries ;;
665   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
666   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
667     x_libraries="$ac_optarg" ;;
668
669   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
670     ;;
671
672   *)
673     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
674       echo "configure: warning: $ac_option: invalid host type" 1>&2
675     fi
676     if test "x$nonopt" != xNONE; then
677       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
678     fi
679     nonopt="$ac_option"
680     ;;
681
682   esac
683 done
684
685 if test -n "$ac_prev"; then
686   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
687 fi
688
689 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
690
691 # File descriptor usage:
692 # 0 standard input
693 # 1 file creation
694 # 2 errors and warnings
695 # 3 some systems may open it to /dev/tty
696 # 4 used on the Kubota Titan
697 # 6 checking for... messages and results
698 # 5 compiler messages saved in config.log
699 if test "$silent" = yes; then
700   exec 6>/dev/null
701 else
702   exec 6>&1
703 fi
704 exec 5>./config.log
705
706 echo "\
707 This file contains any messages produced by compilers while
708 running configure, to aid debugging if configure makes a mistake.
709 " 1>&5
710
711 # Strip out --no-create and --no-recursion so they do not pile up.
712 # Also quote any args containing shell metacharacters.
713 ac_configure_args=
714 for ac_arg
715 do
716   case "$ac_arg" in
717   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
718   | --no-cr | --no-c) ;;
719   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
720   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
721   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
722   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
723   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
724   esac
725 done
726
727 # NLS nuisances.
728 # Only set these to C if already set.  These must not be set unconditionally
729 # because not all systems understand e.g. LANG=C (notably SCO).
730 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
731 # Non-C LC_CTYPE values break the ctype check.
732 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
733 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
734 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
735 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
736
737 # confdefs.h avoids OS command line length limits that DEFS can exceed.
738 rm -rf conftest* confdefs.h
739 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
740 echo > confdefs.h
741
742 # A filename unique to this package, relative to the directory that
743 # configure is in, which we can look for to find out if srcdir is correct.
744 ac_unique_file=build/version.sh
745
746 # Find the source files, if location was not specified.
747 if test -z "$srcdir"; then
748   ac_srcdir_defaulted=yes
749   # Try the directory containing this script, then its parent.
750   ac_prog=$0
751   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
752   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
753   srcdir=$ac_confdir
754   if test ! -r $srcdir/$ac_unique_file; then
755     srcdir=..
756   fi
757 else
758   ac_srcdir_defaulted=no
759 fi
760 if test ! -r $srcdir/$ac_unique_file; then
761   if test "$ac_srcdir_defaulted" = yes; then
762     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
763   else
764     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
765   fi
766 fi
767 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
768
769 # Prefer explicitly selected file to automatically selected ones.
770 if test -z "$CONFIG_SITE"; then
771   if test "x$prefix" != xNONE; then
772     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
773   else
774     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
775   fi
776 fi
777 for ac_site_file in $CONFIG_SITE; do
778   if test -r "$ac_site_file"; then
779     echo "loading site script $ac_site_file"
780     . "$ac_site_file"
781   fi
782 done
783
784
785 ac_ext=c
786 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
787 ac_cpp='$CPP $CPPFLAGS'
788 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
789 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
790 cross_compiling=$ac_cv_prog_cc_cross
791
792 ac_exeext=
793 ac_objext=o
794 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
795   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
796   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
797     ac_n= ac_c='
798 ' ac_t='        '
799   else
800     ac_n=-n ac_c= ac_t=
801   fi
802 else
803   ac_n= ac_c='\c' ac_t=
804 fi
805
806
807 # set unset (borrowed from autoconf 2.49c)
808 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
809   ol_unset=unset
810 else
811   ol_unset=false
812 fi
813 # unset CDPATH
814 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
815
816 ac_aux_dir=
817 for ac_dir in build $srcdir/build; do
818   if test -f $ac_dir/install-sh; then
819     ac_aux_dir=$ac_dir
820     ac_install_sh="$ac_aux_dir/install-sh -c"
821     break
822   elif test -f $ac_dir/install.sh; then
823     ac_aux_dir=$ac_dir
824     ac_install_sh="$ac_aux_dir/install.sh -c"
825     break
826   elif test -f $ac_dir/shtool; then
827     ac_aux_dir=$ac_dir
828     ac_install_sh="$ac_aux_dir/shtool install -c"
829     break
830   fi
831 done
832 if test -z "$ac_aux_dir"; then
833   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
834 fi
835 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
836 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
837 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
838
839 eval `$ac_aux_dir/version.sh`
840 if test -z "$OL_STRING"; then
841         { echo "configure: error: could not determine version" 1>&2; exit 1; }
842 fi
843
844 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
845         ac_cv_shtool="$ac_aux_dir/shtool"
846 else
847         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
848 fi
849
850 SHTOOL="$ac_cv_shtool"
851
852 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
853 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
854
855 OPENLDAP_CVS=""
856 if test -d $ac_aux_dir/CVS; then
857         OPENLDAP_CVS="(from CVS sources) "
858 fi
859
860 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
861
862
863 echo $ac_n "checking host system type""... $ac_c" 1>&6
864 echo "configure:865: checking host system type" >&5
865 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
866
867 # Make sure we can run config.sub.
868   if $ac_config_sub sun4 >/dev/null 2>&1; then :
869     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
870   fi
871
872   ac_cv_host_alias=$host
873   case "$ac_cv_host_alias" in
874   NONE)
875     case $nonopt in
876     NONE)
877       if ac_cv_host_alias=`$ac_config_guess`; then :
878       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
879       fi ;;
880     *) ac_cv_host_alias=$nonopt ;;
881     esac ;;
882   esac
883
884   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
885   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
886   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
887   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
888 else
889   echo $ac_n "(cached) $ac_c" 1>&6
890 fi
891
892 echo "$ac_t""$ac_cv_host" 1>&6
893
894 host=$ac_cv_host
895 host_alias=$ac_cv_host_alias
896 host_cpu=$ac_cv_host_cpu
897 host_vendor=$ac_cv_host_vendor
898 host_os=$ac_cv_host_os
899
900
901
902
903
904 echo $ac_n "checking target system type""... $ac_c" 1>&6
905 echo "configure:906: checking target system type" >&5
906 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
907
908 # Make sure we can run config.sub.
909   if $ac_config_sub sun4 >/dev/null 2>&1; then :
910     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
911   fi
912
913   ac_cv_target_alias=$target
914   case "$ac_cv_target_alias" in
915   NONE)
916     case $nonopt in
917     NONE)
918       ac_cv_target_alias=$host_alias ;;
919
920     *) ac_cv_target_alias=$nonopt ;;
921     esac ;;
922   esac
923
924   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
925   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
926   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
927   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
928 else
929   echo $ac_n "(cached) $ac_c" 1>&6
930 fi
931
932 echo "$ac_t""$ac_cv_target" 1>&6
933
934 target=$ac_cv_target
935 target_alias=$ac_cv_target_alias
936 target_cpu=$ac_cv_target_cpu
937 target_vendor=$ac_cv_target_vendor
938 target_os=$ac_cv_target_os
939
940
941
942
943
944 echo $ac_n "checking build system type""... $ac_c" 1>&6
945 echo "configure:946: checking build system type" >&5
946 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
947
948 # Make sure we can run config.sub.
949   if $ac_config_sub sun4 >/dev/null 2>&1; then :
950     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
951   fi
952
953   ac_cv_build_alias=$build
954   case "$ac_cv_build_alias" in
955   NONE)
956     case $nonopt in
957     NONE)
958       ac_cv_build_alias=$host_alias ;;
959
960     *) ac_cv_build_alias=$nonopt ;;
961     esac ;;
962   esac
963
964   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
965   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
966   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
967   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
968 else
969   echo $ac_n "(cached) $ac_c" 1>&6
970 fi
971
972 echo "$ac_t""$ac_cv_build" 1>&6
973
974 build=$ac_cv_build
975 build_alias=$ac_cv_build_alias
976 build_cpu=$ac_cv_build_cpu
977 build_vendor=$ac_cv_build_vendor
978 build_os=$ac_cv_build_os
979
980
981
982
983
984 # Do some error checking and defaulting for the host and target type.
985 # The inputs are:
986 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
987 #
988 # The rules are:
989 # 1. You are not allowed to specify --host, --target, and nonopt at the
990 #    same time.
991 # 2. Host defaults to nonopt.
992 # 3. If nonopt is not specified, then host defaults to the current host,
993 #    as determined by config.guess.
994 # 4. Target and build default to nonopt.
995 # 5. If nonopt is not specified, then target and build default to host.
996
997 # The aliases save the names the user supplied, while $host etc.
998 # will get canonicalized.
999 case $host---$target---$nonopt in
1000 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1001 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1002 esac
1003
1004 test "$host_alias" != "$target_alias" &&
1005   test "$program_prefix$program_suffix$program_transform_name" = \
1006     NONENONEs,x,x, &&
1007   program_prefix=${target_alias}-
1008
1009
1010 # Find a good install program.  We prefer a C program (faster),
1011 # so one script is as good as another.  But avoid the broken or
1012 # incompatible versions:
1013 # SysV /etc/install, /usr/sbin/install
1014 # SunOS /usr/etc/install
1015 # IRIX /sbin/install
1016 # AIX /bin/install
1017 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1018 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1019 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1020 # ./install, which can be erroneously created by make from ./install.sh.
1021 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1022 echo "configure:1023: checking for a BSD compatible install" >&5
1023 if test -z "$INSTALL"; then
1024 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1025   echo $ac_n "(cached) $ac_c" 1>&6
1026 else
1027     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1028   for ac_dir in $PATH; do
1029     # Account for people who put trailing slashes in PATH elements.
1030     case "$ac_dir/" in
1031     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1032     *)
1033       # OSF1 and SCO ODT 3.0 have their own names for install.
1034       # Don't use installbsd from OSF since it installs stuff as root
1035       # by default.
1036       for ac_prog in ginstall scoinst install; do
1037         if test -f $ac_dir/$ac_prog; then
1038           if test $ac_prog = install &&
1039             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1040             # AIX install.  It has an incompatible calling convention.
1041             :
1042           elif test $ac_prog = install &&
1043             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1044             # program-specific install script used by HP pwplus--don't use.
1045             :
1046           else
1047             ac_cv_path_install="$ac_dir/$ac_prog -c"
1048             break 2
1049           fi
1050         fi
1051       done
1052       ;;
1053     esac
1054   done
1055   IFS="$ac_save_IFS"
1056
1057 fi
1058   if test "${ac_cv_path_install+set}" = set; then
1059     INSTALL="$ac_cv_path_install"
1060   else
1061     # As a last resort, use the slow shell script.  We don't cache a
1062     # path for INSTALL within a source directory, because that will
1063     # break other packages using the cache if that directory is
1064     # removed, or if the path is relative.
1065     INSTALL="$ac_install_sh"
1066   fi
1067 fi
1068 echo "$ac_t""$INSTALL" 1>&6
1069
1070 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1071 # It thinks the first close brace ends the variable substitution.
1072 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1073
1074 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1075
1076 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1077
1078 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1079 echo "configure:1080: checking whether build environment is sane" >&5
1080 # Just in case
1081 sleep 1
1082 echo timestamp > conftestfile
1083 # Do `set' in a subshell so we don't clobber the current shell's
1084 # arguments.  Must try -L first in case configure is actually a
1085 # symlink; some systems play weird games with the mod time of symlinks
1086 # (eg FreeBSD returns the mod time of the symlink's containing
1087 # directory).
1088 if (
1089    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1090    if test "$*" = "X"; then
1091       # -L didn't work.
1092       set X `ls -t $srcdir/configure conftestfile`
1093    fi
1094    if test "$*" != "X $srcdir/configure conftestfile" \
1095       && test "$*" != "X conftestfile $srcdir/configure"; then
1096
1097       # If neither matched, then we have a broken ls.  This can happen
1098       # if, for instance, CONFIG_SHELL is bash and it inherits a
1099       # broken ls alias from the environment.  This has actually
1100       # happened.  Such a system could not be considered "sane".
1101       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1102 alias in your environment" 1>&2; exit 1; }
1103    fi
1104
1105    test "$2" = conftestfile
1106    )
1107 then
1108    # Ok.
1109    :
1110 else
1111    { echo "configure: error: newly created file is older than distributed files!
1112 Check your system clock" 1>&2; exit 1; }
1113 fi
1114 rm -f conftest*
1115 echo "$ac_t""yes" 1>&6
1116 if test "$program_transform_name" = s,x,x,; then
1117   program_transform_name=
1118 else
1119   # Double any \ or $.  echo might interpret backslashes.
1120   cat <<\EOF_SED > conftestsed
1121 s,\\,\\\\,g; s,\$,$$,g
1122 EOF_SED
1123   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1124   rm -f conftestsed
1125 fi
1126 test "$program_prefix" != NONE &&
1127   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1128 # Use a double $ so make ignores it.
1129 test "$program_suffix" != NONE &&
1130   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1131
1132 # sed with no file args requires a program.
1133 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1134
1135 for ac_prog in mawk gawk nawk awk
1136 do
1137 # Extract the first word of "$ac_prog", so it can be a program name with args.
1138 set dummy $ac_prog; ac_word=$2
1139 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1140 echo "configure:1141: checking for $ac_word" >&5
1141 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1142   echo $ac_n "(cached) $ac_c" 1>&6
1143 else
1144   if test -n "$AWK"; then
1145   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1146 else
1147   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1148   ac_dummy="$PATH"
1149   for ac_dir in $ac_dummy; do
1150     test -z "$ac_dir" && ac_dir=.
1151     if test -f $ac_dir/$ac_word; then
1152       ac_cv_prog_AWK="$ac_prog"
1153       break
1154     fi
1155   done
1156   IFS="$ac_save_ifs"
1157 fi
1158 fi
1159 AWK="$ac_cv_prog_AWK"
1160 if test -n "$AWK"; then
1161   echo "$ac_t""$AWK" 1>&6
1162 else
1163   echo "$ac_t""no" 1>&6
1164 fi
1165
1166 test -n "$AWK" && break
1167 done
1168
1169 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1170 echo "configure:1171: checking whether ${MAKE-make} sets \${MAKE}" >&5
1171 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1172 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1173   echo $ac_n "(cached) $ac_c" 1>&6
1174 else
1175   cat > conftestmake <<\EOF
1176 all:
1177         @echo 'ac_maketemp="${MAKE}"'
1178 EOF
1179 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1180 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1181 if test -n "$ac_maketemp"; then
1182   eval ac_cv_prog_make_${ac_make}_set=yes
1183 else
1184   eval ac_cv_prog_make_${ac_make}_set=no
1185 fi
1186 rm -f conftestmake
1187 fi
1188 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1189   echo "$ac_t""yes" 1>&6
1190   SET_MAKE=
1191 else
1192   echo "$ac_t""no" 1>&6
1193   SET_MAKE="MAKE=${MAKE-make}"
1194 fi
1195
1196
1197
1198 PACKAGE=$OL_PACKAGE
1199
1200 VERSION=$OL_VERSION
1201
1202 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1203   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1204 fi
1205
1206
1207
1208 missing_dir=`cd $ac_aux_dir && pwd`
1209 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1210 echo "configure:1211: checking for working aclocal" >&5
1211 # Run test in a subshell; some versions of sh will print an error if
1212 # an executable is not found, even if stderr is redirected.
1213 # Redirect stdin to placate older versions of autoconf.  Sigh.
1214 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1215    ACLOCAL=aclocal
1216    echo "$ac_t""found" 1>&6
1217 else
1218    ACLOCAL="$missing_dir/missing aclocal"
1219    echo "$ac_t""missing" 1>&6
1220 fi
1221
1222 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1223 echo "configure:1224: checking for working autoconf" >&5
1224 # Run test in a subshell; some versions of sh will print an error if
1225 # an executable is not found, even if stderr is redirected.
1226 # Redirect stdin to placate older versions of autoconf.  Sigh.
1227 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1228    AUTOCONF=autoconf
1229    echo "$ac_t""found" 1>&6
1230 else
1231    AUTOCONF="$missing_dir/missing autoconf"
1232    echo "$ac_t""missing" 1>&6
1233 fi
1234
1235 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1236 echo "configure:1237: checking for working automake" >&5
1237 # Run test in a subshell; some versions of sh will print an error if
1238 # an executable is not found, even if stderr is redirected.
1239 # Redirect stdin to placate older versions of autoconf.  Sigh.
1240 if (automake --version) < /dev/null > /dev/null 2>&1; then
1241    AUTOMAKE=automake
1242    echo "$ac_t""found" 1>&6
1243 else
1244    AUTOMAKE="$missing_dir/missing automake"
1245    echo "$ac_t""missing" 1>&6
1246 fi
1247
1248 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1249 echo "configure:1250: checking for working autoheader" >&5
1250 # Run test in a subshell; some versions of sh will print an error if
1251 # an executable is not found, even if stderr is redirected.
1252 # Redirect stdin to placate older versions of autoconf.  Sigh.
1253 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1254    AUTOHEADER=autoheader
1255    echo "$ac_t""found" 1>&6
1256 else
1257    AUTOHEADER="$missing_dir/missing autoheader"
1258    echo "$ac_t""missing" 1>&6
1259 fi
1260
1261 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1262 echo "configure:1263: checking for working makeinfo" >&5
1263 # Run test in a subshell; some versions of sh will print an error if
1264 # an executable is not found, even if stderr is redirected.
1265 # Redirect stdin to placate older versions of autoconf.  Sigh.
1266 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1267    MAKEINFO=makeinfo
1268    echo "$ac_t""found" 1>&6
1269 else
1270    MAKEINFO="$missing_dir/missing makeinfo"
1271    echo "$ac_t""missing" 1>&6
1272 fi
1273
1274 install_sh="$missing_dir/install-sh"
1275 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1276
1277 for ac_prog in gnutar gtar tar
1278 do
1279 # Extract the first word of "$ac_prog", so it can be a program name with args.
1280 set dummy $ac_prog; ac_word=$2
1281 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1282 echo "configure:1283: checking for $ac_word" >&5
1283 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1284   echo $ac_n "(cached) $ac_c" 1>&6
1285 else
1286   if test -n "$AMTAR"; then
1287   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1288 else
1289   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1290   ac_dummy="$PATH"
1291   for ac_dir in $ac_dummy; do
1292     test -z "$ac_dir" && ac_dir=.
1293     if test -f $ac_dir/$ac_word; then
1294       ac_cv_prog_AMTAR="$ac_prog"
1295       break
1296     fi
1297   done
1298   IFS="$ac_save_ifs"
1299 fi
1300 fi
1301 AMTAR="$ac_cv_prog_AMTAR"
1302 if test -n "$AMTAR"; then
1303   echo "$ac_t""$AMTAR" 1>&6
1304 else
1305   echo "$ac_t""no" 1>&6
1306 fi
1307
1308 test -n "$AMTAR" && break
1309 done
1310
1311
1312 AMTARFLAGS=
1313 if test -n "$AMTAR"; then
1314   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1315         AMTARFLAGS=o
1316   fi
1317 fi
1318
1319 cat >> confdefs.h <<EOF
1320 #define OPENLDAP_PACKAGE "$PACKAGE"
1321 EOF
1322
1323 cat >> confdefs.h <<EOF
1324 #define OPENLDAP_VERSION "$VERSION"
1325 EOF
1326
1327
1328 cat >> confdefs.h <<EOF
1329 #define LDAP_VENDOR_VERSION $OL_API_INC
1330 EOF
1331
1332 cat >> confdefs.h <<EOF
1333 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1334 EOF
1335
1336 cat >> confdefs.h <<EOF
1337 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1338 EOF
1339
1340 cat >> confdefs.h <<EOF
1341 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1342 EOF
1343
1344
1345 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1346
1347 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1348
1349 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1350
1351
1352
1353 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1354 echo "configure:1355: checking configure arguments" >&5
1355
1356
1357 top_builddir=`pwd`
1358
1359 ldap_subdir="/openldap"
1360
1361 # Check whether --with-subdir or --without-subdir was given.
1362 if test "${with_subdir+set}" = set; then
1363   withval="$with_subdir"
1364   case "$withval" in
1365         no) ldap_subdir=""
1366                 ;;
1367         yes)
1368                 ;;
1369         /*|\\*)
1370                 ldap_subdir="$withval"
1371                 ;;
1372         *)
1373                 ldap_subdir="/$withval"
1374                 ;;
1375 esac
1376
1377 fi
1378
1379
1380 # OpenLDAP --enable-debug
1381         # Check whether --enable-debug or --disable-debug was given.
1382 if test "${enable_debug+set}" = set; then
1383   enableval="$enable_debug"
1384   
1385         ol_arg=invalid
1386         for ol_val in auto yes no ; do
1387                 if test "$enableval" = "$ol_val" ; then
1388                         ol_arg="$ol_val"
1389                 fi
1390         done
1391         if test "$ol_arg" = "invalid" ; then
1392                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1393         fi
1394         ol_enable_debug="$ol_arg"
1395
1396 else
1397         ol_enable_debug="yes"
1398 fi
1399 # end --enable-debug
1400 # OpenLDAP --enable-dynamic
1401         # Check whether --enable-dynamic or --disable-dynamic was given.
1402 if test "${enable_dynamic+set}" = set; then
1403   enableval="$enable_dynamic"
1404   
1405         ol_arg=invalid
1406         for ol_val in auto yes no ; do
1407                 if test "$enableval" = "$ol_val" ; then
1408                         ol_arg="$ol_val"
1409                 fi
1410         done
1411         if test "$ol_arg" = "invalid" ; then
1412                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1413         fi
1414         ol_enable_dynamic="$ol_arg"
1415
1416 else
1417         ol_enable_dynamic="no"
1418 fi
1419 # end --enable-dynamic
1420 # OpenLDAP --enable-syslog
1421         # Check whether --enable-syslog or --disable-syslog was given.
1422 if test "${enable_syslog+set}" = set; then
1423   enableval="$enable_syslog"
1424   
1425         ol_arg=invalid
1426         for ol_val in auto yes no ; do
1427                 if test "$enableval" = "$ol_val" ; then
1428                         ol_arg="$ol_val"
1429                 fi
1430         done
1431         if test "$ol_arg" = "invalid" ; then
1432                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1433         fi
1434         ol_enable_syslog="$ol_arg"
1435
1436 else
1437         ol_enable_syslog="auto"
1438 fi
1439 # end --enable-syslog
1440 # OpenLDAP --enable-proctitle
1441         # Check whether --enable-proctitle or --disable-proctitle was given.
1442 if test "${enable_proctitle+set}" = set; then
1443   enableval="$enable_proctitle"
1444   
1445         ol_arg=invalid
1446         for ol_val in auto yes no ; do
1447                 if test "$enableval" = "$ol_val" ; then
1448                         ol_arg="$ol_val"
1449                 fi
1450         done
1451         if test "$ol_arg" = "invalid" ; then
1452                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1453         fi
1454         ol_enable_proctitle="$ol_arg"
1455
1456 else
1457         ol_enable_proctitle="yes"
1458 fi
1459 # end --enable-proctitle
1460 ol_enable_referrals=${ol_enable_referrals-no}
1461 ol_enable_kbind=${ol_enable_kbind-no}
1462 # OpenLDAP --enable-ipv6
1463         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1464 if test "${enable_ipv6+set}" = set; then
1465   enableval="$enable_ipv6"
1466   
1467         ol_arg=invalid
1468         for ol_val in auto yes no ; do
1469                 if test "$enableval" = "$ol_val" ; then
1470                         ol_arg="$ol_val"
1471                 fi
1472         done
1473         if test "$ol_arg" = "invalid" ; then
1474                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1475         fi
1476         ol_enable_ipv6="$ol_arg"
1477
1478 else
1479         ol_enable_ipv6="auto"
1480 fi
1481 # end --enable-ipv6
1482 # OpenLDAP --enable-local
1483         # Check whether --enable-local or --disable-local was given.
1484 if test "${enable_local+set}" = set; then
1485   enableval="$enable_local"
1486   
1487         ol_arg=invalid
1488         for ol_val in auto yes no ; do
1489                 if test "$enableval" = "$ol_val" ; then
1490                         ol_arg="$ol_val"
1491                 fi
1492         done
1493         if test "$ol_arg" = "invalid" ; then
1494                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1495         fi
1496         ol_enable_local="$ol_arg"
1497
1498 else
1499         ol_enable_local="auto"
1500 fi
1501 # end --enable-local
1502
1503
1504 # OpenLDAP --with-cyrus_sasl
1505         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1506 if test "${with_cyrus_sasl+set}" = set; then
1507   withval="$with_cyrus_sasl"
1508   
1509         ol_arg=invalid
1510         for ol_val in auto yes no  ; do
1511                 if test "$withval" = "$ol_val" ; then
1512                         ol_arg="$ol_val"
1513                 fi
1514         done
1515         if test "$ol_arg" = "invalid" ; then
1516                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1517         fi
1518         ol_with_cyrus_sasl="$ol_arg"
1519
1520 else
1521         ol_with_cyrus_sasl="auto"
1522 fi
1523 # end --with-cyrus_sasl
1524
1525 # OpenLDAP --with-fetch
1526         # Check whether --with-fetch or --without-fetch was given.
1527 if test "${with_fetch+set}" = set; then
1528   withval="$with_fetch"
1529   
1530         ol_arg=invalid
1531         for ol_val in auto yes no  ; do
1532                 if test "$withval" = "$ol_val" ; then
1533                         ol_arg="$ol_val"
1534                 fi
1535         done
1536         if test "$ol_arg" = "invalid" ; then
1537                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1538         fi
1539         ol_with_fetch="$ol_arg"
1540
1541 else
1542         ol_with_fetch="auto"
1543 fi
1544 # end --with-fetch
1545
1546 ol_with_kerberos=${ol_with_kerberos-auto}
1547 # OpenLDAP --with-threads
1548         # Check whether --with-threads or --without-threads was given.
1549 if test "${with_threads+set}" = set; then
1550   withval="$with_threads"
1551   
1552         ol_arg=invalid
1553         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1554                 if test "$withval" = "$ol_val" ; then
1555                         ol_arg="$ol_val"
1556                 fi
1557         done
1558         if test "$ol_arg" = "invalid" ; then
1559                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1560         fi
1561         ol_with_threads="$ol_arg"
1562
1563 else
1564         ol_with_threads="auto"
1565 fi
1566 # end --with-threads
1567
1568 # OpenLDAP --with-tls
1569         # Check whether --with-tls or --without-tls was given.
1570 if test "${with_tls+set}" = set; then
1571   withval="$with_tls"
1572   
1573         ol_arg=invalid
1574         for ol_val in auto ssleay openssl yes no  ; do
1575                 if test "$withval" = "$ol_val" ; then
1576                         ol_arg="$ol_val"
1577                 fi
1578         done
1579         if test "$ol_arg" = "invalid" ; then
1580                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1581         fi
1582         ol_with_tls="$ol_arg"
1583
1584 else
1585         ol_with_tls="auto"
1586 fi
1587 # end --with-tls
1588
1589 # OpenLDAP --with-yielding_select
1590         # Check whether --with-yielding_select or --without-yielding_select was given.
1591 if test "${with_yielding_select+set}" = set; then
1592   withval="$with_yielding_select"
1593   
1594         ol_arg=invalid
1595         for ol_val in auto yes no manual  ; do
1596                 if test "$withval" = "$ol_val" ; then
1597                         ol_arg="$ol_val"
1598                 fi
1599         done
1600         if test "$ol_arg" = "invalid" ; then
1601                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1602         fi
1603         ol_with_yielding_select="$ol_arg"
1604
1605 else
1606         ol_with_yielding_select="auto"
1607 fi
1608 # end --with-yielding_select
1609
1610
1611
1612 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1613 if test "${with_xxslapdoptions+set}" = set; then
1614   withval="$with_xxslapdoptions"
1615   :
1616 fi
1617
1618 # OpenLDAP --enable-slapd
1619         # Check whether --enable-slapd or --disable-slapd was given.
1620 if test "${enable_slapd+set}" = set; then
1621   enableval="$enable_slapd"
1622   
1623         ol_arg=invalid
1624         for ol_val in auto yes no ; do
1625                 if test "$enableval" = "$ol_val" ; then
1626                         ol_arg="$ol_val"
1627                 fi
1628         done
1629         if test "$ol_arg" = "invalid" ; then
1630                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1631         fi
1632         ol_enable_slapd="$ol_arg"
1633
1634 else
1635         ol_enable_slapd="yes"
1636 fi
1637 # end --enable-slapd
1638 # OpenLDAP --enable-aci
1639         # Check whether --enable-aci or --disable-aci was given.
1640 if test "${enable_aci+set}" = set; then
1641   enableval="$enable_aci"
1642   
1643         ol_arg=invalid
1644         for ol_val in auto yes no ; do
1645                 if test "$enableval" = "$ol_val" ; then
1646                         ol_arg="$ol_val"
1647                 fi
1648         done
1649         if test "$ol_arg" = "invalid" ; then
1650                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1651         fi
1652         ol_enable_aci="$ol_arg"
1653
1654 else
1655         ol_enable_aci="no"
1656 fi
1657 # end --enable-aci
1658 # OpenLDAP --enable-cleartext
1659         # Check whether --enable-cleartext or --disable-cleartext was given.
1660 if test "${enable_cleartext+set}" = set; then
1661   enableval="$enable_cleartext"
1662   
1663         ol_arg=invalid
1664         for ol_val in auto yes no ; do
1665                 if test "$enableval" = "$ol_val" ; then
1666                         ol_arg="$ol_val"
1667                 fi
1668         done
1669         if test "$ol_arg" = "invalid" ; then
1670                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1671         fi
1672         ol_enable_cleartext="$ol_arg"
1673
1674 else
1675         ol_enable_cleartext="yes"
1676 fi
1677 # end --enable-cleartext
1678 # OpenLDAP --enable-crypt
1679         # Check whether --enable-crypt or --disable-crypt was given.
1680 if test "${enable_crypt+set}" = set; then
1681   enableval="$enable_crypt"
1682   
1683         ol_arg=invalid
1684         for ol_val in auto yes no ; do
1685                 if test "$enableval" = "$ol_val" ; then
1686                         ol_arg="$ol_val"
1687                 fi
1688         done
1689         if test "$ol_arg" = "invalid" ; then
1690                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1691         fi
1692         ol_enable_crypt="$ol_arg"
1693
1694 else
1695         ol_enable_crypt="no"
1696 fi
1697 # end --enable-crypt
1698 # OpenLDAP --enable-lmpasswd
1699         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1700 if test "${enable_lmpasswd+set}" = set; then
1701   enableval="$enable_lmpasswd"
1702   
1703         ol_arg=invalid
1704         for ol_val in auto yes no ; do
1705                 if test "$enableval" = "$ol_val" ; then
1706                         ol_arg="$ol_val"
1707                 fi
1708         done
1709         if test "$ol_arg" = "invalid" ; then
1710                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1711         fi
1712         ol_enable_lmpasswd="$ol_arg"
1713
1714 else
1715         ol_enable_lmpasswd="no"
1716 fi
1717 # end --enable-lmpasswd
1718 # OpenLDAP --enable-spasswd
1719         # Check whether --enable-spasswd or --disable-spasswd was given.
1720 if test "${enable_spasswd+set}" = set; then
1721   enableval="$enable_spasswd"
1722   
1723         ol_arg=invalid
1724         for ol_val in auto yes no ; do
1725                 if test "$enableval" = "$ol_val" ; then
1726                         ol_arg="$ol_val"
1727                 fi
1728         done
1729         if test "$ol_arg" = "invalid" ; then
1730                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1731         fi
1732         ol_enable_spasswd="$ol_arg"
1733
1734 else
1735         ol_enable_spasswd="no"
1736 fi
1737 # end --enable-spasswd
1738 # OpenLDAP --enable-modules
1739         # Check whether --enable-modules or --disable-modules was given.
1740 if test "${enable_modules+set}" = set; then
1741   enableval="$enable_modules"
1742   
1743         ol_arg=invalid
1744         for ol_val in auto yes no ; do
1745                 if test "$enableval" = "$ol_val" ; then
1746                         ol_arg="$ol_val"
1747                 fi
1748         done
1749         if test "$ol_arg" = "invalid" ; then
1750                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1751         fi
1752         ol_enable_modules="$ol_arg"
1753
1754 else
1755         ol_enable_modules="no"
1756 fi
1757 # end --enable-modules
1758 ol_enable_multimaster=${ol_enable_multimaster-no}
1759 # OpenLDAP --enable-rewrite
1760         # Check whether --enable-rewrite or --disable-rewrite was given.
1761 if test "${enable_rewrite+set}" = set; then
1762   enableval="$enable_rewrite"
1763   
1764         ol_arg=invalid
1765         for ol_val in auto yes no ; do
1766                 if test "$enableval" = "$ol_val" ; then
1767                         ol_arg="$ol_val"
1768                 fi
1769         done
1770         if test "$ol_arg" = "invalid" ; then
1771                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1772         fi
1773         ol_enable_rewrite="$ol_arg"
1774
1775 else
1776         ol_enable_rewrite="auto"
1777 fi
1778 # end --enable-rewrite
1779 # OpenLDAP --enable-rlookups
1780         # Check whether --enable-rlookups or --disable-rlookups was given.
1781 if test "${enable_rlookups+set}" = set; then
1782   enableval="$enable_rlookups"
1783   
1784         ol_arg=invalid
1785         for ol_val in auto yes no ; do
1786                 if test "$enableval" = "$ol_val" ; then
1787                         ol_arg="$ol_val"
1788                 fi
1789         done
1790         if test "$ol_arg" = "invalid" ; then
1791                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1792         fi
1793         ol_enable_rlookups="$ol_arg"
1794
1795 else
1796         ol_enable_rlookups="no"
1797 fi
1798 # end --enable-rlookups
1799 # OpenLDAP --enable-slapi
1800         # Check whether --enable-slapi or --disable-slapi was given.
1801 if test "${enable_slapi+set}" = set; then
1802   enableval="$enable_slapi"
1803   
1804         ol_arg=invalid
1805         for ol_val in auto yes no ; do
1806                 if test "$enableval" = "$ol_val" ; then
1807                         ol_arg="$ol_val"
1808                 fi
1809         done
1810         if test "$ol_arg" = "invalid" ; then
1811                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1812         fi
1813         ol_enable_slapi="$ol_arg"
1814
1815 else
1816         ol_enable_slapi="no"
1817 fi
1818 # end --enable-slapi
1819 # OpenLDAP --enable-slp
1820         # Check whether --enable-slp or --disable-slp was given.
1821 if test "${enable_slp+set}" = set; then
1822   enableval="$enable_slp"
1823   
1824         ol_arg=invalid
1825         for ol_val in auto yes no ; do
1826                 if test "$enableval" = "$ol_val" ; then
1827                         ol_arg="$ol_val"
1828                 fi
1829         done
1830         if test "$ol_arg" = "invalid" ; then
1831                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1832         fi
1833         ol_enable_slp="$ol_arg"
1834
1835 else
1836         ol_enable_slp="no"
1837 fi
1838 # end --enable-slp
1839 # OpenLDAP --enable-wrappers
1840         # Check whether --enable-wrappers or --disable-wrappers was given.
1841 if test "${enable_wrappers+set}" = set; then
1842   enableval="$enable_wrappers"
1843   
1844         ol_arg=invalid
1845         for ol_val in auto yes no ; do
1846                 if test "$enableval" = "$ol_val" ; then
1847                         ol_arg="$ol_val"
1848                 fi
1849         done
1850         if test "$ol_arg" = "invalid" ; then
1851                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1852         fi
1853         ol_enable_wrappers="$ol_arg"
1854
1855 else
1856         ol_enable_wrappers="no"
1857 fi
1858 # end --enable-wrappers
1859
1860 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1861         passwd perl shell sql"
1862
1863 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
1864 if test "${with_xxslapoverlays+set}" = set; then
1865   withval="$with_xxslapoverlays"
1866   :
1867 fi
1868
1869
1870 # OpenLDAP --enable-bdb
1871         # Check whether --enable-bdb or --disable-bdb was given.
1872 if test "${enable_bdb+set}" = set; then
1873   enableval="$enable_bdb"
1874   
1875         ol_arg=invalid
1876         for ol_val in no yes mod ; do
1877                 if test "$enableval" = "$ol_val" ; then
1878                         ol_arg="$ol_val"
1879                 fi
1880         done
1881         if test "$ol_arg" = "invalid" ; then
1882                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1883         fi
1884         ol_enable_bdb="$ol_arg"
1885
1886 else
1887         ol_enable_bdb="yes"
1888 fi
1889 # end --enable-bdb
1890 # OpenLDAP --enable-dnssrv
1891         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1892 if test "${enable_dnssrv+set}" = set; then
1893   enableval="$enable_dnssrv"
1894   
1895         ol_arg=invalid
1896         for ol_val in no yes mod ; do
1897                 if test "$enableval" = "$ol_val" ; then
1898                         ol_arg="$ol_val"
1899                 fi
1900         done
1901         if test "$ol_arg" = "invalid" ; then
1902                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1903         fi
1904         ol_enable_dnssrv="$ol_arg"
1905
1906 else
1907         ol_enable_dnssrv="no"
1908 fi
1909 # end --enable-dnssrv
1910 # OpenLDAP --enable-hdb
1911         # Check whether --enable-hdb or --disable-hdb was given.
1912 if test "${enable_hdb+set}" = set; then
1913   enableval="$enable_hdb"
1914   
1915         ol_arg=invalid
1916         for ol_val in no yes mod ; do
1917                 if test "$enableval" = "$ol_val" ; then
1918                         ol_arg="$ol_val"
1919                 fi
1920         done
1921         if test "$ol_arg" = "invalid" ; then
1922                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1923         fi
1924         ol_enable_hdb="$ol_arg"
1925
1926 else
1927         ol_enable_hdb="no"
1928 fi
1929 # end --enable-hdb
1930 # OpenLDAP --enable-ldap
1931         # Check whether --enable-ldap or --disable-ldap was given.
1932 if test "${enable_ldap+set}" = set; then
1933   enableval="$enable_ldap"
1934   
1935         ol_arg=invalid
1936         for ol_val in no yes mod ; do
1937                 if test "$enableval" = "$ol_val" ; then
1938                         ol_arg="$ol_val"
1939                 fi
1940         done
1941         if test "$ol_arg" = "invalid" ; then
1942                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1943         fi
1944         ol_enable_ldap="$ol_arg"
1945
1946 else
1947         ol_enable_ldap="no"
1948 fi
1949 # end --enable-ldap
1950 # OpenLDAP --enable-ldbm
1951         # Check whether --enable-ldbm or --disable-ldbm was given.
1952 if test "${enable_ldbm+set}" = set; then
1953   enableval="$enable_ldbm"
1954   
1955         ol_arg=invalid
1956         for ol_val in no yes mod ; do
1957                 if test "$enableval" = "$ol_val" ; then
1958                         ol_arg="$ol_val"
1959                 fi
1960         done
1961         if test "$ol_arg" = "invalid" ; then
1962                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1963         fi
1964         ol_enable_ldbm="$ol_arg"
1965
1966 else
1967         ol_enable_ldbm="no"
1968 fi
1969 # end --enable-ldbm
1970 # OpenLDAP --with-ldbm_api
1971         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1972 if test "${with_ldbm_api+set}" = set; then
1973   withval="$with_ldbm_api"
1974   
1975         ol_arg=invalid
1976         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1977                 if test "$withval" = "$ol_val" ; then
1978                         ol_arg="$ol_val"
1979                 fi
1980         done
1981         if test "$ol_arg" = "invalid" ; then
1982                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1983         fi
1984         ol_with_ldbm_api="$ol_arg"
1985
1986 else
1987         ol_with_ldbm_api="auto"
1988 fi
1989 # end --with-ldbm_api
1990
1991 # OpenLDAP --with-ldbm_type
1992         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1993 if test "${with_ldbm_type+set}" = set; then
1994   withval="$with_ldbm_type"
1995   
1996         ol_arg=invalid
1997         for ol_val in auto btree hash ; do
1998                 if test "$withval" = "$ol_val" ; then
1999                         ol_arg="$ol_val"
2000                 fi
2001         done
2002         if test "$ol_arg" = "invalid" ; then
2003                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2004         fi
2005         ol_with_ldbm_type="$ol_arg"
2006
2007 else
2008         ol_with_ldbm_type="auto"
2009 fi
2010 # end --with-ldbm_type
2011
2012 # OpenLDAP --enable-meta
2013         # Check whether --enable-meta or --disable-meta was given.
2014 if test "${enable_meta+set}" = set; then
2015   enableval="$enable_meta"
2016   
2017         ol_arg=invalid
2018         for ol_val in no yes mod ; do
2019                 if test "$enableval" = "$ol_val" ; then
2020                         ol_arg="$ol_val"
2021                 fi
2022         done
2023         if test "$ol_arg" = "invalid" ; then
2024                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2025         fi
2026         ol_enable_meta="$ol_arg"
2027
2028 else
2029         ol_enable_meta="no"
2030 fi
2031 # end --enable-meta
2032 # OpenLDAP --enable-monitor
2033         # Check whether --enable-monitor or --disable-monitor was given.
2034 if test "${enable_monitor+set}" = set; then
2035   enableval="$enable_monitor"
2036   
2037         ol_arg=invalid
2038         for ol_val in no yes mod ; do
2039                 if test "$enableval" = "$ol_val" ; then
2040                         ol_arg="$ol_val"
2041                 fi
2042         done
2043         if test "$ol_arg" = "invalid" ; then
2044                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2045         fi
2046         ol_enable_monitor="$ol_arg"
2047
2048 else
2049         ol_enable_monitor="yes"
2050 fi
2051 # end --enable-monitor
2052 # OpenLDAP --enable-null
2053         # Check whether --enable-null or --disable-null was given.
2054 if test "${enable_null+set}" = set; then
2055   enableval="$enable_null"
2056   
2057         ol_arg=invalid
2058         for ol_val in no yes mod ; do
2059                 if test "$enableval" = "$ol_val" ; then
2060                         ol_arg="$ol_val"
2061                 fi
2062         done
2063         if test "$ol_arg" = "invalid" ; then
2064                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2065         fi
2066         ol_enable_null="$ol_arg"
2067
2068 else
2069         ol_enable_null="no"
2070 fi
2071 # end --enable-null
2072 # OpenLDAP --enable-passwd
2073         # Check whether --enable-passwd or --disable-passwd was given.
2074 if test "${enable_passwd+set}" = set; then
2075   enableval="$enable_passwd"
2076   
2077         ol_arg=invalid
2078         for ol_val in no yes mod ; do
2079                 if test "$enableval" = "$ol_val" ; then
2080                         ol_arg="$ol_val"
2081                 fi
2082         done
2083         if test "$ol_arg" = "invalid" ; then
2084                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2085         fi
2086         ol_enable_passwd="$ol_arg"
2087
2088 else
2089         ol_enable_passwd="no"
2090 fi
2091 # end --enable-passwd
2092 # OpenLDAP --enable-perl
2093         # Check whether --enable-perl or --disable-perl was given.
2094 if test "${enable_perl+set}" = set; then
2095   enableval="$enable_perl"
2096   
2097         ol_arg=invalid
2098         for ol_val in no yes mod ; do
2099                 if test "$enableval" = "$ol_val" ; then
2100                         ol_arg="$ol_val"
2101                 fi
2102         done
2103         if test "$ol_arg" = "invalid" ; then
2104                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2105         fi
2106         ol_enable_perl="$ol_arg"
2107
2108 else
2109         ol_enable_perl="no"
2110 fi
2111 # end --enable-perl
2112 # OpenLDAP --enable-shell
2113         # Check whether --enable-shell or --disable-shell was given.
2114 if test "${enable_shell+set}" = set; then
2115   enableval="$enable_shell"
2116   
2117         ol_arg=invalid
2118         for ol_val in no yes mod ; do
2119                 if test "$enableval" = "$ol_val" ; then
2120                         ol_arg="$ol_val"
2121                 fi
2122         done
2123         if test "$ol_arg" = "invalid" ; then
2124                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2125         fi
2126         ol_enable_shell="$ol_arg"
2127
2128 else
2129         ol_enable_shell="no"
2130 fi
2131 # end --enable-shell
2132 # OpenLDAP --enable-sql
2133         # Check whether --enable-sql or --disable-sql was given.
2134 if test "${enable_sql+set}" = set; then
2135   enableval="$enable_sql"
2136   
2137         ol_arg=invalid
2138         for ol_val in no yes mod ; do
2139                 if test "$enableval" = "$ol_val" ; then
2140                         ol_arg="$ol_val"
2141                 fi
2142         done
2143         if test "$ol_arg" = "invalid" ; then
2144                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2145         fi
2146         ol_enable_sql="$ol_arg"
2147
2148 else
2149         ol_enable_sql="no"
2150 fi
2151 # end --enable-sql
2152
2153 Overlays="dyngroup proxycache"
2154
2155 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2156 if test "${with_xxslapoverlays+set}" = set; then
2157   withval="$with_xxslapoverlays"
2158   :
2159 fi
2160
2161
2162 # OpenLDAP --enable-dyngroup
2163         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2164 if test "${enable_dyngroup+set}" = set; then
2165   enableval="$enable_dyngroup"
2166   
2167         ol_arg=invalid
2168         for ol_val in no yes mod ; do
2169                 if test "$enableval" = "$ol_val" ; then
2170                         ol_arg="$ol_val"
2171                 fi
2172         done
2173         if test "$ol_arg" = "invalid" ; then
2174                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2175         fi
2176         ol_enable_dyngroup="$ol_arg"
2177
2178 else
2179         ol_enable_dyngroup="no"
2180 fi
2181 # end --enable-dyngroup
2182
2183 # OpenLDAP --enable-proxycache
2184         # Check whether --enable-proxycache or --disable-proxycache was given.
2185 if test "${enable_proxycache+set}" = set; then
2186   enableval="$enable_proxycache"
2187   
2188         ol_arg=invalid
2189         for ol_val in no yes mod ; do
2190                 if test "$enableval" = "$ol_val" ; then
2191                         ol_arg="$ol_val"
2192                 fi
2193         done
2194         if test "$ol_arg" = "invalid" ; then
2195                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2196         fi
2197         ol_enable_proxycache="$ol_arg"
2198
2199 else
2200         ol_enable_proxycache="no"
2201 fi
2202 # end --enable-proxycache
2203
2204
2205 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2206 if test "${with_xxslurpdoptions+set}" = set; then
2207   withval="$with_xxslurpdoptions"
2208   :
2209 fi
2210
2211 # OpenLDAP --enable-slurpd
2212         # Check whether --enable-slurpd or --disable-slurpd was given.
2213 if test "${enable_slurpd+set}" = set; then
2214   enableval="$enable_slurpd"
2215   
2216         ol_arg=invalid
2217         for ol_val in auto yes no ; do
2218                 if test "$enableval" = "$ol_val" ; then
2219                         ol_arg="$ol_val"
2220                 fi
2221         done
2222         if test "$ol_arg" = "invalid" ; then
2223                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2224         fi
2225         ol_enable_slurpd="$ol_arg"
2226
2227 else
2228         ol_enable_slurpd="auto"
2229 fi
2230 # end --enable-slurpd
2231
2232 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2233 if test "${with_xxliboptions+set}" = set; then
2234   withval="$with_xxliboptions"
2235   :
2236 fi
2237
2238 # Check whether --enable-static or --disable-static was given.
2239 if test "${enable_static+set}" = set; then
2240   enableval="$enable_static"
2241   p=${PACKAGE-default}
2242 case $enableval in
2243 yes) enable_static=yes ;;
2244 no) enable_static=no ;;
2245 *)
2246   enable_static=no
2247   # Look at the argument we got.  We use all the common list separators.
2248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2249   for pkg in $enableval; do
2250     if test "X$pkg" = "X$p"; then
2251       enable_static=yes
2252     fi
2253   done
2254   IFS="$ac_save_ifs"
2255   ;;
2256 esac
2257 else
2258   enable_static=yes
2259 fi
2260
2261 # Check whether --enable-shared or --disable-shared was given.
2262 if test "${enable_shared+set}" = set; then
2263   enableval="$enable_shared"
2264   p=${PACKAGE-default}
2265 case $enableval in
2266 yes) enable_shared=yes ;;
2267 no) enable_shared=no ;;
2268 *)
2269   enable_shared=no
2270   # Look at the argument we got.  We use all the common list separators.
2271   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2272   for pkg in $enableval; do
2273     if test "X$pkg" = "X$p"; then
2274       enable_shared=yes
2275     fi
2276   done
2277   IFS="$ac_save_ifs"
2278   ;;
2279 esac
2280 else
2281   enable_shared=yes
2282 fi
2283
2284
2285
2286 # validate options
2287 if test $ol_enable_slapd = no ; then
2288                 if test $ol_enable_slapi = yes ; then
2289                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2290         fi
2291         for i in $Backends; do
2292                 eval "ol_tmp=\$ol_enable_$i"
2293                 if test $ol_tmp != no ; then
2294                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2295                         eval "ol_enable_$i=no"
2296                 fi
2297         done
2298         if test $ol_enable_modules = yes ; then
2299                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2300         fi
2301         if test $ol_enable_multimaster = yes ; then
2302                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2303         fi
2304         if test $ol_enable_wrappers = yes ; then
2305                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2306         fi
2307         if test $ol_enable_rlookups = yes ; then
2308                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2309         fi
2310         if test $ol_enable_aci = yes ; then
2311                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2312         fi
2313         if test $ol_with_ldbm_api != auto ; then
2314                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2315         fi
2316         if test $ol_with_ldbm_type != auto ; then
2317                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2318         fi
2319         if test $ol_enable_slurpd = yes ; then
2320                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2321         fi
2322         if test $ol_enable_rewrite = yes ; then
2323                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2324         fi
2325                 for i in $Overlays; do
2326                 eval "ol_tmp=\$ol_enable_$i"
2327                 if test $ol_tmp != no ; then
2328                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2329                         eval "ol_enable_$i=no"
2330                 fi
2331         done
2332
2333         # force settings to no
2334         ol_enable_slapi=no
2335
2336         ol_enable_modules=no
2337         ol_enable_multimaster=no
2338         ol_enable_rlookups=no
2339         ol_enable_aci=no
2340         ol_enable_wrappers=no
2341
2342         ol_with_ldbm_api=no
2343         ol_with_ldbm_type=no
2344
2345         ol_enable_slurpd=no
2346
2347         ol_enable_rewrite=no
2348
2349 elif test $ol_enable_ldbm = no ; then
2350         
2351         if test $ol_with_ldbm_api != auto ; then
2352                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2353         fi
2354
2355         if test $ol_with_ldbm_type != auto ; then
2356                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2357         fi
2358
2359         if test $ol_enable_modules != yes -a \
2360                 $ol_enable_bdb = no -a \
2361                 $ol_enable_dnssrv = no -a \
2362                 $ol_enable_hdb = no -a \
2363                 $ol_enable_ldap = no -a \
2364                 $ol_enable_meta = no -a \
2365                 $ol_enable_monitor = no -a \
2366                 $ol_enable_null = no -a \
2367                 $ol_enable_passwd = no -a \
2368                 $ol_enable_perl = no -a \
2369                 $ol_enable_shell = no -a \
2370                 $ol_enable_sql = no ; then
2371
2372                 if test $ol_enable_slapd = yes ; then
2373                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2374                 else
2375                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2376                         ol_enable_slapd=no
2377                 fi
2378         fi
2379
2380         ol_with_ldbm_api=no
2381         ol_with_ldbm_type=no
2382
2383         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2384                 ol_with_ldbm_api=berkeley
2385         fi
2386
2387 else
2388                 if test $ol_with_ldbm_api = gdbm -a \
2389                 $ol_with_ldbm_type = btree ; then
2390                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2391         fi
2392         if test $ol_with_ldbm_api = mdbm -a \
2393                 $ol_with_ldbm_type = btree ; then
2394                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2395         fi
2396         if test $ol_with_ldbm_api = ndbm -a \
2397                 $ol_with_ldbm_type = btree ; then
2398                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2399         fi
2400
2401         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2402                 if test $ol_with_ldbm_api = auto ; then
2403                         ol_with_ldbm_api=berkeley
2404                 elif test $ol_with_ldbm_api != berkeley ; then
2405                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2406                 fi
2407         fi
2408 fi
2409
2410 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2411         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2412 fi
2413
2414 if test $ol_enable_slurpd = yes ; then
2415                 if test $ol_with_threads = no ; then
2416                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2417         fi
2418 fi
2419
2420 if test $ol_enable_lmpasswd = yes ; then
2421         if test $ol_with_tls = no ; then
2422                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2423         fi
2424 fi
2425
2426 if test $ol_enable_kbind = yes ; then
2427         if test $ol_with_kerberos = no ; then
2428                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2429         elif test $ol_with_kerberos = auto ; then
2430                 ol_with_kerberos=yes
2431         fi
2432
2433 elif test $ol_enable_kbind = no ; then
2434         if test $ol_with_kerberos = auto ; then
2435                 ol_with_kerberos=no
2436         elif test $ol_with_kerberos != no ; then
2437                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2438                 ol_with_kerberos=no
2439         fi
2440 fi
2441
2442 if test $ol_enable_spasswd = yes ; then
2443         if test $ol_with_cyrus_sasl = no ; then
2444                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2445         fi
2446         ol_with_cyrus_sasl=yes
2447 fi
2448
2449 echo "$ac_t""done" 1>&6
2450
2451 LDAP_LIBS=
2452 LDBM_LIBS=
2453 LTHREAD_LIBS=
2454 LUTIL_LIBS=
2455
2456 SLAPD_LIBS=
2457 SLURPD_LIBS=
2458
2459 BUILD_SLAPD=no
2460 BUILD_SLURPD=no
2461
2462 BUILD_THREAD=no
2463
2464 BUILD_SLAPI=no
2465 SLAPD_SLAPI_DEPEND=
2466
2467 BUILD_BDB=no
2468 BUILD_DNSSRV=no
2469 BUILD_HDB=no
2470 BUILD_LDAP=no
2471 BUILD_LDBM=no
2472 BUILD_META=no
2473 BUILD_MONITOR=no
2474 BUILD_NULL=no
2475 BUILD_PASSWD=no
2476 BUILD_PERL=no
2477 BUILD_SHELL=no
2478 BUILD_SQL=no
2479
2480 BUILD_DYNGROUP=no
2481 BUILD_PROXYCACHE=no
2482
2483 SLAPD_DYNAMIC_OVERLAYS=
2484
2485 SLAPD_MODULES_LDFLAGS=
2486 SLAPD_MODULES_CPPFLAGS=
2487
2488 SLAPD_STATIC_BACKENDS=
2489 SLAPD_DYNAMIC_BACKENDS=
2490
2491 SLAPD_PERL_LDFLAGS=
2492 MOD_PERL_LDFLAGS=
2493 PERL_CPPFLAGS=
2494
2495 SLAPD_SQL_LDFLAGS=
2496 SLAPD_SQL_LIBS=
2497 SLAPD_SQL_INCLUDES=
2498
2499 KRB4_LIBS=
2500 KRB5_LIBS=
2501 SASL_LIBS=
2502 TLS_LIBS=
2503 MODULES_LIBS=
2504 SLAPI_LIBS=
2505 LIBSLAPI=
2506 LIBSLAPITOOLS=
2507 AUTH_LIBS=
2508
2509 SLAPD_SLP_LIBS=
2510
2511
2512 # Find a good install program.  We prefer a C program (faster),
2513 # so one script is as good as another.  But avoid the broken or
2514 # incompatible versions:
2515 # SysV /etc/install, /usr/sbin/install
2516 # SunOS /usr/etc/install
2517 # IRIX /sbin/install
2518 # AIX /bin/install
2519 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2520 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2521 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2522 # ./install, which can be erroneously created by make from ./install.sh.
2523 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2524 echo "configure:2525: checking for a BSD compatible install" >&5
2525 if test -z "$INSTALL"; then
2526 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2527   echo $ac_n "(cached) $ac_c" 1>&6
2528 else
2529     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2530   for ac_dir in $PATH; do
2531     # Account for people who put trailing slashes in PATH elements.
2532     case "$ac_dir/" in
2533     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2534     *)
2535       # OSF1 and SCO ODT 3.0 have their own names for install.
2536       # Don't use installbsd from OSF since it installs stuff as root
2537       # by default.
2538       for ac_prog in ginstall scoinst install; do
2539         if test -f $ac_dir/$ac_prog; then
2540           if test $ac_prog = install &&
2541             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2542             # AIX install.  It has an incompatible calling convention.
2543             :
2544           elif test $ac_prog = install &&
2545             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2546             # program-specific install script used by HP pwplus--don't use.
2547             :
2548           else
2549             ac_cv_path_install="$ac_dir/$ac_prog -c"
2550             break 2
2551           fi
2552         fi
2553       done
2554       ;;
2555     esac
2556   done
2557   IFS="$ac_save_IFS"
2558
2559 fi
2560   if test "${ac_cv_path_install+set}" = set; then
2561     INSTALL="$ac_cv_path_install"
2562   else
2563     # As a last resort, use the slow shell script.  We don't cache a
2564     # path for INSTALL within a source directory, because that will
2565     # break other packages using the cache if that directory is
2566     # removed, or if the path is relative.
2567     INSTALL="$ac_install_sh"
2568   fi
2569 fi
2570 echo "$ac_t""$INSTALL" 1>&6
2571
2572 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2573 # It thinks the first close brace ends the variable substitution.
2574 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2575
2576 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2577
2578 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2579
2580
2581 cat >> confdefs.h <<\EOF
2582 #define HAVE_MKVERSION 1
2583 EOF
2584
2585
2586
2587
2588 ol_aix_threads=no
2589 case "$target" in
2590 *-*-aix*)       if test -z "$CC" ; then
2591                 case "$ol_with_threads" in
2592                 auto | yes |  posix) ol_aix_threads=yes ;;
2593                 esac
2594         fi
2595 ;;
2596 esac
2597
2598 if test $ol_aix_threads = yes ; then
2599         if test -z "${CC}" ; then
2600                 for ac_prog in cc_r xlc_r cc
2601 do
2602 # Extract the first word of "$ac_prog", so it can be a program name with args.
2603 set dummy $ac_prog; ac_word=$2
2604 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2605 echo "configure:2606: checking for $ac_word" >&5
2606 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2607   echo $ac_n "(cached) $ac_c" 1>&6
2608 else
2609   if test -n "$CC"; then
2610   ac_cv_prog_CC="$CC" # Let the user override the test.
2611 else
2612   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2613   ac_dummy="$PATH"
2614   for ac_dir in $ac_dummy; do
2615     test -z "$ac_dir" && ac_dir=.
2616     if test -f $ac_dir/$ac_word; then
2617       ac_cv_prog_CC="$ac_prog"
2618       break
2619     fi
2620   done
2621   IFS="$ac_save_ifs"
2622 fi
2623 fi
2624 CC="$ac_cv_prog_CC"
2625 if test -n "$CC"; then
2626   echo "$ac_t""$CC" 1>&6
2627 else
2628   echo "$ac_t""no" 1>&6
2629 fi
2630
2631 test -n "$CC" && break
2632 done
2633
2634
2635                 if test "$CC" = cc ; then
2636                                                 if test $ol_with_threads != auto ; then
2637                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2638                         else
2639                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2640                         fi
2641                         ol_with_threads=no
2642                 fi
2643         fi
2644
2645         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2646                 ol_with_threads=posix
2647                 ol_cv_pthread_create=yes
2648         fi
2649 fi
2650
2651 if test -z "${CC}"; then
2652         for ac_prog in cc gcc
2653 do
2654 # Extract the first word of "$ac_prog", so it can be a program name with args.
2655 set dummy $ac_prog; ac_word=$2
2656 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2657 echo "configure:2658: checking for $ac_word" >&5
2658 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2659   echo $ac_n "(cached) $ac_c" 1>&6
2660 else
2661   if test -n "$CC"; then
2662   ac_cv_prog_CC="$CC" # Let the user override the test.
2663 else
2664   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2665   ac_dummy="$PATH"
2666   for ac_dir in $ac_dummy; do
2667     test -z "$ac_dir" && ac_dir=.
2668     if test -f $ac_dir/$ac_word; then
2669       ac_cv_prog_CC="$ac_prog"
2670       break
2671     fi
2672   done
2673   IFS="$ac_save_ifs"
2674 fi
2675 fi
2676 CC="$ac_cv_prog_CC"
2677 if test -n "$CC"; then
2678   echo "$ac_t""$CC" 1>&6
2679 else
2680   echo "$ac_t""no" 1>&6
2681 fi
2682
2683 test -n "$CC" && break
2684 done
2685 test -n "$CC" || CC="missing"
2686
2687
2688         if test "${CC}" = "missing" ; then
2689                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2690         fi
2691 fi
2692
2693 if test -z "${AR}"; then
2694         for ac_prog in ar gar
2695 do
2696 # Extract the first word of "$ac_prog", so it can be a program name with args.
2697 set dummy $ac_prog; ac_word=$2
2698 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2699 echo "configure:2700: checking for $ac_word" >&5
2700 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2701   echo $ac_n "(cached) $ac_c" 1>&6
2702 else
2703   if test -n "$AR"; then
2704   ac_cv_prog_AR="$AR" # Let the user override the test.
2705 else
2706   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2707   ac_dummy="$PATH"
2708   for ac_dir in $ac_dummy; do
2709     test -z "$ac_dir" && ac_dir=.
2710     if test -f $ac_dir/$ac_word; then
2711       ac_cv_prog_AR="$ac_prog"
2712       break
2713     fi
2714   done
2715   IFS="$ac_save_ifs"
2716 fi
2717 fi
2718 AR="$ac_cv_prog_AR"
2719 if test -n "$AR"; then
2720   echo "$ac_t""$AR" 1>&6
2721 else
2722   echo "$ac_t""no" 1>&6
2723 fi
2724
2725 test -n "$AR" && break
2726 done
2727 test -n "$AR" || AR="missing"
2728
2729
2730         if test "${AR}" = "missing" ; then
2731                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
2732         fi
2733 fi
2734
2735
2736
2737 # Find the correct PATH separator.  Usually this is `:', but
2738 # DJGPP uses `;' like DOS.
2739 if test "X${PATH_SEPARATOR+set}" != Xset; then
2740   UNAME=${UNAME-`uname 2>/dev/null`}
2741   case X$UNAME in
2742     *-DOS) lt_cv_sys_path_separator=';' ;;
2743     *)     lt_cv_sys_path_separator=':' ;;
2744   esac
2745   PATH_SEPARATOR=$lt_cv_sys_path_separator
2746 fi
2747
2748 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2749 echo "configure:2750: checking for Cygwin environment" >&5
2750 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
2751   echo $ac_n "(cached) $ac_c" 1>&6
2752 else
2753   cat > conftest.$ac_ext <<EOF
2754 #line 2755 "configure"
2755 #include "confdefs.h"
2756
2757 int main() {
2758
2759 #ifndef __CYGWIN__
2760 #define __CYGWIN__ __CYGWIN32__
2761 #endif
2762 return __CYGWIN__;
2763 ; return 0; }
2764 EOF
2765 if { (eval echo configure:2766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2766   rm -rf conftest*
2767   ac_cv_cygwin=yes
2768 else
2769   echo "configure: failed program was:" >&5
2770   cat conftest.$ac_ext >&5
2771   rm -rf conftest*
2772   ac_cv_cygwin=no
2773 fi
2774 rm -f conftest*
2775 fi
2776
2777 echo "$ac_t""$ac_cv_cygwin" 1>&6
2778 CYGWIN=
2779 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2780 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2781 echo "configure:2782: checking for mingw32 environment" >&5
2782 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
2783   echo $ac_n "(cached) $ac_c" 1>&6
2784 else
2785   cat > conftest.$ac_ext <<EOF
2786 #line 2787 "configure"
2787 #include "confdefs.h"
2788
2789 int main() {
2790 return __MINGW32__;
2791 ; return 0; }
2792 EOF
2793 if { (eval echo configure:2794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2794   rm -rf conftest*
2795   ac_cv_mingw32=yes
2796 else
2797   echo "configure: failed program was:" >&5
2798   cat conftest.$ac_ext >&5
2799   rm -rf conftest*
2800   ac_cv_mingw32=no
2801 fi
2802 rm -f conftest*
2803 fi
2804
2805 echo "$ac_t""$ac_cv_mingw32" 1>&6
2806 MINGW32=
2807 test "$ac_cv_mingw32" = yes && MINGW32=yes
2808 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
2809 echo "configure:2810: checking for EMX OS/2 environment" >&5
2810 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
2811   echo $ac_n "(cached) $ac_c" 1>&6
2812 else
2813   cat > conftest.$ac_ext <<EOF
2814 #line 2815 "configure"
2815 #include "confdefs.h"
2816
2817 int main() {
2818 return __EMX__;
2819 ; return 0; }
2820 EOF
2821 if { (eval echo configure:2822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2822   rm -rf conftest*
2823   ac_cv_emxos2=yes
2824 else
2825   echo "configure: failed program was:" >&5
2826   cat conftest.$ac_ext >&5
2827   rm -rf conftest*
2828   ac_cv_emxos2=no
2829 fi
2830 rm -f conftest*
2831 fi
2832
2833 echo "$ac_t""$ac_cv_emxos2" 1>&6
2834 EMXOS2=
2835 test "$ac_cv_emxos2" = yes && EMXOS2=yes
2836 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2837 echo "configure:2838: checking how to run the C preprocessor" >&5
2838 # On Suns, sometimes $CPP names a directory.
2839 if test -n "$CPP" && test -d "$CPP"; then
2840   CPP=
2841 fi
2842 if test -z "$CPP"; then
2843 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
2844   echo $ac_n "(cached) $ac_c" 1>&6
2845 else
2846     # This must be in double quotes, not single quotes, because CPP may get
2847   # substituted into the Makefile and "${CC-cc}" will confuse make.
2848   CPP="${CC-cc} -E"
2849   # On the NeXT, cc -E runs the code through the compiler's parser,
2850   # not just through cpp.
2851   cat > conftest.$ac_ext <<EOF
2852 #line 2853 "configure"
2853 #include "confdefs.h"
2854 #include <assert.h>
2855 Syntax Error
2856 EOF
2857 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2858 { (eval echo configure:2859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2859 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2860 if test -z "$ac_err"; then
2861   :
2862 else
2863   echo "$ac_err" >&5
2864   echo "configure: failed program was:" >&5
2865   cat conftest.$ac_ext >&5
2866   rm -rf conftest*
2867   CPP="${CC-cc} -E -traditional-cpp"
2868   cat > conftest.$ac_ext <<EOF
2869 #line 2870 "configure"
2870 #include "confdefs.h"
2871 #include <assert.h>
2872 Syntax Error
2873 EOF
2874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2875 { (eval echo configure:2876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2876 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2877 if test -z "$ac_err"; then
2878   :
2879 else
2880   echo "$ac_err" >&5
2881   echo "configure: failed program was:" >&5
2882   cat conftest.$ac_ext >&5
2883   rm -rf conftest*
2884   CPP="${CC-cc} -nologo -E"
2885   cat > conftest.$ac_ext <<EOF
2886 #line 2887 "configure"
2887 #include "confdefs.h"
2888 #include <assert.h>
2889 Syntax Error
2890 EOF
2891 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2892 { (eval echo configure:2893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2893 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2894 if test -z "$ac_err"; then
2895   :
2896 else
2897   echo "$ac_err" >&5
2898   echo "configure: failed program was:" >&5
2899   cat conftest.$ac_ext >&5
2900   rm -rf conftest*
2901   CPP=/lib/cpp
2902 fi
2903 rm -f conftest*
2904 fi
2905 rm -f conftest*
2906 fi
2907 rm -f conftest*
2908   ac_cv_prog_CPP="$CPP"
2909 fi
2910   CPP="$ac_cv_prog_CPP"
2911 else
2912   ac_cv_prog_CPP="$CPP"
2913 fi
2914 echo "$ac_t""$CPP" 1>&6
2915
2916 # Check whether --enable-fast-install or --disable-fast-install was given.
2917 if test "${enable_fast_install+set}" = set; then
2918   enableval="$enable_fast_install"
2919   p=${PACKAGE-default}
2920 case $enableval in
2921 yes) enable_fast_install=yes ;;
2922 no) enable_fast_install=no ;;
2923 *)
2924   enable_fast_install=no
2925   # Look at the argument we got.  We use all the common list separators.
2926   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2927   for pkg in $enableval; do
2928     if test "X$pkg" = "X$p"; then
2929       enable_fast_install=yes
2930     fi
2931   done
2932   IFS="$ac_save_ifs"
2933   ;;
2934 esac
2935 else
2936   enable_fast_install=yes
2937 fi
2938
2939 # Extract the first word of "gcc", so it can be a program name with args.
2940 set dummy gcc; ac_word=$2
2941 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2942 echo "configure:2943: checking for $ac_word" >&5
2943 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2944   echo $ac_n "(cached) $ac_c" 1>&6
2945 else
2946   if test -n "$CC"; then
2947   ac_cv_prog_CC="$CC" # Let the user override the test.
2948 else
2949   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2950   ac_dummy="$PATH"
2951   for ac_dir in $ac_dummy; do
2952     test -z "$ac_dir" && ac_dir=.
2953     if test -f $ac_dir/$ac_word; then
2954       ac_cv_prog_CC="gcc"
2955       break
2956     fi
2957   done
2958   IFS="$ac_save_ifs"
2959 fi
2960 fi
2961 CC="$ac_cv_prog_CC"
2962 if test -n "$CC"; then
2963   echo "$ac_t""$CC" 1>&6
2964 else
2965   echo "$ac_t""no" 1>&6
2966 fi
2967
2968 if test -z "$CC"; then
2969   # Extract the first word of "cc", so it can be a program name with args.
2970 set dummy cc; ac_word=$2
2971 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2972 echo "configure:2973: checking for $ac_word" >&5
2973 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2974   echo $ac_n "(cached) $ac_c" 1>&6
2975 else
2976   if test -n "$CC"; then
2977   ac_cv_prog_CC="$CC" # Let the user override the test.
2978 else
2979   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2980   ac_prog_rejected=no
2981   ac_dummy="$PATH"
2982   for ac_dir in $ac_dummy; do
2983     test -z "$ac_dir" && ac_dir=.
2984     if test -f $ac_dir/$ac_word; then
2985       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2986         ac_prog_rejected=yes
2987         continue
2988       fi
2989       ac_cv_prog_CC="cc"
2990       break
2991     fi
2992   done
2993   IFS="$ac_save_ifs"
2994 if test $ac_prog_rejected = yes; then
2995   # We found a bogon in the path, so make sure we never use it.
2996   set dummy $ac_cv_prog_CC
2997   shift
2998   if test $# -gt 0; then
2999     # We chose a different compiler from the bogus one.
3000     # However, it has the same basename, so the bogon will be chosen
3001     # first if we set CC to just the basename; use the full file name.
3002     shift
3003     set dummy "$ac_dir/$ac_word" "$@"
3004     shift
3005     ac_cv_prog_CC="$@"
3006   fi
3007 fi
3008 fi
3009 fi
3010 CC="$ac_cv_prog_CC"
3011 if test -n "$CC"; then
3012   echo "$ac_t""$CC" 1>&6
3013 else
3014   echo "$ac_t""no" 1>&6
3015 fi
3016
3017   if test -z "$CC"; then
3018     case "`uname -s`" in
3019     *win32* | *WIN32* | *CYGWIN*)
3020       # Extract the first word of "cl", so it can be a program name with args.
3021 set dummy cl; 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="cl"
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     esac
3050   fi
3051   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3052 fi
3053
3054 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3055 echo "configure:3056: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3056
3057 ac_ext=c
3058 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3059 ac_cpp='$CPP $CPPFLAGS'
3060 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3061 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3062 cross_compiling=$ac_cv_prog_cc_cross
3063
3064 cat > conftest.$ac_ext << EOF
3065
3066 #line 3067 "configure"
3067 #include "confdefs.h"
3068
3069 main(){return(0);}
3070 EOF
3071 if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3072   ac_cv_prog_cc_works=yes
3073   # If we can't run a trivial program, we are probably using a cross compiler.
3074   if (./conftest; exit) 2>/dev/null; then
3075     ac_cv_prog_cc_cross=no
3076   else
3077     ac_cv_prog_cc_cross=yes
3078   fi
3079 else
3080   echo "configure: failed program was:" >&5
3081   cat conftest.$ac_ext >&5
3082   ac_cv_prog_cc_works=no
3083 fi
3084 rm -fr conftest*
3085 ac_ext=c
3086 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3087 ac_cpp='$CPP $CPPFLAGS'
3088 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3089 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3090 cross_compiling=$ac_cv_prog_cc_cross
3091
3092 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3093 if test $ac_cv_prog_cc_works = no; then
3094   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3095 fi
3096 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3097 echo "configure:3098: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3098 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3099 cross_compiling=$ac_cv_prog_cc_cross
3100
3101 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3102 echo "configure:3103: checking whether we are using GNU C" >&5
3103 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3104   echo $ac_n "(cached) $ac_c" 1>&6
3105 else
3106   cat > conftest.c <<EOF
3107 #ifdef __GNUC__
3108   yes;
3109 #endif
3110 EOF
3111 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3112   ac_cv_prog_gcc=yes
3113 else
3114   ac_cv_prog_gcc=no
3115 fi
3116 fi
3117
3118 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3119
3120 if test $ac_cv_prog_gcc = yes; then
3121   GCC=yes
3122 else
3123   GCC=
3124 fi
3125
3126 ac_test_CFLAGS="${CFLAGS+set}"
3127 ac_save_CFLAGS="$CFLAGS"
3128 CFLAGS=
3129 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3130 echo "configure:3131: checking whether ${CC-cc} accepts -g" >&5
3131 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3132   echo $ac_n "(cached) $ac_c" 1>&6
3133 else
3134   echo 'void f(){}' > conftest.c
3135 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3136   ac_cv_prog_cc_g=yes
3137 else
3138   ac_cv_prog_cc_g=no
3139 fi
3140 rm -f conftest*
3141
3142 fi
3143
3144 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3145 if test "$ac_test_CFLAGS" = set; then
3146   CFLAGS="$ac_save_CFLAGS"
3147 elif test $ac_cv_prog_cc_g = yes; then
3148   if test "$GCC" = yes; then
3149     CFLAGS="-g -O2"
3150   else
3151     CFLAGS="-g"
3152   fi
3153 else
3154   if test "$GCC" = yes; then
3155     CFLAGS="-O2"
3156   else
3157     CFLAGS=
3158   fi
3159 fi
3160
3161 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3162 if test "${with_gnu_ld+set}" = set; then
3163   withval="$with_gnu_ld"
3164   test "$withval" = no || with_gnu_ld=yes
3165 else
3166   with_gnu_ld=no
3167 fi
3168
3169 ac_prog=ld
3170 if test "$GCC" = yes; then
3171   # Check if gcc -print-prog-name=ld gives a path.
3172   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3173 echo "configure:3174: checking for ld used by GCC" >&5
3174   case $host in
3175   *-*-mingw*)
3176     # gcc leaves a trailing carriage return which upsets mingw
3177     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3178   *)
3179     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3180   esac
3181   case $ac_prog in
3182     # Accept absolute paths.
3183     [\\/]* | [A-Za-z]:[\\/]*)
3184       re_direlt='/[^/][^/]*/\.\./'
3185       # Canonicalize the path of ld
3186       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3187       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3188         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3189       done
3190       test -z "$LD" && LD="$ac_prog"
3191       ;;
3192   "")
3193     # If it fails, then pretend we aren't using GCC.
3194     ac_prog=ld
3195     ;;
3196   *)
3197     # If it is relative, then search for the first ld in PATH.
3198     with_gnu_ld=unknown
3199     ;;
3200   esac
3201 elif test "$with_gnu_ld" = yes; then
3202   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3203 echo "configure:3204: checking for GNU ld" >&5
3204 else
3205   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3206 echo "configure:3207: checking for non-GNU ld" >&5
3207 fi
3208 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3209   echo $ac_n "(cached) $ac_c" 1>&6
3210 else
3211   if test -z "$LD"; then
3212   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3213   for ac_dir in $PATH; do
3214     test -z "$ac_dir" && ac_dir=.
3215     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3216       lt_cv_path_LD="$ac_dir/$ac_prog"
3217       # Check to see if the program is GNU ld.  I'd rather use --version,
3218       # but apparently some GNU ld's only accept -v.
3219       # Break only if it was the GNU/non-GNU ld that we prefer.
3220       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3221         test "$with_gnu_ld" != no && break
3222       else
3223         test "$with_gnu_ld" != yes && break
3224       fi
3225     fi
3226   done
3227   IFS="$ac_save_ifs"
3228 else
3229   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3230 fi
3231 fi
3232
3233 LD="$lt_cv_path_LD"
3234 if test -n "$LD"; then
3235   echo "$ac_t""$LD" 1>&6
3236 else
3237   echo "$ac_t""no" 1>&6
3238 fi
3239 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3240 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3241 echo "configure:3242: checking if the linker ($LD) is GNU ld" >&5
3242 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3243   echo $ac_n "(cached) $ac_c" 1>&6
3244 else
3245   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3246 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3247   lt_cv_prog_gnu_ld=yes
3248 else
3249   lt_cv_prog_gnu_ld=no
3250 fi
3251 fi
3252
3253 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3254 with_gnu_ld=$lt_cv_prog_gnu_ld
3255
3256
3257 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3258 echo "configure:3259: checking for $LD option to reload object files" >&5
3259 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3260   echo $ac_n "(cached) $ac_c" 1>&6
3261 else
3262   lt_cv_ld_reload_flag='-r'
3263 fi
3264
3265 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3266 reload_flag=$lt_cv_ld_reload_flag
3267 test -n "$reload_flag" && reload_flag=" $reload_flag"
3268
3269 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3270 echo "configure:3271: checking for BSD-compatible nm" >&5
3271 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3272   echo $ac_n "(cached) $ac_c" 1>&6
3273 else
3274   if test -n "$NM"; then
3275   # Let the user override the test.
3276   lt_cv_path_NM="$NM"
3277 else
3278   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3279   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3280     test -z "$ac_dir" && ac_dir=.
3281     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3282     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3283       # Check to see if the nm accepts a BSD-compat flag.
3284       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3285       #   nm: unknown option "B" ignored
3286       # Tru64's nm complains that /dev/null is an invalid object file
3287       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3288         lt_cv_path_NM="$tmp_nm -B"
3289         break
3290       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3291         lt_cv_path_NM="$tmp_nm -p"
3292         break
3293       else
3294         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3295         continue # so that we can try to find one that supports BSD flags
3296       fi
3297     fi
3298   done
3299   IFS="$ac_save_ifs"
3300   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3301 fi
3302 fi
3303
3304 NM="$lt_cv_path_NM"
3305 echo "$ac_t""$NM" 1>&6
3306
3307 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3308 echo "configure:3309: checking for a sed that does not truncate output" >&5
3309 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3310   echo $ac_n "(cached) $ac_c" 1>&6
3311 else
3312   # Loop through the user's path and test for sed and gsed.
3313 # Then use that list of sed's as ones to test for truncation.
3314 as_executable_p="test -f"
3315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3316 for as_dir in $PATH
3317 do
3318   IFS=$as_save_IFS
3319   test -z "$as_dir" && as_dir=.
3320   for ac_prog in sed gsed; do
3321     for ac_exec_ext in '' $ac_executable_extensions; do
3322       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3323         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3324       fi
3325     done
3326   done
3327 done
3328
3329   # Create a temporary directory, and hook for its removal unless debugging.
3330 $debug ||
3331 {
3332   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3333   trap '{ (exit 1); exit 1; }' 1 2 13 15
3334 }
3335
3336 # Create a (secure) tmp directory for tmp files.
3337 : ${TMPDIR=/tmp}
3338 {
3339   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3340   test -n "$tmp" && test -d "$tmp"
3341 }  ||
3342 {
3343   tmp=$TMPDIR/sed$$-$RANDOM
3344   (umask 077 && mkdir $tmp)
3345 } ||
3346 {
3347    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3348    { (exit 1); exit 1; }
3349 }
3350   _max=0
3351   _count=0
3352   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3353   # along with /bin/sed that truncates output.
3354   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3355     test ! -f ${_sed} && break
3356     cat /dev/null > "$tmp/sed.in"
3357     _count=0
3358     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3359     # Check for GNU sed and select it if it is found.
3360     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3361       lt_cv_path_SED=${_sed}
3362       break
3363     fi
3364     while true; do
3365       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3366       mv "$tmp/sed.tmp" "$tmp/sed.in"
3367       cp "$tmp/sed.in" "$tmp/sed.nl"
3368       echo >>"$tmp/sed.nl"
3369       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3370       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3371       # 40000 chars as input seems more than enough
3372       test $_count -gt 10 && break
3373       _count=`expr $_count + 1`
3374       if test $_count -gt $_max; then
3375         _max=$_count
3376         lt_cv_path_SED=$_sed
3377       fi
3378     done
3379   done
3380   rm -rf "$tmp"
3381
3382 fi
3383
3384 if test "X$SED" != "X"; then
3385   lt_cv_path_SED=$SED
3386 else
3387   SED=$lt_cv_path_SED
3388 fi
3389 echo "$ac_t""$SED" 1>&6
3390
3391 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3392 echo "configure:3393: checking whether ln -s works" >&5
3393 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3394   echo $ac_n "(cached) $ac_c" 1>&6
3395 else
3396   rm -f conftestdata
3397 if ln -s X conftestdata 2>/dev/null
3398 then
3399   rm -f conftestdata
3400   ac_cv_prog_LN_S="ln -s"
3401 else
3402   ac_cv_prog_LN_S=ln
3403 fi
3404 fi
3405 LN_S="$ac_cv_prog_LN_S"
3406 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3407   echo "$ac_t""yes" 1>&6
3408 else
3409   echo "$ac_t""no" 1>&6
3410 fi
3411
3412 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3413 echo "configure:3414: checking how to recognise dependent libraries" >&5
3414 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3415   echo $ac_n "(cached) $ac_c" 1>&6
3416 else
3417   lt_cv_file_magic_cmd='$MAGIC_CMD'
3418 lt_cv_file_magic_test_file=
3419 lt_cv_deplibs_check_method='unknown'
3420 # Need to set the preceding variable on all platforms that support
3421 # interlibrary dependencies.
3422 # 'none' -- dependencies not supported.
3423 # `unknown' -- same as none, but documents that we really don't know.
3424 # 'pass_all' -- all dependencies passed with no checks.
3425 # 'test_compile' -- check by making test program.
3426 # 'file_magic [[regex]]' -- check by looking for files in library path
3427 # which responds to the $file_magic_cmd with a given egrep regex.
3428 # If you have `file' or equivalent on your system and you're not sure
3429 # whether `pass_all' will *always* work, you probably want this one.
3430
3431 case $host_os in
3432 aix4* | aix5*)
3433   lt_cv_deplibs_check_method=pass_all
3434   ;;
3435
3436 beos*)
3437   lt_cv_deplibs_check_method=pass_all
3438   ;;
3439
3440 bsdi4*)
3441   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3442   lt_cv_file_magic_cmd='/usr/bin/file -L'
3443   lt_cv_file_magic_test_file=/shlib/libc.so
3444   ;;
3445
3446 cygwin* | mingw* | pw32*)
3447   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3448   lt_cv_file_magic_cmd='$OBJDUMP -f'
3449   ;;
3450
3451 darwin* | rhapsody*)
3452   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3453   lt_cv_file_magic_cmd='/usr/bin/file -L'
3454   case "$host_os" in
3455   rhapsody* | darwin1.[012])
3456     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3457     ;;
3458   *) # Darwin 1.3 on
3459     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3460     ;;
3461   esac
3462   ;;
3463
3464 freebsd*)
3465   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3466     case $host_cpu in
3467     i*86 )
3468       # Not sure whether the presence of OpenBSD here was a mistake.
3469       # Let's accept both of them until this is cleared up.
3470       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3471       lt_cv_file_magic_cmd=/usr/bin/file
3472       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3473       ;;
3474     esac
3475   else
3476     lt_cv_deplibs_check_method=pass_all
3477   fi
3478   ;;
3479
3480 gnu*)
3481   lt_cv_deplibs_check_method=pass_all
3482   ;;
3483
3484 hpux10.20*|hpux11*)
3485   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3486   lt_cv_file_magic_cmd=/usr/bin/file
3487   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3488   ;;
3489
3490 irix5* | irix6* | nonstopux*)
3491   case $host_os in
3492   irix5* | nonstopux*)
3493     # this will be overridden with pass_all, but let us keep it just in case
3494     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3495     ;;
3496   *)
3497     case $LD in
3498     *-32|*"-32 ") libmagic=32-bit;;
3499     *-n32|*"-n32 ") libmagic=N32;;
3500     *-64|*"-64 ") libmagic=64-bit;;
3501     *) libmagic=never-match;;
3502     esac
3503     # this will be overridden with pass_all, but let us keep it just in case
3504     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3505     ;;
3506   esac
3507   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3508   lt_cv_deplibs_check_method=pass_all
3509   ;;
3510
3511 # This must be Linux ELF.
3512 linux-gnu*)
3513   case $host_cpu in
3514   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3515     lt_cv_deplibs_check_method=pass_all ;;
3516   *)
3517     # glibc up to 2.1.1 does not perform some relocations on ARM
3518     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3519   esac
3520   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3521   ;;
3522
3523 netbsd*)
3524   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3525     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3526   else
3527     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3528   fi
3529   ;;
3530
3531 newos6*)
3532   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3533   lt_cv_file_magic_cmd=/usr/bin/file
3534   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3535   ;;
3536
3537 openbsd*)
3538   lt_cv_file_magic_cmd=/usr/bin/file
3539   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3540   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3541     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3542   else
3543     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3544   fi
3545   ;;
3546
3547 openedition*)
3548   lt_cv_deplibs_check_method=pass_all
3549   ;;
3550
3551 osf3* | osf4* | osf5*)
3552   # this will be overridden with pass_all, but let us keep it just in case
3553   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3554   lt_cv_file_magic_test_file=/shlib/libc.so
3555   lt_cv_deplibs_check_method=pass_all
3556   ;;
3557
3558 sco3.2v5*)
3559   lt_cv_deplibs_check_method=pass_all
3560   ;;
3561
3562 solaris*)
3563   lt_cv_deplibs_check_method=pass_all
3564   lt_cv_file_magic_test_file=/lib/libc.so
3565   ;;
3566
3567 sysv5uw[78]* | sysv4*uw2*)
3568   lt_cv_deplibs_check_method=pass_all
3569   ;;
3570
3571 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3572   case $host_vendor in
3573   motorola)
3574     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]'
3575     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3576     ;;
3577   ncr)
3578     lt_cv_deplibs_check_method=pass_all
3579     ;;
3580   sequent)
3581     lt_cv_file_magic_cmd='/bin/file'
3582     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3583     ;;
3584   sni)
3585     lt_cv_file_magic_cmd='/bin/file'
3586     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3587     lt_cv_file_magic_test_file=/lib/libc.so
3588     ;;
3589   siemens)
3590     lt_cv_deplibs_check_method=pass_all
3591     ;;
3592   esac
3593   ;;
3594 esac
3595
3596 fi
3597
3598 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3599 file_magic_cmd=$lt_cv_file_magic_cmd
3600 deplibs_check_method=$lt_cv_deplibs_check_method
3601
3602 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3603 echo "configure:3604: checking for object suffix" >&5
3604 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3605   echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607   rm -f conftest*
3608 echo 'int i = 1;' > conftest.$ac_ext
3609 if { (eval echo configure:3610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3610   for ac_file in conftest.*; do
3611     case $ac_file in
3612     *.c) ;;
3613     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3614     esac
3615   done
3616 else
3617   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3618 fi
3619 rm -f conftest*
3620 fi
3621
3622 echo "$ac_t""$ac_cv_objext" 1>&6
3623 OBJEXT=$ac_cv_objext
3624 ac_objext=$ac_cv_objext
3625
3626
3627
3628
3629 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3630 echo "configure:3631: checking for executable suffix" >&5
3631 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3632   echo $ac_n "(cached) $ac_c" 1>&6
3633 else
3634   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3635   ac_cv_exeext=.exe
3636 else
3637   rm -f conftest*
3638   echo 'int main () { return 0; }' > conftest.$ac_ext
3639   ac_cv_exeext=
3640   if { (eval echo configure:3641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3641     for file in conftest.*; do
3642       case $file in
3643       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3644       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3645       esac
3646     done
3647   else
3648     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3649   fi
3650   rm -f conftest*
3651   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3652 fi
3653 fi
3654
3655 EXEEXT=""
3656 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3657 echo "$ac_t""${ac_cv_exeext}" 1>&6
3658 ac_exeext=$EXEEXT
3659
3660 if test $host != $build; then
3661   ac_tool_prefix=${host_alias}-
3662 else
3663   ac_tool_prefix=
3664 fi
3665
3666
3667
3668
3669 # Check for command to grab the raw symbol name followed by C symbol from nm.
3670 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3671 echo "configure:3672: checking command to parse $NM output" >&5
3672 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3673   echo $ac_n "(cached) $ac_c" 1>&6
3674 else
3675   
3676 # These are sane defaults that work on at least a few old systems.
3677 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3678
3679 # Character class describing NM global symbol codes.
3680 symcode='[BCDEGRST]'
3681
3682 # Regexp to match symbols that can be accessed directly from C.
3683 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3684
3685 # Transform the above into a raw symbol and a C symbol.
3686 symxfrm='\1 \2\3 \3'
3687
3688 # Transform an extracted symbol line into a proper C declaration
3689 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3690
3691 # Transform an extracted symbol line into symbol name and symbol address
3692 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'"
3693
3694 # Define system-specific variables.
3695 case $host_os in
3696 aix*)
3697   symcode='[BCDT]'
3698   ;;
3699 cygwin* | mingw* | pw32*)
3700   symcode='[ABCDGISTW]'
3701   ;;
3702 hpux*) # Its linker distinguishes data from code symbols
3703   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3704   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'"
3705   ;;
3706 irix* | nonstopux*)
3707   symcode='[BCDEGRST]'
3708   ;;
3709 osf*)
3710   symcode='[BCDEGQRST]'
3711   ;;
3712 solaris* | sysv5*)
3713   symcode='[BDT]'
3714   ;;
3715 sysv4)
3716   symcode='[DFNSTU]'
3717   ;;
3718 esac
3719
3720 # Handle CRLF in mingw tool chain
3721 opt_cr=
3722 case $host_os in
3723 mingw*)
3724   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3725   ;;
3726 esac
3727
3728 # If we're using GNU nm, then use its standard symbol codes.
3729 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3730   symcode='[ABCDGISTW]'
3731 fi
3732
3733 # Try without a prefix undercore, then with it.
3734 for ac_symprfx in "" "_"; do
3735
3736   # Write the raw and C identifiers.
3737 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3738
3739   # Check to see that the pipe works correctly.
3740   pipe_works=no
3741   rm -f conftest*
3742   cat > conftest.$ac_ext <<EOF
3743 #ifdef __cplusplus
3744 extern "C" {
3745 #endif
3746 char nm_test_var;
3747 void nm_test_func(){}
3748 #ifdef __cplusplus
3749 }
3750 #endif
3751 int main(){nm_test_var='a';nm_test_func();return(0);}
3752 EOF
3753
3754   if { (eval echo configure:3755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3755     # Now try to grab the symbols.
3756     nlist=conftest.nm
3757     if { (eval echo configure:3758: \"$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
3758       # Try sorting and uniquifying the output.
3759       if sort "$nlist" | uniq > "$nlist"T; then
3760         mv -f "$nlist"T "$nlist"
3761       else
3762         rm -f "$nlist"T
3763       fi
3764
3765       # Make sure that we snagged all the symbols we need.
3766       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3767         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3768           cat <<EOF > conftest.$ac_ext
3769 #ifdef __cplusplus
3770 extern "C" {
3771 #endif
3772
3773 EOF
3774           # Now generate the symbol file.
3775           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
3776
3777           cat <<EOF >> conftest.$ac_ext
3778 #if defined (__STDC__) && __STDC__
3779 # define lt_ptr void *
3780 #else
3781 # define lt_ptr char *
3782 # define const
3783 #endif
3784
3785 /* The mapping between symbol names and symbols. */
3786 const struct {
3787   const char *name;
3788   lt_ptr address;
3789 }
3790 lt_preloaded_symbols[] =
3791 {
3792 EOF
3793           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
3794           cat <<\EOF >> conftest.$ac_ext
3795   {0, (lt_ptr) 0}
3796 };
3797
3798 #ifdef __cplusplus
3799 }
3800 #endif
3801 EOF
3802           # Now try linking the two files.
3803           mv conftest.$ac_objext conftstm.$ac_objext
3804           save_LIBS="$LIBS"
3805           save_CFLAGS="$CFLAGS"
3806           LIBS="conftstm.$ac_objext"
3807           CFLAGS="$CFLAGS$no_builtin_flag"
3808           if { (eval echo configure:3809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
3809             pipe_works=yes
3810           fi
3811           LIBS="$save_LIBS"
3812           CFLAGS="$save_CFLAGS"
3813         else
3814           echo "cannot find nm_test_func in $nlist" >&5
3815         fi
3816       else
3817         echo "cannot find nm_test_var in $nlist" >&5
3818       fi
3819     else
3820       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
3821     fi
3822   else
3823     echo "$progname: failed program was:" >&5
3824     cat conftest.$ac_ext >&5
3825   fi
3826   rm -f conftest* conftst*
3827
3828   # Do not use the global_symbol_pipe unless it works.
3829   if test "$pipe_works" = yes; then
3830     break
3831   else
3832     lt_cv_sys_global_symbol_pipe=
3833   fi
3834 done
3835
3836 fi
3837
3838 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
3839 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3840   global_symbol_to_cdecl=
3841   global_symbol_to_c_name_address=
3842 else
3843   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
3844   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
3845 fi
3846 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
3847 then
3848   echo "$ac_t""failed" 1>&6
3849 else
3850   echo "$ac_t""ok" 1>&6
3851 fi
3852
3853 for ac_hdr in dlfcn.h
3854 do
3855 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3856 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3857 echo "configure:3858: checking for $ac_hdr" >&5
3858 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3859   echo $ac_n "(cached) $ac_c" 1>&6
3860 else
3861   cat > conftest.$ac_ext <<EOF
3862 #line 3863 "configure"
3863 #include "confdefs.h"
3864 #include <$ac_hdr>
3865 EOF
3866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3867 { (eval echo configure:3868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3869 if test -z "$ac_err"; then
3870   rm -rf conftest*
3871   eval "ac_cv_header_$ac_safe=yes"
3872 else
3873   echo "$ac_err" >&5
3874   echo "configure: failed program was:" >&5
3875   cat conftest.$ac_ext >&5
3876   rm -rf conftest*
3877   eval "ac_cv_header_$ac_safe=no"
3878 fi
3879 rm -f conftest*
3880 fi
3881 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3882   echo "$ac_t""yes" 1>&6
3883     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3884   cat >> confdefs.h <<EOF
3885 #define $ac_tr_hdr 1
3886 EOF
3887  
3888 else
3889   echo "$ac_t""no" 1>&6
3890 fi
3891 done
3892
3893
3894
3895
3896
3897
3898 # Only perform the check for file, if the check method requires it
3899 case $deplibs_check_method in
3900 file_magic*)
3901   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
3902     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
3903 echo "configure:3904: checking for ${ac_tool_prefix}file" >&5
3904 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
3905   echo $ac_n "(cached) $ac_c" 1>&6
3906 else
3907   case $MAGIC_CMD in
3908   /*)
3909   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3910   ;;
3911   ?:/*)
3912   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3913   ;;
3914   *)
3915   ac_save_MAGIC_CMD="$MAGIC_CMD"
3916   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3917   ac_dummy="/usr/bin:$PATH"
3918   for ac_dir in $ac_dummy; do
3919     test -z "$ac_dir" && ac_dir=.
3920     if test -f $ac_dir/${ac_tool_prefix}file; then
3921       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
3922       if test -n "$file_magic_test_file"; then
3923         case $deplibs_check_method in
3924         "file_magic "*)
3925           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3926           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3927           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3928             egrep "$file_magic_regex" > /dev/null; then
3929             :
3930           else
3931             cat <<EOF 1>&2
3932
3933 *** Warning: the command libtool uses to detect shared libraries,
3934 *** $file_magic_cmd, produces output that libtool cannot recognize.
3935 *** The result is that libtool may fail to recognize shared libraries
3936 *** as such.  This will affect the creation of libtool libraries that
3937 *** depend on shared libraries, but programs linked with such libtool
3938 *** libraries will work regardless of this problem.  Nevertheless, you
3939 *** may want to report the problem to your system manager and/or to
3940 *** bug-libtool@gnu.org
3941
3942 EOF
3943           fi ;;
3944         esac
3945       fi
3946       break
3947     fi
3948   done
3949   IFS="$ac_save_ifs"
3950   MAGIC_CMD="$ac_save_MAGIC_CMD"
3951   ;;
3952 esac
3953 fi
3954
3955 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3956 if test -n "$MAGIC_CMD"; then
3957   echo "$ac_t""$MAGIC_CMD" 1>&6
3958 else
3959   echo "$ac_t""no" 1>&6
3960 fi
3961
3962 if test -z "$lt_cv_path_MAGIC_CMD"; then
3963   if test -n "$ac_tool_prefix"; then
3964     echo $ac_n "checking for file""... $ac_c" 1>&6
3965 echo "configure:3966: checking for file" >&5
3966 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
3967   echo $ac_n "(cached) $ac_c" 1>&6
3968 else
3969   case $MAGIC_CMD in
3970   /*)
3971   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3972   ;;
3973   ?:/*)
3974   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3975   ;;
3976   *)
3977   ac_save_MAGIC_CMD="$MAGIC_CMD"
3978   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3979   ac_dummy="/usr/bin:$PATH"
3980   for ac_dir in $ac_dummy; do
3981     test -z "$ac_dir" && ac_dir=.
3982     if test -f $ac_dir/file; then
3983       lt_cv_path_MAGIC_CMD="$ac_dir/file"
3984       if test -n "$file_magic_test_file"; then
3985         case $deplibs_check_method in
3986         "file_magic "*)
3987           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3988           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3989           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3990             egrep "$file_magic_regex" > /dev/null; then
3991             :
3992           else
3993             cat <<EOF 1>&2
3994
3995 *** Warning: the command libtool uses to detect shared libraries,
3996 *** $file_magic_cmd, produces output that libtool cannot recognize.
3997 *** The result is that libtool may fail to recognize shared libraries
3998 *** as such.  This will affect the creation of libtool libraries that
3999 *** depend on shared libraries, but programs linked with such libtool
4000 *** libraries will work regardless of this problem.  Nevertheless, you
4001 *** may want to report the problem to your system manager and/or to
4002 *** bug-libtool@gnu.org
4003
4004 EOF
4005           fi ;;
4006         esac
4007       fi
4008       break
4009     fi
4010   done
4011   IFS="$ac_save_ifs"
4012   MAGIC_CMD="$ac_save_MAGIC_CMD"
4013   ;;
4014 esac
4015 fi
4016
4017 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4018 if test -n "$MAGIC_CMD"; then
4019   echo "$ac_t""$MAGIC_CMD" 1>&6
4020 else
4021   echo "$ac_t""no" 1>&6
4022 fi
4023
4024   else
4025     MAGIC_CMD=:
4026   fi
4027 fi
4028
4029   fi
4030   ;;
4031 esac
4032
4033 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4034 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4035 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4036 echo "configure:4037: checking for $ac_word" >&5
4037 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4038   echo $ac_n "(cached) $ac_c" 1>&6
4039 else
4040   if test -n "$RANLIB"; then
4041   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4042 else
4043   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4044   ac_dummy="$PATH"
4045   for ac_dir in $ac_dummy; do
4046     test -z "$ac_dir" && ac_dir=.
4047     if test -f $ac_dir/$ac_word; then
4048       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4049       break
4050     fi
4051   done
4052   IFS="$ac_save_ifs"
4053 fi
4054 fi
4055 RANLIB="$ac_cv_prog_RANLIB"
4056 if test -n "$RANLIB"; then
4057   echo "$ac_t""$RANLIB" 1>&6
4058 else
4059   echo "$ac_t""no" 1>&6
4060 fi
4061
4062
4063 if test -z "$ac_cv_prog_RANLIB"; then
4064 if test -n "$ac_tool_prefix"; then
4065   # Extract the first word of "ranlib", so it can be a program name with args.
4066 set dummy ranlib; ac_word=$2
4067 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4068 echo "configure:4069: checking for $ac_word" >&5
4069 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4070   echo $ac_n "(cached) $ac_c" 1>&6
4071 else
4072   if test -n "$RANLIB"; then
4073   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4074 else
4075   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4076   ac_dummy="$PATH"
4077   for ac_dir in $ac_dummy; do
4078     test -z "$ac_dir" && ac_dir=.
4079     if test -f $ac_dir/$ac_word; then
4080       ac_cv_prog_RANLIB="ranlib"
4081       break
4082     fi
4083   done
4084   IFS="$ac_save_ifs"
4085   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4086 fi
4087 fi
4088 RANLIB="$ac_cv_prog_RANLIB"
4089 if test -n "$RANLIB"; then
4090   echo "$ac_t""$RANLIB" 1>&6
4091 else
4092   echo "$ac_t""no" 1>&6
4093 fi
4094
4095 else
4096   RANLIB=":"
4097 fi
4098 fi
4099
4100 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4101 set dummy ${ac_tool_prefix}strip; ac_word=$2
4102 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4103 echo "configure:4104: checking for $ac_word" >&5
4104 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4105   echo $ac_n "(cached) $ac_c" 1>&6
4106 else
4107   if test -n "$STRIP"; then
4108   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4109 else
4110   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4111   ac_dummy="$PATH"
4112   for ac_dir in $ac_dummy; do
4113     test -z "$ac_dir" && ac_dir=.
4114     if test -f $ac_dir/$ac_word; then
4115       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4116       break
4117     fi
4118   done
4119   IFS="$ac_save_ifs"
4120 fi
4121 fi
4122 STRIP="$ac_cv_prog_STRIP"
4123 if test -n "$STRIP"; then
4124   echo "$ac_t""$STRIP" 1>&6
4125 else
4126   echo "$ac_t""no" 1>&6
4127 fi
4128
4129
4130 if test -z "$ac_cv_prog_STRIP"; then
4131 if test -n "$ac_tool_prefix"; then
4132   # Extract the first word of "strip", so it can be a program name with args.
4133 set dummy strip; ac_word=$2
4134 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4135 echo "configure:4136: checking for $ac_word" >&5
4136 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4137   echo $ac_n "(cached) $ac_c" 1>&6
4138 else
4139   if test -n "$STRIP"; then
4140   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4141 else
4142   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4143   ac_dummy="$PATH"
4144   for ac_dir in $ac_dummy; do
4145     test -z "$ac_dir" && ac_dir=.
4146     if test -f $ac_dir/$ac_word; then
4147       ac_cv_prog_STRIP="strip"
4148       break
4149     fi
4150   done
4151   IFS="$ac_save_ifs"
4152   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4153 fi
4154 fi
4155 STRIP="$ac_cv_prog_STRIP"
4156 if test -n "$STRIP"; then
4157   echo "$ac_t""$STRIP" 1>&6
4158 else
4159   echo "$ac_t""no" 1>&6
4160 fi
4161
4162 else
4163   STRIP=":"
4164 fi
4165 fi
4166
4167
4168 enable_dlopen=yes
4169 enable_win32_dll=yes
4170
4171 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4172 if test "${enable_libtool_lock+set}" = set; then
4173   enableval="$enable_libtool_lock"
4174   :
4175 fi
4176
4177 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4178
4179 # Some flags need to be propagated to the compiler or linker for good
4180 # libtool support.
4181 case $host in
4182 *-*-irix6*)
4183   # Find out which ABI we are using.
4184   echo '#line 4185 "configure"' > conftest.$ac_ext
4185   if { (eval echo configure:4186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4186     case `/usr/bin/file conftest.$ac_objext` in
4187     *32-bit*)
4188       LD="${LD-ld} -32"
4189       ;;
4190     *N32*)
4191       LD="${LD-ld} -n32"
4192       ;;
4193     *64-bit*)
4194       LD="${LD-ld} -64"
4195       ;;
4196     esac
4197   fi
4198   rm -rf conftest*
4199   ;;
4200
4201 *-*-sco3.2v5*)
4202   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4203   SAVE_CFLAGS="$CFLAGS"
4204   CFLAGS="$CFLAGS -belf"
4205   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4206 echo "configure:4207: checking whether the C compiler needs -belf" >&5
4207 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4208   echo $ac_n "(cached) $ac_c" 1>&6
4209 else
4210   
4211      ac_ext=c
4212 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4213 ac_cpp='$CPP $CPPFLAGS'
4214 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4215 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4216 cross_compiling=$ac_cv_prog_cc_cross
4217
4218      cat > conftest.$ac_ext <<EOF
4219 #line 4220 "configure"
4220 #include "confdefs.h"
4221
4222 int main() {
4223
4224 ; return 0; }
4225 EOF
4226 if { (eval echo configure:4227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4227   rm -rf conftest*
4228   lt_cv_cc_needs_belf=yes
4229 else
4230   echo "configure: failed program was:" >&5
4231   cat conftest.$ac_ext >&5
4232   rm -rf conftest*
4233   lt_cv_cc_needs_belf=no
4234 fi
4235 rm -f conftest*
4236      ac_ext=c
4237 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4238 ac_cpp='$CPP $CPPFLAGS'
4239 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4240 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4241 cross_compiling=$ac_cv_prog_cc_cross
4242
4243 fi
4244
4245 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4246   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4247     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4248     CFLAGS="$SAVE_CFLAGS"
4249   fi
4250   ;;
4251
4252 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4253   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4254 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4255 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4256 echo "configure:4257: checking for $ac_word" >&5
4257 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4258   echo $ac_n "(cached) $ac_c" 1>&6
4259 else
4260   if test -n "$DLLTOOL"; then
4261   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4262 else
4263   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4264   ac_dummy="$PATH"
4265   for ac_dir in $ac_dummy; do
4266     test -z "$ac_dir" && ac_dir=.
4267     if test -f $ac_dir/$ac_word; then
4268       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4269       break
4270     fi
4271   done
4272   IFS="$ac_save_ifs"
4273 fi
4274 fi
4275 DLLTOOL="$ac_cv_prog_DLLTOOL"
4276 if test -n "$DLLTOOL"; then
4277   echo "$ac_t""$DLLTOOL" 1>&6
4278 else
4279   echo "$ac_t""no" 1>&6
4280 fi
4281
4282
4283 if test -z "$ac_cv_prog_DLLTOOL"; then
4284 if test -n "$ac_tool_prefix"; then
4285   # Extract the first word of "dlltool", so it can be a program name with args.
4286 set dummy dlltool; ac_word=$2
4287 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4288 echo "configure:4289: checking for $ac_word" >&5
4289 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4290   echo $ac_n "(cached) $ac_c" 1>&6
4291 else
4292   if test -n "$DLLTOOL"; then
4293   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4294 else
4295   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4296   ac_dummy="$PATH"
4297   for ac_dir in $ac_dummy; do
4298     test -z "$ac_dir" && ac_dir=.
4299     if test -f $ac_dir/$ac_word; then
4300       ac_cv_prog_DLLTOOL="dlltool"
4301       break
4302     fi
4303   done
4304   IFS="$ac_save_ifs"
4305   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4306 fi
4307 fi
4308 DLLTOOL="$ac_cv_prog_DLLTOOL"
4309 if test -n "$DLLTOOL"; then
4310   echo "$ac_t""$DLLTOOL" 1>&6
4311 else
4312   echo "$ac_t""no" 1>&6
4313 fi
4314
4315 else
4316   DLLTOOL="false"
4317 fi
4318 fi
4319
4320   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4321 set dummy ${ac_tool_prefix}as; ac_word=$2
4322 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4323 echo "configure:4324: checking for $ac_word" >&5
4324 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4325   echo $ac_n "(cached) $ac_c" 1>&6
4326 else
4327   if test -n "$AS"; then
4328   ac_cv_prog_AS="$AS" # Let the user override the test.
4329 else
4330   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4331   ac_dummy="$PATH"
4332   for ac_dir in $ac_dummy; do
4333     test -z "$ac_dir" && ac_dir=.
4334     if test -f $ac_dir/$ac_word; then
4335       ac_cv_prog_AS="${ac_tool_prefix}as"
4336       break
4337     fi
4338   done
4339   IFS="$ac_save_ifs"
4340 fi
4341 fi
4342 AS="$ac_cv_prog_AS"
4343 if test -n "$AS"; then
4344   echo "$ac_t""$AS" 1>&6
4345 else
4346   echo "$ac_t""no" 1>&6
4347 fi
4348
4349
4350 if test -z "$ac_cv_prog_AS"; then
4351 if test -n "$ac_tool_prefix"; then
4352   # Extract the first word of "as", so it can be a program name with args.
4353 set dummy as; ac_word=$2
4354 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4355 echo "configure:4356: checking for $ac_word" >&5
4356 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4357   echo $ac_n "(cached) $ac_c" 1>&6
4358 else
4359   if test -n "$AS"; then
4360   ac_cv_prog_AS="$AS" # Let the user override the test.
4361 else
4362   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4363   ac_dummy="$PATH"
4364   for ac_dir in $ac_dummy; do
4365     test -z "$ac_dir" && ac_dir=.
4366     if test -f $ac_dir/$ac_word; then
4367       ac_cv_prog_AS="as"
4368       break
4369     fi
4370   done
4371   IFS="$ac_save_ifs"
4372   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4373 fi
4374 fi
4375 AS="$ac_cv_prog_AS"
4376 if test -n "$AS"; then
4377   echo "$ac_t""$AS" 1>&6
4378 else
4379   echo "$ac_t""no" 1>&6
4380 fi
4381
4382 else
4383   AS="false"
4384 fi
4385 fi
4386
4387   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4388 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4389 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4390 echo "configure:4391: checking for $ac_word" >&5
4391 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4392   echo $ac_n "(cached) $ac_c" 1>&6
4393 else
4394   if test -n "$OBJDUMP"; then
4395   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4396 else
4397   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4398   ac_dummy="$PATH"
4399   for ac_dir in $ac_dummy; do
4400     test -z "$ac_dir" && ac_dir=.
4401     if test -f $ac_dir/$ac_word; then
4402       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4403       break
4404     fi
4405   done
4406   IFS="$ac_save_ifs"
4407 fi
4408 fi
4409 OBJDUMP="$ac_cv_prog_OBJDUMP"
4410 if test -n "$OBJDUMP"; then
4411   echo "$ac_t""$OBJDUMP" 1>&6
4412 else
4413   echo "$ac_t""no" 1>&6
4414 fi
4415
4416
4417 if test -z "$ac_cv_prog_OBJDUMP"; then
4418 if test -n "$ac_tool_prefix"; then
4419   # Extract the first word of "objdump", so it can be a program name with args.
4420 set dummy objdump; ac_word=$2
4421 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4422 echo "configure:4423: checking for $ac_word" >&5
4423 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4424   echo $ac_n "(cached) $ac_c" 1>&6
4425 else
4426   if test -n "$OBJDUMP"; then
4427   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4428 else
4429   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4430   ac_dummy="$PATH"
4431   for ac_dir in $ac_dummy; do
4432     test -z "$ac_dir" && ac_dir=.
4433     if test -f $ac_dir/$ac_word; then
4434       ac_cv_prog_OBJDUMP="objdump"
4435       break
4436     fi
4437   done
4438   IFS="$ac_save_ifs"
4439   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4440 fi
4441 fi
4442 OBJDUMP="$ac_cv_prog_OBJDUMP"
4443 if test -n "$OBJDUMP"; then
4444   echo "$ac_t""$OBJDUMP" 1>&6
4445 else
4446   echo "$ac_t""no" 1>&6
4447 fi
4448
4449 else
4450   OBJDUMP="false"
4451 fi
4452 fi
4453
4454
4455   # recent cygwin and mingw systems supply a stub DllMain which the user
4456   # can override, but on older systems we have to supply one
4457   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4458 echo "configure:4459: checking if libtool should supply DllMain function" >&5
4459 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4460   echo $ac_n "(cached) $ac_c" 1>&6
4461 else
4462   cat > conftest.$ac_ext <<EOF
4463 #line 4464 "configure"
4464 #include "confdefs.h"
4465
4466 int main() {
4467 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4468       DllMain (0, 0, 0);
4469 ; return 0; }
4470 EOF
4471 if { (eval echo configure:4472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4472   rm -rf conftest*
4473   lt_cv_need_dllmain=no
4474 else
4475   echo "configure: failed program was:" >&5
4476   cat conftest.$ac_ext >&5
4477   rm -rf conftest*
4478   lt_cv_need_dllmain=yes
4479 fi
4480 rm -f conftest*
4481 fi
4482
4483 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4484
4485   case $host/$CC in
4486   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4487     # old mingw systems require "-dll" to link a DLL, while more recent ones
4488     # require "-mdll"
4489     SAVE_CFLAGS="$CFLAGS"
4490     CFLAGS="$CFLAGS -mdll"
4491     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4492 echo "configure:4493: checking how to link DLLs" >&5
4493 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4494   echo $ac_n "(cached) $ac_c" 1>&6
4495 else
4496   cat > conftest.$ac_ext <<EOF
4497 #line 4498 "configure"
4498 #include "confdefs.h"
4499
4500 int main() {
4501
4502 ; return 0; }
4503 EOF
4504 if { (eval echo configure:4505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4505   rm -rf conftest*
4506   lt_cv_cc_dll_switch=-mdll
4507 else
4508   echo "configure: failed program was:" >&5
4509   cat conftest.$ac_ext >&5
4510   rm -rf conftest*
4511   lt_cv_cc_dll_switch=-dll
4512 fi
4513 rm -f conftest*
4514 fi
4515
4516 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4517     CFLAGS="$SAVE_CFLAGS" ;;
4518   *-*-cygwin* | *-*-pw32*)
4519     # cygwin systems need to pass --dll to the linker, and not link
4520     # crt.o which will require a WinMain@16 definition.
4521     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4522   esac
4523   ;;
4524   
4525 esac
4526
4527 # Sed substitution that helps us do robust quoting.  It backslashifies
4528 # metacharacters that are still active within double-quoted strings.
4529 Xsed='sed -e s/^X//'
4530 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4531
4532 # Same as above, but do not quote variable references.
4533 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4534
4535 # Sed substitution to delay expansion of an escaped shell variable in a
4536 # double_quote_subst'ed string.
4537 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4538
4539 # Constants:
4540 rm="rm -f"
4541
4542 # Global variables:
4543 default_ofile=libtool
4544 can_build_shared=yes
4545
4546 # All known linkers require a `.a' archive for static linking (except M$VC,
4547 # which needs '.lib').
4548 libext=a
4549 ltmain="$ac_aux_dir/ltmain.sh"
4550 ofile="$default_ofile"
4551 with_gnu_ld="$lt_cv_prog_gnu_ld"
4552 need_locks="$enable_libtool_lock"
4553
4554 old_CC="$CC"
4555 old_CFLAGS="$CFLAGS"
4556
4557 # Set sane defaults for various variables
4558 test -z "$AR" && AR=ar
4559 test -z "$AR_FLAGS" && AR_FLAGS=cru
4560 test -z "$AS" && AS=as
4561 test -z "$CC" && CC=cc
4562 test -z "$DLLTOOL" && DLLTOOL=dlltool
4563 test -z "$LD" && LD=ld
4564 test -z "$LN_S" && LN_S="ln -s"
4565 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4566 test -z "$NM" && NM=nm
4567 test -z "$OBJDUMP" && OBJDUMP=objdump
4568 test -z "$RANLIB" && RANLIB=:
4569 test -z "$STRIP" && STRIP=:
4570 test -z "$ac_objext" && ac_objext=o
4571
4572 if test x"$host" != x"$build"; then
4573   ac_tool_prefix=${host_alias}-
4574 else
4575   ac_tool_prefix=
4576 fi
4577
4578 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4579 case $host_os in
4580 linux-gnu*) ;;
4581 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4582 esac
4583
4584 case $host_os in
4585 aix3*)
4586   # AIX sometimes has problems with the GCC collect2 program.  For some
4587   # reason, if we set the COLLECT_NAMES environment variable, the problems
4588   # vanish in a puff of smoke.
4589   if test "X${COLLECT_NAMES+set}" != Xset; then
4590     COLLECT_NAMES=
4591     export COLLECT_NAMES
4592   fi
4593   ;;
4594 esac
4595
4596 # Determine commands to create old-style static archives.
4597 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4598 old_postinstall_cmds='chmod 644 $oldlib'
4599 old_postuninstall_cmds=
4600
4601 if test -n "$RANLIB"; then
4602   case $host_os in
4603   openbsd*)
4604     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4605     ;;
4606   *)
4607     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4608     ;;
4609   esac
4610   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4611 fi
4612
4613 # Allow CC to be a program name with arguments.
4614 set dummy $CC
4615 compiler="$2"
4616
4617 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4618 echo "configure:4619: checking for objdir" >&5
4619 rm -f .libs 2>/dev/null
4620 mkdir .libs 2>/dev/null
4621 if test -d .libs; then
4622   objdir=.libs
4623 else
4624   # MS-DOS does not allow filenames that begin with a dot.
4625   objdir=_libs
4626 fi
4627 rmdir .libs 2>/dev/null
4628 echo "$ac_t""$objdir" 1>&6
4629
4630
4631 # Check whether --with-pic or --without-pic was given.
4632 if test "${with_pic+set}" = set; then
4633   withval="$with_pic"
4634   pic_mode="$withval"
4635 else
4636   pic_mode=default
4637 fi
4638
4639 test -z "$pic_mode" && pic_mode=default
4640
4641 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4642 # in isolation, and that seeing it set (from the cache) indicates that
4643 # the associated values are set (in the cache) correctly too.
4644 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4645 echo "configure:4646: checking for $compiler option to produce PIC" >&5
4646 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4647   echo $ac_n "(cached) $ac_c" 1>&6
4648 else
4649    lt_cv_prog_cc_pic=
4650   lt_cv_prog_cc_shlib=
4651   lt_cv_prog_cc_wl=
4652   lt_cv_prog_cc_static=
4653   lt_cv_prog_cc_no_builtin=
4654   lt_cv_prog_cc_can_build_shared=$can_build_shared
4655
4656   if test "$GCC" = yes; then
4657     lt_cv_prog_cc_wl='-Wl,'
4658     lt_cv_prog_cc_static='-static'
4659
4660     case $host_os in
4661     aix*)
4662       # Below there is a dirty hack to force normal static linking with -ldl
4663       # The problem is because libdl dynamically linked with both libc and
4664       # libC (AIX C++ library), which obviously doesn't included in libraries
4665       # list by gcc. This cause undefined symbols with -static flags.
4666       # This hack allows C programs to be linked with "-static -ldl", but
4667       # not sure about C++ programs.
4668       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4669       ;;
4670     amigaos*)
4671       # FIXME: we need at least 68020 code to build shared libraries, but
4672       # adding the `-m68020' flag to GCC prevents building anything better,
4673       # like `-m68040'.
4674       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4675       ;;
4676     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4677       # PIC is the default for these OSes.
4678       ;;
4679     darwin* | rhapsody*)
4680       # PIC is the default on this platform
4681       # Common symbols not allowed in MH_DYLIB files
4682       lt_cv_prog_cc_pic='-fno-common'
4683       ;;
4684     cygwin* | mingw* | pw32* | os2*)
4685       # This hack is so that the source file can tell whether it is being
4686       # built for inclusion in a dll (and should export symbols for example).
4687       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4688       ;;
4689     sysv4*MP*)
4690       if test -d /usr/nec; then
4691          lt_cv_prog_cc_pic=-Kconform_pic
4692       fi
4693       ;;
4694     *)
4695       lt_cv_prog_cc_pic='-fPIC'
4696       ;;
4697     esac
4698   else
4699     # PORTME Check for PIC flags for the system compiler.
4700     case $host_os in
4701     aix3* | aix4* | aix5*)
4702       lt_cv_prog_cc_wl='-Wl,'
4703       # All AIX code is PIC.
4704       if test "$host_cpu" = ia64; then
4705         # AIX 5 now supports IA64 processor
4706         lt_cv_prog_cc_static='-Bstatic'
4707       else
4708         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4709       fi
4710       ;;
4711
4712     hpux9* | hpux10* | hpux11*)
4713       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4714       lt_cv_prog_cc_wl='-Wl,'
4715       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4716       lt_cv_prog_cc_pic='+Z'
4717       ;;
4718
4719     irix5* | irix6* | nonstopux*)
4720       lt_cv_prog_cc_wl='-Wl,'
4721       lt_cv_prog_cc_static='-non_shared'
4722       # PIC (with -KPIC) is the default.
4723       ;;
4724
4725     cygwin* | mingw* | pw32* | os2*)
4726       # This hack is so that the source file can tell whether it is being
4727       # built for inclusion in a dll (and should export symbols for example).
4728       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4729       ;;
4730
4731     newsos6)
4732       lt_cv_prog_cc_pic='-KPIC'
4733       lt_cv_prog_cc_static='-Bstatic'
4734       ;;
4735     
4736     openedition)
4737       # XPLINK code is PIC by default
4738       ;;
4739
4740     osf3* | osf4* | osf5*)
4741       # All OSF/1 code is PIC.
4742       lt_cv_prog_cc_wl='-Wl,'
4743       lt_cv_prog_cc_static='-non_shared'
4744       ;;
4745
4746     sco3.2v5*)
4747       lt_cv_prog_cc_pic='-Kpic'
4748       lt_cv_prog_cc_static='-dn'
4749       lt_cv_prog_cc_shlib='-belf'
4750       ;;
4751
4752     solaris*)
4753       lt_cv_prog_cc_pic='-KPIC'
4754       lt_cv_prog_cc_static='-Bstatic'
4755       lt_cv_prog_cc_wl='-Wl,'
4756       ;;
4757
4758     sunos4*)
4759       lt_cv_prog_cc_pic='-PIC'
4760       lt_cv_prog_cc_static='-Bstatic'
4761       lt_cv_prog_cc_wl='-Qoption ld '
4762       ;;
4763
4764     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4765       lt_cv_prog_cc_pic='-KPIC'
4766       lt_cv_prog_cc_static='-Bstatic'
4767       lt_cv_prog_cc_wl='-Wl,'
4768       ;;
4769
4770     uts4*)
4771       lt_cv_prog_cc_pic='-pic'
4772       lt_cv_prog_cc_static='-Bstatic'
4773       ;;
4774
4775     sysv4*MP*)
4776       if test -d /usr/nec ;then
4777         lt_cv_prog_cc_pic='-Kconform_pic'
4778         lt_cv_prog_cc_static='-Bstatic'
4779       fi
4780       ;;
4781
4782     *)
4783       lt_cv_prog_cc_can_build_shared=no
4784       ;;
4785     esac
4786   fi
4787
4788 fi
4789
4790 if test -z "$lt_cv_prog_cc_pic"; then
4791   echo "$ac_t""none" 1>&6
4792 else
4793   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
4794
4795   # Check to make sure the pic_flag actually works.
4796   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
4797 echo "configure:4798: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
4798   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
4799   echo $ac_n "(cached) $ac_c" 1>&6
4800 else
4801       save_CFLAGS="$CFLAGS"
4802     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
4803     cat > conftest.$ac_ext <<EOF
4804 #line 4805 "configure"
4805 #include "confdefs.h"
4806
4807 int main() {
4808
4809 ; return 0; }
4810 EOF
4811 if { (eval echo configure:4812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4812   rm -rf conftest*
4813         case $host_os in
4814       hpux9* | hpux10* | hpux11*)
4815         # On HP-UX, both CC and GCC only warn that PIC is supported... then
4816         # they create non-PIC objects.  So, if there were any warnings, we
4817         # assume that PIC is not supported.
4818         if test -s conftest.err; then
4819           lt_cv_prog_cc_pic_works=no
4820         else
4821           lt_cv_prog_cc_pic_works=yes
4822         fi
4823         ;;
4824       *)
4825         lt_cv_prog_cc_pic_works=yes
4826         ;;
4827       esac
4828     
4829 else
4830   echo "configure: failed program was:" >&5
4831   cat conftest.$ac_ext >&5
4832   rm -rf conftest*
4833         lt_cv_prog_cc_pic_works=no
4834     
4835 fi
4836 rm -f conftest*
4837     CFLAGS="$save_CFLAGS"
4838   
4839 fi
4840
4841
4842   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
4843     lt_cv_prog_cc_pic=
4844     lt_cv_prog_cc_can_build_shared=no
4845   else
4846     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
4847   fi
4848
4849   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
4850 fi
4851
4852 # Check for any special shared library compilation flags.
4853 if test -n "$lt_cv_prog_cc_shlib"; then
4854   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
4855   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
4856   else
4857    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
4858     lt_cv_prog_cc_can_build_shared=no
4859   fi
4860 fi
4861
4862 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
4863 echo "configure:4864: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
4864 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
4865   echo $ac_n "(cached) $ac_c" 1>&6
4866 else
4867     lt_cv_prog_cc_static_works=no
4868   save_LDFLAGS="$LDFLAGS"
4869   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
4870   cat > conftest.$ac_ext <<EOF
4871 #line 4872 "configure"
4872 #include "confdefs.h"
4873
4874 int main() {
4875
4876 ; return 0; }
4877 EOF
4878 if { (eval echo configure:4879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4879   rm -rf conftest*
4880   lt_cv_prog_cc_static_works=yes
4881 else
4882   echo "configure: failed program was:" >&5
4883   cat conftest.$ac_ext >&5
4884 fi
4885 rm -f conftest*
4886   LDFLAGS="$save_LDFLAGS"
4887
4888 fi
4889
4890
4891 # Belt *and* braces to stop my trousers falling down:
4892 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
4893 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
4894
4895 pic_flag="$lt_cv_prog_cc_pic"
4896 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
4897 wl="$lt_cv_prog_cc_wl"
4898 link_static_flag="$lt_cv_prog_cc_static"
4899 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
4900 can_build_shared="$lt_cv_prog_cc_can_build_shared"
4901
4902
4903 # Check to see if options -o and -c are simultaneously supported by compiler
4904 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
4905 echo "configure:4906: checking if $compiler supports -c -o file.$ac_objext" >&5
4906 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
4907   echo $ac_n "(cached) $ac_c" 1>&6
4908 else
4909   
4910 $rm -r conftest 2>/dev/null
4911 mkdir conftest
4912 cd conftest
4913 echo "int some_variable = 0;" > conftest.$ac_ext
4914 mkdir out
4915 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
4916 # that will create temporary files in the current directory regardless of
4917 # the output directory.  Thus, making CWD read-only will cause this test
4918 # to fail, enabling locking or at least warning the user not to do parallel
4919 # builds.
4920 chmod -w .
4921 save_CFLAGS="$CFLAGS"
4922 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
4923 compiler_c_o=no
4924 if { (eval echo configure:4925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
4925   # The compiler can only warn and ignore the option if not recognized
4926   # So say no if there are warnings
4927   if test -s out/conftest.err; then
4928     lt_cv_compiler_c_o=no
4929   else
4930     lt_cv_compiler_c_o=yes
4931   fi
4932 else
4933   # Append any errors to the config.log.
4934   cat out/conftest.err 1>&5
4935   lt_cv_compiler_c_o=no
4936 fi
4937 CFLAGS="$save_CFLAGS"
4938 chmod u+w .
4939 $rm conftest* out/*
4940 rmdir out
4941 cd ..
4942 rmdir conftest
4943 $rm -r conftest 2>/dev/null
4944
4945 fi
4946
4947 compiler_c_o=$lt_cv_compiler_c_o
4948 echo "$ac_t""$compiler_c_o" 1>&6
4949
4950 if test x"$compiler_c_o" = x"yes"; then
4951   # Check to see if we can write to a .lo
4952   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
4953 echo "configure:4954: checking if $compiler supports -c -o file.lo" >&5
4954   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
4955   echo $ac_n "(cached) $ac_c" 1>&6
4956 else
4957   
4958   lt_cv_compiler_o_lo=no
4959   save_CFLAGS="$CFLAGS"
4960   CFLAGS="$CFLAGS -c -o conftest.lo"
4961   save_objext="$ac_objext"
4962   ac_objext=lo
4963   cat > conftest.$ac_ext <<EOF
4964 #line 4965 "configure"
4965 #include "confdefs.h"
4966
4967 int main() {
4968 int some_variable = 0;
4969 ; return 0; }
4970 EOF
4971 if { (eval echo configure:4972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4972   rm -rf conftest*
4973       # The compiler can only warn and ignore the option if not recognized
4974     # So say no if there are warnings
4975     if test -s conftest.err; then
4976       lt_cv_compiler_o_lo=no
4977     else
4978       lt_cv_compiler_o_lo=yes
4979     fi
4980   
4981 else
4982   echo "configure: failed program was:" >&5
4983   cat conftest.$ac_ext >&5
4984 fi
4985 rm -f conftest*
4986   ac_objext="$save_objext"
4987   CFLAGS="$save_CFLAGS"
4988   
4989 fi
4990
4991   compiler_o_lo=$lt_cv_compiler_o_lo
4992   echo "$ac_t""$compiler_o_lo" 1>&6
4993 else
4994   compiler_o_lo=no
4995 fi
4996
4997 # Check to see if we can do hard links to lock some files if needed
4998 hard_links="nottested"
4999 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5000   # do not overwrite the value of need_locks provided by the user
5001   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5002 echo "configure:5003: checking if we can lock with hard links" >&5
5003   hard_links=yes
5004   $rm conftest*
5005   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5006   touch conftest.a
5007   ln conftest.a conftest.b 2>&5 || hard_links=no
5008   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5009   echo "$ac_t""$hard_links" 1>&6
5010   if test "$hard_links" = no; then
5011     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5012     need_locks=warn
5013   fi
5014 else
5015   need_locks=no
5016 fi
5017
5018 if test "$GCC" = yes; then
5019   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5020   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5021 echo "configure:5022: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5022   echo "int some_variable = 0;" > conftest.$ac_ext
5023   save_CFLAGS="$CFLAGS"
5024   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5025   compiler_rtti_exceptions=no
5026   cat > conftest.$ac_ext <<EOF
5027 #line 5028 "configure"
5028 #include "confdefs.h"
5029
5030 int main() {
5031 int some_variable = 0;
5032 ; return 0; }
5033 EOF
5034 if { (eval echo configure:5035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5035   rm -rf conftest*
5036       # The compiler can only warn and ignore the option if not recognized
5037     # So say no if there are warnings
5038     if test -s conftest.err; then
5039       compiler_rtti_exceptions=no
5040     else
5041       compiler_rtti_exceptions=yes
5042     fi
5043   
5044 else
5045   echo "configure: failed program was:" >&5
5046   cat conftest.$ac_ext >&5
5047 fi
5048 rm -f conftest*
5049   CFLAGS="$save_CFLAGS"
5050   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5051
5052   if test "$compiler_rtti_exceptions" = "yes"; then
5053     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5054   else
5055     no_builtin_flag=' -fno-builtin'
5056   fi
5057 fi
5058
5059 # See if the linker supports building shared libraries.
5060 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5061 echo "configure:5062: checking whether the linker ($LD) supports shared libraries" >&5
5062
5063 allow_undefined_flag=
5064 no_undefined_flag=
5065 need_lib_prefix=unknown
5066 need_version=unknown
5067 # when you set need_version to no, make sure it does not cause -set_version
5068 # flags to be left without arguments
5069 archive_cmds=
5070 archive_expsym_cmds=
5071 old_archive_from_new_cmds=
5072 old_archive_from_expsyms_cmds=
5073 export_dynamic_flag_spec=
5074 whole_archive_flag_spec=
5075 thread_safe_flag_spec=
5076 hardcode_into_libs=no
5077 hardcode_libdir_flag_spec=
5078 hardcode_libdir_separator=
5079 hardcode_direct=no
5080 hardcode_minus_L=no
5081 hardcode_shlibpath_var=unsupported
5082 runpath_var=
5083 link_all_deplibs=unknown
5084 always_export_symbols=no
5085 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5086 # include_expsyms should be a list of space-separated symbols to be *always*
5087 # included in the symbol list
5088 include_expsyms=
5089 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5090 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5091 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5092 # as well as any symbol that contains `d'.
5093 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5094 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5095 # platforms (ab)use it in PIC code, but their linkers get confused if
5096 # the symbol is explicitly referenced.  Since portable code cannot
5097 # rely on this symbol name, it's probably fine to never include it in
5098 # preloaded symbol tables.
5099 extract_expsyms_cmds=
5100
5101 case $host_os in
5102 cygwin* | mingw* | pw32*)
5103   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5104   # When not using gcc, we currently assume that we are using
5105   # Microsoft Visual C++.
5106   if test "$GCC" != yes; then
5107     with_gnu_ld=no
5108   fi
5109   ;;
5110 openbsd*)
5111   with_gnu_ld=no
5112   ;;
5113 esac
5114
5115 ld_shlibs=yes
5116 if test "$with_gnu_ld" = yes; then
5117   # If archive_cmds runs LD, not CC, wlarc should be empty
5118   wlarc='${wl}'
5119
5120   # See if GNU ld supports shared libraries.
5121   case $host_os in
5122   aix3* | aix4* | aix5*)
5123     # On AIX, the GNU linker is very broken
5124     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5125     ld_shlibs=no
5126     cat <<EOF 1>&2
5127
5128 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5129 *** to be unable to reliably create shared libraries on AIX.
5130 *** Therefore, libtool is disabling shared libraries support.  If you
5131 *** really care for shared libraries, you may want to modify your PATH
5132 *** so that a non-GNU linker is found, and then restart.
5133
5134 EOF
5135     ;;
5136
5137   amigaos*)
5138     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)'
5139     hardcode_libdir_flag_spec='-L$libdir'
5140     hardcode_minus_L=yes
5141
5142     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5143     # that the semantics of dynamic libraries on AmigaOS, at least up
5144     # to version 4, is to share data among multiple programs linked
5145     # with the same dynamic library.  Since this doesn't match the
5146     # behavior of shared libraries on other platforms, we can use
5147     # them.
5148     ld_shlibs=no
5149     ;;
5150
5151   beos*)
5152     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5153       allow_undefined_flag=unsupported
5154       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5155       # support --undefined.  This deserves some investigation.  FIXME
5156       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5157     else
5158       ld_shlibs=no
5159     fi
5160     ;;
5161
5162   cygwin* | mingw* | pw32*)
5163     # hardcode_libdir_flag_spec is actually meaningless, as there is
5164     # no search path for DLLs.
5165     hardcode_libdir_flag_spec='-L$libdir'
5166     allow_undefined_flag=unsupported
5167     always_export_symbols=yes
5168
5169     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5170       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5171       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5172       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5173       else $CC -o impgen impgen.c ; fi)~
5174       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5175
5176     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5177
5178     # cygwin and mingw dlls have different entry points and sets of symbols
5179     # to exclude.
5180     # FIXME: what about values for MSVC?
5181     dll_entry=__cygwin_dll_entry@12
5182     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5183     case $host_os in
5184     mingw*)
5185       # mingw values
5186       dll_entry=_DllMainCRTStartup@12
5187       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5188       ;;
5189     esac
5190
5191     # mingw and cygwin differ, and it's simplest to just exclude the union
5192     # of the two symbol sets.
5193     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5194
5195     # recent cygwin and mingw systems supply a stub DllMain which the user
5196     # can override, but on older systems we have to supply one (in ltdll.c)
5197     if test "x$lt_cv_need_dllmain" = "xyes"; then
5198       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5199       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~
5200         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5201     else
5202       ltdll_obj=
5203       ltdll_cmds=
5204     fi
5205
5206     # Extract the symbol export list from an `--export-all' def file,
5207     # then regenerate the def file from the symbol export list, so that
5208     # the compiled dll only exports the symbol export list.
5209     # Be careful not to strip the DATA tag left be newer dlltools.
5210     export_symbols_cmds="$ltdll_cmds"'
5211       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5212       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5213
5214     # If the export-symbols file already is a .def file (1st line
5215     # is EXPORTS), use it as is.
5216     # If DATA tags from a recent dlltool are present, honour them!
5217     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5218         cp $export_symbols $output_objdir/$soname-def;
5219       else
5220         echo EXPORTS > $output_objdir/$soname-def;
5221         _lt_hint=1;
5222         cat $export_symbols | while read symbol; do
5223          set dummy \$symbol;
5224          case \$# in
5225            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5226            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5227            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5228          esac;
5229          _lt_hint=`expr 1 + \$_lt_hint`;
5230         done;
5231       fi~
5232       '"$ltdll_cmds"'
5233       $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~
5234       $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~
5235       $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~
5236       $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~
5237       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5238     ;;
5239
5240   netbsd*)
5241     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5242       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5243       wlarc=
5244     else
5245       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5246       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5247     fi
5248     ;;
5249
5250   solaris* | sysv5*)
5251     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5252       ld_shlibs=no
5253       cat <<EOF 1>&2
5254
5255 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5256 *** create shared libraries on Solaris systems.  Therefore, libtool
5257 *** is disabling shared libraries support.  We urge you to upgrade GNU
5258 *** binutils to release 2.9.1 or newer.  Another option is to modify
5259 *** your PATH or compiler configuration so that the native linker is
5260 *** used, and then restart.
5261
5262 EOF
5263     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5264       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5265       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5266     else
5267       ld_shlibs=no
5268     fi
5269     ;;
5270
5271   sunos4*)
5272     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5273     wlarc=
5274     hardcode_direct=yes
5275     hardcode_shlibpath_var=no
5276     ;;
5277
5278   *)
5279     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5280       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5281       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5282     else
5283       ld_shlibs=no
5284     fi
5285     ;;
5286   esac
5287
5288   if test "$ld_shlibs" = yes; then
5289     runpath_var=LD_RUN_PATH
5290     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5291     export_dynamic_flag_spec='${wl}--export-dynamic'
5292     case $host_os in
5293     cygwin* | mingw* | pw32*)
5294       # dlltool doesn't understand --whole-archive et. al.
5295       whole_archive_flag_spec=
5296       ;;
5297     *)
5298       # ancient GNU ld didn't support --whole-archive et. al.
5299       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5300         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5301       else
5302         whole_archive_flag_spec=
5303       fi
5304       ;;
5305     esac
5306   fi
5307 else
5308   # PORTME fill in a description of your system's linker (not GNU ld)
5309   case $host_os in
5310   aix3*)
5311     allow_undefined_flag=unsupported
5312     always_export_symbols=yes
5313     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'
5314     # Note: this linker hardcodes the directories in LIBPATH if there
5315     # are no directories specified by -L.
5316     hardcode_minus_L=yes
5317     if test "$GCC" = yes && test -z "$link_static_flag"; then
5318       # Neither direct hardcoding nor static linking is supported with a
5319       # broken collect2.
5320       hardcode_direct=unsupported
5321     fi
5322     ;;
5323
5324   aix4* | aix5*)
5325     if test "$host_cpu" = ia64; then
5326       # On IA64, the linker does run time linking by default, so we don't
5327       # have to do anything special.
5328       aix_use_runtimelinking=no
5329       exp_sym_flag='-Bexport'
5330       no_entry_flag=""
5331     else
5332       aix_use_runtimelinking=no
5333
5334       # Test if we are trying to use run time linking or normal
5335       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5336       # need to do runtime linking.
5337       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5338         for ld_flag in $LDFLAGS; do
5339           case $ld_flag in
5340           *-brtl*)
5341             aix_use_runtimelinking=yes
5342             break
5343           ;;
5344           esac
5345         done
5346       esac
5347
5348       exp_sym_flag='-bexport'
5349       no_entry_flag='-bnoentry'
5350     fi
5351
5352     # When large executables or shared objects are built, AIX ld can
5353     # have problems creating the table of contents.  If linking a library
5354     # or program results in "error TOC overflow" add -mminimal-toc to
5355     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5356     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5357
5358     hardcode_direct=yes
5359     archive_cmds=''
5360     hardcode_libdir_separator=':'
5361     if test "$GCC" = yes; then
5362       case $host_os in aix4.[012]|aix4.[012].*)
5363         collect2name=`${CC} -print-prog-name=collect2`
5364         if test -f "$collect2name" && \
5365           strings "$collect2name" | grep resolve_lib_name >/dev/null
5366         then
5367           # We have reworked collect2
5368           hardcode_direct=yes
5369         else
5370           # We have old collect2
5371           hardcode_direct=unsupported
5372           # It fails to find uninstalled libraries when the uninstalled
5373           # path is not listed in the libpath.  Setting hardcode_minus_L
5374           # to unsupported forces relinking
5375           hardcode_minus_L=yes
5376           hardcode_libdir_flag_spec='-L$libdir'
5377           hardcode_libdir_separator=
5378         fi
5379       esac
5380
5381       shared_flag='-shared'
5382     else
5383       # not using gcc
5384       if test "$host_cpu" = ia64; then
5385         shared_flag='${wl}-G'
5386       else
5387         if test "$aix_use_runtimelinking" = yes; then
5388           shared_flag='${wl}-G'
5389         else
5390           shared_flag='${wl}-bM:SRE'
5391         fi
5392       fi
5393     fi
5394
5395     # It seems that -bexpall can do strange things, so it is better to
5396     # generate a list of symbols to export.
5397     always_export_symbols=yes
5398     if test "$aix_use_runtimelinking" = yes; then
5399       # Warning - without using the other runtime loading flags (-brtl),
5400       # -berok will link without error, but may produce a broken library.
5401       allow_undefined_flag='-berok'
5402       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5403       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"
5404     else
5405       if test "$host_cpu" = ia64; then
5406         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5407         allow_undefined_flag="-z nodefs"
5408         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"
5409       else
5410         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5411         # Warning - without using the other run time loading flags,
5412         # -berok will link without error, but may produce a broken library.
5413         allow_undefined_flag='${wl}-berok'
5414         # This is a bit strange, but is similar to how AIX traditionally builds
5415         # it's shared libraries.
5416         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'
5417       fi
5418     fi
5419     ;;
5420
5421   amigaos*)
5422     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)'
5423     hardcode_libdir_flag_spec='-L$libdir'
5424     hardcode_minus_L=yes
5425     # see comment about different semantics on the GNU ld section
5426     ld_shlibs=no
5427     ;;
5428
5429   cygwin* | mingw* | pw32*)
5430     # When not using gcc, we currently assume that we are using
5431     # Microsoft Visual C++.
5432     # hardcode_libdir_flag_spec is actually meaningless, as there is
5433     # no search path for DLLs.
5434     hardcode_libdir_flag_spec=' '
5435     allow_undefined_flag=unsupported
5436     # Tell ltmain to make .lib files, not .a files.
5437     libext=lib
5438     # FIXME: Setting linknames here is a bad hack.
5439     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5440     # The linker will automatically build a .lib file if we build a DLL.
5441     old_archive_from_new_cmds='true'
5442     # FIXME: Should let the user specify the lib program.
5443     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5444     fix_srcfile_path='`cygpath -w "$srcfile"`'
5445     ;;
5446
5447   darwin* | rhapsody*)
5448     case "$host_os" in
5449     rhapsody* | darwin1.[012])
5450       allow_undefined_flag='-undefined suppress'
5451       ;;
5452     *) # Darwin 1.3 on
5453       allow_undefined_flag='-flat_namespace -undefined suppress'
5454       ;;
5455     esac
5456     # FIXME: Relying on posixy $() will cause problems for
5457     #        cross-compilation, but unfortunately the echo tests do not
5458     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5459     #        `"' quotes if we put them in here... so don't!
5460     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)'
5461     # We need to add '_' to the symbols in $export_symbols first
5462     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5463     hardcode_direct=yes
5464     hardcode_shlibpath_var=no
5465     whole_archive_flag_spec='-all_load $convenience'
5466     ;;
5467
5468   freebsd1*)
5469     ld_shlibs=no
5470     ;;
5471
5472   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5473   # support.  Future versions do this automatically, but an explicit c++rt0.o
5474   # does not break anything, and helps significantly (at the cost of a little
5475   # extra space).
5476   freebsd2.2*)
5477     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5478     hardcode_libdir_flag_spec='-R$libdir'
5479     hardcode_direct=yes
5480     hardcode_shlibpath_var=no
5481     ;;
5482
5483   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5484   freebsd2*)
5485     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5486     hardcode_direct=yes
5487     hardcode_minus_L=yes
5488     hardcode_shlibpath_var=no
5489     ;;
5490
5491   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5492   freebsd*)
5493     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5494     hardcode_libdir_flag_spec='-R$libdir'
5495     hardcode_direct=yes
5496     hardcode_shlibpath_var=no
5497     ;;
5498
5499   hpux9* | hpux10* | hpux11*)
5500     case $host_os in
5501     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' ;;
5502     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5503     esac
5504     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5505     hardcode_libdir_separator=:
5506     hardcode_direct=yes
5507     hardcode_minus_L=yes # Not in the search PATH, but as the default
5508                          # location of the library.
5509     export_dynamic_flag_spec='${wl}-E'
5510     ;;
5511
5512   irix5* | irix6* | nonstopux*)
5513     if test "$GCC" = yes; then
5514       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'
5515       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5516     else
5517       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'
5518       hardcode_libdir_flag_spec='-rpath $libdir'
5519     fi
5520     hardcode_libdir_separator=:
5521     link_all_deplibs=yes
5522     ;;
5523
5524   netbsd*)
5525     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5526       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5527     else
5528       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5529     fi
5530     hardcode_libdir_flag_spec='-R$libdir'
5531     hardcode_direct=yes
5532     hardcode_shlibpath_var=no
5533     ;;
5534
5535   newsos6)
5536     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5537     hardcode_direct=yes
5538     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5539     hardcode_libdir_separator=:
5540     hardcode_shlibpath_var=no
5541     ;;
5542
5543   openbsd*)
5544     hardcode_direct=yes
5545     hardcode_shlibpath_var=no
5546     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5547       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5548       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5549       export_dynamic_flag_spec='${wl}-E'
5550     else
5551       case "$host_os" in
5552       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5553         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5554         hardcode_libdir_flag_spec='-R$libdir'
5555         ;;
5556       *)
5557         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5558         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5559         ;;
5560       esac
5561     fi
5562     ;;
5563
5564   openedition*)
5565     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5566         cp \$linknames \$output_objdir && linknames=''"
5567     export_dynamic_flag_spec="-Wl,DLL"
5568     ;;
5569
5570   os2*)
5571     hardcode_libdir_flag_spec='-L$libdir'
5572     hardcode_minus_L=yes
5573     allow_undefined_flag=unsupported
5574     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'
5575     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5576     ;;
5577
5578   osf3*)
5579     if test "$GCC" = yes; then
5580       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5581       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'
5582     else
5583       allow_undefined_flag=' -expect_unresolved \*'
5584       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'
5585     fi
5586     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5587     hardcode_libdir_separator=:
5588     ;;
5589
5590   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5591     if test "$GCC" = yes; then
5592       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5593       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'
5594       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5595     else
5596       allow_undefined_flag=' -expect_unresolved \*'
5597       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'
5598       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5599       $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'
5600
5601       #Both c and cxx compiler support -rpath directly
5602       hardcode_libdir_flag_spec='-rpath $libdir'
5603     fi
5604     hardcode_libdir_separator=:
5605     ;;
5606
5607   sco3.2v5*)
5608     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5609     hardcode_shlibpath_var=no
5610     runpath_var=LD_RUN_PATH
5611     hardcode_runpath_var=yes
5612     export_dynamic_flag_spec='${wl}-Bexport'
5613     ;;
5614
5615   solaris*)
5616     # gcc --version < 3.0 without binutils cannot create self contained
5617     # shared libraries reliably, requiring libgcc.a to resolve some of
5618     # the object symbols generated in some cases.  Libraries that use
5619     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5620     # a copy of libgcc.a into every shared library to guarantee resolving
5621     # such symbols causes other problems:  According to Tim Van Holder
5622     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5623     # (to the application) exception stack for one thing.
5624     no_undefined_flag=' -z defs'
5625     if test "$GCC" = yes; then
5626       case `$CC --version 2>/dev/null` in
5627       [12].*)
5628         cat <<EOF 1>&2
5629
5630 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5631 *** create self contained shared libraries on Solaris systems, without
5632 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5633 *** -no-undefined support, which will at least allow you to build shared
5634 *** libraries.  However, you may find that when you link such libraries
5635 *** into an application without using GCC, you have to manually add
5636 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5637 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5638 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5639
5640 EOF
5641         no_undefined_flag=
5642         ;;
5643       esac
5644     fi
5645     # $CC -shared without GNU ld will not create a library from C++
5646     # object files and a static libstdc++, better avoid it by now
5647     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5648     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5649                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5650     hardcode_libdir_flag_spec='-R$libdir'
5651     hardcode_shlibpath_var=no
5652     case $host_os in
5653     solaris2.[0-5] | solaris2.[0-5].*) ;;
5654     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5655       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5656     esac
5657     link_all_deplibs=yes
5658     ;;
5659
5660   sunos4*)
5661     if test "x$host_vendor" = xsequent; then
5662       # Use $CC to link under sequent, because it throws in some extra .o
5663       # files that make .init and .fini sections work.
5664       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5665     else
5666       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5667     fi
5668     hardcode_libdir_flag_spec='-L$libdir'
5669     hardcode_direct=yes
5670     hardcode_minus_L=yes
5671     hardcode_shlibpath_var=no
5672     ;;
5673
5674   sysv4)
5675     case $host_vendor in
5676       sni)
5677         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5678         hardcode_direct=yes # is this really true???
5679         ;;
5680       siemens)
5681         ## LD is ld it makes a PLAMLIB
5682         ## CC just makes a GrossModule.
5683         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5684         reload_cmds='$CC -r -o $output$reload_objs'
5685         hardcode_direct=no
5686         ;;
5687       motorola)
5688         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5689         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5690         ;;
5691     esac
5692     runpath_var='LD_RUN_PATH'
5693     hardcode_shlibpath_var=no
5694     ;;
5695
5696   sysv4.3*)
5697     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5698     hardcode_shlibpath_var=no
5699     export_dynamic_flag_spec='-Bexport'
5700     ;;
5701
5702   sysv5*)
5703     no_undefined_flag=' -z text'
5704     # $CC -shared without GNU ld will not create a library from C++
5705     # object files and a static libstdc++, better avoid it by now
5706     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5707     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5708                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5709     hardcode_libdir_flag_spec=
5710     hardcode_shlibpath_var=no
5711     runpath_var='LD_RUN_PATH'
5712     ;;
5713
5714   uts4*)
5715     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5716     hardcode_libdir_flag_spec='-L$libdir'
5717     hardcode_shlibpath_var=no
5718     ;;
5719
5720   dgux*)
5721     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5722     hardcode_libdir_flag_spec='-L$libdir'
5723     hardcode_shlibpath_var=no
5724     ;;
5725
5726   sysv4*MP*)
5727     if test -d /usr/nec; then
5728       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5729       hardcode_shlibpath_var=no
5730       runpath_var=LD_RUN_PATH
5731       hardcode_runpath_var=yes
5732       ld_shlibs=yes
5733     fi
5734     ;;
5735
5736   sysv4.2uw2*)
5737     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5738     hardcode_direct=yes
5739     hardcode_minus_L=no
5740     hardcode_shlibpath_var=no
5741     hardcode_runpath_var=yes
5742     runpath_var=LD_RUN_PATH
5743     ;;
5744
5745   sysv5uw7* | unixware7*)
5746     no_undefined_flag='${wl}-z ${wl}text'
5747     if test "$GCC" = yes; then
5748       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5749     else
5750       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5751     fi
5752     runpath_var='LD_RUN_PATH'
5753     hardcode_shlibpath_var=no
5754     ;;
5755
5756   *)
5757     ld_shlibs=no
5758     ;;
5759   esac
5760 fi
5761 echo "$ac_t""$ld_shlibs" 1>&6
5762 test "$ld_shlibs" = no && can_build_shared=no
5763
5764 # Check hardcoding attributes.
5765 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
5766 echo "configure:5767: checking how to hardcode library paths into programs" >&5
5767 hardcode_action=
5768 if test -n "$hardcode_libdir_flag_spec" || \
5769    test -n "$runpath_var"; then
5770
5771   # We can hardcode non-existant directories.
5772   if test "$hardcode_direct" != no &&
5773      # If the only mechanism to avoid hardcoding is shlibpath_var, we
5774      # have to relink, otherwise we might link with an installed library
5775      # when we should be linking with a yet-to-be-installed one
5776      ## test "$hardcode_shlibpath_var" != no &&
5777      test "$hardcode_minus_L" != no; then
5778     # Linking always hardcodes the temporary library directory.
5779     hardcode_action=relink
5780   else
5781     # We can link without hardcoding, and we can hardcode nonexisting dirs.
5782     hardcode_action=immediate
5783   fi
5784 else
5785   # We cannot hardcode anything, or else we can only hardcode existing
5786   # directories.
5787   hardcode_action=unsupported
5788 fi
5789 echo "$ac_t""$hardcode_action" 1>&6
5790
5791 striplib=
5792 old_striplib=
5793 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
5794 echo "configure:5795: checking whether stripping libraries is possible" >&5
5795 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
5796   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
5797   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
5798   echo "$ac_t""yes" 1>&6
5799 else
5800   echo "$ac_t""no" 1>&6
5801 fi
5802
5803 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5804 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5805
5806 # PORTME Fill in your ld.so characteristics
5807 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
5808 echo "configure:5809: checking dynamic linker characteristics" >&5
5809 library_names_spec=
5810 libname_spec='lib$name'
5811 soname_spec=
5812 postinstall_cmds=
5813 postuninstall_cmds=
5814 finish_cmds=
5815 finish_eval=
5816 shlibpath_var=
5817 shlibpath_overrides_runpath=unknown
5818 version_type=none
5819 dynamic_linker="$host_os ld.so"
5820 sys_lib_dlsearch_path_spec="/lib /usr/lib"
5821 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
5822
5823 case $host_os in
5824 aix3*)
5825   version_type=linux
5826   library_names_spec='${libname}${release}.so$versuffix $libname.a'
5827   shlibpath_var=LIBPATH
5828
5829   # AIX has no versioning support, so we append a major version to the name.
5830   soname_spec='${libname}${release}.so$major'
5831   ;;
5832
5833 aix4* | aix5*)
5834   version_type=linux
5835   need_lib_prefix=no
5836   need_version=no
5837   hardcode_into_libs=yes
5838   if test "$host_cpu" = ia64; then
5839     # AIX 5 supports IA64
5840     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
5841     shlibpath_var=LD_LIBRARY_PATH
5842   else
5843     # With GCC up to 2.95.x, collect2 would create an import file
5844     # for dependence libraries.  The import file would start with
5845     # the line `#! .'.  This would cause the generated library to
5846     # depend on `.', always an invalid library.  This was fixed in
5847     # development snapshots of GCC prior to 3.0.
5848     case $host_os in
5849       aix4 | aix4.[01] | aix4.[01].*)
5850         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
5851              echo ' yes '
5852              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
5853           :
5854         else
5855           can_build_shared=no
5856         fi
5857         ;;
5858     esac
5859     # AIX (on Power*) has no versioning support, so currently we can
5860     # not hardcode correct soname into executable. Probably we can
5861     # add versioning support to collect2, so additional links can
5862     # be useful in future.
5863     if test "$aix_use_runtimelinking" = yes; then
5864       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
5865       # instead of lib<name>.a to let people know that these are not
5866       # typical AIX shared libraries.
5867       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5868     else
5869       # We preserve .a as extension for shared libraries through AIX4.2
5870       # and later when we are not doing run time linking.
5871       library_names_spec='${libname}${release}.a $libname.a'
5872       soname_spec='${libname}${release}.so$major'
5873     fi
5874     shlibpath_var=LIBPATH
5875   fi
5876   hardcode_into_libs=yes
5877   ;;
5878
5879 amigaos*)
5880   library_names_spec='$libname.ixlibrary $libname.a'
5881   # Create ${libname}_ixlibrary.a entries in /sys/libs.
5882   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'
5883   ;;
5884
5885 beos*)
5886   library_names_spec='${libname}.so'
5887   dynamic_linker="$host_os ld.so"
5888   shlibpath_var=LIBRARY_PATH
5889   ;;
5890
5891 bsdi4*)
5892   version_type=linux
5893   need_version=no
5894   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5895   soname_spec='${libname}${release}.so$major'
5896   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
5897   shlibpath_var=LD_LIBRARY_PATH
5898   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
5899   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
5900   export_dynamic_flag_spec=-rdynamic
5901   # the default ld.so.conf also contains /usr/contrib/lib and
5902   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
5903   # libtool to hard-code these into programs
5904   ;;
5905
5906 cygwin* | mingw* | pw32*)
5907   version_type=windows
5908   need_version=no
5909   need_lib_prefix=no
5910   case $GCC,$host_os in
5911   yes,cygwin*)
5912     library_names_spec='$libname.dll.a'
5913     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
5914     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
5915       dldir=$destdir/`dirname \$dlpath`~
5916       test -d \$dldir || mkdir -p \$dldir~
5917       $install_prog .libs/$dlname \$dldir/$dlname'
5918     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
5919       dlpath=$dir/\$dldll~
5920        $rm \$dlpath'
5921     ;;
5922   yes,mingw*)
5923     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
5924     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
5925     ;;
5926   yes,pw32*)
5927     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
5928     ;;
5929   *)
5930     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
5931     ;;
5932   esac
5933   dynamic_linker='Win32 ld.exe'
5934   # FIXME: first we should search . and the directory the executable is in
5935   shlibpath_var=PATH
5936   ;;
5937
5938 darwin* | rhapsody*)
5939   dynamic_linker="$host_os dyld"
5940   version_type=darwin
5941   need_lib_prefix=no
5942   need_version=no
5943   # FIXME: Relying on posixy $() will cause problems for
5944   #        cross-compilation, but unfortunately the echo tests do not
5945   #        yet detect zsh echo's removal of \ escapes.
5946   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)'
5947   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
5948   shlibpath_overrides_runpath=yes
5949   shlibpath_var=DYLD_LIBRARY_PATH
5950   ;;
5951
5952 freebsd1*)
5953   dynamic_linker=no
5954   ;;
5955
5956 freebsd*)
5957   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
5958   version_type=freebsd-$objformat
5959   case $version_type in
5960     freebsd-elf*)
5961       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
5962       need_version=no
5963       need_lib_prefix=no
5964       ;;
5965     freebsd-*)
5966       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
5967       need_version=yes
5968       ;;
5969   esac
5970   shlibpath_var=LD_LIBRARY_PATH
5971   case $host_os in
5972   freebsd2*)
5973     shlibpath_overrides_runpath=yes
5974     ;;
5975   *)
5976     shlibpath_overrides_runpath=no
5977     hardcode_into_libs=yes
5978     ;;
5979   esac
5980   ;;
5981
5982 gnu*)
5983   version_type=linux
5984   need_lib_prefix=no
5985   need_version=no
5986   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
5987   soname_spec='${libname}${release}.so$major'
5988   shlibpath_var=LD_LIBRARY_PATH
5989   hardcode_into_libs=yes
5990   ;;
5991
5992 hpux9* | hpux10* | hpux11*)
5993   # Give a soname corresponding to the major version so that dld.sl refuses to
5994   # link against other versions.
5995   dynamic_linker="$host_os dld.sl"
5996   version_type=sunos
5997   need_lib_prefix=no
5998   need_version=no
5999   shlibpath_var=SHLIB_PATH
6000   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6001   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6002   soname_spec='${libname}${release}.sl$major'
6003   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6004   postinstall_cmds='chmod 555 $lib'
6005   ;;
6006
6007 irix5* | irix6* | nonstopux*)
6008   case $host_os in
6009     nonstopux*) version_type=nonstopux ;;
6010     *)          version_type=irix ;;
6011   esac
6012   need_lib_prefix=no
6013   need_version=no
6014   soname_spec='${libname}${release}.so$major'
6015   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6016   case $host_os in
6017   irix5* | nonstopux*)
6018     libsuff= shlibsuff=
6019     ;;
6020   *)
6021     case $LD in # libtool.m4 will add one of these switches to LD
6022     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6023     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6024     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6025     *) libsuff= shlibsuff= libmagic=never-match;;
6026     esac
6027     ;;
6028   esac
6029   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6030   shlibpath_overrides_runpath=no
6031   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6032   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6033   ;;
6034
6035 # No shared lib support for Linux oldld, aout, or coff.
6036 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6037   dynamic_linker=no
6038   ;;
6039
6040 # This must be Linux ELF.
6041 linux-gnu*)
6042   version_type=linux
6043   need_lib_prefix=no
6044   need_version=no
6045   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6046   soname_spec='${libname}${release}.so$major'
6047   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6048   shlibpath_var=LD_LIBRARY_PATH
6049   shlibpath_overrides_runpath=no
6050   # This implies no fast_install, which is unacceptable.
6051   # Some rework will be needed to allow for fast_install
6052   # before this can be enabled.
6053   hardcode_into_libs=yes
6054
6055   # We used to test for /lib/ld.so.1 and disable shared libraries on
6056   # powerpc, because MkLinux only supported shared libraries with the
6057   # GNU dynamic linker.  Since this was broken with cross compilers,
6058   # most powerpc-linux boxes support dynamic linking these days and
6059   # people can always --disable-shared, the test was removed, and we
6060   # assume the GNU/Linux dynamic linker is in use.
6061   dynamic_linker='GNU/Linux ld.so'
6062   ;;
6063
6064 netbsd*)
6065   version_type=sunos
6066   need_lib_prefix=no
6067   need_version=no
6068   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6069     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6070     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6071     dynamic_linker='NetBSD (a.out) ld.so'
6072   else
6073     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6074     soname_spec='${libname}${release}.so$major'
6075     dynamic_linker='NetBSD ld.elf_so'
6076   fi
6077   shlibpath_var=LD_LIBRARY_PATH
6078   shlibpath_overrides_runpath=yes
6079   hardcode_into_libs=yes
6080   ;;
6081
6082 newsos6)
6083   version_type=linux
6084   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6085   shlibpath_var=LD_LIBRARY_PATH
6086   shlibpath_overrides_runpath=yes
6087   ;;
6088
6089 openbsd*)
6090   version_type=sunos
6091   need_lib_prefix=no
6092   need_version=no
6093   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6094     case "$host_os" in
6095     openbsd2.[89] | openbsd2.[89].*)
6096       shlibpath_overrides_runpath=no
6097       ;;
6098     *)
6099       shlibpath_overrides_runpath=yes
6100       ;;
6101     esac
6102   else
6103     shlibpath_overrides_runpath=yes
6104   fi
6105   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6106   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6107   shlibpath_var=LD_LIBRARY_PATH
6108   ;;
6109
6110 openedition*)
6111   need_lib_prefix=no
6112   need_version=no
6113   shlibpath_overrides_runpath=yes
6114   shlibpath_var=LIBPATH
6115   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6116   # the library's exports are in libname.x; this is the file that must
6117   # actually be linked with to use a DLL.
6118   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6119   ;;
6120
6121 os2*)
6122   libname_spec='$name'
6123   need_lib_prefix=no
6124   library_names_spec='$libname.dll $libname.a'
6125   dynamic_linker='OS/2 ld.exe'
6126   shlibpath_var=LIBPATH
6127   ;;
6128
6129 osf3* | osf4* | osf5*)
6130   version_type=osf
6131   need_version=no
6132   soname_spec='${libname}${release}.so$major'
6133   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6134   shlibpath_var=LD_LIBRARY_PATH
6135   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6136   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6137   hardcode_into_libs=yes
6138   ;;
6139
6140 sco3.2v5*)
6141   version_type=osf
6142   soname_spec='${libname}${release}.so$major'
6143   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6144   shlibpath_var=LD_LIBRARY_PATH
6145   ;;
6146
6147 solaris*)
6148   version_type=linux
6149   need_lib_prefix=no
6150   need_version=no
6151   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6152   soname_spec='${libname}${release}.so$major'
6153   shlibpath_var=LD_LIBRARY_PATH
6154   shlibpath_overrides_runpath=yes
6155   hardcode_into_libs=yes
6156   # ldd complains unless libraries are executable
6157   postinstall_cmds='chmod +x $lib'
6158   ;;
6159
6160 sunos4*)
6161   version_type=sunos
6162   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6163   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6164   shlibpath_var=LD_LIBRARY_PATH
6165   shlibpath_overrides_runpath=yes
6166   if test "$with_gnu_ld" = yes; then
6167     need_lib_prefix=no
6168   fi
6169   need_version=yes
6170   ;;
6171
6172 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6173   version_type=linux
6174   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6175   soname_spec='${libname}${release}.so$major'
6176   shlibpath_var=LD_LIBRARY_PATH
6177   case $host_vendor in
6178     sni)
6179       shlibpath_overrides_runpath=no
6180       need_lib_prefix=no
6181       export_dynamic_flag_spec='${wl}-Blargedynsym'
6182       runpath_var=LD_RUN_PATH
6183       ;;
6184     siemens)
6185       need_lib_prefix=no
6186       ;;
6187     motorola)
6188       need_lib_prefix=no
6189       need_version=no
6190       shlibpath_overrides_runpath=no
6191       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6192       ;;
6193   esac
6194   ;;
6195
6196 uts4*)
6197   version_type=linux
6198   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6199   soname_spec='${libname}${release}.so$major'
6200   shlibpath_var=LD_LIBRARY_PATH
6201   ;;
6202
6203 dgux*)
6204   version_type=linux
6205   need_lib_prefix=no
6206   need_version=no
6207   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6208   soname_spec='${libname}${release}.so$major'
6209   shlibpath_var=LD_LIBRARY_PATH
6210   ;;
6211
6212 sysv4*MP*)
6213   if test -d /usr/nec ;then
6214     version_type=linux
6215     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6216     soname_spec='$libname.so.$major'
6217     shlibpath_var=LD_LIBRARY_PATH
6218   fi
6219   ;;
6220
6221 *)
6222   dynamic_linker=no
6223   ;;
6224 esac
6225 echo "$ac_t""$dynamic_linker" 1>&6
6226 test "$dynamic_linker" = no && can_build_shared=no
6227
6228 # Report the final consequences.
6229 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6230 echo "configure:6231: checking if libtool supports shared libraries" >&5
6231 echo "$ac_t""$can_build_shared" 1>&6
6232
6233 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6234 echo "configure:6235: checking whether to build shared libraries" >&5
6235 test "$can_build_shared" = "no" && enable_shared=no
6236
6237 # On AIX, shared libraries and static libraries use the same namespace, and
6238 # are all built from PIC.
6239 case "$host_os" in
6240 aix3*)
6241   test "$enable_shared" = yes && enable_static=no
6242   if test -n "$RANLIB"; then
6243     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6244     postinstall_cmds='$RANLIB $lib'
6245   fi
6246   ;;
6247
6248 aix4*)
6249   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6250     test "$enable_shared" = yes && enable_static=no
6251   fi
6252   ;;
6253 esac
6254 echo "$ac_t""$enable_shared" 1>&6
6255
6256 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6257 echo "configure:6258: checking whether to build static libraries" >&5
6258 # Make sure either enable_shared or enable_static is yes.
6259 test "$enable_shared" = yes || enable_static=yes
6260 echo "$ac_t""$enable_static" 1>&6
6261
6262 if test "$hardcode_action" = relink; then
6263   # Fast installation is not supported
6264   enable_fast_install=no
6265 elif test "$shlibpath_overrides_runpath" = yes ||
6266      test "$enable_shared" = no; then
6267   # Fast installation is not necessary
6268   enable_fast_install=needless
6269 fi
6270
6271 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6272 if test "$GCC" = yes; then
6273   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6274 fi
6275
6276 if test "x$enable_dlopen" != xyes; then
6277   enable_dlopen=unknown
6278   enable_dlopen_self=unknown
6279   enable_dlopen_self_static=unknown
6280 else
6281   lt_cv_dlopen=no
6282   lt_cv_dlopen_libs=
6283
6284   case $host_os in
6285   beos*)
6286     lt_cv_dlopen="load_add_on"
6287     lt_cv_dlopen_libs=
6288     lt_cv_dlopen_self=yes
6289     ;;
6290
6291   cygwin* | mingw* | pw32*)
6292     lt_cv_dlopen="LoadLibrary"
6293     lt_cv_dlopen_libs=
6294    ;;
6295
6296   *)
6297     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6298 echo "configure:6299: checking for dllload" >&5
6299 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6300   echo $ac_n "(cached) $ac_c" 1>&6
6301 else
6302   cat > conftest.$ac_ext <<EOF
6303 #line 6304 "configure"
6304 #include "confdefs.h"
6305 /* System header to define __stub macros and hopefully few prototypes,
6306     which can conflict with char dllload(); below.  */
6307 #include <assert.h>
6308 /* Override any gcc2 internal prototype to avoid an error.  */
6309 /* We use char because int might match the return type of a gcc2
6310     builtin and then its argument prototype would still apply.  */
6311 char dllload();
6312 char (*f)();
6313
6314 int main() {
6315
6316 /* The GNU C library defines this for functions which it implements
6317     to always fail with ENOSYS.  Some functions are actually named
6318     something starting with __ and the normal name is an alias.  */
6319 #if defined (__stub_dllload) || defined (__stub___dllload)
6320 choke me
6321 #else
6322 f = dllload;
6323 #endif
6324
6325 ; return 0; }
6326 EOF
6327 if { (eval echo configure:6328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6328   rm -rf conftest*
6329   eval "ac_cv_func_dllload=yes"
6330 else
6331   echo "configure: failed program was:" >&5
6332   cat conftest.$ac_ext >&5
6333   rm -rf conftest*
6334   eval "ac_cv_func_dllload=no"
6335 fi
6336 rm -f conftest*
6337 fi
6338
6339 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6340   echo "$ac_t""yes" 1>&6
6341   lt_cv_dlopen="dllload"
6342 else
6343   echo "$ac_t""no" 1>&6
6344 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6345 echo "configure:6346: checking for shl_load" >&5
6346 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6347   echo $ac_n "(cached) $ac_c" 1>&6
6348 else
6349   cat > conftest.$ac_ext <<EOF
6350 #line 6351 "configure"
6351 #include "confdefs.h"
6352 /* System header to define __stub macros and hopefully few prototypes,
6353     which can conflict with char shl_load(); below.  */
6354 #include <assert.h>
6355 /* Override any gcc2 internal prototype to avoid an error.  */
6356 /* We use char because int might match the return type of a gcc2
6357     builtin and then its argument prototype would still apply.  */
6358 char shl_load();
6359 char (*f)();
6360
6361 int main() {
6362
6363 /* The GNU C library defines this for functions which it implements
6364     to always fail with ENOSYS.  Some functions are actually named
6365     something starting with __ and the normal name is an alias.  */
6366 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6367 choke me
6368 #else
6369 f = shl_load;
6370 #endif
6371
6372 ; return 0; }
6373 EOF
6374 if { (eval echo configure:6375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6375   rm -rf conftest*
6376   eval "ac_cv_func_shl_load=yes"
6377 else
6378   echo "configure: failed program was:" >&5
6379   cat conftest.$ac_ext >&5
6380   rm -rf conftest*
6381   eval "ac_cv_func_shl_load=no"
6382 fi
6383 rm -f conftest*
6384 fi
6385
6386 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6387   echo "$ac_t""yes" 1>&6
6388   lt_cv_dlopen="shl_load"
6389 else
6390   echo "$ac_t""no" 1>&6
6391 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6392 echo "configure:6393: checking for shl_load in -ldld" >&5
6393 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6394 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6395   echo $ac_n "(cached) $ac_c" 1>&6
6396 else
6397   ac_save_LIBS="$LIBS"
6398 LIBS="-ldld  $LIBS"
6399 cat > conftest.$ac_ext <<EOF
6400 #line 6401 "configure"
6401 #include "confdefs.h"
6402 /* Override any gcc2 internal prototype to avoid an error.  */
6403 /* We use char because int might match the return type of a gcc2
6404     builtin and then its argument prototype would still apply.  */
6405 char shl_load();
6406
6407 int main() {
6408 shl_load()
6409 ; return 0; }
6410 EOF
6411 if { (eval echo configure:6412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6412   rm -rf conftest*
6413   eval "ac_cv_lib_$ac_lib_var=yes"
6414 else
6415   echo "configure: failed program was:" >&5
6416   cat conftest.$ac_ext >&5
6417   rm -rf conftest*
6418   eval "ac_cv_lib_$ac_lib_var=no"
6419 fi
6420 rm -f conftest*
6421 LIBS="$ac_save_LIBS"
6422
6423 fi
6424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6425   echo "$ac_t""yes" 1>&6
6426   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6427 else
6428   echo "$ac_t""no" 1>&6
6429 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6430 echo "configure:6431: checking for dlopen" >&5
6431 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6432   echo $ac_n "(cached) $ac_c" 1>&6
6433 else
6434   cat > conftest.$ac_ext <<EOF
6435 #line 6436 "configure"
6436 #include "confdefs.h"
6437 /* System header to define __stub macros and hopefully few prototypes,
6438     which can conflict with char dlopen(); below.  */
6439 #include <assert.h>
6440 /* Override any gcc2 internal prototype to avoid an error.  */
6441 /* We use char because int might match the return type of a gcc2
6442     builtin and then its argument prototype would still apply.  */
6443 char dlopen();
6444 char (*f)();
6445
6446 int main() {
6447
6448 /* The GNU C library defines this for functions which it implements
6449     to always fail with ENOSYS.  Some functions are actually named
6450     something starting with __ and the normal name is an alias.  */
6451 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6452 choke me
6453 #else
6454 f = dlopen;
6455 #endif
6456
6457 ; return 0; }
6458 EOF
6459 if { (eval echo configure:6460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6460   rm -rf conftest*
6461   eval "ac_cv_func_dlopen=yes"
6462 else
6463   echo "configure: failed program was:" >&5
6464   cat conftest.$ac_ext >&5
6465   rm -rf conftest*
6466   eval "ac_cv_func_dlopen=no"
6467 fi
6468 rm -f conftest*
6469 fi
6470
6471 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6472   echo "$ac_t""yes" 1>&6
6473   lt_cv_dlopen="dlopen"
6474 else
6475   echo "$ac_t""no" 1>&6
6476 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6477 echo "configure:6478: checking for dlopen in -ldl" >&5
6478 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6479 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6480   echo $ac_n "(cached) $ac_c" 1>&6
6481 else
6482   ac_save_LIBS="$LIBS"
6483 LIBS="-ldl  $LIBS"
6484 cat > conftest.$ac_ext <<EOF
6485 #line 6486 "configure"
6486 #include "confdefs.h"
6487 /* Override any gcc2 internal prototype to avoid an error.  */
6488 /* We use char because int might match the return type of a gcc2
6489     builtin and then its argument prototype would still apply.  */
6490 char dlopen();
6491
6492 int main() {
6493 dlopen()
6494 ; return 0; }
6495 EOF
6496 if { (eval echo configure:6497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6497   rm -rf conftest*
6498   eval "ac_cv_lib_$ac_lib_var=yes"
6499 else
6500   echo "configure: failed program was:" >&5
6501   cat conftest.$ac_ext >&5
6502   rm -rf conftest*
6503   eval "ac_cv_lib_$ac_lib_var=no"
6504 fi
6505 rm -f conftest*
6506 LIBS="$ac_save_LIBS"
6507
6508 fi
6509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6510   echo "$ac_t""yes" 1>&6
6511   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6512 else
6513   echo "$ac_t""no" 1>&6
6514 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6515 echo "configure:6516: checking for dlopen in -lsvld" >&5
6516 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6517 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6518   echo $ac_n "(cached) $ac_c" 1>&6
6519 else
6520   ac_save_LIBS="$LIBS"
6521 LIBS="-lsvld  $LIBS"
6522 cat > conftest.$ac_ext <<EOF
6523 #line 6524 "configure"
6524 #include "confdefs.h"
6525 /* Override any gcc2 internal prototype to avoid an error.  */
6526 /* We use char because int might match the return type of a gcc2
6527     builtin and then its argument prototype would still apply.  */
6528 char dlopen();
6529
6530 int main() {
6531 dlopen()
6532 ; return 0; }
6533 EOF
6534 if { (eval echo configure:6535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6535   rm -rf conftest*
6536   eval "ac_cv_lib_$ac_lib_var=yes"
6537 else
6538   echo "configure: failed program was:" >&5
6539   cat conftest.$ac_ext >&5
6540   rm -rf conftest*
6541   eval "ac_cv_lib_$ac_lib_var=no"
6542 fi
6543 rm -f conftest*
6544 LIBS="$ac_save_LIBS"
6545
6546 fi
6547 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6548   echo "$ac_t""yes" 1>&6
6549   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6550 else
6551   echo "$ac_t""no" 1>&6
6552 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6553 echo "configure:6554: checking for dld_link in -ldld" >&5
6554 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6555 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6556   echo $ac_n "(cached) $ac_c" 1>&6
6557 else
6558   ac_save_LIBS="$LIBS"
6559 LIBS="-ldld  $LIBS"
6560 cat > conftest.$ac_ext <<EOF
6561 #line 6562 "configure"
6562 #include "confdefs.h"
6563 /* Override any gcc2 internal prototype to avoid an error.  */
6564 /* We use char because int might match the return type of a gcc2
6565     builtin and then its argument prototype would still apply.  */
6566 char dld_link();
6567
6568 int main() {
6569 dld_link()
6570 ; return 0; }
6571 EOF
6572 if { (eval echo configure:6573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6573   rm -rf conftest*
6574   eval "ac_cv_lib_$ac_lib_var=yes"
6575 else
6576   echo "configure: failed program was:" >&5
6577   cat conftest.$ac_ext >&5
6578   rm -rf conftest*
6579   eval "ac_cv_lib_$ac_lib_var=no"
6580 fi
6581 rm -f conftest*
6582 LIBS="$ac_save_LIBS"
6583
6584 fi
6585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6586   echo "$ac_t""yes" 1>&6
6587   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6588 else
6589   echo "$ac_t""no" 1>&6
6590 fi
6591
6592               
6593 fi
6594
6595             
6596 fi
6597
6598           
6599 fi
6600
6601         
6602 fi
6603
6604       
6605 fi
6606
6607     
6608 fi
6609
6610     ;;
6611   esac
6612
6613   if test "x$lt_cv_dlopen" != xno; then
6614     enable_dlopen=yes
6615   else
6616     enable_dlopen=no
6617   fi
6618
6619   case $lt_cv_dlopen in
6620   dlopen)
6621     save_CPPFLAGS="$CPPFLAGS"
6622         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6623
6624     save_LDFLAGS="$LDFLAGS"
6625     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6626
6627     save_LIBS="$LIBS"
6628     LIBS="$lt_cv_dlopen_libs $LIBS"
6629
6630     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6631 echo "configure:6632: checking whether a program can dlopen itself" >&5
6632 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6633   echo $ac_n "(cached) $ac_c" 1>&6
6634 else
6635           if test "$cross_compiling" = yes; then :
6636   lt_cv_dlopen_self=cross
6637 else
6638     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6639   lt_status=$lt_dlunknown
6640   cat > conftest.$ac_ext <<EOF
6641 #line 6642 "configure"
6642 #include "confdefs.h"
6643
6644 #if HAVE_DLFCN_H
6645 #include <dlfcn.h>
6646 #endif
6647
6648 #include <stdio.h>
6649
6650 #ifdef RTLD_GLOBAL
6651 #  define LT_DLGLOBAL           RTLD_GLOBAL
6652 #else
6653 #  ifdef DL_GLOBAL
6654 #    define LT_DLGLOBAL         DL_GLOBAL
6655 #  else
6656 #    define LT_DLGLOBAL         0
6657 #  endif
6658 #endif
6659
6660 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6661    find out it does not work in some platform. */
6662 #ifndef LT_DLLAZY_OR_NOW
6663 #  ifdef RTLD_LAZY
6664 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6665 #  else
6666 #    ifdef DL_LAZY
6667 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6668 #    else
6669 #      ifdef RTLD_NOW
6670 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6671 #      else
6672 #        ifdef DL_NOW
6673 #          define LT_DLLAZY_OR_NOW      DL_NOW
6674 #        else
6675 #          define LT_DLLAZY_OR_NOW      0
6676 #        endif
6677 #      endif
6678 #    endif
6679 #  endif
6680 #endif
6681
6682 #ifdef __cplusplus
6683 extern "C" void exit (int);
6684 #endif
6685
6686 void fnord() { int i=42;}
6687 int main ()
6688 {
6689   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6690   int status = $lt_dlunknown;
6691
6692   if (self)
6693     {
6694       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6695       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6696       /* dlclose (self); */
6697     }
6698
6699     exit (status);
6700 }
6701 EOF
6702   if { (eval echo configure:6703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6703     (./conftest; exit; ) 2>/dev/null
6704     lt_status=$?
6705     case x$lt_status in
6706       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6707       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6708       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6709     esac
6710   else :
6711     # compilation failed
6712     lt_cv_dlopen_self=no
6713   fi
6714 fi
6715 rm -fr conftest*
6716
6717     
6718 fi
6719
6720 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6721
6722     if test "x$lt_cv_dlopen_self" = xyes; then
6723       LDFLAGS="$LDFLAGS $link_static_flag"
6724       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6725 echo "configure:6726: checking whether a statically linked program can dlopen itself" >&5
6726 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6727   echo $ac_n "(cached) $ac_c" 1>&6
6728 else
6729           if test "$cross_compiling" = yes; then :
6730   lt_cv_dlopen_self_static=cross
6731 else
6732     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6733   lt_status=$lt_dlunknown
6734   cat > conftest.$ac_ext <<EOF
6735 #line 6736 "configure"
6736 #include "confdefs.h"
6737
6738 #if HAVE_DLFCN_H
6739 #include <dlfcn.h>
6740 #endif
6741
6742 #include <stdio.h>
6743
6744 #ifdef RTLD_GLOBAL
6745 #  define LT_DLGLOBAL           RTLD_GLOBAL
6746 #else
6747 #  ifdef DL_GLOBAL
6748 #    define LT_DLGLOBAL         DL_GLOBAL
6749 #  else
6750 #    define LT_DLGLOBAL         0
6751 #  endif
6752 #endif
6753
6754 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6755    find out it does not work in some platform. */
6756 #ifndef LT_DLLAZY_OR_NOW
6757 #  ifdef RTLD_LAZY
6758 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6759 #  else
6760 #    ifdef DL_LAZY
6761 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6762 #    else
6763 #      ifdef RTLD_NOW
6764 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6765 #      else
6766 #        ifdef DL_NOW
6767 #          define LT_DLLAZY_OR_NOW      DL_NOW
6768 #        else
6769 #          define LT_DLLAZY_OR_NOW      0
6770 #        endif
6771 #      endif
6772 #    endif
6773 #  endif
6774 #endif
6775
6776 #ifdef __cplusplus
6777 extern "C" void exit (int);
6778 #endif
6779
6780 void fnord() { int i=42;}
6781 int main ()
6782 {
6783   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6784   int status = $lt_dlunknown;
6785
6786   if (self)
6787     {
6788       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6789       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6790       /* dlclose (self); */
6791     }
6792
6793     exit (status);
6794 }
6795 EOF
6796   if { (eval echo configure:6797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6797     (./conftest; exit; ) 2>/dev/null
6798     lt_status=$?
6799     case x$lt_status in
6800       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6801       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6802       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6803     esac
6804   else :
6805     # compilation failed
6806     lt_cv_dlopen_self_static=no
6807   fi
6808 fi
6809 rm -fr conftest*
6810
6811       
6812 fi
6813
6814 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
6815     fi
6816
6817     CPPFLAGS="$save_CPPFLAGS"
6818     LDFLAGS="$save_LDFLAGS"
6819     LIBS="$save_LIBS"
6820     ;;
6821   esac
6822
6823   case $lt_cv_dlopen_self in
6824   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6825   *) enable_dlopen_self=unknown ;;
6826   esac
6827
6828   case $lt_cv_dlopen_self_static in
6829   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6830   *) enable_dlopen_self_static=unknown ;;
6831   esac
6832 fi
6833
6834
6835 if test "$enable_shared" = yes && test "$GCC" = yes; then
6836   case $archive_cmds in
6837   *'~'*)
6838     # FIXME: we may have to deal with multi-command sequences.
6839     ;;
6840   '$CC '*)
6841     # Test whether the compiler implicitly links with -lc since on some
6842     # systems, -lgcc has to come before -lc. If gcc already passes -lc
6843     # to ld, don't add -lc before -lgcc.
6844     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
6845 echo "configure:6846: checking whether -lc should be explicitly linked in" >&5
6846     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
6847   echo $ac_n "(cached) $ac_c" 1>&6
6848 else
6849   $rm conftest*
6850     echo 'static int dummy;' > conftest.$ac_ext
6851
6852     if { (eval echo configure:6853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6853       soname=conftest
6854       lib=conftest
6855       libobjs=conftest.$ac_objext
6856       deplibs=
6857       wl=$lt_cv_prog_cc_wl
6858       compiler_flags=-v
6859       linker_flags=-v
6860       verstring=
6861       output_objdir=.
6862       libname=conftest
6863       save_allow_undefined_flag=$allow_undefined_flag
6864       allow_undefined_flag=
6865       if { (eval echo configure:6866: \"$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; }
6866       then
6867         lt_cv_archive_cmds_need_lc=no
6868       else
6869         lt_cv_archive_cmds_need_lc=yes
6870       fi
6871       allow_undefined_flag=$save_allow_undefined_flag
6872     else
6873       cat conftest.err 1>&5
6874     fi
6875 fi
6876
6877     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
6878     ;;
6879   esac
6880 fi
6881 need_lc=${lt_cv_archive_cmds_need_lc-yes}
6882
6883 # The second clause should only fire when bootstrapping the
6884 # libtool distribution, otherwise you forgot to ship ltmain.sh
6885 # with your package, and you will get complaints that there are
6886 # no rules to generate ltmain.sh.
6887 if test -f "$ltmain"; then
6888   :
6889 else
6890   # If there is no Makefile yet, we rely on a make rule to execute
6891   # `config.status --recheck' to rerun these tests and create the
6892   # libtool script then.
6893   test -f Makefile && make "$ltmain"
6894 fi
6895
6896 if test -f "$ltmain"; then
6897   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
6898   $rm -f "${ofile}T"
6899
6900   echo creating $ofile
6901
6902   # Now quote all the things that may contain metacharacters while being
6903   # careful not to overquote the AC_SUBSTed values.  We take copies of the
6904   # variables and quote the copies for generation of the libtool script.
6905   for var in echo old_CC old_CFLAGS SED \
6906     AR AR_FLAGS CC LD LN_S NM SHELL \
6907     reload_flag reload_cmds wl \
6908     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
6909     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
6910     library_names_spec soname_spec \
6911     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
6912     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
6913     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
6914     old_striplib striplib file_magic_cmd export_symbols_cmds \
6915     deplibs_check_method allow_undefined_flag no_undefined_flag \
6916     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
6917     global_symbol_to_c_name_address \
6918     hardcode_libdir_flag_spec hardcode_libdir_separator  \
6919     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
6920     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
6921
6922     case $var in
6923     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
6924     old_postinstall_cmds | old_postuninstall_cmds | \
6925     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
6926     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
6927     postinstall_cmds | postuninstall_cmds | \
6928     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
6929       # Double-quote double-evaled strings.
6930       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
6931       ;;
6932     *)
6933       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
6934       ;;
6935     esac
6936   done
6937
6938   cat <<__EOF__ > "${ofile}T"
6939 #! $SHELL
6940
6941 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
6942 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
6943 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
6944 #
6945 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
6946 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6947 #
6948 # This program is free software; you can redistribute it and/or modify
6949 # it under the terms of the GNU General Public License as published by
6950 # the Free Software Foundation; either version 2 of the License, or
6951 # (at your option) any later version.
6952 #
6953 # This program is distributed in the hope that it will be useful, but
6954 # WITHOUT ANY WARRANTY; without even the implied warranty of
6955 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6956 # General Public License for more details.
6957 #
6958 # You should have received a copy of the GNU General Public License
6959 # along with this program; if not, write to the Free Software
6960 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6961 #
6962 # As a special exception to the GNU General Public License, if you
6963 # distribute this file as part of a program that contains a
6964 # configuration script generated by Autoconf, you may include it under
6965 # the same distribution terms that you use for the rest of that program.
6966
6967 # A sed that does not truncate output.
6968 SED=$lt_SED
6969
6970 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
6971 Xsed="${SED} -e s/^X//"
6972
6973 # The HP-UX ksh and POSIX shell print the target directory to stdout
6974 # if CDPATH is set.
6975 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6976
6977 # ### BEGIN LIBTOOL CONFIG
6978
6979 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6980
6981 # Shell to use when invoking shell scripts.
6982 SHELL=$lt_SHELL
6983
6984 # Whether or not to build shared libraries.
6985 build_libtool_libs=$enable_shared
6986
6987 # Whether or not to build static libraries.
6988 build_old_libs=$enable_static
6989
6990 # Whether or not to add -lc for building shared libraries.
6991 build_libtool_need_lc=$need_lc
6992
6993 # Whether or not to optimize for fast installation.
6994 fast_install=$enable_fast_install
6995
6996 # The host system.
6997 host_alias=$host_alias
6998 host=$host
6999
7000 # An echo program that does not interpret backslashes.
7001 echo=$lt_echo
7002
7003 # The archiver.
7004 AR=$lt_AR
7005 AR_FLAGS=$lt_AR_FLAGS
7006
7007 # The default C compiler.
7008 CC=$lt_CC
7009
7010 # Is the compiler the GNU C compiler?
7011 with_gcc=$GCC
7012
7013 # The linker used to build libraries.
7014 LD=$lt_LD
7015
7016 # Whether we need hard or soft links.
7017 LN_S=$lt_LN_S
7018
7019 # A BSD-compatible nm program.
7020 NM=$lt_NM
7021
7022 # A symbol stripping program
7023 STRIP=$STRIP
7024
7025 # Used to examine libraries when file_magic_cmd begins "file"
7026 MAGIC_CMD=$MAGIC_CMD
7027
7028 # Used on cygwin: DLL creation program.
7029 DLLTOOL="$DLLTOOL"
7030
7031 # Used on cygwin: object dumper.
7032 OBJDUMP="$OBJDUMP"
7033
7034 # Used on cygwin: assembler.
7035 AS="$AS"
7036
7037 # The name of the directory that contains temporary libtool files.
7038 objdir=$objdir
7039
7040 # How to create reloadable object files.
7041 reload_flag=$lt_reload_flag
7042 reload_cmds=$lt_reload_cmds
7043
7044 # How to pass a linker flag through the compiler.
7045 wl=$lt_wl
7046
7047 # Object file suffix (normally "o").
7048 objext="$ac_objext"
7049
7050 # Old archive suffix (normally "a").
7051 libext="$libext"
7052
7053 # Executable file suffix (normally "").
7054 exeext="$exeext"
7055
7056 # Additional compiler flags for building library objects.
7057 pic_flag=$lt_pic_flag
7058 pic_mode=$pic_mode
7059
7060 # Does compiler simultaneously support -c and -o options?
7061 compiler_c_o=$lt_compiler_c_o
7062
7063 # Can we write directly to a .lo ?
7064 compiler_o_lo=$lt_compiler_o_lo
7065
7066 # Must we lock files when doing compilation ?
7067 need_locks=$lt_need_locks
7068
7069 # Do we need the lib prefix for modules?
7070 need_lib_prefix=$need_lib_prefix
7071
7072 # Do we need a version for libraries?
7073 need_version=$need_version
7074
7075 # Whether dlopen is supported.
7076 dlopen_support=$enable_dlopen
7077
7078 # Whether dlopen of programs is supported.
7079 dlopen_self=$enable_dlopen_self
7080
7081 # Whether dlopen of statically linked programs is supported.
7082 dlopen_self_static=$enable_dlopen_self_static
7083
7084 # Compiler flag to prevent dynamic linking.
7085 link_static_flag=$lt_link_static_flag
7086
7087 # Compiler flag to turn off builtin functions.
7088 no_builtin_flag=$lt_no_builtin_flag
7089
7090 # Compiler flag to allow reflexive dlopens.
7091 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7092
7093 # Compiler flag to generate shared objects directly from archives.
7094 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7095
7096 # Compiler flag to generate thread-safe objects.
7097 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7098
7099 # Library versioning type.
7100 version_type=$version_type
7101
7102 # Format of library name prefix.
7103 libname_spec=$lt_libname_spec
7104
7105 # List of archive names.  First name is the real one, the rest are links.
7106 # The last name is the one that the linker finds with -lNAME.
7107 library_names_spec=$lt_library_names_spec
7108
7109 # The coded name of the library, if different from the real name.
7110 soname_spec=$lt_soname_spec
7111
7112 # Commands used to build and install an old-style archive.
7113 RANLIB=$lt_RANLIB
7114 old_archive_cmds=$lt_old_archive_cmds
7115 old_postinstall_cmds=$lt_old_postinstall_cmds
7116 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7117
7118 # Create an old-style archive from a shared archive.
7119 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7120
7121 # Create a temporary old-style archive to link instead of a shared archive.
7122 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7123
7124 # Commands used to build and install a shared archive.
7125 archive_cmds=$lt_archive_cmds
7126 archive_expsym_cmds=$lt_archive_expsym_cmds
7127 postinstall_cmds=$lt_postinstall_cmds
7128 postuninstall_cmds=$lt_postuninstall_cmds
7129
7130 # Commands to strip libraries.
7131 old_striplib=$lt_old_striplib
7132 striplib=$lt_striplib
7133
7134 # Method to check whether dependent libraries are shared objects.
7135 deplibs_check_method=$lt_deplibs_check_method
7136
7137 # Command to use when deplibs_check_method == file_magic.
7138 file_magic_cmd=$lt_file_magic_cmd
7139
7140 # Flag that allows shared libraries with undefined symbols to be built.
7141 allow_undefined_flag=$lt_allow_undefined_flag
7142
7143 # Flag that forces no undefined symbols.
7144 no_undefined_flag=$lt_no_undefined_flag
7145
7146 # Commands used to finish a libtool library installation in a directory.
7147 finish_cmds=$lt_finish_cmds
7148
7149 # Same as above, but a single script fragment to be evaled but not shown.
7150 finish_eval=$lt_finish_eval
7151
7152 # Take the output of nm and produce a listing of raw symbols and C names.
7153 global_symbol_pipe=$lt_global_symbol_pipe
7154
7155 # Transform the output of nm in a proper C declaration
7156 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7157
7158 # Transform the output of nm in a C name address pair
7159 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7160
7161 # This is the shared library runtime path variable.
7162 runpath_var=$runpath_var
7163
7164 # This is the shared library path variable.
7165 shlibpath_var=$shlibpath_var
7166
7167 # Is shlibpath searched before the hard-coded library search path?
7168 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7169
7170 # How to hardcode a shared library path into an executable.
7171 hardcode_action=$hardcode_action
7172
7173 # Whether we should hardcode library paths into libraries.
7174 hardcode_into_libs=$hardcode_into_libs
7175
7176 # Flag to hardcode \$libdir into a binary during linking.
7177 # This must work even if \$libdir does not exist.
7178 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7179
7180 # Whether we need a single -rpath flag with a separated argument.
7181 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7182
7183 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7184 # resulting binary.
7185 hardcode_direct=$hardcode_direct
7186
7187 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7188 # resulting binary.
7189 hardcode_minus_L=$hardcode_minus_L
7190
7191 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7192 # the resulting binary.
7193 hardcode_shlibpath_var=$hardcode_shlibpath_var
7194
7195 # Variables whose values should be saved in libtool wrapper scripts and
7196 # restored at relink time.
7197 variables_saved_for_relink="$variables_saved_for_relink"
7198
7199 # Whether libtool must link a program against all its dependency libraries.
7200 link_all_deplibs=$link_all_deplibs
7201
7202 # Compile-time system search path for libraries
7203 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7204
7205 # Run-time system search path for libraries
7206 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7207
7208 # Fix the shell variable \$srcfile for the compiler.
7209 fix_srcfile_path="$fix_srcfile_path"
7210
7211 # Set to yes if exported symbols are required.
7212 always_export_symbols=$always_export_symbols
7213
7214 # The commands to list exported symbols.
7215 export_symbols_cmds=$lt_export_symbols_cmds
7216
7217 # The commands to extract the exported symbol list from a shared archive.
7218 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7219
7220 # Symbols that should not be listed in the preloaded symbols.
7221 exclude_expsyms=$lt_exclude_expsyms
7222
7223 # Symbols that must always be exported.
7224 include_expsyms=$lt_include_expsyms
7225
7226 # ### END LIBTOOL CONFIG
7227
7228 __EOF__
7229
7230   case $host_os in
7231   aix3*)
7232     cat <<\EOF >> "${ofile}T"
7233
7234 # AIX sometimes has problems with the GCC collect2 program.  For some
7235 # reason, if we set the COLLECT_NAMES environment variable, the problems
7236 # vanish in a puff of smoke.
7237 if test "X${COLLECT_NAMES+set}" != Xset; then
7238   COLLECT_NAMES=
7239   export COLLECT_NAMES
7240 fi
7241 EOF
7242     ;;
7243   esac
7244
7245   case $host_os in
7246   cygwin* | mingw* | pw32* | os2*)
7247     cat <<'EOF' >> "${ofile}T"
7248       # This is a source program that is used to create dlls on Windows
7249       # Don't remove nor modify the starting and closing comments
7250 # /* ltdll.c starts here */
7251 # #define WIN32_LEAN_AND_MEAN
7252 # #include <windows.h>
7253 # #undef WIN32_LEAN_AND_MEAN
7254 # #include <stdio.h>
7255 #
7256 # #ifndef __CYGWIN__
7257 # #  ifdef __CYGWIN32__
7258 # #    define __CYGWIN__ __CYGWIN32__
7259 # #  endif
7260 # #endif
7261 #
7262 # #ifdef __cplusplus
7263 # extern "C" {
7264 # #endif
7265 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7266 # #ifdef __cplusplus
7267 # }
7268 # #endif
7269 #
7270 # #ifdef __CYGWIN__
7271 # #include <cygwin/cygwin_dll.h>
7272 # DECLARE_CYGWIN_DLL( DllMain );
7273 # #endif
7274 # HINSTANCE __hDllInstance_base;
7275 #
7276 # BOOL APIENTRY
7277 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7278 # {
7279 #   __hDllInstance_base = hInst;
7280 #   return TRUE;
7281 # }
7282 # /* ltdll.c ends here */
7283         # This is a source program that is used to create import libraries
7284         # on Windows for dlls which lack them. Don't remove nor modify the
7285         # starting and closing comments
7286 # /* impgen.c starts here */
7287 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7288 #
7289 #  This file is part of GNU libtool.
7290 #
7291 #  This program is free software; you can redistribute it and/or modify
7292 #  it under the terms of the GNU General Public License as published by
7293 #  the Free Software Foundation; either version 2 of the License, or
7294 #  (at your option) any later version.
7295 #
7296 #  This program is distributed in the hope that it will be useful,
7297 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7298 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7299 #  GNU General Public License for more details.
7300 #
7301 #  You should have received a copy of the GNU General Public License
7302 #  along with this program; if not, write to the Free Software
7303 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7304 #  */
7305 #
7306 # #include <stdio.h>            /* for printf() */
7307 # #include <unistd.h>           /* for open(), lseek(), read() */
7308 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7309 # #include <string.h>           /* for strdup() */
7310 #
7311 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7312 # #ifndef O_BINARY
7313 # #define O_BINARY 0
7314 # #endif
7315 #
7316 # static unsigned int
7317 # pe_get16 (fd, offset)
7318 #      int fd;
7319 #      int offset;
7320 # {
7321 #   unsigned char b[2];
7322 #   lseek (fd, offset, SEEK_SET);
7323 #   read (fd, b, 2);
7324 #   return b[0] + (b[1]<<8);
7325 # }
7326 #
7327 # static unsigned int
7328 # pe_get32 (fd, offset)
7329 #     int fd;
7330 #     int offset;
7331 # {
7332 #   unsigned char b[4];
7333 #   lseek (fd, offset, SEEK_SET);
7334 #   read (fd, b, 4);
7335 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7336 # }
7337 #
7338 # static unsigned int
7339 # pe_as32 (ptr)
7340 #      void *ptr;
7341 # {
7342 #   unsigned char *b = ptr;
7343 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7344 # }
7345 #
7346 # int
7347 # main (argc, argv)
7348 #     int argc;
7349 #     char *argv[];
7350 # {
7351 #     int dll;
7352 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7353 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7354 #     unsigned long name_rvas, nexp;
7355 #     unsigned char *expdata, *erva;
7356 #     char *filename, *dll_name;
7357 #
7358 #     filename = argv[1];
7359 #
7360 #     dll = open(filename, O_RDONLY|O_BINARY);
7361 #     if (dll < 1)
7362 #       return 1;
7363 #
7364 #     dll_name = filename;
7365 #
7366 #     for (i=0; filename[i]; i++)
7367 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7368 #           dll_name = filename + i +1;
7369 #
7370 #     pe_header_offset = pe_get32 (dll, 0x3c);
7371 #     opthdr_ofs = pe_header_offset + 4 + 20;
7372 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7373 #
7374 #     if (num_entries < 1) /* no exports */
7375 #       return 1;
7376 #
7377 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7378 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7379 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7380 #     secptr = (pe_header_offset + 4 + 20 +
7381 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7382 #
7383 #     expptr = 0;
7384 #     for (i = 0; i < nsections; i++)
7385 #     {
7386 #       char sname[8];
7387 #       unsigned long secptr1 = secptr + 40 * i;
7388 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7389 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7390 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7391 #       lseek(dll, secptr1, SEEK_SET);
7392 #       read(dll, sname, 8);
7393 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7394 #       {
7395 #           expptr = fptr + (export_rva - vaddr);
7396 #           if (export_rva + export_size > vaddr + vsize)
7397 #               export_size = vsize - (export_rva - vaddr);
7398 #           break;
7399 #       }
7400 #     }
7401 #
7402 #     expdata = (unsigned char*)malloc(export_size);
7403 #     lseek (dll, expptr, SEEK_SET);
7404 #     read (dll, expdata, export_size);
7405 #     erva = expdata - export_rva;
7406 #
7407 #     nexp = pe_as32 (expdata+24);
7408 #     name_rvas = pe_as32 (expdata+32);
7409 #
7410 #     printf ("EXPORTS\n");
7411 #     for (i = 0; i<nexp; i++)
7412 #     {
7413 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7414 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7415 #     }
7416 #
7417 #     return 0;
7418 # }
7419 # /* impgen.c ends here */
7420
7421 EOF
7422     ;;
7423   esac
7424
7425   # We use sed instead of cat because bash on DJGPP gets confused if
7426   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7427   # text mode, it properly converts lines to CR/LF.  This bash problem
7428   # is reportedly fixed, but why not run on old versions too?
7429   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7430
7431   mv -f "${ofile}T" "$ofile" || \
7432     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7433   chmod +x "$ofile"
7434 fi
7435
7436
7437
7438
7439
7440 # This can be used to rebuild libtool when needed
7441 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7442
7443 # Always use our own libtool.
7444 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7445
7446 # Prevent multiple expansion
7447
7448
7449
7450 # test for ln hardlink support
7451 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7452 echo "configure:7453: checking whether ln works" >&5
7453 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7454   echo $ac_n "(cached) $ac_c" 1>&6
7455 else
7456   rm -f conftest.src conftest.dst
7457 echo "conftest" > conftest.src
7458 if ln conftest.src conftest.dst 2>/dev/null
7459 then
7460   ol_cv_prog_LN_H="ln"
7461 else
7462   ol_cv_prog_LN_H="cp"
7463 fi
7464 rm -f conftest.src conftest.dst
7465
7466 fi
7467 LN_H="$ol_cv_prog_LN_H"
7468 if test "$ol_cv_prog_LN_H" = "ln"; then
7469         echo "$ac_t""yes" 1>&6
7470 else
7471         echo "$ac_t""no" 1>&6
7472 fi
7473
7474 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7475 echo "configure:7476: checking whether ln -s works" >&5
7476 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7477   echo $ac_n "(cached) $ac_c" 1>&6
7478 else
7479   rm -f conftestdata
7480 if ln -s X conftestdata 2>/dev/null
7481 then
7482   rm -f conftestdata
7483   ac_cv_prog_LN_S="ln -s"
7484 else
7485   ac_cv_prog_LN_S=ln
7486 fi
7487 fi
7488 LN_S="$ac_cv_prog_LN_S"
7489 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7490   echo "$ac_t""yes" 1>&6
7491 else
7492   echo "$ac_t""no" 1>&6
7493 fi
7494
7495
7496 ol_link_perl=no
7497 if test $ol_enable_perl != no ; then
7498         # Extract the first word of "perl", so it can be a program name with args.
7499 set dummy perl; ac_word=$2
7500 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7501 echo "configure:7502: checking for $ac_word" >&5
7502 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7503   echo $ac_n "(cached) $ac_c" 1>&6
7504 else
7505   case "$PERLBIN" in
7506   /*)
7507   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7508   ;;
7509   ?:/*)
7510   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7511   ;;
7512   *)
7513   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7514   ac_dummy="$PATH"
7515   for ac_dir in $ac_dummy; do 
7516     test -z "$ac_dir" && ac_dir=.
7517     if test -f $ac_dir/$ac_word; then
7518       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7519       break
7520     fi
7521   done
7522   IFS="$ac_save_ifs"
7523   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7524   ;;
7525 esac
7526 fi
7527 PERLBIN="$ac_cv_path_PERLBIN"
7528 if test -n "$PERLBIN"; then
7529   echo "$ac_t""$PERLBIN" 1>&6
7530 else
7531   echo "$ac_t""no" 1>&6
7532 fi
7533
7534
7535         if test "no$PERLBIN" = "no" ; then
7536                 if test $ol_enable_perl = yes ; then
7537                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7538                 fi
7539
7540         else
7541                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7542                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7543
7544                 if test x"$ol_enable_perl" = "xyes" ; then
7545                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7546                 else
7547                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7548                 fi
7549                                 ol_link_perl=yes
7550         fi
7551 fi
7552
7553 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7554 echo "configure:7555: checking how to run the C preprocessor" >&5
7555 # On Suns, sometimes $CPP names a directory.
7556 if test -n "$CPP" && test -d "$CPP"; then
7557   CPP=
7558 fi
7559 if test -z "$CPP"; then
7560 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7561   echo $ac_n "(cached) $ac_c" 1>&6
7562 else
7563     # This must be in double quotes, not single quotes, because CPP may get
7564   # substituted into the Makefile and "${CC-cc}" will confuse make.
7565   CPP="${CC-cc} -E"
7566   # On the NeXT, cc -E runs the code through the compiler's parser,
7567   # not just through cpp.
7568   cat > conftest.$ac_ext <<EOF
7569 #line 7570 "configure"
7570 #include "confdefs.h"
7571 #include <assert.h>
7572 Syntax Error
7573 EOF
7574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7575 { (eval echo configure:7576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7577 if test -z "$ac_err"; then
7578   :
7579 else
7580   echo "$ac_err" >&5
7581   echo "configure: failed program was:" >&5
7582   cat conftest.$ac_ext >&5
7583   rm -rf conftest*
7584   CPP="${CC-cc} -E -traditional-cpp"
7585   cat > conftest.$ac_ext <<EOF
7586 #line 7587 "configure"
7587 #include "confdefs.h"
7588 #include <assert.h>
7589 Syntax Error
7590 EOF
7591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7592 { (eval echo configure:7593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7594 if test -z "$ac_err"; then
7595   :
7596 else
7597   echo "$ac_err" >&5
7598   echo "configure: failed program was:" >&5
7599   cat conftest.$ac_ext >&5
7600   rm -rf conftest*
7601   CPP="${CC-cc} -nologo -E"
7602   cat > conftest.$ac_ext <<EOF
7603 #line 7604 "configure"
7604 #include "confdefs.h"
7605 #include <assert.h>
7606 Syntax Error
7607 EOF
7608 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7609 { (eval echo configure:7610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7610 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7611 if test -z "$ac_err"; then
7612   :
7613 else
7614   echo "$ac_err" >&5
7615   echo "configure: failed program was:" >&5
7616   cat conftest.$ac_ext >&5
7617   rm -rf conftest*
7618   CPP=/lib/cpp
7619 fi
7620 rm -f conftest*
7621 fi
7622 rm -f conftest*
7623 fi
7624 rm -f conftest*
7625   ac_cv_prog_CPP="$CPP"
7626 fi
7627   CPP="$ac_cv_prog_CPP"
7628 else
7629   ac_cv_prog_CPP="$CPP"
7630 fi
7631 echo "$ac_t""$CPP" 1>&6
7632
7633
7634
7635 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7636 echo "configure:7637: checking for Cygwin environment" >&5
7637 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7638   echo $ac_n "(cached) $ac_c" 1>&6
7639 else
7640   cat > conftest.$ac_ext <<EOF
7641 #line 7642 "configure"
7642 #include "confdefs.h"
7643
7644 int main() {
7645
7646 #ifndef __CYGWIN__
7647 #define __CYGWIN__ __CYGWIN32__
7648 #endif
7649 return __CYGWIN__;
7650 ; return 0; }
7651 EOF
7652 if { (eval echo configure:7653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7653   rm -rf conftest*
7654   ac_cv_cygwin=yes
7655 else
7656   echo "configure: failed program was:" >&5
7657   cat conftest.$ac_ext >&5
7658   rm -rf conftest*
7659   ac_cv_cygwin=no
7660 fi
7661 rm -f conftest*
7662 fi
7663
7664 echo "$ac_t""$ac_cv_cygwin" 1>&6
7665 CYGWIN=
7666 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7667 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7668 echo "configure:7669: checking for mingw32 environment" >&5
7669 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7670   echo $ac_n "(cached) $ac_c" 1>&6
7671 else
7672   cat > conftest.$ac_ext <<EOF
7673 #line 7674 "configure"
7674 #include "confdefs.h"
7675
7676 int main() {
7677 return __MINGW32__;
7678 ; return 0; }
7679 EOF
7680 if { (eval echo configure:7681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7681   rm -rf conftest*
7682   ac_cv_mingw32=yes
7683 else
7684   echo "configure: failed program was:" >&5
7685   cat conftest.$ac_ext >&5
7686   rm -rf conftest*
7687   ac_cv_mingw32=no
7688 fi
7689 rm -f conftest*
7690 fi
7691
7692 echo "$ac_t""$ac_cv_mingw32" 1>&6
7693 MINGW32=
7694 test "$ac_cv_mingw32" = yes && MINGW32=yes
7695
7696
7697
7698 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7699 echo "configure:7700: checking for executable suffix" >&5
7700 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7701   echo $ac_n "(cached) $ac_c" 1>&6
7702 else
7703   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7704   ac_cv_exeext=.exe
7705 else
7706   rm -f conftest*
7707   echo 'int main () { return 0; }' > conftest.$ac_ext
7708   ac_cv_exeext=
7709   if { (eval echo configure:7710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7710     for file in conftest.*; do
7711       case $file in
7712       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7713       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7714       esac
7715     done
7716   else
7717     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7718   fi
7719   rm -f conftest*
7720   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7721 fi
7722 fi
7723
7724 EXEEXT=""
7725 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7726 echo "$ac_t""${ac_cv_exeext}" 1>&6
7727 ac_exeext=$EXEEXT
7728
7729 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7730 echo "configure:7731: checking for object suffix" >&5
7731 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7732   echo $ac_n "(cached) $ac_c" 1>&6
7733 else
7734   rm -f conftest*
7735 echo 'int i = 1;' > conftest.$ac_ext
7736 if { (eval echo configure:7737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7737   for ac_file in conftest.*; do
7738     case $ac_file in
7739     *.c) ;;
7740     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7741     esac
7742   done
7743 else
7744   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7745 fi
7746 rm -f conftest*
7747 fi
7748
7749 echo "$ac_t""$ac_cv_objext" 1>&6
7750 OBJEXT=$ac_cv_objext
7751 ac_objext=$ac_cv_objext
7752
7753
7754 cat >> confdefs.h <<EOF
7755 #define EXEEXT "${EXEEXT}"
7756 EOF
7757
7758
7759 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7760 echo "configure:7761: checking for be_app in -lbe" >&5
7761 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7762 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7763   echo $ac_n "(cached) $ac_c" 1>&6
7764 else
7765   ac_save_LIBS="$LIBS"
7766 LIBS="-lbe -lroot -lnet $LIBS"
7767 cat > conftest.$ac_ext <<EOF
7768 #line 7769 "configure"
7769 #include "confdefs.h"
7770 /* Override any gcc2 internal prototype to avoid an error.  */
7771 /* We use char because int might match the return type of a gcc2
7772     builtin and then its argument prototype would still apply.  */
7773 char be_app();
7774
7775 int main() {
7776 be_app()
7777 ; return 0; }
7778 EOF
7779 if { (eval echo configure:7780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7780   rm -rf conftest*
7781   eval "ac_cv_lib_$ac_lib_var=yes"
7782 else
7783   echo "configure: failed program was:" >&5
7784   cat conftest.$ac_ext >&5
7785   rm -rf conftest*
7786   eval "ac_cv_lib_$ac_lib_var=no"
7787 fi
7788 rm -f conftest*
7789 LIBS="$ac_save_LIBS"
7790
7791 fi
7792 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7793   echo "$ac_t""yes" 1>&6
7794   LIBS="$LIBS -lbe -lroot -lnet"
7795 else
7796   echo "$ac_t""no" 1>&6
7797 :
7798 fi
7799
7800
7801
7802
7803
7804 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
7805 echo "configure:7806: checking for ${CC-cc} option to accept ANSI C" >&5
7806 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
7807   echo $ac_n "(cached) $ac_c" 1>&6
7808 else
7809   am_cv_prog_cc_stdc=no
7810 ac_save_CC="$CC"
7811 # Don't try gcc -ansi; that turns off useful extensions and
7812 # breaks some systems' header files.
7813 # AIX                   -qlanglvl=ansi
7814 # Ultrix and OSF/1      -std1
7815 # HP-UX 10.20 and later -Ae
7816 # HP-UX older versions  -Aa -D_HPUX_SOURCE
7817 # SVR4                  -Xc -D__EXTENSIONS__
7818 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7819 do
7820   CC="$ac_save_CC $ac_arg"
7821   cat > conftest.$ac_ext <<EOF
7822 #line 7823 "configure"
7823 #include "confdefs.h"
7824 #include <stdarg.h>
7825 #include <stdio.h>
7826 #include <sys/types.h>
7827 #include <sys/stat.h>
7828 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
7829 struct buf { int x; };
7830 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7831 static char *e (p, i)
7832      char **p;
7833      int i;
7834 {
7835   return p[i];
7836 }
7837 static char *f (char * (*g) (char **, int), char **p, ...)
7838 {
7839   char *s;
7840   va_list v;
7841   va_start (v,p);
7842   s = g (p, va_arg (v,int));
7843   va_end (v);
7844   return s;
7845 }
7846 int test (int i, double x);
7847 struct s1 {int (*f) (int a);};
7848 struct s2 {int (*f) (double a);};
7849 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7850 int argc;
7851 char **argv;
7852
7853 int main() {
7854
7855 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
7856
7857 ; return 0; }
7858 EOF
7859 if { (eval echo configure:7860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7860   rm -rf conftest*
7861   am_cv_prog_cc_stdc="$ac_arg"; break
7862 else
7863   echo "configure: failed program was:" >&5
7864   cat conftest.$ac_ext >&5
7865 fi
7866 rm -f conftest*
7867 done
7868 CC="$ac_save_CC"
7869
7870 fi
7871
7872 if test -z "$am_cv_prog_cc_stdc"; then
7873   echo "$ac_t""none needed" 1>&6
7874 else
7875   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
7876 fi
7877 case "x$am_cv_prog_cc_stdc" in
7878   x|xno) ;;
7879   *) CC="$CC $am_cv_prog_cc_stdc" ;;
7880 esac
7881
7882 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
7883         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
7884 fi
7885
7886 # test for make depend flag
7887 OL_MKDEP=
7888 OL_MKDEP_FLAGS=
7889 if test -z "${MKDEP}"; then
7890         OL_MKDEP="${CC-cc}"
7891         if test -z "${MKDEP_FLAGS}"; then
7892                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
7893 echo "configure:7894: checking for ${OL_MKDEP} depend flag" >&5
7894 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
7895   echo $ac_n "(cached) $ac_c" 1>&6
7896 else
7897   
7898                         ol_cv_mkdep=no
7899                         for flag in "-M" "-xM"; do
7900                                 cat > conftest.c <<EOF
7901  noCode;
7902 EOF
7903                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:7904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
7904                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
7905                                 then
7906                                         if test ! -f conftest."${ac_object}" ; then
7907                                                 ol_cv_mkdep=$flag
7908                                                 OL_MKDEP_FLAGS="$flag"
7909                                                 break
7910                                         fi
7911                                 fi
7912                         done
7913                         rm -f conftest*
7914                 
7915 fi
7916
7917 echo "$ac_t""$ol_cv_mkdep" 1>&6
7918         else
7919                 cc_cv_mkdep=yes
7920                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
7921         fi
7922 else
7923         cc_cv_mkdep=yes
7924         OL_MKDEP="${MKDEP}"
7925         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
7926 fi
7927
7928
7929
7930 if test "${ol_cv_mkdep}" = no ; then
7931         # this will soon become an error
7932         echo "configure: warning: do not know how to generate dependencies" 1>&2
7933 fi
7934
7935 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
7936 echo "configure:7937: checking for afopen in -ls" >&5
7937 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
7938 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7939   echo $ac_n "(cached) $ac_c" 1>&6
7940 else
7941   ac_save_LIBS="$LIBS"
7942 LIBS="-ls  $LIBS"
7943 cat > conftest.$ac_ext <<EOF
7944 #line 7945 "configure"
7945 #include "confdefs.h"
7946 /* Override any gcc2 internal prototype to avoid an error.  */
7947 /* We use char because int might match the return type of a gcc2
7948     builtin and then its argument prototype would still apply.  */
7949 char afopen();
7950
7951 int main() {
7952 afopen()
7953 ; return 0; }
7954 EOF
7955 if { (eval echo configure:7956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7956   rm -rf conftest*
7957   eval "ac_cv_lib_$ac_lib_var=yes"
7958 else
7959   echo "configure: failed program was:" >&5
7960   cat conftest.$ac_ext >&5
7961   rm -rf conftest*
7962   eval "ac_cv_lib_$ac_lib_var=no"
7963 fi
7964 rm -f conftest*
7965 LIBS="$ac_save_LIBS"
7966
7967 fi
7968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7969   echo "$ac_t""yes" 1>&6
7970   
7971         AUTH_LIBS=-ls
7972         cat >> confdefs.h <<\EOF
7973 #define HAVE_AIX_SECURITY 1
7974 EOF
7975
7976
7977 else
7978   echo "$ac_t""no" 1>&6
7979 fi
7980
7981
7982 case "$target" in
7983 *-ibm-openedition)
7984         ac_cv_func_getopt=no
7985         cat >> confdefs.h <<\EOF
7986 #define BOTH_STRINGS_H 1
7987 EOF
7988
7989         ;;
7990 esac
7991
7992 ol_link_modules=no
7993 if test $ol_enable_modules != no ; then
7994         for ac_hdr in ltdl.h
7995 do
7996 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7997 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7998 echo "configure:7999: checking for $ac_hdr" >&5
7999 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8000   echo $ac_n "(cached) $ac_c" 1>&6
8001 else
8002   cat > conftest.$ac_ext <<EOF
8003 #line 8004 "configure"
8004 #include "confdefs.h"
8005 #include <$ac_hdr>
8006 EOF
8007 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8008 { (eval echo configure:8009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8009 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8010 if test -z "$ac_err"; then
8011   rm -rf conftest*
8012   eval "ac_cv_header_$ac_safe=yes"
8013 else
8014   echo "$ac_err" >&5
8015   echo "configure: failed program was:" >&5
8016   cat conftest.$ac_ext >&5
8017   rm -rf conftest*
8018   eval "ac_cv_header_$ac_safe=no"
8019 fi
8020 rm -f conftest*
8021 fi
8022 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8023   echo "$ac_t""yes" 1>&6
8024     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8025   cat >> confdefs.h <<EOF
8026 #define $ac_tr_hdr 1
8027 EOF
8028  
8029 else
8030   echo "$ac_t""no" 1>&6
8031 fi
8032 done
8033
8034
8035         if test $ac_cv_header_ltdl_h = no ; then
8036                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8037         fi
8038
8039         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8040 echo "configure:8041: checking for lt_dlinit in -lltdl" >&5
8041 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8042 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8043   echo $ac_n "(cached) $ac_c" 1>&6
8044 else
8045   ac_save_LIBS="$LIBS"
8046 LIBS="-lltdl  $LIBS"
8047 cat > conftest.$ac_ext <<EOF
8048 #line 8049 "configure"
8049 #include "confdefs.h"
8050 /* Override any gcc2 internal prototype to avoid an error.  */
8051 /* We use char because int might match the return type of a gcc2
8052     builtin and then its argument prototype would still apply.  */
8053 char lt_dlinit();
8054
8055 int main() {
8056 lt_dlinit()
8057 ; return 0; }
8058 EOF
8059 if { (eval echo configure:8060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8060   rm -rf conftest*
8061   eval "ac_cv_lib_$ac_lib_var=yes"
8062 else
8063   echo "configure: failed program was:" >&5
8064   cat conftest.$ac_ext >&5
8065   rm -rf conftest*
8066   eval "ac_cv_lib_$ac_lib_var=no"
8067 fi
8068 rm -f conftest*
8069 LIBS="$ac_save_LIBS"
8070
8071 fi
8072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8073   echo "$ac_t""yes" 1>&6
8074   
8075                 MODULES_LIBS=-lltdl
8076                 cat >> confdefs.h <<\EOF
8077 #define HAVE_LIBLTDL 1
8078 EOF
8079
8080         
8081 else
8082   echo "$ac_t""no" 1>&6
8083 fi
8084
8085
8086         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8087                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8088         fi
8089         ol_link_modules=yes
8090
8091 else
8092         for i in $Backends; do
8093                 eval "ol_tmp=\$ol_enable_$i"
8094                 if test $ol_tmp = mod ; then
8095                         echo "configure: warning: building static $i backend" 1>&2
8096                         eval "ol_enable_$i=yes"
8097                 fi
8098         done
8099         for i in $Overlays; do
8100                 eval "ol_tmp=\$ol_enable_$i"
8101                 if test $ol_tmp = mod ; then
8102                         echo "configure: warning: building static $i overlay" 1>&2
8103                         eval "ol_enable_$i=yes"
8104                 fi
8105         done
8106 fi
8107
8108 # test for EBCDIC
8109 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8110 echo "configure:8111: checking for EBCDIC" >&5
8111 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8112   echo $ac_n "(cached) $ac_c" 1>&6
8113 else
8114   
8115         cat > conftest.$ac_ext <<EOF
8116 #line 8117 "configure"
8117 #include "confdefs.h"
8118
8119 #if !('M' == 0xd4)
8120 #include <__ASCII__/generate_error.h>
8121 #endif
8122
8123 EOF
8124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8125 { (eval echo configure:8126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8127 if test -z "$ac_err"; then
8128   rm -rf conftest*
8129   ol_cv_cpp_ebcdic=yes
8130 else
8131   echo "$ac_err" >&5
8132   echo "configure: failed program was:" >&5
8133   cat conftest.$ac_ext >&5
8134   rm -rf conftest*
8135   ol_cv_cpp_ebcdic=no
8136 fi
8137 rm -f conftest*
8138 fi
8139
8140 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8141 if test $ol_cv_cpp_ebcdic = yes ; then
8142         cat >> confdefs.h <<\EOF
8143 #define HAVE_EBCDIC 1
8144 EOF
8145
8146 fi
8147
8148 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8149 echo "configure:8150: checking for ANSI C header files" >&5
8150 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8151   echo $ac_n "(cached) $ac_c" 1>&6
8152 else
8153   cat > conftest.$ac_ext <<EOF
8154 #line 8155 "configure"
8155 #include "confdefs.h"
8156 #include <stdlib.h>
8157 #include <stdarg.h>
8158 #include <string.h>
8159 #include <float.h>
8160 EOF
8161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8162 { (eval echo configure:8163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8163 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8164 if test -z "$ac_err"; then
8165   rm -rf conftest*
8166   ol_cv_header_stdc=yes
8167 else
8168   echo "$ac_err" >&5
8169   echo "configure: failed program was:" >&5
8170   cat conftest.$ac_ext >&5
8171   rm -rf conftest*
8172   ol_cv_header_stdc=no
8173 fi
8174 rm -f conftest*
8175
8176 if test $ol_cv_header_stdc = yes; then
8177   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8178 cat > conftest.$ac_ext <<EOF
8179 #line 8180 "configure"
8180 #include "confdefs.h"
8181 #include <string.h>
8182 EOF
8183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8184   egrep "memchr" >/dev/null 2>&1; then
8185   :
8186 else
8187   rm -rf conftest*
8188   ol_cv_header_stdc=no
8189 fi
8190 rm -f conftest*
8191
8192 fi
8193
8194 if test $ol_cv_header_stdc = yes; then
8195   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8196 cat > conftest.$ac_ext <<EOF
8197 #line 8198 "configure"
8198 #include "confdefs.h"
8199 #include <stdlib.h>
8200 EOF
8201 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8202   egrep "free" >/dev/null 2>&1; then
8203   :
8204 else
8205   rm -rf conftest*
8206   ol_cv_header_stdc=no
8207 fi
8208 rm -f conftest*
8209
8210 fi
8211
8212 if test $ol_cv_header_stdc = yes; then
8213   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8214 if test "$cross_compiling" = yes; then
8215   :
8216 else
8217   cat > conftest.$ac_ext <<EOF
8218 #line 8219 "configure"
8219 #include "confdefs.h"
8220 #include <ctype.h>
8221 #ifndef HAVE_EBCDIC
8222 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8223 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8224 #else
8225 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8226                 || ('j' <= (c) && (c) <= 'r') \
8227                 || ('s' <= (c) && (c) <= 'z'))
8228 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8229 #endif
8230 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8231 int main () { int i; for (i = 0; i < 256; i++)
8232 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8233 exit (0); }
8234
8235 EOF
8236 if { (eval echo configure:8237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
8237 then
8238   :
8239 else
8240   echo "configure: failed program was:" >&5
8241   cat conftest.$ac_ext >&5
8242   rm -fr conftest*
8243   ol_cv_header_stdc=no
8244 fi
8245 rm -fr conftest*
8246 fi
8247
8248 fi
8249 fi
8250
8251 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8252 if test $ol_cv_header_stdc = yes; then
8253   cat >> confdefs.h <<\EOF
8254 #define STDC_HEADERS 1
8255 EOF
8256
8257 fi
8258 ac_cv_header_stdc=disable
8259
8260
8261 if test $ol_cv_header_stdc != yes; then
8262         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8263 fi
8264
8265 ac_header_dirent=no
8266 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8267 do
8268 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8269 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8270 echo "configure:8271: checking for $ac_hdr that defines DIR" >&5
8271 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8272   echo $ac_n "(cached) $ac_c" 1>&6
8273 else
8274   cat > conftest.$ac_ext <<EOF
8275 #line 8276 "configure"
8276 #include "confdefs.h"
8277 #include <sys/types.h>
8278 #include <$ac_hdr>
8279 int main() {
8280 DIR *dirp = 0;
8281 ; return 0; }
8282 EOF
8283 if { (eval echo configure:8284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8284   rm -rf conftest*
8285   eval "ac_cv_header_dirent_$ac_safe=yes"
8286 else
8287   echo "configure: failed program was:" >&5
8288   cat conftest.$ac_ext >&5
8289   rm -rf conftest*
8290   eval "ac_cv_header_dirent_$ac_safe=no"
8291 fi
8292 rm -f conftest*
8293 fi
8294 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8295   echo "$ac_t""yes" 1>&6
8296     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8297   cat >> confdefs.h <<EOF
8298 #define $ac_tr_hdr 1
8299 EOF
8300  ac_header_dirent=$ac_hdr; break
8301 else
8302   echo "$ac_t""no" 1>&6
8303 fi
8304 done
8305 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8306 if test $ac_header_dirent = dirent.h; then
8307 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8308 echo "configure:8309: checking for opendir in -ldir" >&5
8309 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8310 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8311   echo $ac_n "(cached) $ac_c" 1>&6
8312 else
8313   ac_save_LIBS="$LIBS"
8314 LIBS="-ldir  $LIBS"
8315 cat > conftest.$ac_ext <<EOF
8316 #line 8317 "configure"
8317 #include "confdefs.h"
8318 /* Override any gcc2 internal prototype to avoid an error.  */
8319 /* We use char because int might match the return type of a gcc2
8320     builtin and then its argument prototype would still apply.  */
8321 char opendir();
8322
8323 int main() {
8324 opendir()
8325 ; return 0; }
8326 EOF
8327 if { (eval echo configure:8328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8328   rm -rf conftest*
8329   eval "ac_cv_lib_$ac_lib_var=yes"
8330 else
8331   echo "configure: failed program was:" >&5
8332   cat conftest.$ac_ext >&5
8333   rm -rf conftest*
8334   eval "ac_cv_lib_$ac_lib_var=no"
8335 fi
8336 rm -f conftest*
8337 LIBS="$ac_save_LIBS"
8338
8339 fi
8340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8341   echo "$ac_t""yes" 1>&6
8342   LIBS="$LIBS -ldir"
8343 else
8344   echo "$ac_t""no" 1>&6
8345 fi
8346
8347 else
8348 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8349 echo "configure:8350: checking for opendir in -lx" >&5
8350 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8351 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8352   echo $ac_n "(cached) $ac_c" 1>&6
8353 else
8354   ac_save_LIBS="$LIBS"
8355 LIBS="-lx  $LIBS"
8356 cat > conftest.$ac_ext <<EOF
8357 #line 8358 "configure"
8358 #include "confdefs.h"
8359 /* Override any gcc2 internal prototype to avoid an error.  */
8360 /* We use char because int might match the return type of a gcc2
8361     builtin and then its argument prototype would still apply.  */
8362 char opendir();
8363
8364 int main() {
8365 opendir()
8366 ; return 0; }
8367 EOF
8368 if { (eval echo configure:8369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8369   rm -rf conftest*
8370   eval "ac_cv_lib_$ac_lib_var=yes"
8371 else
8372   echo "configure: failed program was:" >&5
8373   cat conftest.$ac_ext >&5
8374   rm -rf conftest*
8375   eval "ac_cv_lib_$ac_lib_var=no"
8376 fi
8377 rm -f conftest*
8378 LIBS="$ac_save_LIBS"
8379
8380 fi
8381 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8382   echo "$ac_t""yes" 1>&6
8383   LIBS="$LIBS -lx"
8384 else
8385   echo "$ac_t""no" 1>&6
8386 fi
8387
8388 fi
8389
8390 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8391 echo "configure:8392: checking for sys/wait.h that is POSIX.1 compatible" >&5
8392 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8393   echo $ac_n "(cached) $ac_c" 1>&6
8394 else
8395   cat > conftest.$ac_ext <<EOF
8396 #line 8397 "configure"
8397 #include "confdefs.h"
8398 #include <sys/types.h>
8399 #include <sys/wait.h>
8400 #ifndef WEXITSTATUS
8401 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8402 #endif
8403 #ifndef WIFEXITED
8404 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8405 #endif
8406 int main() {
8407 int s;
8408 wait (&s);
8409 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8410 ; return 0; }
8411 EOF
8412 if { (eval echo configure:8413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8413   rm -rf conftest*
8414   ac_cv_header_sys_wait_h=yes
8415 else
8416   echo "configure: failed program was:" >&5
8417   cat conftest.$ac_ext >&5
8418   rm -rf conftest*
8419   ac_cv_header_sys_wait_h=no
8420 fi
8421 rm -f conftest*
8422 fi
8423
8424 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8425 if test $ac_cv_header_sys_wait_h = yes; then
8426   cat >> confdefs.h <<\EOF
8427 #define HAVE_SYS_WAIT_H 1
8428 EOF
8429
8430 fi
8431
8432 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8433 echo "configure:8434: checking POSIX termios" >&5
8434 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8435   echo $ac_n "(cached) $ac_c" 1>&6
8436 else
8437   cat > conftest.$ac_ext <<EOF
8438 #line 8439 "configure"
8439 #include "confdefs.h"
8440 #include <sys/types.h>
8441 #include <unistd.h>
8442 #include <termios.h>
8443 int main() {
8444 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8445    tcgetattr(0, 0);
8446 ; return 0; }
8447 EOF
8448 if { (eval echo configure:8449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8449   rm -rf conftest*
8450   am_cv_sys_posix_termios=yes
8451 else
8452   echo "configure: failed program was:" >&5
8453   cat conftest.$ac_ext >&5
8454   rm -rf conftest*
8455   am_cv_sys_posix_termios=no
8456 fi
8457 rm -f conftest*
8458 fi
8459
8460 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8461
8462
8463  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8464 echo "configure:8465: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8465 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8466   echo $ac_n "(cached) $ac_c" 1>&6
8467 else
8468   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8469
8470   gwinsz_in_termios_h=no
8471   if test $am_cv_sys_posix_termios = yes; then
8472     cat > conftest.$ac_ext <<EOF
8473 #line 8474 "configure"
8474 #include "confdefs.h"
8475 #include <sys/types.h>
8476 #     include <termios.h>
8477 #     ifdef TIOCGWINSZ
8478         yes
8479 #     endif
8480     
8481 EOF
8482 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8483   egrep "yes" >/dev/null 2>&1; then
8484   rm -rf conftest*
8485   gwinsz_in_termios_h=yes
8486 fi
8487 rm -f conftest*
8488
8489   fi
8490
8491   if test $gwinsz_in_termios_h = no; then
8492     cat > conftest.$ac_ext <<EOF
8493 #line 8494 "configure"
8494 #include "confdefs.h"
8495 #include <sys/types.h>
8496 #     include <sys/ioctl.h>
8497 #     ifdef TIOCGWINSZ
8498         yes
8499 #     endif
8500     
8501 EOF
8502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8503   egrep "yes" >/dev/null 2>&1; then
8504   rm -rf conftest*
8505   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8506 fi
8507 rm -f conftest*
8508
8509   fi
8510   
8511 fi
8512
8513 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8514   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8515     cat >> confdefs.h <<\EOF
8516 #define GWINSZ_IN_SYS_IOCTL 1
8517 EOF
8518
8519   fi
8520
8521 if test $am_cv_sys_posix_termios = yes ; then
8522         cat >> confdefs.h <<\EOF
8523 #define HAVE_POSIX_TERMIOS 1
8524 EOF
8525
8526 fi
8527
8528 for ac_hdr in \
8529         arpa/inet.h             \
8530         arpa/nameser.h  \
8531         assert.h                \
8532         bits/types.h    \
8533         conio.h                 \
8534         crypt.h                 \
8535         direct.h                \
8536         errno.h                 \
8537         fcntl.h                 \
8538         filio.h                 \
8539         getopt.h                \
8540         grp.h                   \
8541         io.h                    \
8542         libutil.h               \
8543         limits.h                \
8544         locale.h                \
8545         netinet/tcp.h   \
8546         malloc.h                \
8547         memory.h                \
8548         psap.h                  \
8549         pwd.h                   \
8550         process.h               \
8551         resolv.h                \
8552         sgtty.h                 \
8553         shadow.h                \
8554         stddef.h                \
8555         string.h                \
8556         strings.h               \
8557         sysexits.h              \
8558         sys/file.h              \
8559         sys/filio.h             \
8560         sys/errno.h             \
8561         sys/ioctl.h             \
8562         sys/param.h             \
8563         sys/resource.h  \
8564         sys/select.h    \
8565         sys/socket.h    \
8566         sys/stat.h              \
8567         sys/syslog.h    \
8568         sys/time.h              \
8569         sys/types.h             \
8570         sys/ucred.h             \
8571         sys/uio.h               \
8572         syslog.h                \
8573         termios.h               \
8574         unistd.h                \
8575         winsock.h               \
8576         winsock2.h              \
8577
8578 do
8579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8581 echo "configure:8582: checking for $ac_hdr" >&5
8582 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8583   echo $ac_n "(cached) $ac_c" 1>&6
8584 else
8585   cat > conftest.$ac_ext <<EOF
8586 #line 8587 "configure"
8587 #include "confdefs.h"
8588 #include <$ac_hdr>
8589 EOF
8590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8591 { (eval echo configure:8592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8593 if test -z "$ac_err"; then
8594   rm -rf conftest*
8595   eval "ac_cv_header_$ac_safe=yes"
8596 else
8597   echo "$ac_err" >&5
8598   echo "configure: failed program was:" >&5
8599   cat conftest.$ac_ext >&5
8600   rm -rf conftest*
8601   eval "ac_cv_header_$ac_safe=no"
8602 fi
8603 rm -f conftest*
8604 fi
8605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8606   echo "$ac_t""yes" 1>&6
8607     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8608   cat >> confdefs.h <<EOF
8609 #define $ac_tr_hdr 1
8610 EOF
8611  
8612 else
8613   echo "$ac_t""no" 1>&6
8614 fi
8615 done
8616
8617
8618
8619
8620 for ac_func in sigaction sigset 
8621 do
8622 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8623 echo "configure:8624: checking for $ac_func" >&5
8624 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8625   echo $ac_n "(cached) $ac_c" 1>&6
8626 else
8627   cat > conftest.$ac_ext <<EOF
8628 #line 8629 "configure"
8629 #include "confdefs.h"
8630 /* System header to define __stub macros and hopefully few prototypes,
8631     which can conflict with char $ac_func(); below.  */
8632 #include <assert.h>
8633 /* Override any gcc2 internal prototype to avoid an error.  */
8634 /* We use char because int might match the return type of a gcc2
8635     builtin and then its argument prototype would still apply.  */
8636 char $ac_func();
8637 char (*f)();
8638
8639 int main() {
8640
8641 /* The GNU C library defines this for functions which it implements
8642     to always fail with ENOSYS.  Some functions are actually named
8643     something starting with __ and the normal name is an alias.  */
8644 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8645 choke me
8646 #else
8647 f = $ac_func;
8648 #endif
8649
8650 ; return 0; }
8651 EOF
8652 if { (eval echo configure:8653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8653   rm -rf conftest*
8654   eval "ac_cv_func_$ac_func=yes"
8655 else
8656   echo "configure: failed program was:" >&5
8657   cat conftest.$ac_ext >&5
8658   rm -rf conftest*
8659   eval "ac_cv_func_$ac_func=no"
8660 fi
8661 rm -f conftest*
8662 fi
8663
8664 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8665   echo "$ac_t""yes" 1>&6
8666     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8667   cat >> confdefs.h <<EOF
8668 #define $ac_tr_func 1
8669 EOF
8670  
8671 else
8672   echo "$ac_t""no" 1>&6
8673 fi
8674 done
8675
8676
8677 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
8678         echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8679 echo "configure:8680: checking for sigset in -lV3" >&5
8680 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8681 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8682   echo $ac_n "(cached) $ac_c" 1>&6
8683 else
8684   ac_save_LIBS="$LIBS"
8685 LIBS="-lV3  $LIBS"
8686 cat > conftest.$ac_ext <<EOF
8687 #line 8688 "configure"
8688 #include "confdefs.h"
8689 /* Override any gcc2 internal prototype to avoid an error.  */
8690 /* We use char because int might match the return type of a gcc2
8691     builtin and then its argument prototype would still apply.  */
8692 char sigset();
8693
8694 int main() {
8695 sigset()
8696 ; return 0; }
8697 EOF
8698 if { (eval echo configure:8699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8699   rm -rf conftest*
8700   eval "ac_cv_lib_$ac_lib_var=yes"
8701 else
8702   echo "configure: failed program was:" >&5
8703   cat conftest.$ac_ext >&5
8704   rm -rf conftest*
8705   eval "ac_cv_lib_$ac_lib_var=no"
8706 fi
8707 rm -f conftest*
8708 LIBS="$ac_save_LIBS"
8709
8710 fi
8711 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8712   echo "$ac_t""yes" 1>&6
8713     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8714     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8715   cat >> confdefs.h <<EOF
8716 #define $ac_tr_lib 1
8717 EOF
8718
8719   LIBS="-lV3 $LIBS"
8720
8721 else
8722   echo "$ac_t""no" 1>&6
8723 fi
8724
8725 fi
8726
8727 if test "$ac_cv_header_winsock_h" = yes; then
8728 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8729 echo "configure:8730: checking for winsock" >&5
8730 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8731   echo $ac_n "(cached) $ac_c" 1>&6
8732 else
8733   save_LIBS="$LIBS"
8734 for curlib in ws2_32 wsock32; do
8735         LIBS="$LIBS -l$curlib"
8736         cat > conftest.$ac_ext <<EOF
8737 #line 8738 "configure"
8738 #include "confdefs.h"
8739 #include <winsock.h>
8740                         
8741 int main() {
8742
8743                         socket(0,0,0);
8744                         select(0,NULL,NULL,NULL,NULL);
8745                         closesocket(0);
8746                         gethostname(NULL,0);
8747                         
8748 ; return 0; }
8749 EOF
8750 if { (eval echo configure:8751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8751   rm -rf conftest*
8752   ol_cv_winsock=yes
8753 else
8754   echo "configure: failed program was:" >&5
8755   cat conftest.$ac_ext >&5
8756   rm -rf conftest*
8757   ol_cv_winsock=no
8758 fi
8759 rm -f conftest*
8760
8761         if test $ol_cv_winsock = yes; then
8762                 cat >> confdefs.h <<\EOF
8763 #define HAVE_WINSOCK 1
8764 EOF
8765
8766                 ac_cv_func_socket=yes
8767                 ac_cv_func_select=yes
8768                 ac_cv_func_closesocket=yes
8769                 ac_cv_func_gethostname=yes
8770                 if test $curlib = ws2_32; then
8771                         ol_cv_winsock=winsock2
8772                         cat >> confdefs.h <<\EOF
8773 #define HAVE_WINSOCK2 1
8774 EOF
8775
8776                 fi
8777                 break
8778         fi
8779         LIBS="$save_LIBS"
8780 done
8781 fi
8782
8783 echo "$ac_t""$ol_cv_winsock" 1>&6
8784 fi
8785
8786
8787 echo $ac_n "checking for socket""... $ac_c" 1>&6
8788 echo "configure:8789: checking for socket" >&5
8789 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
8790   echo $ac_n "(cached) $ac_c" 1>&6
8791 else
8792   cat > conftest.$ac_ext <<EOF
8793 #line 8794 "configure"
8794 #include "confdefs.h"
8795 /* System header to define __stub macros and hopefully few prototypes,
8796     which can conflict with char socket(); below.  */
8797 #include <assert.h>
8798 /* Override any gcc2 internal prototype to avoid an error.  */
8799 /* We use char because int might match the return type of a gcc2
8800     builtin and then its argument prototype would still apply.  */
8801 char socket();
8802 char (*f)();
8803
8804 int main() {
8805
8806 /* The GNU C library defines this for functions which it implements
8807     to always fail with ENOSYS.  Some functions are actually named
8808     something starting with __ and the normal name is an alias.  */
8809 #if defined (__stub_socket) || defined (__stub___socket)
8810 choke me
8811 #else
8812 f = socket;
8813 #endif
8814
8815 ; return 0; }
8816 EOF
8817 if { (eval echo configure:8818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8818   rm -rf conftest*
8819   eval "ac_cv_func_socket=yes"
8820 else
8821   echo "configure: failed program was:" >&5
8822   cat conftest.$ac_ext >&5
8823   rm -rf conftest*
8824   eval "ac_cv_func_socket=no"
8825 fi
8826 rm -f conftest*
8827 fi
8828
8829 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8830   echo "$ac_t""yes" 1>&6
8831   :
8832 else
8833   echo "$ac_t""no" 1>&6
8834         
8835         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
8836 echo "configure:8837: checking for main in -lsocket" >&5
8837 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
8838 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8839   echo $ac_n "(cached) $ac_c" 1>&6
8840 else
8841   ac_save_LIBS="$LIBS"
8842 LIBS="-lsocket  $LIBS"
8843 cat > conftest.$ac_ext <<EOF
8844 #line 8845 "configure"
8845 #include "confdefs.h"
8846
8847 int main() {
8848 main()
8849 ; return 0; }
8850 EOF
8851 if { (eval echo configure:8852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8852   rm -rf conftest*
8853   eval "ac_cv_lib_$ac_lib_var=yes"
8854 else
8855   echo "configure: failed program was:" >&5
8856   cat conftest.$ac_ext >&5
8857   rm -rf conftest*
8858   eval "ac_cv_lib_$ac_lib_var=no"
8859 fi
8860 rm -f conftest*
8861 LIBS="$ac_save_LIBS"
8862
8863 fi
8864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8865   echo "$ac_t""yes" 1>&6
8866     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8867     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8868   cat >> confdefs.h <<EOF
8869 #define $ac_tr_lib 1
8870 EOF
8871
8872   LIBS="-lsocket $LIBS"
8873
8874 else
8875   echo "$ac_t""no" 1>&6
8876 fi
8877
8878         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
8879 echo "configure:8880: checking for main in -lnet" >&5
8880 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
8881 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8882   echo $ac_n "(cached) $ac_c" 1>&6
8883 else
8884   ac_save_LIBS="$LIBS"
8885 LIBS="-lnet  $LIBS"
8886 cat > conftest.$ac_ext <<EOF
8887 #line 8888 "configure"
8888 #include "confdefs.h"
8889
8890 int main() {
8891 main()
8892 ; return 0; }
8893 EOF
8894 if { (eval echo configure:8895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8895   rm -rf conftest*
8896   eval "ac_cv_lib_$ac_lib_var=yes"
8897 else
8898   echo "configure: failed program was:" >&5
8899   cat conftest.$ac_ext >&5
8900   rm -rf conftest*
8901   eval "ac_cv_lib_$ac_lib_var=no"
8902 fi
8903 rm -f conftest*
8904 LIBS="$ac_save_LIBS"
8905
8906 fi
8907 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8908   echo "$ac_t""yes" 1>&6
8909     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8910     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8911   cat >> confdefs.h <<EOF
8912 #define $ac_tr_lib 1
8913 EOF
8914
8915   LIBS="-lnet $LIBS"
8916
8917 else
8918   echo "$ac_t""no" 1>&6
8919 fi
8920
8921         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
8922 echo "configure:8923: checking for main in -lnsl_s" >&5
8923 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
8924 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8925   echo $ac_n "(cached) $ac_c" 1>&6
8926 else
8927   ac_save_LIBS="$LIBS"
8928 LIBS="-lnsl_s  $LIBS"
8929 cat > conftest.$ac_ext <<EOF
8930 #line 8931 "configure"
8931 #include "confdefs.h"
8932
8933 int main() {
8934 main()
8935 ; return 0; }
8936 EOF
8937 if { (eval echo configure:8938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8938   rm -rf conftest*
8939   eval "ac_cv_lib_$ac_lib_var=yes"
8940 else
8941   echo "configure: failed program was:" >&5
8942   cat conftest.$ac_ext >&5
8943   rm -rf conftest*
8944   eval "ac_cv_lib_$ac_lib_var=no"
8945 fi
8946 rm -f conftest*
8947 LIBS="$ac_save_LIBS"
8948
8949 fi
8950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8951   echo "$ac_t""yes" 1>&6
8952     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8953     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8954   cat >> confdefs.h <<EOF
8955 #define $ac_tr_lib 1
8956 EOF
8957
8958   LIBS="-lnsl_s $LIBS"
8959
8960 else
8961   echo "$ac_t""no" 1>&6
8962 fi
8963
8964         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
8965 echo "configure:8966: checking for main in -lnsl" >&5
8966 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
8967 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8968   echo $ac_n "(cached) $ac_c" 1>&6
8969 else
8970   ac_save_LIBS="$LIBS"
8971 LIBS="-lnsl  $LIBS"
8972 cat > conftest.$ac_ext <<EOF
8973 #line 8974 "configure"
8974 #include "confdefs.h"
8975
8976 int main() {
8977 main()
8978 ; return 0; }
8979 EOF
8980 if { (eval echo configure:8981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8981   rm -rf conftest*
8982   eval "ac_cv_lib_$ac_lib_var=yes"
8983 else
8984   echo "configure: failed program was:" >&5
8985   cat conftest.$ac_ext >&5
8986   rm -rf conftest*
8987   eval "ac_cv_lib_$ac_lib_var=no"
8988 fi
8989 rm -f conftest*
8990 LIBS="$ac_save_LIBS"
8991
8992 fi
8993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8994   echo "$ac_t""yes" 1>&6
8995     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8996     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8997   cat >> confdefs.h <<EOF
8998 #define $ac_tr_lib 1
8999 EOF
9000
9001   LIBS="-lnsl $LIBS"
9002
9003 else
9004   echo "$ac_t""no" 1>&6
9005 fi
9006
9007         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9008 echo "configure:9009: checking for socket in -linet" >&5
9009 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9010 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9011   echo $ac_n "(cached) $ac_c" 1>&6
9012 else
9013   ac_save_LIBS="$LIBS"
9014 LIBS="-linet  $LIBS"
9015 cat > conftest.$ac_ext <<EOF
9016 #line 9017 "configure"
9017 #include "confdefs.h"
9018 /* Override any gcc2 internal prototype to avoid an error.  */
9019 /* We use char because int might match the return type of a gcc2
9020     builtin and then its argument prototype would still apply.  */
9021 char socket();
9022
9023 int main() {
9024 socket()
9025 ; return 0; }
9026 EOF
9027 if { (eval echo configure:9028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9028   rm -rf conftest*
9029   eval "ac_cv_lib_$ac_lib_var=yes"
9030 else
9031   echo "configure: failed program was:" >&5
9032   cat conftest.$ac_ext >&5
9033   rm -rf conftest*
9034   eval "ac_cv_lib_$ac_lib_var=no"
9035 fi
9036 rm -f conftest*
9037 LIBS="$ac_save_LIBS"
9038
9039 fi
9040 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9041   echo "$ac_t""yes" 1>&6
9042     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9043     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9044   cat >> confdefs.h <<EOF
9045 #define $ac_tr_lib 1
9046 EOF
9047
9048   LIBS="-linet $LIBS"
9049
9050 else
9051   echo "$ac_t""no" 1>&6
9052 fi
9053
9054         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9055 echo "configure:9056: checking for main in -lgen" >&5
9056 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9057 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9058   echo $ac_n "(cached) $ac_c" 1>&6
9059 else
9060   ac_save_LIBS="$LIBS"
9061 LIBS="-lgen  $LIBS"
9062 cat > conftest.$ac_ext <<EOF
9063 #line 9064 "configure"
9064 #include "confdefs.h"
9065
9066 int main() {
9067 main()
9068 ; return 0; }
9069 EOF
9070 if { (eval echo configure:9071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9071   rm -rf conftest*
9072   eval "ac_cv_lib_$ac_lib_var=yes"
9073 else
9074   echo "configure: failed program was:" >&5
9075   cat conftest.$ac_ext >&5
9076   rm -rf conftest*
9077   eval "ac_cv_lib_$ac_lib_var=no"
9078 fi
9079 rm -f conftest*
9080 LIBS="$ac_save_LIBS"
9081
9082 fi
9083 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9084   echo "$ac_t""yes" 1>&6
9085     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9086     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9087   cat >> confdefs.h <<EOF
9088 #define $ac_tr_lib 1
9089 EOF
9090
9091   LIBS="-lgen $LIBS"
9092
9093 else
9094   echo "$ac_t""no" 1>&6
9095 fi
9096
9097
9098 fi
9099
9100
9101 echo $ac_n "checking for select""... $ac_c" 1>&6
9102 echo "configure:9103: checking for select" >&5
9103 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9104   echo $ac_n "(cached) $ac_c" 1>&6
9105 else
9106   cat > conftest.$ac_ext <<EOF
9107 #line 9108 "configure"
9108 #include "confdefs.h"
9109 /* System header to define __stub macros and hopefully few prototypes,
9110     which can conflict with char select(); below.  */
9111 #include <assert.h>
9112 /* Override any gcc2 internal prototype to avoid an error.  */
9113 /* We use char because int might match the return type of a gcc2
9114     builtin and then its argument prototype would still apply.  */
9115 char select();
9116 char (*f)();
9117
9118 int main() {
9119
9120 /* The GNU C library defines this for functions which it implements
9121     to always fail with ENOSYS.  Some functions are actually named
9122     something starting with __ and the normal name is an alias.  */
9123 #if defined (__stub_select) || defined (__stub___select)
9124 choke me
9125 #else
9126 f = select;
9127 #endif
9128
9129 ; return 0; }
9130 EOF
9131 if { (eval echo configure:9132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9132   rm -rf conftest*
9133   eval "ac_cv_func_select=yes"
9134 else
9135   echo "configure: failed program was:" >&5
9136   cat conftest.$ac_ext >&5
9137   rm -rf conftest*
9138   eval "ac_cv_func_select=no"
9139 fi
9140 rm -f conftest*
9141 fi
9142
9143 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9144   echo "$ac_t""yes" 1>&6
9145   :
9146 else
9147   echo "$ac_t""no" 1>&6
9148 { echo "configure: error: select() required." 1>&2; exit 1; }
9149 fi
9150
9151
9152 if test "${ac_cv_header_winsock_h}" != yes; then
9153                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9154 echo "configure:9155: checking types of arguments for select()" >&5
9155  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9156   echo $ac_n "(cached) $ac_c" 1>&6
9157 else
9158    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9159   echo $ac_n "(cached) $ac_c" 1>&6
9160 else
9161     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9162   echo $ac_n "(cached) $ac_c" 1>&6
9163 else
9164      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9165      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9166       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9167        cat > conftest.$ac_ext <<EOF
9168 #line 9169 "configure"
9169 #include "confdefs.h"
9170 #ifdef HAVE_SYS_TYPES_H
9171 #include <sys/types.h>
9172 #endif
9173 #ifdef HAVE_SYS_TIME_H
9174 #include <sys/time.h>
9175 #endif
9176 #ifdef HAVE_SYS_SELECT_H
9177 #include <sys/select.h>
9178 #endif
9179 #ifdef HAVE_SYS_SOCKET_H
9180 #include <sys/socket.h>
9181 #endif
9182 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);
9183 int main() {
9184
9185 ; return 0; }
9186 EOF
9187 if { (eval echo configure:9188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9188   rm -rf conftest*
9189           ac_not_found=no ; break 3
9190 else
9191   echo "configure: failed program was:" >&5
9192   cat conftest.$ac_ext >&5
9193   rm -rf conftest*
9194   ac_not_found=yes
9195 fi
9196 rm -f conftest*
9197       done
9198      done
9199     done
9200    
9201 fi
9202   
9203 fi
9204  
9205 fi
9206  if test "$ac_not_found" = yes; then
9207   ac_cv_func_select_arg1=int 
9208   ac_cv_func_select_arg234='int *' 
9209   ac_cv_func_select_arg5='struct timeval *'
9210  fi
9211  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9212  cat >> confdefs.h <<EOF
9213 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9214 EOF
9215
9216  cat >> confdefs.h <<EOF
9217 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9218 EOF
9219
9220  cat >> confdefs.h <<EOF
9221 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9222 EOF
9223
9224
9225 fi
9226
9227
9228 for ac_hdr in regex.h 
9229 do
9230 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9231 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9232 echo "configure:9233: checking for $ac_hdr" >&5
9233 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9234   echo $ac_n "(cached) $ac_c" 1>&6
9235 else
9236   cat > conftest.$ac_ext <<EOF
9237 #line 9238 "configure"
9238 #include "confdefs.h"
9239 #include <$ac_hdr>
9240 EOF
9241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9242 { (eval echo configure:9243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9244 if test -z "$ac_err"; then
9245   rm -rf conftest*
9246   eval "ac_cv_header_$ac_safe=yes"
9247 else
9248   echo "$ac_err" >&5
9249   echo "configure: failed program was:" >&5
9250   cat conftest.$ac_ext >&5
9251   rm -rf conftest*
9252   eval "ac_cv_header_$ac_safe=no"
9253 fi
9254 rm -f conftest*
9255 fi
9256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9257   echo "$ac_t""yes" 1>&6
9258     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9259   cat >> confdefs.h <<EOF
9260 #define $ac_tr_hdr 1
9261 EOF
9262  
9263 else
9264   echo "$ac_t""no" 1>&6
9265 fi
9266 done
9267
9268 if test "$ac_cv_header_regex_h" != yes ; then
9269         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9270 fi
9271
9272 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9273 echo "configure:9274: checking for library containing regfree" >&5
9274 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9275   echo $ac_n "(cached) $ac_c" 1>&6
9276 else
9277   ac_func_search_save_LIBS="$LIBS"
9278 ac_cv_search_regfree="no"
9279 cat > conftest.$ac_ext <<EOF
9280 #line 9281 "configure"
9281 #include "confdefs.h"
9282 /* Override any gcc2 internal prototype to avoid an error.  */
9283 /* We use char because int might match the return type of a gcc2
9284     builtin and then its argument prototype would still apply.  */
9285 char regfree();
9286
9287 int main() {
9288 regfree()
9289 ; return 0; }
9290 EOF
9291 if { (eval echo configure:9292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9292   rm -rf conftest*
9293   ac_cv_search_regfree="none required"
9294 else
9295   echo "configure: failed program was:" >&5
9296   cat conftest.$ac_ext >&5
9297 fi
9298 rm -f conftest*
9299 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9300 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9301 cat > conftest.$ac_ext <<EOF
9302 #line 9303 "configure"
9303 #include "confdefs.h"
9304 /* Override any gcc2 internal prototype to avoid an error.  */
9305 /* We use char because int might match the return type of a gcc2
9306     builtin and then its argument prototype would still apply.  */
9307 char regfree();
9308
9309 int main() {
9310 regfree()
9311 ; return 0; }
9312 EOF
9313 if { (eval echo configure:9314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9314   rm -rf conftest*
9315   ac_cv_search_regfree="-l$ac_lib"
9316 break
9317 else
9318   echo "configure: failed program was:" >&5
9319   cat conftest.$ac_ext >&5
9320 fi
9321 rm -f conftest*
9322 done
9323 LIBS="$ac_func_search_save_LIBS"
9324 fi
9325
9326 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9327 if test "$ac_cv_search_regfree" != "no"; then
9328   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9329   :
9330 else :
9331   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9332 fi
9333
9334
9335 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9336 echo "configure:9337: checking for compatible POSIX regex" >&5
9337 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9338   echo $ac_n "(cached) $ac_c" 1>&6
9339 else
9340   
9341         if test "$cross_compiling" = yes; then
9342   ol_cv_c_posix_regex=cross
9343 else
9344   cat > conftest.$ac_ext <<EOF
9345 #line 9346 "configure"
9346 #include "confdefs.h"
9347
9348 #include <sys/types.h>
9349 #include <regex.h>
9350 static char *pattern, *string;
9351 main()
9352 {
9353         int rc;
9354         regex_t re;
9355
9356         pattern = "^A";
9357
9358         if(regcomp(&re, pattern, 0)) {
9359                 return -1;
9360         }
9361         
9362         string = "ALL MATCH";
9363         
9364         rc = regexec(&re, string, 0, (void*)0, 0);
9365
9366         regfree(&re);
9367
9368         return rc;
9369 }
9370 EOF
9371 if { (eval echo configure:9372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9372 then
9373   ol_cv_c_posix_regex=yes
9374 else
9375   echo "configure: failed program was:" >&5
9376   cat conftest.$ac_ext >&5
9377   rm -fr conftest*
9378   ol_cv_c_posix_regex=no
9379 fi
9380 rm -fr conftest*
9381 fi
9382
9383 fi
9384
9385 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9386
9387 if test "$ol_cv_c_posix_regex" = no ; then
9388         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9389 fi
9390
9391
9392 have_uuid=no
9393 for ac_hdr in sys/uuid.h
9394 do
9395 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9396 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9397 echo "configure:9398: checking for $ac_hdr" >&5
9398 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9399   echo $ac_n "(cached) $ac_c" 1>&6
9400 else
9401   cat > conftest.$ac_ext <<EOF
9402 #line 9403 "configure"
9403 #include "confdefs.h"
9404 #include <$ac_hdr>
9405 EOF
9406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9407 { (eval echo configure:9408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9409 if test -z "$ac_err"; then
9410   rm -rf conftest*
9411   eval "ac_cv_header_$ac_safe=yes"
9412 else
9413   echo "$ac_err" >&5
9414   echo "configure: failed program was:" >&5
9415   cat conftest.$ac_ext >&5
9416   rm -rf conftest*
9417   eval "ac_cv_header_$ac_safe=no"
9418 fi
9419 rm -f conftest*
9420 fi
9421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9422   echo "$ac_t""yes" 1>&6
9423     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9424   cat >> confdefs.h <<EOF
9425 #define $ac_tr_hdr 1
9426 EOF
9427  
9428 else
9429   echo "$ac_t""no" 1>&6
9430 fi
9431 done
9432
9433 if test $ac_cv_header_sys_uuid_h = yes ; then
9434         save_LIBS="$LIBS"
9435         
9436 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9437 echo "configure:9438: checking for library containing uuid_to_str" >&5
9438 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9439   echo $ac_n "(cached) $ac_c" 1>&6
9440 else
9441   ac_func_search_save_LIBS="$LIBS"
9442 ac_cv_search_uuid_to_str="no"
9443 cat > conftest.$ac_ext <<EOF
9444 #line 9445 "configure"
9445 #include "confdefs.h"
9446 /* Override any gcc2 internal prototype to avoid an error.  */
9447 /* We use char because int might match the return type of a gcc2
9448     builtin and then its argument prototype would still apply.  */
9449 char uuid_to_str();
9450
9451 int main() {
9452 uuid_to_str()
9453 ; return 0; }
9454 EOF
9455 if { (eval echo configure:9456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9456   rm -rf conftest*
9457   ac_cv_search_uuid_to_str="none required"
9458 else
9459   echo "configure: failed program was:" >&5
9460   cat conftest.$ac_ext >&5
9461 fi
9462 rm -f conftest*
9463 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9464 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9465 cat > conftest.$ac_ext <<EOF
9466 #line 9467 "configure"
9467 #include "confdefs.h"
9468 /* Override any gcc2 internal prototype to avoid an error.  */
9469 /* We use char because int might match the return type of a gcc2
9470     builtin and then its argument prototype would still apply.  */
9471 char uuid_to_str();
9472
9473 int main() {
9474 uuid_to_str()
9475 ; return 0; }
9476 EOF
9477 if { (eval echo configure:9478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9478   rm -rf conftest*
9479   ac_cv_search_uuid_to_str="-l$ac_lib"
9480 break
9481 else
9482   echo "configure: failed program was:" >&5
9483   cat conftest.$ac_ext >&5
9484 fi
9485 rm -f conftest*
9486 done
9487 LIBS="$ac_func_search_save_LIBS"
9488 fi
9489
9490 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9491 if test "$ac_cv_search_uuid_to_str" != "no"; then
9492   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9493   have_uuid=yes
9494 else :
9495   :
9496 fi
9497         LIBS="$save_LIBS"
9498
9499         if test have_uuid = yes ; then
9500                 cat >> confdefs.h <<\EOF
9501 #define HAVE_UUID_TO_STR 1
9502 EOF
9503
9504
9505                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9506                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9507         fi
9508 fi
9509
9510 if test $have_uuid = no ; then
9511         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9512 echo "configure:9513: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9513         save_LIBS="$LIBS"
9514         LIBS="$LIBS -lrpcrt4"
9515         cat > conftest.$ac_ext <<EOF
9516 #line 9517 "configure"
9517 #include "confdefs.h"
9518
9519                 int __stdcall UuidCreate(void *);
9520                 int __stdcall UuidToStringA(void *,void **);
9521                 
9522 int main() {
9523
9524                 UuidCreate(0);
9525                 UuidToStringA(0,0);
9526                 
9527 ; return 0; }
9528 EOF
9529 if { (eval echo configure:9530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9530   rm -rf conftest*
9531   need_rpcrt=yes
9532 else
9533   echo "configure: failed program was:" >&5
9534   cat conftest.$ac_ext >&5
9535   rm -rf conftest*
9536   need_rpcrt=no
9537 fi
9538 rm -f conftest*
9539         if test $need_rpcrt = yes; then
9540                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9541         fi
9542         LIBS="$save_LIBS"
9543         echo "$ac_t""$need_rpcrt" 1>&6
9544 fi
9545
9546 ol_link_dnssrv=no
9547 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9548 echo "configure:9549: checking for res_query" >&5
9549 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9550   echo $ac_n "(cached) $ac_c" 1>&6
9551 else
9552   cat > conftest.$ac_ext <<EOF
9553 #line 9554 "configure"
9554 #include "confdefs.h"
9555 /* System header to define __stub macros and hopefully few prototypes,
9556     which can conflict with char res_query(); below.  */
9557 #include <assert.h>
9558 /* Override any gcc2 internal prototype to avoid an error.  */
9559 /* We use char because int might match the return type of a gcc2
9560     builtin and then its argument prototype would still apply.  */
9561 char res_query();
9562 char (*f)();
9563
9564 int main() {
9565
9566 /* The GNU C library defines this for functions which it implements
9567     to always fail with ENOSYS.  Some functions are actually named
9568     something starting with __ and the normal name is an alias.  */
9569 #if defined (__stub_res_query) || defined (__stub___res_query)
9570 choke me
9571 #else
9572 f = res_query;
9573 #endif
9574
9575 ; return 0; }
9576 EOF
9577 if { (eval echo configure:9578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9578   rm -rf conftest*
9579   eval "ac_cv_func_res_query=yes"
9580 else
9581   echo "configure: failed program was:" >&5
9582   cat conftest.$ac_ext >&5
9583   rm -rf conftest*
9584   eval "ac_cv_func_res_query=no"
9585 fi
9586 rm -f conftest*
9587 fi
9588
9589 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9590   echo "$ac_t""yes" 1>&6
9591   :
9592 else
9593   echo "$ac_t""no" 1>&6
9594 fi
9595
9596 if test $ac_cv_func_res_query = no ; then 
9597         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9598 echo "configure:9599: checking for __res_query" >&5
9599 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9600   echo $ac_n "(cached) $ac_c" 1>&6
9601 else
9602   cat > conftest.$ac_ext <<EOF
9603 #line 9604 "configure"
9604 #include "confdefs.h"
9605 /* System header to define __stub macros and hopefully few prototypes,
9606     which can conflict with char __res_query(); below.  */
9607 #include <assert.h>
9608 /* Override any gcc2 internal prototype to avoid an error.  */
9609 /* We use char because int might match the return type of a gcc2
9610     builtin and then its argument prototype would still apply.  */
9611 char __res_query();
9612 char (*f)();
9613
9614 int main() {
9615
9616 /* The GNU C library defines this for functions which it implements
9617     to always fail with ENOSYS.  Some functions are actually named
9618     something starting with __ and the normal name is an alias.  */
9619 #if defined (__stub___res_query) || defined (__stub_____res_query)
9620 choke me
9621 #else
9622 f = __res_query;
9623 #endif
9624
9625 ; return 0; }
9626 EOF
9627 if { (eval echo configure:9628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9628   rm -rf conftest*
9629   eval "ac_cv_func___res_query=yes"
9630 else
9631   echo "configure: failed program was:" >&5
9632   cat conftest.$ac_ext >&5
9633   rm -rf conftest*
9634   eval "ac_cv_func___res_query=no"
9635 fi
9636 rm -f conftest*
9637 fi
9638
9639 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9640   echo "$ac_t""yes" 1>&6
9641   :
9642 else
9643   echo "$ac_t""no" 1>&6
9644 fi
9645
9646         ac_cv_func_res_query=$ac_cv_func___res_query
9647 fi
9648
9649 if test $ac_cv_func_res_query = no ; then 
9650         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9651 echo "configure:9652: checking for res_query in -lbind" >&5
9652 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9653 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9654   echo $ac_n "(cached) $ac_c" 1>&6
9655 else
9656   ac_save_LIBS="$LIBS"
9657 LIBS="-lbind  $LIBS"
9658 cat > conftest.$ac_ext <<EOF
9659 #line 9660 "configure"
9660 #include "confdefs.h"
9661 /* Override any gcc2 internal prototype to avoid an error.  */
9662 /* We use char because int might match the return type of a gcc2
9663     builtin and then its argument prototype would still apply.  */
9664 char res_query();
9665
9666 int main() {
9667 res_query()
9668 ; return 0; }
9669 EOF
9670 if { (eval echo configure:9671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9671   rm -rf conftest*
9672   eval "ac_cv_lib_$ac_lib_var=yes"
9673 else
9674   echo "configure: failed program was:" >&5
9675   cat conftest.$ac_ext >&5
9676   rm -rf conftest*
9677   eval "ac_cv_lib_$ac_lib_var=no"
9678 fi
9679 rm -f conftest*
9680 LIBS="$ac_save_LIBS"
9681
9682 fi
9683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9684   echo "$ac_t""yes" 1>&6
9685     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9686     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9687   cat >> confdefs.h <<EOF
9688 #define $ac_tr_lib 1
9689 EOF
9690
9691   LIBS="-lbind $LIBS"
9692
9693 else
9694   echo "$ac_t""no" 1>&6
9695 fi
9696
9697         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9698 fi
9699
9700 if test $ac_cv_func_res_query = no ; then 
9701         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9702 echo "configure:9703: checking for __res_query in -lbind" >&5
9703 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9704 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9705   echo $ac_n "(cached) $ac_c" 1>&6
9706 else
9707   ac_save_LIBS="$LIBS"
9708 LIBS="-lbind  $LIBS"
9709 cat > conftest.$ac_ext <<EOF
9710 #line 9711 "configure"
9711 #include "confdefs.h"
9712 /* Override any gcc2 internal prototype to avoid an error.  */
9713 /* We use char because int might match the return type of a gcc2
9714     builtin and then its argument prototype would still apply.  */
9715 char __res_query();
9716
9717 int main() {
9718 __res_query()
9719 ; return 0; }
9720 EOF
9721 if { (eval echo configure:9722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9722   rm -rf conftest*
9723   eval "ac_cv_lib_$ac_lib_var=yes"
9724 else
9725   echo "configure: failed program was:" >&5
9726   cat conftest.$ac_ext >&5
9727   rm -rf conftest*
9728   eval "ac_cv_lib_$ac_lib_var=no"
9729 fi
9730 rm -f conftest*
9731 LIBS="$ac_save_LIBS"
9732
9733 fi
9734 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9735   echo "$ac_t""yes" 1>&6
9736     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9737     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9738   cat >> confdefs.h <<EOF
9739 #define $ac_tr_lib 1
9740 EOF
9741
9742   LIBS="-lbind $LIBS"
9743
9744 else
9745   echo "$ac_t""no" 1>&6
9746 fi
9747
9748         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
9749 fi
9750
9751 if test $ac_cv_func_res_query = no ; then 
9752         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
9753 echo "configure:9754: checking for res_query in -lresolv" >&5
9754 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
9755 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9756   echo $ac_n "(cached) $ac_c" 1>&6
9757 else
9758   ac_save_LIBS="$LIBS"
9759 LIBS="-lresolv  $LIBS"
9760 cat > conftest.$ac_ext <<EOF
9761 #line 9762 "configure"
9762 #include "confdefs.h"
9763 /* Override any gcc2 internal prototype to avoid an error.  */
9764 /* We use char because int might match the return type of a gcc2
9765     builtin and then its argument prototype would still apply.  */
9766 char res_query();
9767
9768 int main() {
9769 res_query()
9770 ; return 0; }
9771 EOF
9772 if { (eval echo configure:9773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9773   rm -rf conftest*
9774   eval "ac_cv_lib_$ac_lib_var=yes"
9775 else
9776   echo "configure: failed program was:" >&5
9777   cat conftest.$ac_ext >&5
9778   rm -rf conftest*
9779   eval "ac_cv_lib_$ac_lib_var=no"
9780 fi
9781 rm -f conftest*
9782 LIBS="$ac_save_LIBS"
9783
9784 fi
9785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9786   echo "$ac_t""yes" 1>&6
9787     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9788     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9789   cat >> confdefs.h <<EOF
9790 #define $ac_tr_lib 1
9791 EOF
9792
9793   LIBS="-lresolv $LIBS"
9794
9795 else
9796   echo "$ac_t""no" 1>&6
9797 fi
9798
9799         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
9800 fi
9801
9802 if test $ac_cv_func_res_query = no ; then 
9803         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
9804 echo "configure:9805: checking for __res_query in -lresolv" >&5
9805 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
9806 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9807   echo $ac_n "(cached) $ac_c" 1>&6
9808 else
9809   ac_save_LIBS="$LIBS"
9810 LIBS="-lresolv  $LIBS"
9811 cat > conftest.$ac_ext <<EOF
9812 #line 9813 "configure"
9813 #include "confdefs.h"
9814 /* Override any gcc2 internal prototype to avoid an error.  */
9815 /* We use char because int might match the return type of a gcc2
9816     builtin and then its argument prototype would still apply.  */
9817 char __res_query();
9818
9819 int main() {
9820 __res_query()
9821 ; return 0; }
9822 EOF
9823 if { (eval echo configure:9824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9824   rm -rf conftest*
9825   eval "ac_cv_lib_$ac_lib_var=yes"
9826 else
9827   echo "configure: failed program was:" >&5
9828   cat conftest.$ac_ext >&5
9829   rm -rf conftest*
9830   eval "ac_cv_lib_$ac_lib_var=no"
9831 fi
9832 rm -f conftest*
9833 LIBS="$ac_save_LIBS"
9834
9835 fi
9836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9837   echo "$ac_t""yes" 1>&6
9838     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9839     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9840   cat >> confdefs.h <<EOF
9841 #define $ac_tr_lib 1
9842 EOF
9843
9844   LIBS="-lresolv $LIBS"
9845
9846 else
9847   echo "$ac_t""no" 1>&6
9848 fi
9849
9850         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
9851 fi
9852
9853 if test $ac_cv_func_res_query = no ; then 
9854         echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
9855 echo "configure:9856: checking for _res_9_query in -lresolv" >&5
9856 ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
9857 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9858   echo $ac_n "(cached) $ac_c" 1>&6
9859 else
9860   ac_save_LIBS="$LIBS"
9861 LIBS="-lresolv  $LIBS"
9862 cat > conftest.$ac_ext <<EOF
9863 #line 9864 "configure"
9864 #include "confdefs.h"
9865 /* Override any gcc2 internal prototype to avoid an error.  */
9866 /* We use char because int might match the return type of a gcc2
9867     builtin and then its argument prototype would still apply.  */
9868 char _res_9_query();
9869
9870 int main() {
9871 _res_9_query()
9872 ; return 0; }
9873 EOF
9874 if { (eval echo configure:9875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9875   rm -rf conftest*
9876   eval "ac_cv_lib_$ac_lib_var=yes"
9877 else
9878   echo "configure: failed program was:" >&5
9879   cat conftest.$ac_ext >&5
9880   rm -rf conftest*
9881   eval "ac_cv_lib_$ac_lib_var=no"
9882 fi
9883 rm -f conftest*
9884 LIBS="$ac_save_LIBS"
9885
9886 fi
9887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9888   echo "$ac_t""yes" 1>&6
9889     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9890     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9891   cat >> confdefs.h <<EOF
9892 #define $ac_tr_lib 1
9893 EOF
9894
9895   LIBS="-lresolv $LIBS"
9896
9897 else
9898   echo "$ac_t""no" 1>&6
9899 fi
9900
9901         ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
9902 fi
9903
9904 if test "$ac_cv_func_res_query" = yes ; then
9905         cat >> confdefs.h <<\EOF
9906 #define HAVE_RES_QUERY 1
9907 EOF
9908
9909
9910         if test $ol_enable_dnssrv != no ; then
9911                 ol_link_dnssrv=yes
9912         fi
9913 fi
9914
9915 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
9916         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
9917 fi
9918
9919 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
9920 do
9921 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9922 echo "configure:9923: checking for $ac_func" >&5
9923 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9924   echo $ac_n "(cached) $ac_c" 1>&6
9925 else
9926   cat > conftest.$ac_ext <<EOF
9927 #line 9928 "configure"
9928 #include "confdefs.h"
9929 /* System header to define __stub macros and hopefully few prototypes,
9930     which can conflict with char $ac_func(); below.  */
9931 #include <assert.h>
9932 /* Override any gcc2 internal prototype to avoid an error.  */
9933 /* We use char because int might match the return type of a gcc2
9934     builtin and then its argument prototype would still apply.  */
9935 char $ac_func();
9936 char (*f)();
9937
9938 int main() {
9939
9940 /* The GNU C library defines this for functions which it implements
9941     to always fail with ENOSYS.  Some functions are actually named
9942     something starting with __ and the normal name is an alias.  */
9943 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9944 choke me
9945 #else
9946 f = $ac_func;
9947 #endif
9948
9949 ; return 0; }
9950 EOF
9951 if { (eval echo configure:9952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9952   rm -rf conftest*
9953   eval "ac_cv_func_$ac_func=yes"
9954 else
9955   echo "configure: failed program was:" >&5
9956   cat conftest.$ac_ext >&5
9957   rm -rf conftest*
9958   eval "ac_cv_func_$ac_func=no"
9959 fi
9960 rm -f conftest*
9961 fi
9962
9963 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9964   echo "$ac_t""yes" 1>&6
9965     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9966   cat >> confdefs.h <<EOF
9967 #define $ac_tr_func 1
9968 EOF
9969  
9970 else
9971   echo "$ac_t""no" 1>&6
9972 fi
9973 done
9974
9975
9976 ol_link_ipv6=no
9977 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
9978         if test $ol_enable_ipv6 = yes ; then
9979                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
9980         fi
9981 elif test $ol_enable_ipv6 != no ; then
9982         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
9983 echo "configure:9984: checking INET6_ADDRSTRLEN" >&5
9984 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
9985   echo $ac_n "(cached) $ac_c" 1>&6
9986 else
9987   
9988                 cat > conftest.$ac_ext <<EOF
9989 #line 9990 "configure"
9990 #include "confdefs.h"
9991
9992 #                       include <netinet/in.h>
9993 #                       ifdef INET6_ADDRSTRLEN
9994                                 __has_inet6_addrstrlen__;
9995 #                       endif
9996                 
9997 EOF
9998 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9999   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10000   rm -rf conftest*
10001   ol_cv_inet6_addrstrlen=yes
10002 else
10003   rm -rf conftest*
10004   ol_cv_inet6_addrstrlen=no
10005 fi
10006 rm -f conftest*
10007
10008 fi
10009
10010 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10011
10012
10013         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10014 echo "configure:10015: checking struct sockaddr_storage" >&5
10015 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10016   echo $ac_n "(cached) $ac_c" 1>&6
10017 else
10018   
10019                 cat > conftest.$ac_ext <<EOF
10020 #line 10021 "configure"
10021 #include "confdefs.h"
10022
10023 #include <sys/types.h>
10024 #include <sys/socket.h>
10025
10026 int main() {
10027
10028                         struct sockaddr_storage ss;
10029
10030 ; return 0; }
10031 EOF
10032 if { (eval echo configure:10033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10033   rm -rf conftest*
10034   ol_cv_struct_sockaddr_storage=yes
10035 else
10036   echo "configure: failed program was:" >&5
10037   cat conftest.$ac_ext >&5
10038   rm -rf conftest*
10039   ol_cv_struct_sockaddr_storage=no
10040 fi
10041 rm -f conftest*
10042 fi
10043
10044 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10045
10046         if test $ol_cv_inet6_addrstrlen = yes \
10047                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10048                 ol_link_ipv6=yes
10049         elif test $ol_enable_ipv6 = yes \
10050                         -a $ol_cv_inet6_addrstrlen = no ; then
10051                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10052         elif test $ol_enable_ipv6 = yes \
10053                         -a $ol_cv_struct_sockaddr_storage = no ; then
10054                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10055         fi
10056 fi
10057
10058 if test $ol_enable_local != no ; then
10059         for ac_hdr in sys/un.h 
10060 do
10061 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10062 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10063 echo "configure:10064: checking for $ac_hdr" >&5
10064 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10065   echo $ac_n "(cached) $ac_c" 1>&6
10066 else
10067   cat > conftest.$ac_ext <<EOF
10068 #line 10069 "configure"
10069 #include "confdefs.h"
10070 #include <$ac_hdr>
10071 EOF
10072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10073 { (eval echo configure:10074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10075 if test -z "$ac_err"; then
10076   rm -rf conftest*
10077   eval "ac_cv_header_$ac_safe=yes"
10078 else
10079   echo "$ac_err" >&5
10080   echo "configure: failed program was:" >&5
10081   cat conftest.$ac_ext >&5
10082   rm -rf conftest*
10083   eval "ac_cv_header_$ac_safe=no"
10084 fi
10085 rm -f conftest*
10086 fi
10087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10088   echo "$ac_t""yes" 1>&6
10089     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10090   cat >> confdefs.h <<EOF
10091 #define $ac_tr_hdr 1
10092 EOF
10093  
10094 else
10095   echo "$ac_t""no" 1>&6
10096 fi
10097 done
10098
10099
10100         if test $ol_enable_local = auto ; then
10101                 ol_enable_local=$ac_cv_header_sys_un_h
10102         elif test $ac_cv_header_sys_un_h = no ; then
10103                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10104         fi
10105 fi
10106
10107 ol_link_kbind=no
10108 ol_link_krb5=no
10109 ol_link_krb4=no
10110
10111 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10112         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10113         -o $ol_with_kerberos = k425 ; then
10114
10115         for ac_hdr in krb5.h
10116 do
10117 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10118 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10119 echo "configure:10120: checking for $ac_hdr" >&5
10120 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10121   echo $ac_n "(cached) $ac_c" 1>&6
10122 else
10123   cat > conftest.$ac_ext <<EOF
10124 #line 10125 "configure"
10125 #include "confdefs.h"
10126 #include <$ac_hdr>
10127 EOF
10128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10129 { (eval echo configure:10130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10131 if test -z "$ac_err"; then
10132   rm -rf conftest*
10133   eval "ac_cv_header_$ac_safe=yes"
10134 else
10135   echo "$ac_err" >&5
10136   echo "configure: failed program was:" >&5
10137   cat conftest.$ac_ext >&5
10138   rm -rf conftest*
10139   eval "ac_cv_header_$ac_safe=no"
10140 fi
10141 rm -f conftest*
10142 fi
10143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10144   echo "$ac_t""yes" 1>&6
10145     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10146   cat >> confdefs.h <<EOF
10147 #define $ac_tr_hdr 1
10148 EOF
10149  
10150 else
10151   echo "$ac_t""no" 1>&6
10152 fi
10153 done
10154
10155
10156         if test $ac_cv_header_krb5_h = yes ; then
10157                                 for ac_hdr in heim_err.h
10158 do
10159 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10160 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10161 echo "configure:10162: checking for $ac_hdr" >&5
10162 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10163   echo $ac_n "(cached) $ac_c" 1>&6
10164 else
10165   cat > conftest.$ac_ext <<EOF
10166 #line 10167 "configure"
10167 #include "confdefs.h"
10168 #include <$ac_hdr>
10169 EOF
10170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10171 { (eval echo configure:10172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10173 if test -z "$ac_err"; then
10174   rm -rf conftest*
10175   eval "ac_cv_header_$ac_safe=yes"
10176 else
10177   echo "$ac_err" >&5
10178   echo "configure: failed program was:" >&5
10179   cat conftest.$ac_ext >&5
10180   rm -rf conftest*
10181   eval "ac_cv_header_$ac_safe=no"
10182 fi
10183 rm -f conftest*
10184 fi
10185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10186   echo "$ac_t""yes" 1>&6
10187     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10188   cat >> confdefs.h <<EOF
10189 #define $ac_tr_hdr 1
10190 EOF
10191  
10192 else
10193   echo "$ac_t""no" 1>&6
10194 fi
10195 done
10196
10197                 if test $ac_cv_header_heim_err_h = yes ; then
10198                         krb5_impl=heimdal
10199                 else
10200                         krb5_impl=mit
10201                 fi
10202
10203                 if test $krb5_impl = mit; then
10204                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10205 echo "configure:10206: checking for main in -lk5crypto" >&5
10206 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10207 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10208   echo $ac_n "(cached) $ac_c" 1>&6
10209 else
10210   ac_save_LIBS="$LIBS"
10211 LIBS="-lk5crypto  $LIBS"
10212 cat > conftest.$ac_ext <<EOF
10213 #line 10214 "configure"
10214 #include "confdefs.h"
10215
10216 int main() {
10217 main()
10218 ; return 0; }
10219 EOF
10220 if { (eval echo configure:10221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10221   rm -rf conftest*
10222   eval "ac_cv_lib_$ac_lib_var=yes"
10223 else
10224   echo "configure: failed program was:" >&5
10225   cat conftest.$ac_ext >&5
10226   rm -rf conftest*
10227   eval "ac_cv_lib_$ac_lib_var=no"
10228 fi
10229 rm -f conftest*
10230 LIBS="$ac_save_LIBS"
10231
10232 fi
10233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10234   echo "$ac_t""yes" 1>&6
10235   krb5crypto=k5crypto
10236 else
10237   echo "$ac_t""no" 1>&6
10238 krb5crypto=crypto
10239 fi
10240
10241
10242                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10243 echo "configure:10244: checking for main in -lkrb5" >&5
10244 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10245 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10246   echo $ac_n "(cached) $ac_c" 1>&6
10247 else
10248   ac_save_LIBS="$LIBS"
10249 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10250 cat > conftest.$ac_ext <<EOF
10251 #line 10252 "configure"
10252 #include "confdefs.h"
10253
10254 int main() {
10255 main()
10256 ; return 0; }
10257 EOF
10258 if { (eval echo configure:10259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10259   rm -rf conftest*
10260   eval "ac_cv_lib_$ac_lib_var=yes"
10261 else
10262   echo "configure: failed program was:" >&5
10263   cat conftest.$ac_ext >&5
10264   rm -rf conftest*
10265   eval "ac_cv_lib_$ac_lib_var=no"
10266 fi
10267 rm -f conftest*
10268 LIBS="$ac_save_LIBS"
10269
10270 fi
10271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10272   echo "$ac_t""yes" 1>&6
10273   have_krb5=yes
10274                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10275 else
10276   echo "$ac_t""no" 1>&6
10277 have_krb5=no
10278 fi
10279
10280
10281                 elif test $krb5_impl = heimdal; then
10282                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10283 echo "configure:10284: checking for main in -ldes" >&5
10284 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10285 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10286   echo $ac_n "(cached) $ac_c" 1>&6
10287 else
10288   ac_save_LIBS="$LIBS"
10289 LIBS="-ldes  $LIBS"
10290 cat > conftest.$ac_ext <<EOF
10291 #line 10292 "configure"
10292 #include "confdefs.h"
10293
10294 int main() {
10295 main()
10296 ; return 0; }
10297 EOF
10298 if { (eval echo configure:10299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10299   rm -rf conftest*
10300   eval "ac_cv_lib_$ac_lib_var=yes"
10301 else
10302   echo "configure: failed program was:" >&5
10303   cat conftest.$ac_ext >&5
10304   rm -rf conftest*
10305   eval "ac_cv_lib_$ac_lib_var=no"
10306 fi
10307 rm -f conftest*
10308 LIBS="$ac_save_LIBS"
10309
10310 fi
10311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10312   echo "$ac_t""yes" 1>&6
10313   krb5crypto=des
10314 else
10315   echo "$ac_t""no" 1>&6
10316 krb5crypto=crypto
10317 fi
10318
10319
10320                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10321 echo "configure:10322: checking for main in -lkrb5" >&5
10322 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10323 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10324   echo $ac_n "(cached) $ac_c" 1>&6
10325 else
10326   ac_save_LIBS="$LIBS"
10327 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10328 cat > conftest.$ac_ext <<EOF
10329 #line 10330 "configure"
10330 #include "confdefs.h"
10331
10332 int main() {
10333 main()
10334 ; return 0; }
10335 EOF
10336 if { (eval echo configure:10337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10337   rm -rf conftest*
10338   eval "ac_cv_lib_$ac_lib_var=yes"
10339 else
10340   echo "configure: failed program was:" >&5
10341   cat conftest.$ac_ext >&5
10342   rm -rf conftest*
10343   eval "ac_cv_lib_$ac_lib_var=no"
10344 fi
10345 rm -f conftest*
10346 LIBS="$ac_save_LIBS"
10347
10348 fi
10349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10350   echo "$ac_t""yes" 1>&6
10351   have_krb5=yes
10352                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10353 else
10354   echo "$ac_t""no" 1>&6
10355 have_krb5=no
10356 fi
10357
10358
10359                         cat >> confdefs.h <<\EOF
10360 #define HAVE_HEIMDAL_KERBEROS 1
10361 EOF
10362
10363
10364                 else
10365                         have_krb5=no
10366                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10367                 fi
10368
10369                 if test $have_krb5 = yes ; then
10370                         ol_link_krb5=yes
10371
10372                         cat >> confdefs.h <<\EOF
10373 #define HAVE_KRB5 1
10374 EOF
10375
10376
10377                         if test $ol_with_kerberos = k5only ; then
10378                                 ol_with_kerberos=found
10379                         fi
10380
10381                 elif test $ol_with_kerberos != auto ; then
10382                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10383                 fi
10384
10385         fi
10386 fi
10387
10388 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10389         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10390
10391         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10392 do
10393 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10394 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10395 echo "configure:10396: checking for $ac_hdr" >&5
10396 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10397   echo $ac_n "(cached) $ac_c" 1>&6
10398 else
10399   cat > conftest.$ac_ext <<EOF
10400 #line 10401 "configure"
10401 #include "confdefs.h"
10402 #include <$ac_hdr>
10403 EOF
10404 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10405 { (eval echo configure:10406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10406 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10407 if test -z "$ac_err"; then
10408   rm -rf conftest*
10409   eval "ac_cv_header_$ac_safe=yes"
10410 else
10411   echo "$ac_err" >&5
10412   echo "configure: failed program was:" >&5
10413   cat conftest.$ac_ext >&5
10414   rm -rf conftest*
10415   eval "ac_cv_header_$ac_safe=no"
10416 fi
10417 rm -f conftest*
10418 fi
10419 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10420   echo "$ac_t""yes" 1>&6
10421     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10422   cat >> confdefs.h <<EOF
10423 #define $ac_tr_hdr 1
10424 EOF
10425  
10426 else
10427   echo "$ac_t""no" 1>&6
10428 fi
10429 done
10430
10431
10432         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10433                 if test $krb5_impl = mit; then
10434                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10435 echo "configure:10436: checking for main in -lkrb4" >&5
10436 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10437 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10438   echo $ac_n "(cached) $ac_c" 1>&6
10439 else
10440   ac_save_LIBS="$LIBS"
10441 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10442 cat > conftest.$ac_ext <<EOF
10443 #line 10444 "configure"
10444 #include "confdefs.h"
10445
10446 int main() {
10447 main()
10448 ; return 0; }
10449 EOF
10450 if { (eval echo configure:10451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10451   rm -rf conftest*
10452   eval "ac_cv_lib_$ac_lib_var=yes"
10453 else
10454   echo "configure: failed program was:" >&5
10455   cat conftest.$ac_ext >&5
10456   rm -rf conftest*
10457   eval "ac_cv_lib_$ac_lib_var=no"
10458 fi
10459 rm -f conftest*
10460 LIBS="$ac_save_LIBS"
10461
10462 fi
10463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10464   echo "$ac_t""yes" 1>&6
10465   have_k425=yes
10466                                 KRB4_LIBS="-lkrb4 -ldes425"
10467 else
10468   echo "$ac_t""no" 1>&6
10469 have_k425=no
10470 fi
10471
10472
10473                 elif test $krb5_impl = heimdal; then
10474                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10475 echo "configure:10476: checking for main in -lkrb4" >&5
10476 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10477 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10478   echo $ac_n "(cached) $ac_c" 1>&6
10479 else
10480   ac_save_LIBS="$LIBS"
10481 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10482 cat > conftest.$ac_ext <<EOF
10483 #line 10484 "configure"
10484 #include "confdefs.h"
10485
10486 int main() {
10487 main()
10488 ; return 0; }
10489 EOF
10490 if { (eval echo configure:10491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10491   rm -rf conftest*
10492   eval "ac_cv_lib_$ac_lib_var=yes"
10493 else
10494   echo "configure: failed program was:" >&5
10495   cat conftest.$ac_ext >&5
10496   rm -rf conftest*
10497   eval "ac_cv_lib_$ac_lib_var=no"
10498 fi
10499 rm -f conftest*
10500 LIBS="$ac_save_LIBS"
10501
10502 fi
10503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10504   echo "$ac_t""yes" 1>&6
10505   have_k425=yes
10506                                 KRB4_LIBS="-lkrb4"
10507 else
10508   echo "$ac_t""no" 1>&6
10509 have_k425=no
10510 fi
10511
10512
10513                 else
10514                         have_425=no
10515                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10516                 fi
10517
10518                 if test $have_k425 = yes ; then
10519                         ol_with_kerberos=found
10520                         ol_link_krb4=yes
10521
10522                         cat >> confdefs.h <<\EOF
10523 #define HAVE_KRB425 1
10524 EOF
10525
10526                         cat >> confdefs.h <<\EOF
10527 #define HAVE_KRB4 1
10528 EOF
10529
10530
10531                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10532 echo "configure:10533: checking for des_debug in Kerberos libraries" >&5
10533 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10534   echo $ac_n "(cached) $ac_c" 1>&6
10535 else
10536   
10537                                                                 save_LIBS="$LIBS"
10538                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10539                                 cat > conftest.$ac_ext <<EOF
10540 #line 10541 "configure"
10541 #include "confdefs.h"
10542
10543 #include <kerberosIV/krb.h>
10544 #include <kerberosIV/des.h>
10545 extern int des_debug;
10546
10547 int main() {
10548
10549 des_debug = 1;
10550
10551 ; return 0; }
10552 EOF
10553 if { (eval echo configure:10554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10554   rm -rf conftest*
10555   ol_cv_var_des_debug=yes
10556 else
10557   echo "configure: failed program was:" >&5
10558   cat conftest.$ac_ext >&5
10559   rm -rf conftest*
10560   ol_cv_var_des_debug=no
10561 fi
10562 rm -f conftest*
10563                                                                 LIBS="$save_LIBS"
10564                         
10565 fi
10566
10567 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10568
10569                         if test $ol_cv_var_des_debug = yes ; then
10570                                 cat >> confdefs.h <<\EOF
10571 #define HAVE_DES_DEBUG 1
10572 EOF
10573
10574                         fi
10575
10576                         LIBS="$save_LIBS"
10577                 fi
10578         fi
10579 fi
10580
10581 if test $ol_link_krb5 = yes ; then
10582         ol_with_kerberos=found
10583 fi
10584
10585 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10586         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10587
10588         for ac_hdr in krb.h des.h krb-archaeology.h 
10589 do
10590 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10591 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10592 echo "configure:10593: checking for $ac_hdr" >&5
10593 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10594   echo $ac_n "(cached) $ac_c" 1>&6
10595 else
10596   cat > conftest.$ac_ext <<EOF
10597 #line 10598 "configure"
10598 #include "confdefs.h"
10599 #include <$ac_hdr>
10600 EOF
10601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10602 { (eval echo configure:10603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10604 if test -z "$ac_err"; then
10605   rm -rf conftest*
10606   eval "ac_cv_header_$ac_safe=yes"
10607 else
10608   echo "$ac_err" >&5
10609   echo "configure: failed program was:" >&5
10610   cat conftest.$ac_ext >&5
10611   rm -rf conftest*
10612   eval "ac_cv_header_$ac_safe=no"
10613 fi
10614 rm -f conftest*
10615 fi
10616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10617   echo "$ac_t""yes" 1>&6
10618     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10619   cat >> confdefs.h <<EOF
10620 #define $ac_tr_hdr 1
10621 EOF
10622  
10623 else
10624   echo "$ac_t""no" 1>&6
10625 fi
10626 done
10627
10628
10629         if test $ac_cv_header_krb_h = yes ; then
10630                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10631 echo "configure:10632: checking for main in -lkrb" >&5
10632 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10633 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10634   echo $ac_n "(cached) $ac_c" 1>&6
10635 else
10636   ac_save_LIBS="$LIBS"
10637 LIBS="-lkrb -ldes $LIBS"
10638 cat > conftest.$ac_ext <<EOF
10639 #line 10640 "configure"
10640 #include "confdefs.h"
10641
10642 int main() {
10643 main()
10644 ; return 0; }
10645 EOF
10646 if { (eval echo configure:10647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10647   rm -rf conftest*
10648   eval "ac_cv_lib_$ac_lib_var=yes"
10649 else
10650   echo "configure: failed program was:" >&5
10651   cat conftest.$ac_ext >&5
10652   rm -rf conftest*
10653   eval "ac_cv_lib_$ac_lib_var=no"
10654 fi
10655 rm -f conftest*
10656 LIBS="$ac_save_LIBS"
10657
10658 fi
10659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10660   echo "$ac_t""yes" 1>&6
10661   have_k4=yes
10662 else
10663   echo "$ac_t""no" 1>&6
10664 have_k4=no
10665 fi
10666
10667
10668                 if test $have_k4 = yes ; then
10669                         ol_with_kerberos=found
10670                         ol_link_krb4=yes
10671
10672                         cat >> confdefs.h <<\EOF
10673 #define HAVE_KRB4 1
10674 EOF
10675
10676
10677                         KRB4_LIBS="-lkrb -ldes"
10678
10679                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10680                                 cat >> confdefs.h <<\EOF
10681 #define HAVE_KTH_KERBEROS 1
10682 EOF
10683
10684                         fi
10685                 fi
10686         fi
10687 fi
10688
10689 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10690         ol_link_kbind=yes
10691
10692 elif test $ol_enable_kbind = yes ; then
10693         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10694 fi
10695
10696 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10697         cat >> confdefs.h <<\EOF
10698 #define HAVE_KERBEROS 1
10699 EOF
10700
10701
10702 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10703         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10704 fi
10705
10706 ol_link_tls=no
10707 if test $ol_with_tls != no ; then
10708         for ac_hdr in openssl/ssl.h ssl.h
10709 do
10710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10712 echo "configure:10713: checking for $ac_hdr" >&5
10713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10714   echo $ac_n "(cached) $ac_c" 1>&6
10715 else
10716   cat > conftest.$ac_ext <<EOF
10717 #line 10718 "configure"
10718 #include "confdefs.h"
10719 #include <$ac_hdr>
10720 EOF
10721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10722 { (eval echo configure:10723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10724 if test -z "$ac_err"; then
10725   rm -rf conftest*
10726   eval "ac_cv_header_$ac_safe=yes"
10727 else
10728   echo "$ac_err" >&5
10729   echo "configure: failed program was:" >&5
10730   cat conftest.$ac_ext >&5
10731   rm -rf conftest*
10732   eval "ac_cv_header_$ac_safe=no"
10733 fi
10734 rm -f conftest*
10735 fi
10736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10737   echo "$ac_t""yes" 1>&6
10738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10739   cat >> confdefs.h <<EOF
10740 #define $ac_tr_hdr 1
10741 EOF
10742  
10743 else
10744   echo "$ac_t""no" 1>&6
10745 fi
10746 done
10747
10748         
10749         if test $ac_cv_header_openssl_ssl_h = yes \
10750                 -o $ac_cv_header_ssl_h = yes ; then
10751                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10752 echo "configure:10753: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10753 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10754 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10755   echo $ac_n "(cached) $ac_c" 1>&6
10756 else
10757   ac_save_LIBS="$LIBS"
10758 LIBS="-lssl -lcrypto $LIBS"
10759 cat > conftest.$ac_ext <<EOF
10760 #line 10761 "configure"
10761 #include "confdefs.h"
10762 /* Override any gcc2 internal prototype to avoid an error.  */
10763 /* We use char because int might match the return type of a gcc2
10764     builtin and then its argument prototype would still apply.  */
10765 char SSLeay_add_ssl_algorithms();
10766
10767 int main() {
10768 SSLeay_add_ssl_algorithms()
10769 ; return 0; }
10770 EOF
10771 if { (eval echo configure:10772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10772   rm -rf conftest*
10773   eval "ac_cv_lib_$ac_lib_var=yes"
10774 else
10775   echo "configure: failed program was:" >&5
10776   cat conftest.$ac_ext >&5
10777   rm -rf conftest*
10778   eval "ac_cv_lib_$ac_lib_var=no"
10779 fi
10780 rm -f conftest*
10781 LIBS="$ac_save_LIBS"
10782
10783 fi
10784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10785   echo "$ac_t""yes" 1>&6
10786   have_ssleay=yes
10787                         need_rsaref=no
10788 else
10789   echo "$ac_t""no" 1>&6
10790 have_ssleay=no
10791 fi
10792
10793                         
10794                 if test $have_ssleay = no ; then
10795                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
10796 echo "configure:10797: checking for SSL_library_init in -lssl" >&5
10797 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
10798 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10799   echo $ac_n "(cached) $ac_c" 1>&6
10800 else
10801   ac_save_LIBS="$LIBS"
10802 LIBS="-lssl -lcrypto $LIBS"
10803 cat > conftest.$ac_ext <<EOF
10804 #line 10805 "configure"
10805 #include "confdefs.h"
10806 /* Override any gcc2 internal prototype to avoid an error.  */
10807 /* We use char because int might match the return type of a gcc2
10808     builtin and then its argument prototype would still apply.  */
10809 char SSL_library_init();
10810
10811 int main() {
10812 SSL_library_init()
10813 ; return 0; }
10814 EOF
10815 if { (eval echo configure:10816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10816   rm -rf conftest*
10817   eval "ac_cv_lib_$ac_lib_var=yes"
10818 else
10819   echo "configure: failed program was:" >&5
10820   cat conftest.$ac_ext >&5
10821   rm -rf conftest*
10822   eval "ac_cv_lib_$ac_lib_var=no"
10823 fi
10824 rm -f conftest*
10825 LIBS="$ac_save_LIBS"
10826
10827 fi
10828 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10829   echo "$ac_t""yes" 1>&6
10830   have_ssleay=yes
10831                                 need_rsaref=no
10832 else
10833   echo "$ac_t""no" 1>&6
10834 have_ssleay=no
10835 fi
10836
10837                 fi
10838
10839                 if test $have_ssleay = no ; then
10840                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
10841 echo "configure:10842: checking for ssl3_accept in -lssl" >&5
10842 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
10843 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10844   echo $ac_n "(cached) $ac_c" 1>&6
10845 else
10846   ac_save_LIBS="$LIBS"
10847 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
10848 cat > conftest.$ac_ext <<EOF
10849 #line 10850 "configure"
10850 #include "confdefs.h"
10851 /* Override any gcc2 internal prototype to avoid an error.  */
10852 /* We use char because int might match the return type of a gcc2
10853     builtin and then its argument prototype would still apply.  */
10854 char ssl3_accept();
10855
10856 int main() {
10857 ssl3_accept()
10858 ; return 0; }
10859 EOF
10860 if { (eval echo configure:10861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10861   rm -rf conftest*
10862   eval "ac_cv_lib_$ac_lib_var=yes"
10863 else
10864   echo "configure: failed program was:" >&5
10865   cat conftest.$ac_ext >&5
10866   rm -rf conftest*
10867   eval "ac_cv_lib_$ac_lib_var=no"
10868 fi
10869 rm -f conftest*
10870 LIBS="$ac_save_LIBS"
10871
10872 fi
10873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10874   echo "$ac_t""yes" 1>&6
10875   have_ssleay=yes
10876                                 need_rsaref=yes
10877 else
10878   echo "$ac_t""no" 1>&6
10879 have_ssleay=no
10880 fi
10881
10882                 fi
10883
10884                 if test $have_ssleay = yes ; then
10885                         ol_with_tls=found
10886                         ol_link_tls=yes
10887
10888                         cat >> confdefs.h <<\EOF
10889 #define HAVE_SSLEAY 1
10890 EOF
10891
10892
10893                         if test $need_rsaref = yes; then
10894                                 cat >> confdefs.h <<\EOF
10895 #define HAVE_RSAREF 1
10896 EOF
10897
10898
10899                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
10900                         else
10901                                 TLS_LIBS="-lssl -lcrypto"
10902                         fi
10903                 fi
10904         fi
10905
10906 else
10907         echo "configure: warning: TLS data protection not supported!" 1>&2
10908 fi
10909
10910 WITH_TLS=no
10911 if test $ol_link_tls = yes ; then
10912         cat >> confdefs.h <<\EOF
10913 #define HAVE_TLS 1
10914 EOF
10915
10916         WITH_TLS=yes
10917
10918 elif test $ol_with_tls = auto ; then
10919         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
10920         echo "configure: warning: TLS data protection not supported!" 1>&2
10921
10922 elif test $ol_with_tls != no ; then
10923         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
10924 fi
10925
10926 if test $ol_enable_lmpasswd != no; then
10927         if test $ol_link_tls != yes ; then
10928                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
10929         fi
10930
10931         cat >> confdefs.h <<\EOF
10932 #define SLAPD_LMHASH 1
10933 EOF
10934
10935 fi
10936
10937 ol_link_threads=no
10938
10939 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10940         -o $ol_with_threads = nt ; then
10941
10942         
10943         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
10944 echo "configure:10945: checking for _beginthread" >&5
10945 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
10946   echo $ac_n "(cached) $ac_c" 1>&6
10947 else
10948   cat > conftest.$ac_ext <<EOF
10949 #line 10950 "configure"
10950 #include "confdefs.h"
10951 /* System header to define __stub macros and hopefully few prototypes,
10952     which can conflict with char _beginthread(); below.  */
10953 #include <assert.h>
10954 /* Override any gcc2 internal prototype to avoid an error.  */
10955 /* We use char because int might match the return type of a gcc2
10956     builtin and then its argument prototype would still apply.  */
10957 char _beginthread();
10958 char (*f)();
10959
10960 int main() {
10961
10962 /* The GNU C library defines this for functions which it implements
10963     to always fail with ENOSYS.  Some functions are actually named
10964     something starting with __ and the normal name is an alias.  */
10965 #if defined (__stub__beginthread) || defined (__stub____beginthread)
10966 choke me
10967 #else
10968 f = _beginthread;
10969 #endif
10970
10971 ; return 0; }
10972 EOF
10973 if { (eval echo configure:10974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10974   rm -rf conftest*
10975   eval "ac_cv_func__beginthread=yes"
10976 else
10977   echo "configure: failed program was:" >&5
10978   cat conftest.$ac_ext >&5
10979   rm -rf conftest*
10980   eval "ac_cv_func__beginthread=no"
10981 fi
10982 rm -f conftest*
10983 fi
10984
10985 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
10986   echo "$ac_t""yes" 1>&6
10987   :
10988 else
10989   echo "$ac_t""no" 1>&6
10990 fi
10991
10992
10993         if test $ac_cv_func__beginthread = yes ; then
10994                 cat >> confdefs.h <<\EOF
10995 #define HAVE_NT_THREADS 1
10996 EOF
10997
10998                 ol_cv_nt_threads=yes
10999         fi
11000
11001
11002         if test "$ol_cv_nt_threads" = yes ; then
11003                 ol_link_threads=nt
11004                 ol_with_threads=found
11005                 ol_with_yielding_select=yes
11006
11007                 cat >> confdefs.h <<\EOF
11008 #define HAVE_NT_SERVICE_MANAGER 1
11009 EOF
11010
11011                 cat >> confdefs.h <<\EOF
11012 #define HAVE_NT_EVENT_LOG 1
11013 EOF
11014
11015         fi
11016
11017         if test $ol_with_threads = nt ; then
11018                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11019         fi
11020 fi
11021
11022 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11023         -o $ol_with_threads = posix ; then
11024
11025         for ac_hdr in pthread.h
11026 do
11027 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11028 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11029 echo "configure:11030: checking for $ac_hdr" >&5
11030 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11031   echo $ac_n "(cached) $ac_c" 1>&6
11032 else
11033   cat > conftest.$ac_ext <<EOF
11034 #line 11035 "configure"
11035 #include "confdefs.h"
11036 #include <$ac_hdr>
11037 EOF
11038 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11039 { (eval echo configure:11040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11040 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11041 if test -z "$ac_err"; then
11042   rm -rf conftest*
11043   eval "ac_cv_header_$ac_safe=yes"
11044 else
11045   echo "$ac_err" >&5
11046   echo "configure: failed program was:" >&5
11047   cat conftest.$ac_ext >&5
11048   rm -rf conftest*
11049   eval "ac_cv_header_$ac_safe=no"
11050 fi
11051 rm -f conftest*
11052 fi
11053 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11054   echo "$ac_t""yes" 1>&6
11055     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11056   cat >> confdefs.h <<EOF
11057 #define $ac_tr_hdr 1
11058 EOF
11059  
11060 else
11061   echo "$ac_t""no" 1>&6
11062 fi
11063 done
11064
11065
11066         if test $ac_cv_header_pthread_h = yes ; then
11067                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11068 echo "configure:11069: checking POSIX thread version" >&5
11069 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11070   echo $ac_n "(cached) $ac_c" 1>&6
11071 else
11072   
11073         cat > conftest.$ac_ext <<EOF
11074 #line 11075 "configure"
11075 #include "confdefs.h"
11076
11077 #               include <pthread.h>
11078         
11079 int main() {
11080
11081                 int i = PTHREAD_CREATE_JOINABLE;
11082         
11083 ; return 0; }
11084 EOF
11085 if { (eval echo configure:11086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11086   rm -rf conftest*
11087   
11088         cat > conftest.$ac_ext <<EOF
11089 #line 11090 "configure"
11090 #include "confdefs.h"
11091 #include <pthread.h>
11092 EOF
11093 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11094   egrep "pthread_detach" >/dev/null 2>&1; then
11095   rm -rf conftest*
11096   ol_cv_pthread_version=10
11097 else
11098   rm -rf conftest*
11099   ol_cv_pthread_version=8
11100 fi
11101 rm -f conftest*
11102
11103 else
11104   echo "configure: failed program was:" >&5
11105   cat conftest.$ac_ext >&5
11106   rm -rf conftest*
11107   
11108         cat > conftest.$ac_ext <<EOF
11109 #line 11110 "configure"
11110 #include "confdefs.h"
11111
11112 #               include <pthread.h>
11113 #               ifdef PTHREAD_CREATE_UNDETACHED
11114                 draft7
11115 #               endif
11116         
11117 EOF
11118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11119   egrep "draft7" >/dev/null 2>&1; then
11120   rm -rf conftest*
11121   ol_cv_pthread_version=7
11122 else
11123   rm -rf conftest*
11124   
11125         cat > conftest.$ac_ext <<EOF
11126 #line 11127 "configure"
11127 #include "confdefs.h"
11128 #include <pthread.h>
11129 EOF
11130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11131   egrep "pthread_attr_init" >/dev/null 2>&1; then
11132   rm -rf conftest*
11133   ol_cv_pthread_version=6
11134 else
11135   rm -rf conftest*
11136   
11137         cat > conftest.$ac_ext <<EOF
11138 #line 11139 "configure"
11139 #include "confdefs.h"
11140
11141 #               include <pthread.h>
11142 #ifdef          PTHREAD_MUTEX_INITIALIZER
11143                 draft5
11144 #endif
11145         
11146 EOF
11147 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11148   egrep "draft5" >/dev/null 2>&1; then
11149   rm -rf conftest*
11150   ol_cv_pthread_version=5
11151 else
11152   rm -rf conftest*
11153   ol_cv_pthread_version=4
11154 fi
11155 rm -f conftest*
11156  
11157 fi
11158 rm -f conftest*
11159  
11160 fi
11161 rm -f conftest*
11162  
11163 fi
11164 rm -f conftest*
11165
11166 fi
11167
11168 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11169
11170
11171                 if test $ol_cv_pthread_version != 0 ; then
11172                         cat >> confdefs.h <<EOF
11173 #define HAVE_PTHREADS $ol_cv_pthread_version
11174 EOF
11175
11176                 else
11177                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11178                 fi
11179
11180                 # consider threads found
11181                 ol_with_threads=found
11182
11183                 
11184         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11185 echo "configure:11186: checking for LinuxThreads pthread.h" >&5
11186 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11187   echo $ac_n "(cached) $ac_c" 1>&6
11188 else
11189   cat > conftest.$ac_ext <<EOF
11190 #line 11191 "configure"
11191 #include "confdefs.h"
11192 #include <pthread.h>
11193 EOF
11194 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11195   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11196   rm -rf conftest*
11197   ol_cv_header_linux_threads=yes
11198 else
11199   rm -rf conftest*
11200   ol_cv_header_linux_threads=no
11201 fi
11202 rm -f conftest*
11203
11204                 
11205 fi
11206
11207 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11208         if test $ol_cv_header_linux_threads = yes; then
11209                 cat >> confdefs.h <<\EOF
11210 #define HAVE_LINUX_THREADS 1
11211 EOF
11212
11213         fi
11214
11215                 
11216         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11217 echo "configure:11218: checking for GNU Pth pthread.h" >&5
11218 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11219   echo $ac_n "(cached) $ac_c" 1>&6
11220 else
11221   cat > conftest.$ac_ext <<EOF
11222 #line 11223 "configure"
11223 #include "confdefs.h"
11224 #include <pthread.h>
11225 #ifdef _POSIX_THREAD_IS_GNU_PTH
11226         __gnu_pth__;
11227 #endif
11228
11229 EOF
11230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11231   egrep "__gnu_pth__" >/dev/null 2>&1; then
11232   rm -rf conftest*
11233   ol_cv_header_gnu_pth_pthread_h=yes
11234 else
11235   rm -rf conftest*
11236   ol_cv_header_gnu_pth_pthread_h=no
11237 fi
11238 rm -f conftest*
11239
11240                 
11241 fi
11242
11243 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11244
11245
11246                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11247                         for ac_hdr in sched.h
11248 do
11249 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11250 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11251 echo "configure:11252: checking for $ac_hdr" >&5
11252 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11253   echo $ac_n "(cached) $ac_c" 1>&6
11254 else
11255   cat > conftest.$ac_ext <<EOF
11256 #line 11257 "configure"
11257 #include "confdefs.h"
11258 #include <$ac_hdr>
11259 EOF
11260 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11261 { (eval echo configure:11262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11262 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11263 if test -z "$ac_err"; then
11264   rm -rf conftest*
11265   eval "ac_cv_header_$ac_safe=yes"
11266 else
11267   echo "$ac_err" >&5
11268   echo "configure: failed program was:" >&5
11269   cat conftest.$ac_ext >&5
11270   rm -rf conftest*
11271   eval "ac_cv_header_$ac_safe=no"
11272 fi
11273 rm -f conftest*
11274 fi
11275 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11276   echo "$ac_t""yes" 1>&6
11277     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11278   cat >> confdefs.h <<EOF
11279 #define $ac_tr_hdr 1
11280 EOF
11281  
11282 else
11283   echo "$ac_t""no" 1>&6
11284 fi
11285 done
11286
11287                 fi
11288
11289                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11290                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11291 echo "configure:11292: checking for pthread_create in default libraries" >&5
11292 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11293   echo $ac_n "(cached) $ac_c" 1>&6
11294 else
11295   
11296                 if test "$cross_compiling" = yes; then
11297   cat > conftest.$ac_ext <<EOF
11298 #line 11299 "configure"
11299 #include "confdefs.h"
11300 /* pthread test headers */
11301 #include <pthread.h>
11302 #if HAVE_PTHREADS < 7
11303 #include <errno.h>
11304 #endif
11305 #ifndef NULL
11306 #define NULL (void*)0
11307 #endif
11308
11309 static void *task(p)
11310         void *p;
11311 {
11312         return (void *) (p == NULL);
11313 }
11314
11315 int main() {
11316
11317         /* pthread test function */
11318 #ifndef PTHREAD_CREATE_DETACHED
11319 #define PTHREAD_CREATE_DETACHED 1
11320 #endif
11321         pthread_t t;
11322         int status;
11323         int detach = PTHREAD_CREATE_DETACHED;
11324
11325 #if HAVE_PTHREADS > 4
11326         /* Final pthreads */
11327         pthread_attr_t attr;
11328
11329         status = pthread_attr_init(&attr);
11330         if( status ) return status;
11331
11332 #if HAVE_PTHREADS < 7
11333         status = pthread_attr_setdetachstate(&attr, &detach);
11334         if( status < 0 ) status = errno;
11335 #else
11336         status = pthread_attr_setdetachstate(&attr, detach);
11337 #endif
11338         if( status ) return status;
11339         status = pthread_create( &t, &attr, task, NULL );
11340 #if HAVE_PTHREADS < 7
11341         if( status < 0 ) status = errno;
11342 #endif
11343         if( status ) return status;
11344 #else
11345         /* Draft 4 pthreads */
11346         status = pthread_create( &t, pthread_attr_default, task, NULL );
11347         if( status ) return errno;
11348
11349         /* give thread a chance to complete */
11350         /* it should remain joinable and hence detachable */
11351         sleep( 1 );
11352
11353         status = pthread_detach( &t );
11354         if( status ) return errno;
11355 #endif
11356
11357 #ifdef HAVE_LINUX_THREADS
11358         pthread_kill_other_threads_np();
11359 #endif
11360
11361         return 0;
11362
11363 ; return 0; }
11364 EOF
11365 if { (eval echo configure:11366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11366   rm -rf conftest*
11367   ol_cv_pthread_create=yes
11368 else
11369   echo "configure: failed program was:" >&5
11370   cat conftest.$ac_ext >&5
11371   rm -rf conftest*
11372   ol_cv_pthread_create=no
11373 fi
11374 rm -f conftest*
11375 else
11376   cat > conftest.$ac_ext <<EOF
11377 #line 11378 "configure"
11378 #include "confdefs.h"
11379 /* pthread test headers */
11380 #include <pthread.h>
11381 #if HAVE_PTHREADS < 7
11382 #include <errno.h>
11383 #endif
11384 #ifndef NULL
11385 #define NULL (void*)0
11386 #endif
11387
11388 static void *task(p)
11389         void *p;
11390 {
11391         return (void *) (p == NULL);
11392 }
11393
11394
11395 int main(argc, argv)
11396         int argc;
11397         char **argv;
11398 {
11399
11400         /* pthread test function */
11401 #ifndef PTHREAD_CREATE_DETACHED
11402 #define PTHREAD_CREATE_DETACHED 1
11403 #endif
11404         pthread_t t;
11405         int status;
11406         int detach = PTHREAD_CREATE_DETACHED;
11407
11408 #if HAVE_PTHREADS > 4
11409         /* Final pthreads */
11410         pthread_attr_t attr;
11411
11412         status = pthread_attr_init(&attr);
11413         if( status ) return status;
11414
11415 #if HAVE_PTHREADS < 7
11416         status = pthread_attr_setdetachstate(&attr, &detach);
11417         if( status < 0 ) status = errno;
11418 #else
11419         status = pthread_attr_setdetachstate(&attr, detach);
11420 #endif
11421         if( status ) return status;
11422         status = pthread_create( &t, &attr, task, NULL );
11423 #if HAVE_PTHREADS < 7
11424         if( status < 0 ) status = errno;
11425 #endif
11426         if( status ) return status;
11427 #else
11428         /* Draft 4 pthreads */
11429         status = pthread_create( &t, pthread_attr_default, task, NULL );
11430         if( status ) return errno;
11431
11432         /* give thread a chance to complete */
11433         /* it should remain joinable and hence detachable */
11434         sleep( 1 );
11435
11436         status = pthread_detach( &t );
11437         if( status ) return errno;
11438 #endif
11439
11440 #ifdef HAVE_LINUX_THREADS
11441         pthread_kill_other_threads_np();
11442 #endif
11443
11444         return 0;
11445
11446 }
11447
11448 EOF
11449 if { (eval echo configure:11450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
11450 then
11451   ol_cv_pthread_create=yes
11452 else
11453   echo "configure: failed program was:" >&5
11454   cat conftest.$ac_ext >&5
11455   rm -fr conftest*
11456   ol_cv_pthread_create=no
11457 fi
11458 rm -fr conftest*
11459 fi
11460
11461 fi
11462
11463 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11464
11465                 if test $ol_cv_pthread_create != no ; then
11466                         ol_link_threads=posix
11467                         ol_link_pthreads=""
11468                 fi
11469                 
11470                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11471 if test "$ol_link_threads" = no ; then
11472         # try -kthread
11473         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11474 echo "configure:11475: checking for pthread link with -kthread" >&5
11475 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11476   echo $ac_n "(cached) $ac_c" 1>&6
11477 else
11478   
11479                 # save the flags
11480                 ol_LIBS="$LIBS"
11481                 LIBS="-kthread $LIBS"
11482
11483                 if test "$cross_compiling" = yes; then
11484   cat > conftest.$ac_ext <<EOF
11485 #line 11486 "configure"
11486 #include "confdefs.h"
11487 /* pthread test headers */
11488 #include <pthread.h>
11489 #if HAVE_PTHREADS < 7
11490 #include <errno.h>
11491 #endif
11492 #ifndef NULL
11493 #define NULL (void*)0
11494 #endif
11495
11496 static void *task(p)
11497         void *p;
11498 {
11499         return (void *) (p == NULL);
11500 }
11501
11502 int main() {
11503
11504         /* pthread test function */
11505 #ifndef PTHREAD_CREATE_DETACHED
11506 #define PTHREAD_CREATE_DETACHED 1
11507 #endif
11508         pthread_t t;
11509         int status;
11510         int detach = PTHREAD_CREATE_DETACHED;
11511
11512 #if HAVE_PTHREADS > 4
11513         /* Final pthreads */
11514         pthread_attr_t attr;
11515
11516         status = pthread_attr_init(&attr);
11517         if( status ) return status;
11518
11519 #if HAVE_PTHREADS < 7
11520         status = pthread_attr_setdetachstate(&attr, &detach);
11521         if( status < 0 ) status = errno;
11522 #else
11523         status = pthread_attr_setdetachstate(&attr, detach);
11524 #endif
11525         if( status ) return status;
11526         status = pthread_create( &t, &attr, task, NULL );
11527 #if HAVE_PTHREADS < 7
11528         if( status < 0 ) status = errno;
11529 #endif
11530         if( status ) return status;
11531 #else
11532         /* Draft 4 pthreads */
11533         status = pthread_create( &t, pthread_attr_default, task, NULL );
11534         if( status ) return errno;
11535
11536         /* give thread a chance to complete */
11537         /* it should remain joinable and hence detachable */
11538         sleep( 1 );
11539
11540         status = pthread_detach( &t );
11541         if( status ) return errno;
11542 #endif
11543
11544 #ifdef HAVE_LINUX_THREADS
11545         pthread_kill_other_threads_np();
11546 #endif
11547
11548         return 0;
11549
11550 ; return 0; }
11551 EOF
11552 if { (eval echo configure:11553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11553   rm -rf conftest*
11554   ol_cv_pthread_kthread=yes
11555 else
11556   echo "configure: failed program was:" >&5
11557   cat conftest.$ac_ext >&5
11558   rm -rf conftest*
11559   ol_cv_pthread_kthread=no
11560 fi
11561 rm -f conftest*
11562 else
11563   cat > conftest.$ac_ext <<EOF
11564 #line 11565 "configure"
11565 #include "confdefs.h"
11566 /* pthread test headers */
11567 #include <pthread.h>
11568 #if HAVE_PTHREADS < 7
11569 #include <errno.h>
11570 #endif
11571 #ifndef NULL
11572 #define NULL (void*)0
11573 #endif
11574
11575 static void *task(p)
11576         void *p;
11577 {
11578         return (void *) (p == NULL);
11579 }
11580
11581
11582 int main(argc, argv)
11583         int argc;
11584         char **argv;
11585 {
11586
11587         /* pthread test function */
11588 #ifndef PTHREAD_CREATE_DETACHED
11589 #define PTHREAD_CREATE_DETACHED 1
11590 #endif
11591         pthread_t t;
11592         int status;
11593         int detach = PTHREAD_CREATE_DETACHED;
11594
11595 #if HAVE_PTHREADS > 4
11596         /* Final pthreads */
11597         pthread_attr_t attr;
11598
11599         status = pthread_attr_init(&attr);
11600         if( status ) return status;
11601
11602 #if HAVE_PTHREADS < 7
11603         status = pthread_attr_setdetachstate(&attr, &detach);
11604         if( status < 0 ) status = errno;
11605 #else
11606         status = pthread_attr_setdetachstate(&attr, detach);
11607 #endif
11608         if( status ) return status;
11609         status = pthread_create( &t, &attr, task, NULL );
11610 #if HAVE_PTHREADS < 7
11611         if( status < 0 ) status = errno;
11612 #endif
11613         if( status ) return status;
11614 #else
11615         /* Draft 4 pthreads */
11616         status = pthread_create( &t, pthread_attr_default, task, NULL );
11617         if( status ) return errno;
11618
11619         /* give thread a chance to complete */
11620         /* it should remain joinable and hence detachable */
11621         sleep( 1 );
11622
11623         status = pthread_detach( &t );
11624         if( status ) return errno;
11625 #endif
11626
11627 #ifdef HAVE_LINUX_THREADS
11628         pthread_kill_other_threads_np();
11629 #endif
11630
11631         return 0;
11632
11633 }
11634
11635 EOF
11636 if { (eval echo configure:11637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
11637 then
11638   ol_cv_pthread_kthread=yes
11639 else
11640   echo "configure: failed program was:" >&5
11641   cat conftest.$ac_ext >&5
11642   rm -fr conftest*
11643   ol_cv_pthread_kthread=no
11644 fi
11645 rm -fr conftest*
11646 fi
11647
11648
11649                 # restore the LIBS
11650                 LIBS="$ol_LIBS"
11651         
11652 fi
11653
11654 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11655
11656         if test $ol_cv_pthread_kthread = yes ; then
11657                 ol_link_pthreads="-kthread"
11658                 ol_link_threads=posix
11659         fi
11660 fi
11661
11662                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11663 if test "$ol_link_threads" = no ; then
11664         # try -pthread
11665         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11666 echo "configure:11667: checking for pthread link with -pthread" >&5
11667 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11668   echo $ac_n "(cached) $ac_c" 1>&6
11669 else
11670   
11671                 # save the flags
11672                 ol_LIBS="$LIBS"
11673                 LIBS="-pthread $LIBS"
11674
11675                 if test "$cross_compiling" = yes; then
11676   cat > conftest.$ac_ext <<EOF
11677 #line 11678 "configure"
11678 #include "confdefs.h"
11679 /* pthread test headers */
11680 #include <pthread.h>
11681 #if HAVE_PTHREADS < 7
11682 #include <errno.h>
11683 #endif
11684 #ifndef NULL
11685 #define NULL (void*)0
11686 #endif
11687
11688 static void *task(p)
11689         void *p;
11690 {
11691         return (void *) (p == NULL);
11692 }
11693
11694 int main() {
11695
11696         /* pthread test function */
11697 #ifndef PTHREAD_CREATE_DETACHED
11698 #define PTHREAD_CREATE_DETACHED 1
11699 #endif
11700         pthread_t t;
11701         int status;
11702         int detach = PTHREAD_CREATE_DETACHED;
11703
11704 #if HAVE_PTHREADS > 4
11705         /* Final pthreads */
11706         pthread_attr_t attr;
11707
11708         status = pthread_attr_init(&attr);
11709         if( status ) return status;
11710
11711 #if HAVE_PTHREADS < 7
11712         status = pthread_attr_setdetachstate(&attr, &detach);
11713         if( status < 0 ) status = errno;
11714 #else
11715         status = pthread_attr_setdetachstate(&attr, detach);
11716 #endif
11717         if( status ) return status;
11718         status = pthread_create( &t, &attr, task, NULL );
11719 #if HAVE_PTHREADS < 7
11720         if( status < 0 ) status = errno;
11721 #endif
11722         if( status ) return status;
11723 #else
11724         /* Draft 4 pthreads */
11725         status = pthread_create( &t, pthread_attr_default, task, NULL );
11726         if( status ) return errno;
11727
11728         /* give thread a chance to complete */
11729         /* it should remain joinable and hence detachable */
11730         sleep( 1 );
11731
11732         status = pthread_detach( &t );
11733         if( status ) return errno;
11734 #endif
11735
11736 #ifdef HAVE_LINUX_THREADS
11737         pthread_kill_other_threads_np();
11738 #endif
11739
11740         return 0;
11741
11742 ; return 0; }
11743 EOF
11744 if { (eval echo configure:11745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11745   rm -rf conftest*
11746   ol_cv_pthread_pthread=yes
11747 else
11748   echo "configure: failed program was:" >&5
11749   cat conftest.$ac_ext >&5
11750   rm -rf conftest*
11751   ol_cv_pthread_pthread=no
11752 fi
11753 rm -f conftest*
11754 else
11755   cat > conftest.$ac_ext <<EOF
11756 #line 11757 "configure"
11757 #include "confdefs.h"
11758 /* pthread test headers */
11759 #include <pthread.h>
11760 #if HAVE_PTHREADS < 7
11761 #include <errno.h>
11762 #endif
11763 #ifndef NULL
11764 #define NULL (void*)0
11765 #endif
11766
11767 static void *task(p)
11768         void *p;
11769 {
11770         return (void *) (p == NULL);
11771 }
11772
11773
11774 int main(argc, argv)
11775         int argc;
11776         char **argv;
11777 {
11778
11779         /* pthread test function */
11780 #ifndef PTHREAD_CREATE_DETACHED
11781 #define PTHREAD_CREATE_DETACHED 1
11782 #endif
11783         pthread_t t;
11784         int status;
11785         int detach = PTHREAD_CREATE_DETACHED;
11786
11787 #if HAVE_PTHREADS > 4
11788         /* Final pthreads */
11789         pthread_attr_t attr;
11790
11791         status = pthread_attr_init(&attr);
11792         if( status ) return status;
11793
11794 #if HAVE_PTHREADS < 7
11795         status = pthread_attr_setdetachstate(&attr, &detach);
11796         if( status < 0 ) status = errno;
11797 #else
11798         status = pthread_attr_setdetachstate(&attr, detach);
11799 #endif
11800         if( status ) return status;
11801         status = pthread_create( &t, &attr, task, NULL );
11802 #if HAVE_PTHREADS < 7
11803         if( status < 0 ) status = errno;
11804 #endif
11805         if( status ) return status;
11806 #else
11807         /* Draft 4 pthreads */
11808         status = pthread_create( &t, pthread_attr_default, task, NULL );
11809         if( status ) return errno;
11810
11811         /* give thread a chance to complete */
11812         /* it should remain joinable and hence detachable */
11813         sleep( 1 );
11814
11815         status = pthread_detach( &t );
11816         if( status ) return errno;
11817 #endif
11818
11819 #ifdef HAVE_LINUX_THREADS
11820         pthread_kill_other_threads_np();
11821 #endif
11822
11823         return 0;
11824
11825 }
11826
11827 EOF
11828 if { (eval echo configure:11829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
11829 then
11830   ol_cv_pthread_pthread=yes
11831 else
11832   echo "configure: failed program was:" >&5
11833   cat conftest.$ac_ext >&5
11834   rm -fr conftest*
11835   ol_cv_pthread_pthread=no
11836 fi
11837 rm -fr conftest*
11838 fi
11839
11840
11841                 # restore the LIBS
11842                 LIBS="$ol_LIBS"
11843         
11844 fi
11845
11846 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
11847
11848         if test $ol_cv_pthread_pthread = yes ; then
11849                 ol_link_pthreads="-pthread"
11850                 ol_link_threads=posix
11851         fi
11852 fi
11853
11854                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
11855 if test "$ol_link_threads" = no ; then
11856         # try -pthreads
11857         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
11858 echo "configure:11859: checking for pthread link with -pthreads" >&5
11859 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
11860   echo $ac_n "(cached) $ac_c" 1>&6
11861 else
11862   
11863                 # save the flags
11864                 ol_LIBS="$LIBS"
11865                 LIBS="-pthreads $LIBS"
11866
11867                 if test "$cross_compiling" = yes; then
11868   cat > conftest.$ac_ext <<EOF
11869 #line 11870 "configure"
11870 #include "confdefs.h"
11871 /* pthread test headers */
11872 #include <pthread.h>
11873 #if HAVE_PTHREADS < 7
11874 #include <errno.h>
11875 #endif
11876 #ifndef NULL
11877 #define NULL (void*)0
11878 #endif
11879
11880 static void *task(p)
11881         void *p;
11882 {
11883         return (void *) (p == NULL);
11884 }
11885
11886 int main() {
11887
11888         /* pthread test function */
11889 #ifndef PTHREAD_CREATE_DETACHED
11890 #define PTHREAD_CREATE_DETACHED 1
11891 #endif
11892         pthread_t t;
11893         int status;
11894         int detach = PTHREAD_CREATE_DETACHED;
11895
11896 #if HAVE_PTHREADS > 4
11897         /* Final pthreads */
11898         pthread_attr_t attr;
11899
11900         status = pthread_attr_init(&attr);
11901         if( status ) return status;
11902
11903 #if HAVE_PTHREADS < 7
11904         status = pthread_attr_setdetachstate(&attr, &detach);
11905         if( status < 0 ) status = errno;
11906 #else
11907         status = pthread_attr_setdetachstate(&attr, detach);
11908 #endif
11909         if( status ) return status;
11910         status = pthread_create( &t, &attr, task, NULL );
11911 #if HAVE_PTHREADS < 7
11912         if( status < 0 ) status = errno;
11913 #endif
11914         if( status ) return status;
11915 #else
11916         /* Draft 4 pthreads */
11917         status = pthread_create( &t, pthread_attr_default, task, NULL );
11918         if( status ) return errno;
11919
11920         /* give thread a chance to complete */
11921         /* it should remain joinable and hence detachable */
11922         sleep( 1 );
11923
11924         status = pthread_detach( &t );
11925         if( status ) return errno;
11926 #endif
11927
11928 #ifdef HAVE_LINUX_THREADS
11929         pthread_kill_other_threads_np();
11930 #endif
11931
11932         return 0;
11933
11934 ; return 0; }
11935 EOF
11936 if { (eval echo configure:11937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11937   rm -rf conftest*
11938   ol_cv_pthread_pthreads=yes
11939 else
11940   echo "configure: failed program was:" >&5
11941   cat conftest.$ac_ext >&5
11942   rm -rf conftest*
11943   ol_cv_pthread_pthreads=no
11944 fi
11945 rm -f conftest*
11946 else
11947   cat > conftest.$ac_ext <<EOF
11948 #line 11949 "configure"
11949 #include "confdefs.h"
11950 /* pthread test headers */
11951 #include <pthread.h>
11952 #if HAVE_PTHREADS < 7
11953 #include <errno.h>
11954 #endif
11955 #ifndef NULL
11956 #define NULL (void*)0
11957 #endif
11958
11959 static void *task(p)
11960         void *p;
11961 {
11962         return (void *) (p == NULL);
11963 }
11964
11965
11966 int main(argc, argv)
11967         int argc;
11968         char **argv;
11969 {
11970
11971         /* pthread test function */
11972 #ifndef PTHREAD_CREATE_DETACHED
11973 #define PTHREAD_CREATE_DETACHED 1
11974 #endif
11975         pthread_t t;
11976         int status;
11977         int detach = PTHREAD_CREATE_DETACHED;
11978
11979 #if HAVE_PTHREADS > 4
11980         /* Final pthreads */
11981         pthread_attr_t attr;
11982
11983         status = pthread_attr_init(&attr);
11984         if( status ) return status;
11985
11986 #if HAVE_PTHREADS < 7
11987         status = pthread_attr_setdetachstate(&attr, &detach);
11988         if( status < 0 ) status = errno;
11989 #else
11990         status = pthread_attr_setdetachstate(&attr, detach);
11991 #endif
11992         if( status ) return status;
11993         status = pthread_create( &t, &attr, task, NULL );
11994 #if HAVE_PTHREADS < 7
11995         if( status < 0 ) status = errno;
11996 #endif
11997         if( status ) return status;
11998 #else
11999         /* Draft 4 pthreads */
12000         status = pthread_create( &t, pthread_attr_default, task, NULL );
12001         if( status ) return errno;
12002
12003         /* give thread a chance to complete */
12004         /* it should remain joinable and hence detachable */
12005         sleep( 1 );
12006
12007         status = pthread_detach( &t );
12008         if( status ) return errno;
12009 #endif
12010
12011 #ifdef HAVE_LINUX_THREADS
12012         pthread_kill_other_threads_np();
12013 #endif
12014
12015         return 0;
12016
12017 }
12018
12019 EOF
12020 if { (eval echo configure:12021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12021 then
12022   ol_cv_pthread_pthreads=yes
12023 else
12024   echo "configure: failed program was:" >&5
12025   cat conftest.$ac_ext >&5
12026   rm -fr conftest*
12027   ol_cv_pthread_pthreads=no
12028 fi
12029 rm -fr conftest*
12030 fi
12031
12032
12033                 # restore the LIBS
12034                 LIBS="$ol_LIBS"
12035         
12036 fi
12037
12038 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12039
12040         if test $ol_cv_pthread_pthreads = yes ; then
12041                 ol_link_pthreads="-pthreads"
12042                 ol_link_threads=posix
12043         fi
12044 fi
12045
12046                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12047 if test "$ol_link_threads" = no ; then
12048         # try -mthreads
12049         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12050 echo "configure:12051: checking for pthread link with -mthreads" >&5
12051 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12052   echo $ac_n "(cached) $ac_c" 1>&6
12053 else
12054   
12055                 # save the flags
12056                 ol_LIBS="$LIBS"
12057                 LIBS="-mthreads $LIBS"
12058
12059                 if test "$cross_compiling" = yes; then
12060   cat > conftest.$ac_ext <<EOF
12061 #line 12062 "configure"
12062 #include "confdefs.h"
12063 /* pthread test headers */
12064 #include <pthread.h>
12065 #if HAVE_PTHREADS < 7
12066 #include <errno.h>
12067 #endif
12068 #ifndef NULL
12069 #define NULL (void*)0
12070 #endif
12071
12072 static void *task(p)
12073         void *p;
12074 {
12075         return (void *) (p == NULL);
12076 }
12077
12078 int main() {
12079
12080         /* pthread test function */
12081 #ifndef PTHREAD_CREATE_DETACHED
12082 #define PTHREAD_CREATE_DETACHED 1
12083 #endif
12084         pthread_t t;
12085         int status;
12086         int detach = PTHREAD_CREATE_DETACHED;
12087
12088 #if HAVE_PTHREADS > 4
12089         /* Final pthreads */
12090         pthread_attr_t attr;
12091
12092         status = pthread_attr_init(&attr);
12093         if( status ) return status;
12094
12095 #if HAVE_PTHREADS < 7
12096         status = pthread_attr_setdetachstate(&attr, &detach);
12097         if( status < 0 ) status = errno;
12098 #else
12099         status = pthread_attr_setdetachstate(&attr, detach);
12100 #endif
12101         if( status ) return status;
12102         status = pthread_create( &t, &attr, task, NULL );
12103 #if HAVE_PTHREADS < 7
12104         if( status < 0 ) status = errno;
12105 #endif
12106         if( status ) return status;
12107 #else
12108         /* Draft 4 pthreads */
12109         status = pthread_create( &t, pthread_attr_default, task, NULL );
12110         if( status ) return errno;
12111
12112         /* give thread a chance to complete */
12113         /* it should remain joinable and hence detachable */
12114         sleep( 1 );
12115
12116         status = pthread_detach( &t );
12117         if( status ) return errno;
12118 #endif
12119
12120 #ifdef HAVE_LINUX_THREADS
12121         pthread_kill_other_threads_np();
12122 #endif
12123
12124         return 0;
12125
12126 ; return 0; }
12127 EOF
12128 if { (eval echo configure:12129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12129   rm -rf conftest*
12130   ol_cv_pthread_mthreads=yes
12131 else
12132   echo "configure: failed program was:" >&5
12133   cat conftest.$ac_ext >&5
12134   rm -rf conftest*
12135   ol_cv_pthread_mthreads=no
12136 fi
12137 rm -f conftest*
12138 else
12139   cat > conftest.$ac_ext <<EOF
12140 #line 12141 "configure"
12141 #include "confdefs.h"
12142 /* pthread test headers */
12143 #include <pthread.h>
12144 #if HAVE_PTHREADS < 7
12145 #include <errno.h>
12146 #endif
12147 #ifndef NULL
12148 #define NULL (void*)0
12149 #endif
12150
12151 static void *task(p)
12152         void *p;
12153 {
12154         return (void *) (p == NULL);
12155 }
12156
12157
12158 int main(argc, argv)
12159         int argc;
12160         char **argv;
12161 {
12162
12163         /* pthread test function */
12164 #ifndef PTHREAD_CREATE_DETACHED
12165 #define PTHREAD_CREATE_DETACHED 1
12166 #endif
12167         pthread_t t;
12168         int status;
12169         int detach = PTHREAD_CREATE_DETACHED;
12170
12171 #if HAVE_PTHREADS > 4
12172         /* Final pthreads */
12173         pthread_attr_t attr;
12174
12175         status = pthread_attr_init(&attr);
12176         if( status ) return status;
12177
12178 #if HAVE_PTHREADS < 7
12179         status = pthread_attr_setdetachstate(&attr, &detach);
12180         if( status < 0 ) status = errno;
12181 #else
12182         status = pthread_attr_setdetachstate(&attr, detach);
12183 #endif
12184         if( status ) return status;
12185         status = pthread_create( &t, &attr, task, NULL );
12186 #if HAVE_PTHREADS < 7
12187         if( status < 0 ) status = errno;
12188 #endif
12189         if( status ) return status;
12190 #else
12191         /* Draft 4 pthreads */
12192         status = pthread_create( &t, pthread_attr_default, task, NULL );
12193         if( status ) return errno;
12194
12195         /* give thread a chance to complete */
12196         /* it should remain joinable and hence detachable */
12197         sleep( 1 );
12198
12199         status = pthread_detach( &t );
12200         if( status ) return errno;
12201 #endif
12202
12203 #ifdef HAVE_LINUX_THREADS
12204         pthread_kill_other_threads_np();
12205 #endif
12206
12207         return 0;
12208
12209 }
12210
12211 EOF
12212 if { (eval echo configure:12213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12213 then
12214   ol_cv_pthread_mthreads=yes
12215 else
12216   echo "configure: failed program was:" >&5
12217   cat conftest.$ac_ext >&5
12218   rm -fr conftest*
12219   ol_cv_pthread_mthreads=no
12220 fi
12221 rm -fr conftest*
12222 fi
12223
12224
12225                 # restore the LIBS
12226                 LIBS="$ol_LIBS"
12227         
12228 fi
12229
12230 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12231
12232         if test $ol_cv_pthread_mthreads = yes ; then
12233                 ol_link_pthreads="-mthreads"
12234                 ol_link_threads=posix
12235         fi
12236 fi
12237
12238                 # Pthread try link: -thread (ol_cv_pthread_thread)
12239 if test "$ol_link_threads" = no ; then
12240         # try -thread
12241         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12242 echo "configure:12243: checking for pthread link with -thread" >&5
12243 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12244   echo $ac_n "(cached) $ac_c" 1>&6
12245 else
12246   
12247                 # save the flags
12248                 ol_LIBS="$LIBS"
12249                 LIBS="-thread $LIBS"
12250
12251                 if test "$cross_compiling" = yes; then
12252   cat > conftest.$ac_ext <<EOF
12253 #line 12254 "configure"
12254 #include "confdefs.h"
12255 /* pthread test headers */
12256 #include <pthread.h>
12257 #if HAVE_PTHREADS < 7
12258 #include <errno.h>
12259 #endif
12260 #ifndef NULL
12261 #define NULL (void*)0
12262 #endif
12263
12264 static void *task(p)
12265         void *p;
12266 {
12267         return (void *) (p == NULL);
12268 }
12269
12270 int main() {
12271
12272         /* pthread test function */
12273 #ifndef PTHREAD_CREATE_DETACHED
12274 #define PTHREAD_CREATE_DETACHED 1
12275 #endif
12276         pthread_t t;
12277         int status;
12278         int detach = PTHREAD_CREATE_DETACHED;
12279
12280 #if HAVE_PTHREADS > 4
12281         /* Final pthreads */
12282         pthread_attr_t attr;
12283
12284         status = pthread_attr_init(&attr);
12285         if( status ) return status;
12286
12287 #if HAVE_PTHREADS < 7
12288         status = pthread_attr_setdetachstate(&attr, &detach);
12289         if( status < 0 ) status = errno;
12290 #else
12291         status = pthread_attr_setdetachstate(&attr, detach);
12292 #endif
12293         if( status ) return status;
12294         status = pthread_create( &t, &attr, task, NULL );
12295 #if HAVE_PTHREADS < 7
12296         if( status < 0 ) status = errno;
12297 #endif
12298         if( status ) return status;
12299 #else
12300         /* Draft 4 pthreads */
12301         status = pthread_create( &t, pthread_attr_default, task, NULL );
12302         if( status ) return errno;
12303
12304         /* give thread a chance to complete */
12305         /* it should remain joinable and hence detachable */
12306         sleep( 1 );
12307
12308         status = pthread_detach( &t );
12309         if( status ) return errno;
12310 #endif
12311
12312 #ifdef HAVE_LINUX_THREADS
12313         pthread_kill_other_threads_np();
12314 #endif
12315
12316         return 0;
12317
12318 ; return 0; }
12319 EOF
12320 if { (eval echo configure:12321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12321   rm -rf conftest*
12322   ol_cv_pthread_thread=yes
12323 else
12324   echo "configure: failed program was:" >&5
12325   cat conftest.$ac_ext >&5
12326   rm -rf conftest*
12327   ol_cv_pthread_thread=no
12328 fi
12329 rm -f conftest*
12330 else
12331   cat > conftest.$ac_ext <<EOF
12332 #line 12333 "configure"
12333 #include "confdefs.h"
12334 /* pthread test headers */
12335 #include <pthread.h>
12336 #if HAVE_PTHREADS < 7
12337 #include <errno.h>
12338 #endif
12339 #ifndef NULL
12340 #define NULL (void*)0
12341 #endif
12342
12343 static void *task(p)
12344         void *p;
12345 {
12346         return (void *) (p == NULL);
12347 }
12348
12349
12350 int main(argc, argv)
12351         int argc;
12352         char **argv;
12353 {
12354
12355         /* pthread test function */
12356 #ifndef PTHREAD_CREATE_DETACHED
12357 #define PTHREAD_CREATE_DETACHED 1
12358 #endif
12359         pthread_t t;
12360         int status;
12361         int detach = PTHREAD_CREATE_DETACHED;
12362
12363 #if HAVE_PTHREADS > 4
12364         /* Final pthreads */
12365         pthread_attr_t attr;
12366
12367         status = pthread_attr_init(&attr);
12368         if( status ) return status;
12369
12370 #if HAVE_PTHREADS < 7
12371         status = pthread_attr_setdetachstate(&attr, &detach);
12372         if( status < 0 ) status = errno;
12373 #else
12374         status = pthread_attr_setdetachstate(&attr, detach);
12375 #endif
12376         if( status ) return status;
12377         status = pthread_create( &t, &attr, task, NULL );
12378 #if HAVE_PTHREADS < 7
12379         if( status < 0 ) status = errno;
12380 #endif
12381         if( status ) return status;
12382 #else
12383         /* Draft 4 pthreads */
12384         status = pthread_create( &t, pthread_attr_default, task, NULL );
12385         if( status ) return errno;
12386
12387         /* give thread a chance to complete */
12388         /* it should remain joinable and hence detachable */
12389         sleep( 1 );
12390
12391         status = pthread_detach( &t );
12392         if( status ) return errno;
12393 #endif
12394
12395 #ifdef HAVE_LINUX_THREADS
12396         pthread_kill_other_threads_np();
12397 #endif
12398
12399         return 0;
12400
12401 }
12402
12403 EOF
12404 if { (eval echo configure:12405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12405 then
12406   ol_cv_pthread_thread=yes
12407 else
12408   echo "configure: failed program was:" >&5
12409   cat conftest.$ac_ext >&5
12410   rm -fr conftest*
12411   ol_cv_pthread_thread=no
12412 fi
12413 rm -fr conftest*
12414 fi
12415
12416
12417                 # restore the LIBS
12418                 LIBS="$ol_LIBS"
12419         
12420 fi
12421
12422 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12423
12424         if test $ol_cv_pthread_thread = yes ; then
12425                 ol_link_pthreads="-thread"
12426                 ol_link_threads=posix
12427         fi
12428 fi
12429
12430
12431                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12432 if test "$ol_link_threads" = no ; then
12433         # try -lpthread -lmach -lexc -lc_r
12434         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12435 echo "configure:12436: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12436 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12437   echo $ac_n "(cached) $ac_c" 1>&6
12438 else
12439   
12440                 # save the flags
12441                 ol_LIBS="$LIBS"
12442                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12443
12444                 if test "$cross_compiling" = yes; then
12445   cat > conftest.$ac_ext <<EOF
12446 #line 12447 "configure"
12447 #include "confdefs.h"
12448 /* pthread test headers */
12449 #include <pthread.h>
12450 #if HAVE_PTHREADS < 7
12451 #include <errno.h>
12452 #endif
12453 #ifndef NULL
12454 #define NULL (void*)0
12455 #endif
12456
12457 static void *task(p)
12458         void *p;
12459 {
12460         return (void *) (p == NULL);
12461 }
12462
12463 int main() {
12464
12465         /* pthread test function */
12466 #ifndef PTHREAD_CREATE_DETACHED
12467 #define PTHREAD_CREATE_DETACHED 1
12468 #endif
12469         pthread_t t;
12470         int status;
12471         int detach = PTHREAD_CREATE_DETACHED;
12472
12473 #if HAVE_PTHREADS > 4
12474         /* Final pthreads */
12475         pthread_attr_t attr;
12476
12477         status = pthread_attr_init(&attr);
12478         if( status ) return status;
12479
12480 #if HAVE_PTHREADS < 7
12481         status = pthread_attr_setdetachstate(&attr, &detach);
12482         if( status < 0 ) status = errno;
12483 #else
12484         status = pthread_attr_setdetachstate(&attr, detach);
12485 #endif
12486         if( status ) return status;
12487         status = pthread_create( &t, &attr, task, NULL );
12488 #if HAVE_PTHREADS < 7
12489         if( status < 0 ) status = errno;
12490 #endif
12491         if( status ) return status;
12492 #else
12493         /* Draft 4 pthreads */
12494         status = pthread_create( &t, pthread_attr_default, task, NULL );
12495         if( status ) return errno;
12496
12497         /* give thread a chance to complete */
12498         /* it should remain joinable and hence detachable */
12499         sleep( 1 );
12500
12501         status = pthread_detach( &t );
12502         if( status ) return errno;
12503 #endif
12504
12505 #ifdef HAVE_LINUX_THREADS
12506         pthread_kill_other_threads_np();
12507 #endif
12508
12509         return 0;
12510
12511 ; return 0; }
12512 EOF
12513 if { (eval echo configure:12514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12514   rm -rf conftest*
12515   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12516 else
12517   echo "configure: failed program was:" >&5
12518   cat conftest.$ac_ext >&5
12519   rm -rf conftest*
12520   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12521 fi
12522 rm -f conftest*
12523 else
12524   cat > conftest.$ac_ext <<EOF
12525 #line 12526 "configure"
12526 #include "confdefs.h"
12527 /* pthread test headers */
12528 #include <pthread.h>
12529 #if HAVE_PTHREADS < 7
12530 #include <errno.h>
12531 #endif
12532 #ifndef NULL
12533 #define NULL (void*)0
12534 #endif
12535
12536 static void *task(p)
12537         void *p;
12538 {
12539         return (void *) (p == NULL);
12540 }
12541
12542
12543 int main(argc, argv)
12544         int argc;
12545         char **argv;
12546 {
12547
12548         /* pthread test function */
12549 #ifndef PTHREAD_CREATE_DETACHED
12550 #define PTHREAD_CREATE_DETACHED 1
12551 #endif
12552         pthread_t t;
12553         int status;
12554         int detach = PTHREAD_CREATE_DETACHED;
12555
12556 #if HAVE_PTHREADS > 4
12557         /* Final pthreads */
12558         pthread_attr_t attr;
12559
12560         status = pthread_attr_init(&attr);
12561         if( status ) return status;
12562
12563 #if HAVE_PTHREADS < 7
12564         status = pthread_attr_setdetachstate(&attr, &detach);
12565         if( status < 0 ) status = errno;
12566 #else
12567         status = pthread_attr_setdetachstate(&attr, detach);
12568 #endif
12569         if( status ) return status;
12570         status = pthread_create( &t, &attr, task, NULL );
12571 #if HAVE_PTHREADS < 7
12572         if( status < 0 ) status = errno;
12573 #endif
12574         if( status ) return status;
12575 #else
12576         /* Draft 4 pthreads */
12577         status = pthread_create( &t, pthread_attr_default, task, NULL );
12578         if( status ) return errno;
12579
12580         /* give thread a chance to complete */
12581         /* it should remain joinable and hence detachable */
12582         sleep( 1 );
12583
12584         status = pthread_detach( &t );
12585         if( status ) return errno;
12586 #endif
12587
12588 #ifdef HAVE_LINUX_THREADS
12589         pthread_kill_other_threads_np();
12590 #endif
12591
12592         return 0;
12593
12594 }
12595
12596 EOF
12597 if { (eval echo configure:12598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12598 then
12599   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12600 else
12601   echo "configure: failed program was:" >&5
12602   cat conftest.$ac_ext >&5
12603   rm -fr conftest*
12604   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12605 fi
12606 rm -fr conftest*
12607 fi
12608
12609
12610                 # restore the LIBS
12611                 LIBS="$ol_LIBS"
12612         
12613 fi
12614
12615 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12616
12617         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12618                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12619                 ol_link_threads=posix
12620         fi
12621 fi
12622
12623                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12624 if test "$ol_link_threads" = no ; then
12625         # try -lpthread -lmach -lexc
12626         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12627 echo "configure:12628: checking for pthread link with -lpthread -lmach -lexc" >&5
12628 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12629   echo $ac_n "(cached) $ac_c" 1>&6
12630 else
12631   
12632                 # save the flags
12633                 ol_LIBS="$LIBS"
12634                 LIBS="-lpthread -lmach -lexc $LIBS"
12635
12636                 if test "$cross_compiling" = yes; then
12637   cat > conftest.$ac_ext <<EOF
12638 #line 12639 "configure"
12639 #include "confdefs.h"
12640 /* pthread test headers */
12641 #include <pthread.h>
12642 #if HAVE_PTHREADS < 7
12643 #include <errno.h>
12644 #endif
12645 #ifndef NULL
12646 #define NULL (void*)0
12647 #endif
12648
12649 static void *task(p)
12650         void *p;
12651 {
12652         return (void *) (p == NULL);
12653 }
12654
12655 int main() {
12656
12657         /* pthread test function */
12658 #ifndef PTHREAD_CREATE_DETACHED
12659 #define PTHREAD_CREATE_DETACHED 1
12660 #endif
12661         pthread_t t;
12662         int status;
12663         int detach = PTHREAD_CREATE_DETACHED;
12664
12665 #if HAVE_PTHREADS > 4
12666         /* Final pthreads */
12667         pthread_attr_t attr;
12668
12669         status = pthread_attr_init(&attr);
12670         if( status ) return status;
12671
12672 #if HAVE_PTHREADS < 7
12673         status = pthread_attr_setdetachstate(&attr, &detach);
12674         if( status < 0 ) status = errno;
12675 #else
12676         status = pthread_attr_setdetachstate(&attr, detach);
12677 #endif
12678         if( status ) return status;
12679         status = pthread_create( &t, &attr, task, NULL );
12680 #if HAVE_PTHREADS < 7
12681         if( status < 0 ) status = errno;
12682 #endif
12683         if( status ) return status;
12684 #else
12685         /* Draft 4 pthreads */
12686         status = pthread_create( &t, pthread_attr_default, task, NULL );
12687         if( status ) return errno;
12688
12689         /* give thread a chance to complete */
12690         /* it should remain joinable and hence detachable */
12691         sleep( 1 );
12692
12693         status = pthread_detach( &t );
12694         if( status ) return errno;
12695 #endif
12696
12697 #ifdef HAVE_LINUX_THREADS
12698         pthread_kill_other_threads_np();
12699 #endif
12700
12701         return 0;
12702
12703 ; return 0; }
12704 EOF
12705 if { (eval echo configure:12706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12706   rm -rf conftest*
12707   ol_cv_pthread_lpthread_lmach_lexc=yes
12708 else
12709   echo "configure: failed program was:" >&5
12710   cat conftest.$ac_ext >&5
12711   rm -rf conftest*
12712   ol_cv_pthread_lpthread_lmach_lexc=no
12713 fi
12714 rm -f conftest*
12715 else
12716   cat > conftest.$ac_ext <<EOF
12717 #line 12718 "configure"
12718 #include "confdefs.h"
12719 /* pthread test headers */
12720 #include <pthread.h>
12721 #if HAVE_PTHREADS < 7
12722 #include <errno.h>
12723 #endif
12724 #ifndef NULL
12725 #define NULL (void*)0
12726 #endif
12727
12728 static void *task(p)
12729         void *p;
12730 {
12731         return (void *) (p == NULL);
12732 }
12733
12734
12735 int main(argc, argv)
12736         int argc;
12737         char **argv;
12738 {
12739
12740         /* pthread test function */
12741 #ifndef PTHREAD_CREATE_DETACHED
12742 #define PTHREAD_CREATE_DETACHED 1
12743 #endif
12744         pthread_t t;
12745         int status;
12746         int detach = PTHREAD_CREATE_DETACHED;
12747
12748 #if HAVE_PTHREADS > 4
12749         /* Final pthreads */
12750         pthread_attr_t attr;
12751
12752         status = pthread_attr_init(&attr);
12753         if( status ) return status;
12754
12755 #if HAVE_PTHREADS < 7
12756         status = pthread_attr_setdetachstate(&attr, &detach);
12757         if( status < 0 ) status = errno;
12758 #else
12759         status = pthread_attr_setdetachstate(&attr, detach);
12760 #endif
12761         if( status ) return status;
12762         status = pthread_create( &t, &attr, task, NULL );
12763 #if HAVE_PTHREADS < 7
12764         if( status < 0 ) status = errno;
12765 #endif
12766         if( status ) return status;
12767 #else
12768         /* Draft 4 pthreads */
12769         status = pthread_create( &t, pthread_attr_default, task, NULL );
12770         if( status ) return errno;
12771
12772         /* give thread a chance to complete */
12773         /* it should remain joinable and hence detachable */
12774         sleep( 1 );
12775
12776         status = pthread_detach( &t );
12777         if( status ) return errno;
12778 #endif
12779
12780 #ifdef HAVE_LINUX_THREADS
12781         pthread_kill_other_threads_np();
12782 #endif
12783
12784         return 0;
12785
12786 }
12787
12788 EOF
12789 if { (eval echo configure:12790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12790 then
12791   ol_cv_pthread_lpthread_lmach_lexc=yes
12792 else
12793   echo "configure: failed program was:" >&5
12794   cat conftest.$ac_ext >&5
12795   rm -fr conftest*
12796   ol_cv_pthread_lpthread_lmach_lexc=no
12797 fi
12798 rm -fr conftest*
12799 fi
12800
12801
12802                 # restore the LIBS
12803                 LIBS="$ol_LIBS"
12804         
12805 fi
12806
12807 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
12808
12809         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
12810                 ol_link_pthreads="-lpthread -lmach -lexc"
12811                 ol_link_threads=posix
12812         fi
12813 fi
12814
12815
12816                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
12817 if test "$ol_link_threads" = no ; then
12818         # try -lpthread -Wl,-woff,85
12819         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
12820 echo "configure:12821: checking for pthread link with -lpthread -Wl,-woff,85" >&5
12821 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
12822   echo $ac_n "(cached) $ac_c" 1>&6
12823 else
12824   
12825                 # save the flags
12826                 ol_LIBS="$LIBS"
12827                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
12828
12829                 if test "$cross_compiling" = yes; then
12830   cat > conftest.$ac_ext <<EOF
12831 #line 12832 "configure"
12832 #include "confdefs.h"
12833 /* pthread test headers */
12834 #include <pthread.h>
12835 #if HAVE_PTHREADS < 7
12836 #include <errno.h>
12837 #endif
12838 #ifndef NULL
12839 #define NULL (void*)0
12840 #endif
12841
12842 static void *task(p)
12843         void *p;
12844 {
12845         return (void *) (p == NULL);
12846 }
12847
12848 int main() {
12849
12850         /* pthread test function */
12851 #ifndef PTHREAD_CREATE_DETACHED
12852 #define PTHREAD_CREATE_DETACHED 1
12853 #endif
12854         pthread_t t;
12855         int status;
12856         int detach = PTHREAD_CREATE_DETACHED;
12857
12858 #if HAVE_PTHREADS > 4
12859         /* Final pthreads */
12860         pthread_attr_t attr;
12861
12862         status = pthread_attr_init(&attr);
12863         if( status ) return status;
12864
12865 #if HAVE_PTHREADS < 7
12866         status = pthread_attr_setdetachstate(&attr, &detach);
12867         if( status < 0 ) status = errno;
12868 #else
12869         status = pthread_attr_setdetachstate(&attr, detach);
12870 #endif
12871         if( status ) return status;
12872         status = pthread_create( &t, &attr, task, NULL );
12873 #if HAVE_PTHREADS < 7
12874         if( status < 0 ) status = errno;
12875 #endif
12876         if( status ) return status;
12877 #else
12878         /* Draft 4 pthreads */
12879         status = pthread_create( &t, pthread_attr_default, task, NULL );
12880         if( status ) return errno;
12881
12882         /* give thread a chance to complete */
12883         /* it should remain joinable and hence detachable */
12884         sleep( 1 );
12885
12886         status = pthread_detach( &t );
12887         if( status ) return errno;
12888 #endif
12889
12890 #ifdef HAVE_LINUX_THREADS
12891         pthread_kill_other_threads_np();
12892 #endif
12893
12894         return 0;
12895
12896 ; return 0; }
12897 EOF
12898 if { (eval echo configure:12899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12899   rm -rf conftest*
12900   ol_cv_pthread_lib_lpthread_woff=yes
12901 else
12902   echo "configure: failed program was:" >&5
12903   cat conftest.$ac_ext >&5
12904   rm -rf conftest*
12905   ol_cv_pthread_lib_lpthread_woff=no
12906 fi
12907 rm -f conftest*
12908 else
12909   cat > conftest.$ac_ext <<EOF
12910 #line 12911 "configure"
12911 #include "confdefs.h"
12912 /* pthread test headers */
12913 #include <pthread.h>
12914 #if HAVE_PTHREADS < 7
12915 #include <errno.h>
12916 #endif
12917 #ifndef NULL
12918 #define NULL (void*)0
12919 #endif
12920
12921 static void *task(p)
12922         void *p;
12923 {
12924         return (void *) (p == NULL);
12925 }
12926
12927
12928 int main(argc, argv)
12929         int argc;
12930         char **argv;
12931 {
12932
12933         /* pthread test function */
12934 #ifndef PTHREAD_CREATE_DETACHED
12935 #define PTHREAD_CREATE_DETACHED 1
12936 #endif
12937         pthread_t t;
12938         int status;
12939         int detach = PTHREAD_CREATE_DETACHED;
12940
12941 #if HAVE_PTHREADS > 4
12942         /* Final pthreads */
12943         pthread_attr_t attr;
12944
12945         status = pthread_attr_init(&attr);
12946         if( status ) return status;
12947
12948 #if HAVE_PTHREADS < 7
12949         status = pthread_attr_setdetachstate(&attr, &detach);
12950         if( status < 0 ) status = errno;
12951 #else
12952         status = pthread_attr_setdetachstate(&attr, detach);
12953 #endif
12954         if( status ) return status;
12955         status = pthread_create( &t, &attr, task, NULL );
12956 #if HAVE_PTHREADS < 7
12957         if( status < 0 ) status = errno;
12958 #endif
12959         if( status ) return status;
12960 #else
12961         /* Draft 4 pthreads */
12962         status = pthread_create( &t, pthread_attr_default, task, NULL );
12963         if( status ) return errno;
12964
12965         /* give thread a chance to complete */
12966         /* it should remain joinable and hence detachable */
12967         sleep( 1 );
12968
12969         status = pthread_detach( &t );
12970         if( status ) return errno;
12971 #endif
12972
12973 #ifdef HAVE_LINUX_THREADS
12974         pthread_kill_other_threads_np();
12975 #endif
12976
12977         return 0;
12978
12979 }
12980
12981 EOF
12982 if { (eval echo configure:12983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12983 then
12984   ol_cv_pthread_lib_lpthread_woff=yes
12985 else
12986   echo "configure: failed program was:" >&5
12987   cat conftest.$ac_ext >&5
12988   rm -fr conftest*
12989   ol_cv_pthread_lib_lpthread_woff=no
12990 fi
12991 rm -fr conftest*
12992 fi
12993
12994
12995                 # restore the LIBS
12996                 LIBS="$ol_LIBS"
12997         
12998 fi
12999
13000 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13001
13002         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13003                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13004                 ol_link_threads=posix
13005         fi
13006 fi
13007
13008
13009                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13010 if test "$ol_link_threads" = no ; then
13011         # try -lpthread
13012         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13013 echo "configure:13014: checking for pthread link with -lpthread" >&5
13014 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13015   echo $ac_n "(cached) $ac_c" 1>&6
13016 else
13017   
13018                 # save the flags
13019                 ol_LIBS="$LIBS"
13020                 LIBS="-lpthread $LIBS"
13021
13022                 if test "$cross_compiling" = yes; then
13023   cat > conftest.$ac_ext <<EOF
13024 #line 13025 "configure"
13025 #include "confdefs.h"
13026 /* pthread test headers */
13027 #include <pthread.h>
13028 #if HAVE_PTHREADS < 7
13029 #include <errno.h>
13030 #endif
13031 #ifndef NULL
13032 #define NULL (void*)0
13033 #endif
13034
13035 static void *task(p)
13036         void *p;
13037 {
13038         return (void *) (p == NULL);
13039 }
13040
13041 int main() {
13042
13043         /* pthread test function */
13044 #ifndef PTHREAD_CREATE_DETACHED
13045 #define PTHREAD_CREATE_DETACHED 1
13046 #endif
13047         pthread_t t;
13048         int status;
13049         int detach = PTHREAD_CREATE_DETACHED;
13050
13051 #if HAVE_PTHREADS > 4
13052         /* Final pthreads */
13053         pthread_attr_t attr;
13054
13055         status = pthread_attr_init(&attr);
13056         if( status ) return status;
13057
13058 #if HAVE_PTHREADS < 7
13059         status = pthread_attr_setdetachstate(&attr, &detach);
13060         if( status < 0 ) status = errno;
13061 #else
13062         status = pthread_attr_setdetachstate(&attr, detach);
13063 #endif
13064         if( status ) return status;
13065         status = pthread_create( &t, &attr, task, NULL );
13066 #if HAVE_PTHREADS < 7
13067         if( status < 0 ) status = errno;
13068 #endif
13069         if( status ) return status;
13070 #else
13071         /* Draft 4 pthreads */
13072         status = pthread_create( &t, pthread_attr_default, task, NULL );
13073         if( status ) return errno;
13074
13075         /* give thread a chance to complete */
13076         /* it should remain joinable and hence detachable */
13077         sleep( 1 );
13078
13079         status = pthread_detach( &t );
13080         if( status ) return errno;
13081 #endif
13082
13083 #ifdef HAVE_LINUX_THREADS
13084         pthread_kill_other_threads_np();
13085 #endif
13086
13087         return 0;
13088
13089 ; return 0; }
13090 EOF
13091 if { (eval echo configure:13092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13092   rm -rf conftest*
13093   ol_cv_pthread_lpthread=yes
13094 else
13095   echo "configure: failed program was:" >&5
13096   cat conftest.$ac_ext >&5
13097   rm -rf conftest*
13098   ol_cv_pthread_lpthread=no
13099 fi
13100 rm -f conftest*
13101 else
13102   cat > conftest.$ac_ext <<EOF
13103 #line 13104 "configure"
13104 #include "confdefs.h"
13105 /* pthread test headers */
13106 #include <pthread.h>
13107 #if HAVE_PTHREADS < 7
13108 #include <errno.h>
13109 #endif
13110 #ifndef NULL
13111 #define NULL (void*)0
13112 #endif
13113
13114 static void *task(p)
13115         void *p;
13116 {
13117         return (void *) (p == NULL);
13118 }
13119
13120
13121 int main(argc, argv)
13122         int argc;
13123         char **argv;
13124 {
13125
13126         /* pthread test function */
13127 #ifndef PTHREAD_CREATE_DETACHED
13128 #define PTHREAD_CREATE_DETACHED 1
13129 #endif
13130         pthread_t t;
13131         int status;
13132         int detach = PTHREAD_CREATE_DETACHED;
13133
13134 #if HAVE_PTHREADS > 4
13135         /* Final pthreads */
13136         pthread_attr_t attr;
13137
13138         status = pthread_attr_init(&attr);
13139         if( status ) return status;
13140
13141 #if HAVE_PTHREADS < 7
13142         status = pthread_attr_setdetachstate(&attr, &detach);
13143         if( status < 0 ) status = errno;
13144 #else
13145         status = pthread_attr_setdetachstate(&attr, detach);
13146 #endif
13147         if( status ) return status;
13148         status = pthread_create( &t, &attr, task, NULL );
13149 #if HAVE_PTHREADS < 7
13150         if( status < 0 ) status = errno;
13151 #endif
13152         if( status ) return status;
13153 #else
13154         /* Draft 4 pthreads */
13155         status = pthread_create( &t, pthread_attr_default, task, NULL );
13156         if( status ) return errno;
13157
13158         /* give thread a chance to complete */
13159         /* it should remain joinable and hence detachable */
13160         sleep( 1 );
13161
13162         status = pthread_detach( &t );
13163         if( status ) return errno;
13164 #endif
13165
13166 #ifdef HAVE_LINUX_THREADS
13167         pthread_kill_other_threads_np();
13168 #endif
13169
13170         return 0;
13171
13172 }
13173
13174 EOF
13175 if { (eval echo configure:13176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13176 then
13177   ol_cv_pthread_lpthread=yes
13178 else
13179   echo "configure: failed program was:" >&5
13180   cat conftest.$ac_ext >&5
13181   rm -fr conftest*
13182   ol_cv_pthread_lpthread=no
13183 fi
13184 rm -fr conftest*
13185 fi
13186
13187
13188                 # restore the LIBS
13189                 LIBS="$ol_LIBS"
13190         
13191 fi
13192
13193 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13194
13195         if test $ol_cv_pthread_lpthread = yes ; then
13196                 ol_link_pthreads="-lpthread"
13197                 ol_link_threads=posix
13198         fi
13199 fi
13200
13201                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13202 if test "$ol_link_threads" = no ; then
13203         # try -lc_r
13204         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13205 echo "configure:13206: checking for pthread link with -lc_r" >&5
13206 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13207   echo $ac_n "(cached) $ac_c" 1>&6
13208 else
13209   
13210                 # save the flags
13211                 ol_LIBS="$LIBS"
13212                 LIBS="-lc_r $LIBS"
13213
13214                 if test "$cross_compiling" = yes; then
13215   cat > conftest.$ac_ext <<EOF
13216 #line 13217 "configure"
13217 #include "confdefs.h"
13218 /* pthread test headers */
13219 #include <pthread.h>
13220 #if HAVE_PTHREADS < 7
13221 #include <errno.h>
13222 #endif
13223 #ifndef NULL
13224 #define NULL (void*)0
13225 #endif
13226
13227 static void *task(p)
13228         void *p;
13229 {
13230         return (void *) (p == NULL);
13231 }
13232
13233 int main() {
13234
13235         /* pthread test function */
13236 #ifndef PTHREAD_CREATE_DETACHED
13237 #define PTHREAD_CREATE_DETACHED 1
13238 #endif
13239         pthread_t t;
13240         int status;
13241         int detach = PTHREAD_CREATE_DETACHED;
13242
13243 #if HAVE_PTHREADS > 4
13244         /* Final pthreads */
13245         pthread_attr_t attr;
13246
13247         status = pthread_attr_init(&attr);
13248         if( status ) return status;
13249
13250 #if HAVE_PTHREADS < 7
13251         status = pthread_attr_setdetachstate(&attr, &detach);
13252         if( status < 0 ) status = errno;
13253 #else
13254         status = pthread_attr_setdetachstate(&attr, detach);
13255 #endif
13256         if( status ) return status;
13257         status = pthread_create( &t, &attr, task, NULL );
13258 #if HAVE_PTHREADS < 7
13259         if( status < 0 ) status = errno;
13260 #endif
13261         if( status ) return status;
13262 #else
13263         /* Draft 4 pthreads */
13264         status = pthread_create( &t, pthread_attr_default, task, NULL );
13265         if( status ) return errno;
13266
13267         /* give thread a chance to complete */
13268         /* it should remain joinable and hence detachable */
13269         sleep( 1 );
13270
13271         status = pthread_detach( &t );
13272         if( status ) return errno;
13273 #endif
13274
13275 #ifdef HAVE_LINUX_THREADS
13276         pthread_kill_other_threads_np();
13277 #endif
13278
13279         return 0;
13280
13281 ; return 0; }
13282 EOF
13283 if { (eval echo configure:13284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13284   rm -rf conftest*
13285   ol_cv_pthread_lc_r=yes
13286 else
13287   echo "configure: failed program was:" >&5
13288   cat conftest.$ac_ext >&5
13289   rm -rf conftest*
13290   ol_cv_pthread_lc_r=no
13291 fi
13292 rm -f conftest*
13293 else
13294   cat > conftest.$ac_ext <<EOF
13295 #line 13296 "configure"
13296 #include "confdefs.h"
13297 /* pthread test headers */
13298 #include <pthread.h>
13299 #if HAVE_PTHREADS < 7
13300 #include <errno.h>
13301 #endif
13302 #ifndef NULL
13303 #define NULL (void*)0
13304 #endif
13305
13306 static void *task(p)
13307         void *p;
13308 {
13309         return (void *) (p == NULL);
13310 }
13311
13312
13313 int main(argc, argv)
13314         int argc;
13315         char **argv;
13316 {
13317
13318         /* pthread test function */
13319 #ifndef PTHREAD_CREATE_DETACHED
13320 #define PTHREAD_CREATE_DETACHED 1
13321 #endif
13322         pthread_t t;
13323         int status;
13324         int detach = PTHREAD_CREATE_DETACHED;
13325
13326 #if HAVE_PTHREADS > 4
13327         /* Final pthreads */
13328         pthread_attr_t attr;
13329
13330         status = pthread_attr_init(&attr);
13331         if( status ) return status;
13332
13333 #if HAVE_PTHREADS < 7
13334         status = pthread_attr_setdetachstate(&attr, &detach);
13335         if( status < 0 ) status = errno;
13336 #else
13337         status = pthread_attr_setdetachstate(&attr, detach);
13338 #endif
13339         if( status ) return status;
13340         status = pthread_create( &t, &attr, task, NULL );
13341 #if HAVE_PTHREADS < 7
13342         if( status < 0 ) status = errno;
13343 #endif
13344         if( status ) return status;
13345 #else
13346         /* Draft 4 pthreads */
13347         status = pthread_create( &t, pthread_attr_default, task, NULL );
13348         if( status ) return errno;
13349
13350         /* give thread a chance to complete */
13351         /* it should remain joinable and hence detachable */
13352         sleep( 1 );
13353
13354         status = pthread_detach( &t );
13355         if( status ) return errno;
13356 #endif
13357
13358 #ifdef HAVE_LINUX_THREADS
13359         pthread_kill_other_threads_np();
13360 #endif
13361
13362         return 0;
13363
13364 }
13365
13366 EOF
13367 if { (eval echo configure:13368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13368 then
13369   ol_cv_pthread_lc_r=yes
13370 else
13371   echo "configure: failed program was:" >&5
13372   cat conftest.$ac_ext >&5
13373   rm -fr conftest*
13374   ol_cv_pthread_lc_r=no
13375 fi
13376 rm -fr conftest*
13377 fi
13378
13379
13380                 # restore the LIBS
13381                 LIBS="$ol_LIBS"
13382         
13383 fi
13384
13385 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13386
13387         if test $ol_cv_pthread_lc_r = yes ; then
13388                 ol_link_pthreads="-lc_r"
13389                 ol_link_threads=posix
13390         fi
13391 fi
13392
13393
13394                 # Pthread try link: -threads (ol_cv_pthread_threads)
13395 if test "$ol_link_threads" = no ; then
13396         # try -threads
13397         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13398 echo "configure:13399: checking for pthread link with -threads" >&5
13399 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13400   echo $ac_n "(cached) $ac_c" 1>&6
13401 else
13402   
13403                 # save the flags
13404                 ol_LIBS="$LIBS"
13405                 LIBS="-threads $LIBS"
13406
13407                 if test "$cross_compiling" = yes; then
13408   cat > conftest.$ac_ext <<EOF
13409 #line 13410 "configure"
13410 #include "confdefs.h"
13411 /* pthread test headers */
13412 #include <pthread.h>
13413 #if HAVE_PTHREADS < 7
13414 #include <errno.h>
13415 #endif
13416 #ifndef NULL
13417 #define NULL (void*)0
13418 #endif
13419
13420 static void *task(p)
13421         void *p;
13422 {
13423         return (void *) (p == NULL);
13424 }
13425
13426 int main() {
13427
13428         /* pthread test function */
13429 #ifndef PTHREAD_CREATE_DETACHED
13430 #define PTHREAD_CREATE_DETACHED 1
13431 #endif
13432         pthread_t t;
13433         int status;
13434         int detach = PTHREAD_CREATE_DETACHED;
13435
13436 #if HAVE_PTHREADS > 4
13437         /* Final pthreads */
13438         pthread_attr_t attr;
13439
13440         status = pthread_attr_init(&attr);
13441         if( status ) return status;
13442
13443 #if HAVE_PTHREADS < 7
13444         status = pthread_attr_setdetachstate(&attr, &detach);
13445         if( status < 0 ) status = errno;
13446 #else
13447         status = pthread_attr_setdetachstate(&attr, detach);
13448 #endif
13449         if( status ) return status;
13450         status = pthread_create( &t, &attr, task, NULL );
13451 #if HAVE_PTHREADS < 7
13452         if( status < 0 ) status = errno;
13453 #endif
13454         if( status ) return status;
13455 #else
13456         /* Draft 4 pthreads */
13457         status = pthread_create( &t, pthread_attr_default, task, NULL );
13458         if( status ) return errno;
13459
13460         /* give thread a chance to complete */
13461         /* it should remain joinable and hence detachable */
13462         sleep( 1 );
13463
13464         status = pthread_detach( &t );
13465         if( status ) return errno;
13466 #endif
13467
13468 #ifdef HAVE_LINUX_THREADS
13469         pthread_kill_other_threads_np();
13470 #endif
13471
13472         return 0;
13473
13474 ; return 0; }
13475 EOF
13476 if { (eval echo configure:13477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13477   rm -rf conftest*
13478   ol_cv_pthread_threads=yes
13479 else
13480   echo "configure: failed program was:" >&5
13481   cat conftest.$ac_ext >&5
13482   rm -rf conftest*
13483   ol_cv_pthread_threads=no
13484 fi
13485 rm -f conftest*
13486 else
13487   cat > conftest.$ac_ext <<EOF
13488 #line 13489 "configure"
13489 #include "confdefs.h"
13490 /* pthread test headers */
13491 #include <pthread.h>
13492 #if HAVE_PTHREADS < 7
13493 #include <errno.h>
13494 #endif
13495 #ifndef NULL
13496 #define NULL (void*)0
13497 #endif
13498
13499 static void *task(p)
13500         void *p;
13501 {
13502         return (void *) (p == NULL);
13503 }
13504
13505
13506 int main(argc, argv)
13507         int argc;
13508         char **argv;
13509 {
13510
13511         /* pthread test function */
13512 #ifndef PTHREAD_CREATE_DETACHED
13513 #define PTHREAD_CREATE_DETACHED 1
13514 #endif
13515         pthread_t t;
13516         int status;
13517         int detach = PTHREAD_CREATE_DETACHED;
13518
13519 #if HAVE_PTHREADS > 4
13520         /* Final pthreads */
13521         pthread_attr_t attr;
13522
13523         status = pthread_attr_init(&attr);
13524         if( status ) return status;
13525
13526 #if HAVE_PTHREADS < 7
13527         status = pthread_attr_setdetachstate(&attr, &detach);
13528         if( status < 0 ) status = errno;
13529 #else
13530         status = pthread_attr_setdetachstate(&attr, detach);
13531 #endif
13532         if( status ) return status;
13533         status = pthread_create( &t, &attr, task, NULL );
13534 #if HAVE_PTHREADS < 7
13535         if( status < 0 ) status = errno;
13536 #endif
13537         if( status ) return status;
13538 #else
13539         /* Draft 4 pthreads */
13540         status = pthread_create( &t, pthread_attr_default, task, NULL );
13541         if( status ) return errno;
13542
13543         /* give thread a chance to complete */
13544         /* it should remain joinable and hence detachable */
13545         sleep( 1 );
13546
13547         status = pthread_detach( &t );
13548         if( status ) return errno;
13549 #endif
13550
13551 #ifdef HAVE_LINUX_THREADS
13552         pthread_kill_other_threads_np();
13553 #endif
13554
13555         return 0;
13556
13557 }
13558
13559 EOF
13560 if { (eval echo configure:13561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13561 then
13562   ol_cv_pthread_threads=yes
13563 else
13564   echo "configure: failed program was:" >&5
13565   cat conftest.$ac_ext >&5
13566   rm -fr conftest*
13567   ol_cv_pthread_threads=no
13568 fi
13569 rm -fr conftest*
13570 fi
13571
13572
13573                 # restore the LIBS
13574                 LIBS="$ol_LIBS"
13575         
13576 fi
13577
13578 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13579
13580         if test $ol_cv_pthread_threads = yes ; then
13581                 ol_link_pthreads="-threads"
13582                 ol_link_threads=posix
13583         fi
13584 fi
13585
13586
13587                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13588 if test "$ol_link_threads" = no ; then
13589         # try -lpthreads -lmach -lexc -lc_r
13590         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13591 echo "configure:13592: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13592 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13593   echo $ac_n "(cached) $ac_c" 1>&6
13594 else
13595   
13596                 # save the flags
13597                 ol_LIBS="$LIBS"
13598                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13599
13600                 if test "$cross_compiling" = yes; then
13601   cat > conftest.$ac_ext <<EOF
13602 #line 13603 "configure"
13603 #include "confdefs.h"
13604 /* pthread test headers */
13605 #include <pthread.h>
13606 #if HAVE_PTHREADS < 7
13607 #include <errno.h>
13608 #endif
13609 #ifndef NULL
13610 #define NULL (void*)0
13611 #endif
13612
13613 static void *task(p)
13614         void *p;
13615 {
13616         return (void *) (p == NULL);
13617 }
13618
13619 int main() {
13620
13621         /* pthread test function */
13622 #ifndef PTHREAD_CREATE_DETACHED
13623 #define PTHREAD_CREATE_DETACHED 1
13624 #endif
13625         pthread_t t;
13626         int status;
13627         int detach = PTHREAD_CREATE_DETACHED;
13628
13629 #if HAVE_PTHREADS > 4
13630         /* Final pthreads */
13631         pthread_attr_t attr;
13632
13633         status = pthread_attr_init(&attr);
13634         if( status ) return status;
13635
13636 #if HAVE_PTHREADS < 7
13637         status = pthread_attr_setdetachstate(&attr, &detach);
13638         if( status < 0 ) status = errno;
13639 #else
13640         status = pthread_attr_setdetachstate(&attr, detach);
13641 #endif
13642         if( status ) return status;
13643         status = pthread_create( &t, &attr, task, NULL );
13644 #if HAVE_PTHREADS < 7
13645         if( status < 0 ) status = errno;
13646 #endif
13647         if( status ) return status;
13648 #else
13649         /* Draft 4 pthreads */
13650         status = pthread_create( &t, pthread_attr_default, task, NULL );
13651         if( status ) return errno;
13652
13653         /* give thread a chance to complete */
13654         /* it should remain joinable and hence detachable */
13655         sleep( 1 );
13656
13657         status = pthread_detach( &t );
13658         if( status ) return errno;
13659 #endif
13660
13661 #ifdef HAVE_LINUX_THREADS
13662         pthread_kill_other_threads_np();
13663 #endif
13664
13665         return 0;
13666
13667 ; return 0; }
13668 EOF
13669 if { (eval echo configure:13670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13670   rm -rf conftest*
13671   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13672 else
13673   echo "configure: failed program was:" >&5
13674   cat conftest.$ac_ext >&5
13675   rm -rf conftest*
13676   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13677 fi
13678 rm -f conftest*
13679 else
13680   cat > conftest.$ac_ext <<EOF
13681 #line 13682 "configure"
13682 #include "confdefs.h"
13683 /* pthread test headers */
13684 #include <pthread.h>
13685 #if HAVE_PTHREADS < 7
13686 #include <errno.h>
13687 #endif
13688 #ifndef NULL
13689 #define NULL (void*)0
13690 #endif
13691
13692 static void *task(p)
13693         void *p;
13694 {
13695         return (void *) (p == NULL);
13696 }
13697
13698
13699 int main(argc, argv)
13700         int argc;
13701         char **argv;
13702 {
13703
13704         /* pthread test function */
13705 #ifndef PTHREAD_CREATE_DETACHED
13706 #define PTHREAD_CREATE_DETACHED 1
13707 #endif
13708         pthread_t t;
13709         int status;
13710         int detach = PTHREAD_CREATE_DETACHED;
13711
13712 #if HAVE_PTHREADS > 4
13713         /* Final pthreads */
13714         pthread_attr_t attr;
13715
13716         status = pthread_attr_init(&attr);
13717         if( status ) return status;
13718
13719 #if HAVE_PTHREADS < 7
13720         status = pthread_attr_setdetachstate(&attr, &detach);
13721         if( status < 0 ) status = errno;
13722 #else
13723         status = pthread_attr_setdetachstate(&attr, detach);
13724 #endif
13725         if( status ) return status;
13726         status = pthread_create( &t, &attr, task, NULL );
13727 #if HAVE_PTHREADS < 7
13728         if( status < 0 ) status = errno;
13729 #endif
13730         if( status ) return status;
13731 #else
13732         /* Draft 4 pthreads */
13733         status = pthread_create( &t, pthread_attr_default, task, NULL );
13734         if( status ) return errno;
13735
13736         /* give thread a chance to complete */
13737         /* it should remain joinable and hence detachable */
13738         sleep( 1 );
13739
13740         status = pthread_detach( &t );
13741         if( status ) return errno;
13742 #endif
13743
13744 #ifdef HAVE_LINUX_THREADS
13745         pthread_kill_other_threads_np();
13746 #endif
13747
13748         return 0;
13749
13750 }
13751
13752 EOF
13753 if { (eval echo configure:13754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13754 then
13755   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13756 else
13757   echo "configure: failed program was:" >&5
13758   cat conftest.$ac_ext >&5
13759   rm -fr conftest*
13760   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13761 fi
13762 rm -fr conftest*
13763 fi
13764
13765
13766                 # restore the LIBS
13767                 LIBS="$ol_LIBS"
13768         
13769 fi
13770
13771 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
13772
13773         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
13774                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
13775                 ol_link_threads=posix
13776         fi
13777 fi
13778
13779                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
13780 if test "$ol_link_threads" = no ; then
13781         # try -lpthreads -lmach -lexc
13782         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
13783 echo "configure:13784: checking for pthread link with -lpthreads -lmach -lexc" >&5
13784 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
13785   echo $ac_n "(cached) $ac_c" 1>&6
13786 else
13787   
13788                 # save the flags
13789                 ol_LIBS="$LIBS"
13790                 LIBS="-lpthreads -lmach -lexc $LIBS"
13791
13792                 if test "$cross_compiling" = yes; then
13793   cat > conftest.$ac_ext <<EOF
13794 #line 13795 "configure"
13795 #include "confdefs.h"
13796 /* pthread test headers */
13797 #include <pthread.h>
13798 #if HAVE_PTHREADS < 7
13799 #include <errno.h>
13800 #endif
13801 #ifndef NULL
13802 #define NULL (void*)0
13803 #endif
13804
13805 static void *task(p)
13806         void *p;
13807 {
13808         return (void *) (p == NULL);
13809 }
13810
13811 int main() {
13812
13813         /* pthread test function */
13814 #ifndef PTHREAD_CREATE_DETACHED
13815 #define PTHREAD_CREATE_DETACHED 1
13816 #endif
13817         pthread_t t;
13818         int status;
13819         int detach = PTHREAD_CREATE_DETACHED;
13820
13821 #if HAVE_PTHREADS > 4
13822         /* Final pthreads */
13823         pthread_attr_t attr;
13824
13825         status = pthread_attr_init(&attr);
13826         if( status ) return status;
13827
13828 #if HAVE_PTHREADS < 7
13829         status = pthread_attr_setdetachstate(&attr, &detach);
13830         if( status < 0 ) status = errno;
13831 #else
13832         status = pthread_attr_setdetachstate(&attr, detach);
13833 #endif
13834         if( status ) return status;
13835         status = pthread_create( &t, &attr, task, NULL );
13836 #if HAVE_PTHREADS < 7
13837         if( status < 0 ) status = errno;
13838 #endif
13839         if( status ) return status;
13840 #else
13841         /* Draft 4 pthreads */
13842         status = pthread_create( &t, pthread_attr_default, task, NULL );
13843         if( status ) return errno;
13844
13845         /* give thread a chance to complete */
13846         /* it should remain joinable and hence detachable */
13847         sleep( 1 );
13848
13849         status = pthread_detach( &t );
13850         if( status ) return errno;
13851 #endif
13852
13853 #ifdef HAVE_LINUX_THREADS
13854         pthread_kill_other_threads_np();
13855 #endif
13856
13857         return 0;
13858
13859 ; return 0; }
13860 EOF
13861 if { (eval echo configure:13862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13862   rm -rf conftest*
13863   ol_cv_pthread_lpthreads_lmach_lexc=yes
13864 else
13865   echo "configure: failed program was:" >&5
13866   cat conftest.$ac_ext >&5
13867   rm -rf conftest*
13868   ol_cv_pthread_lpthreads_lmach_lexc=no
13869 fi
13870 rm -f conftest*
13871 else
13872   cat > conftest.$ac_ext <<EOF
13873 #line 13874 "configure"
13874 #include "confdefs.h"
13875 /* pthread test headers */
13876 #include <pthread.h>
13877 #if HAVE_PTHREADS < 7
13878 #include <errno.h>
13879 #endif
13880 #ifndef NULL
13881 #define NULL (void*)0
13882 #endif
13883
13884 static void *task(p)
13885         void *p;
13886 {
13887         return (void *) (p == NULL);
13888 }
13889
13890
13891 int main(argc, argv)
13892         int argc;
13893         char **argv;
13894 {
13895
13896         /* pthread test function */
13897 #ifndef PTHREAD_CREATE_DETACHED
13898 #define PTHREAD_CREATE_DETACHED 1
13899 #endif
13900         pthread_t t;
13901         int status;
13902         int detach = PTHREAD_CREATE_DETACHED;
13903
13904 #if HAVE_PTHREADS > 4
13905         /* Final pthreads */
13906         pthread_attr_t attr;
13907
13908         status = pthread_attr_init(&attr);
13909         if( status ) return status;
13910
13911 #if HAVE_PTHREADS < 7
13912         status = pthread_attr_setdetachstate(&attr, &detach);
13913         if( status < 0 ) status = errno;
13914 #else
13915         status = pthread_attr_setdetachstate(&attr, detach);
13916 #endif
13917         if( status ) return status;
13918         status = pthread_create( &t, &attr, task, NULL );
13919 #if HAVE_PTHREADS < 7
13920         if( status < 0 ) status = errno;
13921 #endif
13922         if( status ) return status;
13923 #else
13924         /* Draft 4 pthreads */
13925         status = pthread_create( &t, pthread_attr_default, task, NULL );
13926         if( status ) return errno;
13927
13928         /* give thread a chance to complete */
13929         /* it should remain joinable and hence detachable */
13930         sleep( 1 );
13931
13932         status = pthread_detach( &t );
13933         if( status ) return errno;
13934 #endif
13935
13936 #ifdef HAVE_LINUX_THREADS
13937         pthread_kill_other_threads_np();
13938 #endif
13939
13940         return 0;
13941
13942 }
13943
13944 EOF
13945 if { (eval echo configure:13946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13946 then
13947   ol_cv_pthread_lpthreads_lmach_lexc=yes
13948 else
13949   echo "configure: failed program was:" >&5
13950   cat conftest.$ac_ext >&5
13951   rm -fr conftest*
13952   ol_cv_pthread_lpthreads_lmach_lexc=no
13953 fi
13954 rm -fr conftest*
13955 fi
13956
13957
13958                 # restore the LIBS
13959                 LIBS="$ol_LIBS"
13960         
13961 fi
13962
13963 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
13964
13965         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
13966                 ol_link_pthreads="-lpthreads -lmach -lexc"
13967                 ol_link_threads=posix
13968         fi
13969 fi
13970
13971                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
13972 if test "$ol_link_threads" = no ; then
13973         # try -lpthreads -lexc
13974         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
13975 echo "configure:13976: checking for pthread link with -lpthreads -lexc" >&5
13976 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
13977   echo $ac_n "(cached) $ac_c" 1>&6
13978 else
13979   
13980                 # save the flags
13981                 ol_LIBS="$LIBS"
13982                 LIBS="-lpthreads -lexc $LIBS"
13983
13984                 if test "$cross_compiling" = yes; then
13985   cat > conftest.$ac_ext <<EOF
13986 #line 13987 "configure"
13987 #include "confdefs.h"
13988 /* pthread test headers */
13989 #include <pthread.h>
13990 #if HAVE_PTHREADS < 7
13991 #include <errno.h>
13992 #endif
13993 #ifndef NULL
13994 #define NULL (void*)0
13995 #endif
13996
13997 static void *task(p)
13998         void *p;
13999 {
14000         return (void *) (p == NULL);
14001 }
14002
14003 int main() {
14004
14005         /* pthread test function */
14006 #ifndef PTHREAD_CREATE_DETACHED
14007 #define PTHREAD_CREATE_DETACHED 1
14008 #endif
14009         pthread_t t;
14010         int status;
14011         int detach = PTHREAD_CREATE_DETACHED;
14012
14013 #if HAVE_PTHREADS > 4
14014         /* Final pthreads */
14015         pthread_attr_t attr;
14016
14017         status = pthread_attr_init(&attr);
14018         if( status ) return status;
14019
14020 #if HAVE_PTHREADS < 7
14021         status = pthread_attr_setdetachstate(&attr, &detach);
14022         if( status < 0 ) status = errno;
14023 #else
14024         status = pthread_attr_setdetachstate(&attr, detach);
14025 #endif
14026         if( status ) return status;
14027         status = pthread_create( &t, &attr, task, NULL );
14028 #if HAVE_PTHREADS < 7
14029         if( status < 0 ) status = errno;
14030 #endif
14031         if( status ) return status;
14032 #else
14033         /* Draft 4 pthreads */
14034         status = pthread_create( &t, pthread_attr_default, task, NULL );
14035         if( status ) return errno;
14036
14037         /* give thread a chance to complete */
14038         /* it should remain joinable and hence detachable */
14039         sleep( 1 );
14040
14041         status = pthread_detach( &t );
14042         if( status ) return errno;
14043 #endif
14044
14045 #ifdef HAVE_LINUX_THREADS
14046         pthread_kill_other_threads_np();
14047 #endif
14048
14049         return 0;
14050
14051 ; return 0; }
14052 EOF
14053 if { (eval echo configure:14054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14054   rm -rf conftest*
14055   ol_cv_pthread_lpthreads_lexc=yes
14056 else
14057   echo "configure: failed program was:" >&5
14058   cat conftest.$ac_ext >&5
14059   rm -rf conftest*
14060   ol_cv_pthread_lpthreads_lexc=no
14061 fi
14062 rm -f conftest*
14063 else
14064   cat > conftest.$ac_ext <<EOF
14065 #line 14066 "configure"
14066 #include "confdefs.h"
14067 /* pthread test headers */
14068 #include <pthread.h>
14069 #if HAVE_PTHREADS < 7
14070 #include <errno.h>
14071 #endif
14072 #ifndef NULL
14073 #define NULL (void*)0
14074 #endif
14075
14076 static void *task(p)
14077         void *p;
14078 {
14079         return (void *) (p == NULL);
14080 }
14081
14082
14083 int main(argc, argv)
14084         int argc;
14085         char **argv;
14086 {
14087
14088         /* pthread test function */
14089 #ifndef PTHREAD_CREATE_DETACHED
14090 #define PTHREAD_CREATE_DETACHED 1
14091 #endif
14092         pthread_t t;
14093         int status;
14094         int detach = PTHREAD_CREATE_DETACHED;
14095
14096 #if HAVE_PTHREADS > 4
14097         /* Final pthreads */
14098         pthread_attr_t attr;
14099
14100         status = pthread_attr_init(&attr);
14101         if( status ) return status;
14102
14103 #if HAVE_PTHREADS < 7
14104         status = pthread_attr_setdetachstate(&attr, &detach);
14105         if( status < 0 ) status = errno;
14106 #else
14107         status = pthread_attr_setdetachstate(&attr, detach);
14108 #endif
14109         if( status ) return status;
14110         status = pthread_create( &t, &attr, task, NULL );
14111 #if HAVE_PTHREADS < 7
14112         if( status < 0 ) status = errno;
14113 #endif
14114         if( status ) return status;
14115 #else
14116         /* Draft 4 pthreads */
14117         status = pthread_create( &t, pthread_attr_default, task, NULL );
14118         if( status ) return errno;
14119
14120         /* give thread a chance to complete */
14121         /* it should remain joinable and hence detachable */
14122         sleep( 1 );
14123
14124         status = pthread_detach( &t );
14125         if( status ) return errno;
14126 #endif
14127
14128 #ifdef HAVE_LINUX_THREADS
14129         pthread_kill_other_threads_np();
14130 #endif
14131
14132         return 0;
14133
14134 }
14135
14136 EOF
14137 if { (eval echo configure:14138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14138 then
14139   ol_cv_pthread_lpthreads_lexc=yes
14140 else
14141   echo "configure: failed program was:" >&5
14142   cat conftest.$ac_ext >&5
14143   rm -fr conftest*
14144   ol_cv_pthread_lpthreads_lexc=no
14145 fi
14146 rm -fr conftest*
14147 fi
14148
14149
14150                 # restore the LIBS
14151                 LIBS="$ol_LIBS"
14152         
14153 fi
14154
14155 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14156
14157         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14158                 ol_link_pthreads="-lpthreads -lexc"
14159                 ol_link_threads=posix
14160         fi
14161 fi
14162
14163
14164                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14165 if test "$ol_link_threads" = no ; then
14166         # try -lpthreads
14167         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14168 echo "configure:14169: checking for pthread link with -lpthreads" >&5
14169 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14170   echo $ac_n "(cached) $ac_c" 1>&6
14171 else
14172   
14173                 # save the flags
14174                 ol_LIBS="$LIBS"
14175                 LIBS="-lpthreads $LIBS"
14176
14177                 if test "$cross_compiling" = yes; then
14178   cat > conftest.$ac_ext <<EOF
14179 #line 14180 "configure"
14180 #include "confdefs.h"
14181 /* pthread test headers */
14182 #include <pthread.h>
14183 #if HAVE_PTHREADS < 7
14184 #include <errno.h>
14185 #endif
14186 #ifndef NULL
14187 #define NULL (void*)0
14188 #endif
14189
14190 static void *task(p)
14191         void *p;
14192 {
14193         return (void *) (p == NULL);
14194 }
14195
14196 int main() {
14197
14198         /* pthread test function */
14199 #ifndef PTHREAD_CREATE_DETACHED
14200 #define PTHREAD_CREATE_DETACHED 1
14201 #endif
14202         pthread_t t;
14203         int status;
14204         int detach = PTHREAD_CREATE_DETACHED;
14205
14206 #if HAVE_PTHREADS > 4
14207         /* Final pthreads */
14208         pthread_attr_t attr;
14209
14210         status = pthread_attr_init(&attr);
14211         if( status ) return status;
14212
14213 #if HAVE_PTHREADS < 7
14214         status = pthread_attr_setdetachstate(&attr, &detach);
14215         if( status < 0 ) status = errno;
14216 #else
14217         status = pthread_attr_setdetachstate(&attr, detach);
14218 #endif
14219         if( status ) return status;
14220         status = pthread_create( &t, &attr, task, NULL );
14221 #if HAVE_PTHREADS < 7
14222         if( status < 0 ) status = errno;
14223 #endif
14224         if( status ) return status;
14225 #else
14226         /* Draft 4 pthreads */
14227         status = pthread_create( &t, pthread_attr_default, task, NULL );
14228         if( status ) return errno;
14229
14230         /* give thread a chance to complete */
14231         /* it should remain joinable and hence detachable */
14232         sleep( 1 );
14233
14234         status = pthread_detach( &t );
14235         if( status ) return errno;
14236 #endif
14237
14238 #ifdef HAVE_LINUX_THREADS
14239         pthread_kill_other_threads_np();
14240 #endif
14241
14242         return 0;
14243
14244 ; return 0; }
14245 EOF
14246 if { (eval echo configure:14247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14247   rm -rf conftest*
14248   ol_cv_pthread_lib_lpthreads=yes
14249 else
14250   echo "configure: failed program was:" >&5
14251   cat conftest.$ac_ext >&5
14252   rm -rf conftest*
14253   ol_cv_pthread_lib_lpthreads=no
14254 fi
14255 rm -f conftest*
14256 else
14257   cat > conftest.$ac_ext <<EOF
14258 #line 14259 "configure"
14259 #include "confdefs.h"
14260 /* pthread test headers */
14261 #include <pthread.h>
14262 #if HAVE_PTHREADS < 7
14263 #include <errno.h>
14264 #endif
14265 #ifndef NULL
14266 #define NULL (void*)0
14267 #endif
14268
14269 static void *task(p)
14270         void *p;
14271 {
14272         return (void *) (p == NULL);
14273 }
14274
14275
14276 int main(argc, argv)
14277         int argc;
14278         char **argv;
14279 {
14280
14281         /* pthread test function */
14282 #ifndef PTHREAD_CREATE_DETACHED
14283 #define PTHREAD_CREATE_DETACHED 1
14284 #endif
14285         pthread_t t;
14286         int status;
14287         int detach = PTHREAD_CREATE_DETACHED;
14288
14289 #if HAVE_PTHREADS > 4
14290         /* Final pthreads */
14291         pthread_attr_t attr;
14292
14293         status = pthread_attr_init(&attr);
14294         if( status ) return status;
14295
14296 #if HAVE_PTHREADS < 7
14297         status = pthread_attr_setdetachstate(&attr, &detach);
14298         if( status < 0 ) status = errno;
14299 #else
14300         status = pthread_attr_setdetachstate(&attr, detach);
14301 #endif
14302         if( status ) return status;
14303         status = pthread_create( &t, &attr, task, NULL );
14304 #if HAVE_PTHREADS < 7
14305         if( status < 0 ) status = errno;
14306 #endif
14307         if( status ) return status;
14308 #else
14309         /* Draft 4 pthreads */
14310         status = pthread_create( &t, pthread_attr_default, task, NULL );
14311         if( status ) return errno;
14312
14313         /* give thread a chance to complete */
14314         /* it should remain joinable and hence detachable */
14315         sleep( 1 );
14316
14317         status = pthread_detach( &t );
14318         if( status ) return errno;
14319 #endif
14320
14321 #ifdef HAVE_LINUX_THREADS
14322         pthread_kill_other_threads_np();
14323 #endif
14324
14325         return 0;
14326
14327 }
14328
14329 EOF
14330 if { (eval echo configure:14331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14331 then
14332   ol_cv_pthread_lib_lpthreads=yes
14333 else
14334   echo "configure: failed program was:" >&5
14335   cat conftest.$ac_ext >&5
14336   rm -fr conftest*
14337   ol_cv_pthread_lib_lpthreads=no
14338 fi
14339 rm -fr conftest*
14340 fi
14341
14342
14343                 # restore the LIBS
14344                 LIBS="$ol_LIBS"
14345         
14346 fi
14347
14348 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14349
14350         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14351                 ol_link_pthreads="-lpthreads"
14352                 ol_link_threads=posix
14353         fi
14354 fi
14355
14356
14357                 if test $ol_link_threads != no ; then
14358                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14359
14360                                                 save_CPPFLAGS="$CPPFLAGS"
14361                         save_LIBS="$LIBS"
14362                         LIBS="$LTHREAD_LIBS $LIBS"
14363
14364                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14365 do
14366 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14367 echo "configure:14368: checking for $ac_func" >&5
14368 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14369   echo $ac_n "(cached) $ac_c" 1>&6
14370 else
14371   cat > conftest.$ac_ext <<EOF
14372 #line 14373 "configure"
14373 #include "confdefs.h"
14374 /* System header to define __stub macros and hopefully few prototypes,
14375     which can conflict with char $ac_func(); below.  */
14376 #include <assert.h>
14377 /* Override any gcc2 internal prototype to avoid an error.  */
14378 /* We use char because int might match the return type of a gcc2
14379     builtin and then its argument prototype would still apply.  */
14380 char $ac_func();
14381 char (*f)();
14382
14383 int main() {
14384
14385 /* The GNU C library defines this for functions which it implements
14386     to always fail with ENOSYS.  Some functions are actually named
14387     something starting with __ and the normal name is an alias.  */
14388 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14389 choke me
14390 #else
14391 f = $ac_func;
14392 #endif
14393
14394 ; return 0; }
14395 EOF
14396 if { (eval echo configure:14397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14397   rm -rf conftest*
14398   eval "ac_cv_func_$ac_func=yes"
14399 else
14400   echo "configure: failed program was:" >&5
14401   cat conftest.$ac_ext >&5
14402   rm -rf conftest*
14403   eval "ac_cv_func_$ac_func=no"
14404 fi
14405 rm -f conftest*
14406 fi
14407
14408 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14409   echo "$ac_t""yes" 1>&6
14410     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14411   cat >> confdefs.h <<EOF
14412 #define $ac_tr_func 1
14413 EOF
14414  
14415 else
14416   echo "$ac_t""no" 1>&6
14417 fi
14418 done
14419
14420
14421                         if test $ac_cv_func_sched_yield = no -a \
14422                                 $ac_cv_func_pthread_yield = no -a \
14423                                 $ac_cv_func_thr_yield = no ; then
14424                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14425 echo "configure:14426: checking for sched_yield in -lrt" >&5
14426 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14427 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14428   echo $ac_n "(cached) $ac_c" 1>&6
14429 else
14430   ac_save_LIBS="$LIBS"
14431 LIBS="-lrt  $LIBS"
14432 cat > conftest.$ac_ext <<EOF
14433 #line 14434 "configure"
14434 #include "confdefs.h"
14435 /* Override any gcc2 internal prototype to avoid an error.  */
14436 /* We use char because int might match the return type of a gcc2
14437     builtin and then its argument prototype would still apply.  */
14438 char sched_yield();
14439
14440 int main() {
14441 sched_yield()
14442 ; return 0; }
14443 EOF
14444 if { (eval echo configure:14445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14445   rm -rf conftest*
14446   eval "ac_cv_lib_$ac_lib_var=yes"
14447 else
14448   echo "configure: failed program was:" >&5
14449   cat conftest.$ac_ext >&5
14450   rm -rf conftest*
14451   eval "ac_cv_lib_$ac_lib_var=no"
14452 fi
14453 rm -f conftest*
14454 LIBS="$ac_save_LIBS"
14455
14456 fi
14457 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14458   echo "$ac_t""yes" 1>&6
14459   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14460                                         cat >> confdefs.h <<\EOF
14461 #define HAVE_SCHED_YIELD 1
14462 EOF
14463
14464                                         ac_cv_func_sched_yield=yes
14465 else
14466   echo "$ac_t""no" 1>&6
14467 ac_cv_func_sched_yield=no
14468 fi
14469
14470                         fi
14471                         if test $ac_cv_func_sched_yield = no -a \
14472                                 $ac_cv_func_pthread_yield = no -a \
14473                                 "$ac_cv_func_thr_yield" = no ; then
14474                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14475                         fi
14476
14477                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14478 do
14479 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14480 echo "configure:14481: checking for $ac_func" >&5
14481 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14482   echo $ac_n "(cached) $ac_c" 1>&6
14483 else
14484   cat > conftest.$ac_ext <<EOF
14485 #line 14486 "configure"
14486 #include "confdefs.h"
14487 /* System header to define __stub macros and hopefully few prototypes,
14488     which can conflict with char $ac_func(); below.  */
14489 #include <assert.h>
14490 /* Override any gcc2 internal prototype to avoid an error.  */
14491 /* We use char because int might match the return type of a gcc2
14492     builtin and then its argument prototype would still apply.  */
14493 char $ac_func();
14494 char (*f)();
14495
14496 int main() {
14497
14498 /* The GNU C library defines this for functions which it implements
14499     to always fail with ENOSYS.  Some functions are actually named
14500     something starting with __ and the normal name is an alias.  */
14501 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14502 choke me
14503 #else
14504 f = $ac_func;
14505 #endif
14506
14507 ; return 0; }
14508 EOF
14509 if { (eval echo configure:14510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14510   rm -rf conftest*
14511   eval "ac_cv_func_$ac_func=yes"
14512 else
14513   echo "configure: failed program was:" >&5
14514   cat conftest.$ac_ext >&5
14515   rm -rf conftest*
14516   eval "ac_cv_func_$ac_func=no"
14517 fi
14518 rm -f conftest*
14519 fi
14520
14521 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14522   echo "$ac_t""yes" 1>&6
14523     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14524   cat >> confdefs.h <<EOF
14525 #define $ac_tr_func 1
14526 EOF
14527  
14528 else
14529   echo "$ac_t""no" 1>&6
14530 fi
14531 done
14532
14533
14534                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14535 echo "configure:14536: checking for pthread_detach with <pthread.h>" >&5
14536 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14537   echo $ac_n "(cached) $ac_c" 1>&6
14538 else
14539   
14540                                                                 cat > conftest.$ac_ext <<EOF
14541 #line 14542 "configure"
14542 #include "confdefs.h"
14543
14544 #include <pthread.h>
14545 #ifndef NULL
14546 #define NULL (void*)0
14547 #endif
14548
14549 int main() {
14550 pthread_detach(NULL);
14551 ; return 0; }
14552 EOF
14553 if { (eval echo configure:14554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14554   rm -rf conftest*
14555   ol_cv_func_pthread_detach=yes
14556 else
14557   echo "configure: failed program was:" >&5
14558   cat conftest.$ac_ext >&5
14559   rm -rf conftest*
14560   ol_cv_func_pthread_detach=no
14561 fi
14562 rm -f conftest*
14563                         
14564 fi
14565
14566 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14567
14568                         if test $ol_cv_func_pthread_detach = no ; then
14569                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14570                         fi
14571
14572                         cat >> confdefs.h <<\EOF
14573 #define HAVE_PTHREAD_DETACH 1
14574 EOF
14575
14576
14577                                                 for ac_func in \
14578                                 pthread_setconcurrency \
14579                                 pthread_getconcurrency \
14580                                 thr_setconcurrency \
14581                                 thr_getconcurrency \
14582                         
14583 do
14584 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14585 echo "configure:14586: checking for $ac_func" >&5
14586 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14587   echo $ac_n "(cached) $ac_c" 1>&6
14588 else
14589   cat > conftest.$ac_ext <<EOF
14590 #line 14591 "configure"
14591 #include "confdefs.h"
14592 /* System header to define __stub macros and hopefully few prototypes,
14593     which can conflict with char $ac_func(); below.  */
14594 #include <assert.h>
14595 /* Override any gcc2 internal prototype to avoid an error.  */
14596 /* We use char because int might match the return type of a gcc2
14597     builtin and then its argument prototype would still apply.  */
14598 char $ac_func();
14599 char (*f)();
14600
14601 int main() {
14602
14603 /* The GNU C library defines this for functions which it implements
14604     to always fail with ENOSYS.  Some functions are actually named
14605     something starting with __ and the normal name is an alias.  */
14606 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14607 choke me
14608 #else
14609 f = $ac_func;
14610 #endif
14611
14612 ; return 0; }
14613 EOF
14614 if { (eval echo configure:14615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14615   rm -rf conftest*
14616   eval "ac_cv_func_$ac_func=yes"
14617 else
14618   echo "configure: failed program was:" >&5
14619   cat conftest.$ac_ext >&5
14620   rm -rf conftest*
14621   eval "ac_cv_func_$ac_func=no"
14622 fi
14623 rm -f conftest*
14624 fi
14625
14626 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14627   echo "$ac_t""yes" 1>&6
14628     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14629   cat >> confdefs.h <<EOF
14630 #define $ac_tr_func 1
14631 EOF
14632  
14633 else
14634   echo "$ac_t""no" 1>&6
14635 fi
14636 done
14637
14638
14639                         
14640         for ac_func in pthread_kill_other_threads_np
14641 do
14642 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14643 echo "configure:14644: checking for $ac_func" >&5
14644 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14645   echo $ac_n "(cached) $ac_c" 1>&6
14646 else
14647   cat > conftest.$ac_ext <<EOF
14648 #line 14649 "configure"
14649 #include "confdefs.h"
14650 /* System header to define __stub macros and hopefully few prototypes,
14651     which can conflict with char $ac_func(); below.  */
14652 #include <assert.h>
14653 /* Override any gcc2 internal prototype to avoid an error.  */
14654 /* We use char because int might match the return type of a gcc2
14655     builtin and then its argument prototype would still apply.  */
14656 char $ac_func();
14657 char (*f)();
14658
14659 int main() {
14660
14661 /* The GNU C library defines this for functions which it implements
14662     to always fail with ENOSYS.  Some functions are actually named
14663     something starting with __ and the normal name is an alias.  */
14664 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14665 choke me
14666 #else
14667 f = $ac_func;
14668 #endif
14669
14670 ; return 0; }
14671 EOF
14672 if { (eval echo configure:14673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14673   rm -rf conftest*
14674   eval "ac_cv_func_$ac_func=yes"
14675 else
14676   echo "configure: failed program was:" >&5
14677   cat conftest.$ac_ext >&5
14678   rm -rf conftest*
14679   eval "ac_cv_func_$ac_func=no"
14680 fi
14681 rm -f conftest*
14682 fi
14683
14684 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14685   echo "$ac_t""yes" 1>&6
14686     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14687   cat >> confdefs.h <<EOF
14688 #define $ac_tr_func 1
14689 EOF
14690  
14691 else
14692   echo "$ac_t""no" 1>&6
14693 fi
14694 done
14695
14696         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14697 echo "configure:14698: checking for LinuxThreads implementation" >&5
14698 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14699   echo $ac_n "(cached) $ac_c" 1>&6
14700 else
14701   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14702 fi
14703
14704 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14705
14706                         
14707         
14708         
14709         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14710 echo "configure:14711: checking for LinuxThreads consistency" >&5
14711 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
14712   echo $ac_n "(cached) $ac_c" 1>&6
14713 else
14714   
14715                 if test $ol_cv_header_linux_threads = yes -a \
14716                         $ol_cv_sys_linux_threads = yes; then
14717                         ol_cv_linux_threads=yes
14718                 elif test $ol_cv_header_linux_threads = no -a \
14719                         $ol_cv_sys_linux_threads = no; then
14720                         ol_cv_linux_threads=no
14721                 else
14722                         ol_cv_linux_threads=error
14723                 fi
14724         
14725 fi
14726
14727 echo "$ac_t""$ol_cv_linux_threads" 1>&6
14728
14729
14730                         if test $ol_cv_linux_threads = error; then
14731                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
14732                         fi
14733
14734                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
14735 echo "configure:14736: checking if pthread_create() works" >&5
14736 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
14737   echo $ac_n "(cached) $ac_c" 1>&6
14738 else
14739   
14740                         if test "$cross_compiling" = yes; then
14741                                 ol_cv_pthread_create_works=yes
14742 else
14743   cat > conftest.$ac_ext <<EOF
14744 #line 14745 "configure"
14745 #include "confdefs.h"
14746 /* pthread test headers */
14747 #include <pthread.h>
14748 #if HAVE_PTHREADS < 7
14749 #include <errno.h>
14750 #endif
14751 #ifndef NULL
14752 #define NULL (void*)0
14753 #endif
14754
14755 static void *task(p)
14756         void *p;
14757 {
14758         return (void *) (p == NULL);
14759 }
14760
14761
14762 int main(argc, argv)
14763         int argc;
14764         char **argv;
14765 {
14766
14767         /* pthread test function */
14768 #ifndef PTHREAD_CREATE_DETACHED
14769 #define PTHREAD_CREATE_DETACHED 1
14770 #endif
14771         pthread_t t;
14772         int status;
14773         int detach = PTHREAD_CREATE_DETACHED;
14774
14775 #if HAVE_PTHREADS > 4
14776         /* Final pthreads */
14777         pthread_attr_t attr;
14778
14779         status = pthread_attr_init(&attr);
14780         if( status ) return status;
14781
14782 #if HAVE_PTHREADS < 7
14783         status = pthread_attr_setdetachstate(&attr, &detach);
14784         if( status < 0 ) status = errno;
14785 #else
14786         status = pthread_attr_setdetachstate(&attr, detach);
14787 #endif
14788         if( status ) return status;
14789         status = pthread_create( &t, &attr, task, NULL );
14790 #if HAVE_PTHREADS < 7
14791         if( status < 0 ) status = errno;
14792 #endif
14793         if( status ) return status;
14794 #else
14795         /* Draft 4 pthreads */
14796         status = pthread_create( &t, pthread_attr_default, task, NULL );
14797         if( status ) return errno;
14798
14799         /* give thread a chance to complete */
14800         /* it should remain joinable and hence detachable */
14801         sleep( 1 );
14802
14803         status = pthread_detach( &t );
14804         if( status ) return errno;
14805 #endif
14806
14807 #ifdef HAVE_LINUX_THREADS
14808         pthread_kill_other_threads_np();
14809 #endif
14810
14811         return 0;
14812
14813 }
14814
14815 EOF
14816 if { (eval echo configure:14817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14817 then
14818   ol_cv_pthread_create_works=yes
14819 else
14820   echo "configure: failed program was:" >&5
14821   cat conftest.$ac_ext >&5
14822   rm -fr conftest*
14823   ol_cv_pthread_create_works=no
14824 fi
14825 rm -fr conftest*
14826 fi
14827
14828 fi
14829
14830 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
14831
14832                         if test $ol_cv_pthread_create_works = no ; then
14833                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
14834                         fi
14835
14836                                                 if test $ol_with_yielding_select = auto ; then
14837                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
14838 echo "configure:14839: checking if select yields when using pthreads" >&5
14839 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
14840   echo $ac_n "(cached) $ac_c" 1>&6
14841 else
14842   
14843                                 if test "$cross_compiling" = yes; then
14844   ol_cv_pthread_select_yields=cross
14845 else
14846   cat > conftest.$ac_ext <<EOF
14847 #line 14848 "configure"
14848 #include "confdefs.h"
14849
14850 #include <sys/types.h>
14851 #include <sys/time.h>
14852 #include <unistd.h>
14853 #include <pthread.h>
14854 #ifndef NULL
14855 #define NULL (void*) 0
14856 #endif
14857
14858 static int fildes[2];
14859
14860 static void *task(p)
14861         void *p;
14862 {
14863         int i;
14864         struct timeval tv;
14865
14866         fd_set rfds;
14867
14868         tv.tv_sec=10;
14869         tv.tv_usec=0;
14870
14871         FD_ZERO(&rfds);
14872         FD_SET(fildes[0], &rfds);
14873
14874         /* we're not interested in any fds */
14875         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
14876
14877         if(i < 0) {
14878                 perror("select");
14879                 exit(10);
14880         }
14881
14882         exit(0); /* if we exit here, the select blocked the whole process */
14883 }
14884
14885 int main(argc, argv)
14886         int argc;
14887         char **argv;
14888 {
14889         pthread_t t;
14890
14891         /* create a pipe to select */
14892         if(pipe(&fildes[0])) {
14893                 perror("select");
14894                 exit(1);
14895         }
14896
14897 #ifdef HAVE_PTHREAD_SETCONCURRENCY
14898         (void) pthread_setconcurrency(2);
14899 #else
14900 #ifdef HAVE_THR_SETCONCURRENCY
14901         /* Set Solaris LWP concurrency to 2 */
14902         thr_setconcurrency(2);
14903 #endif
14904 #endif
14905
14906 #if HAVE_PTHREADS < 6
14907         pthread_create(&t, pthread_attr_default, task, NULL);
14908 #else
14909         pthread_create(&t, NULL, task, NULL);
14910 #endif
14911
14912         /* make sure task runs first */
14913 #if HAVE_THR_YIELD
14914         thr_yield();
14915 #elif defined( HAVE_SCHED_YIELD )
14916         sched_yield();
14917 #elif defined( HAVE_PTHREAD_YIELD )
14918         pthread_yield();
14919 #endif
14920
14921         exit(2);
14922 }
14923 EOF
14924 if { (eval echo configure:14925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14925 then
14926   ol_cv_pthread_select_yields=no
14927 else
14928   echo "configure: failed program was:" >&5
14929   cat conftest.$ac_ext >&5
14930   rm -fr conftest*
14931   ol_cv_pthread_select_yields=yes
14932 fi
14933 rm -fr conftest*
14934 fi
14935
14936 fi
14937
14938 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
14939
14940                                 if test $ol_cv_pthread_select_yields = cross ; then
14941                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
14942                                 fi
14943
14944                                 if test $ol_cv_pthread_select_yields = yes ; then
14945                                         ol_with_yielding_select=yes
14946                                 fi
14947                         fi
14948
14949                                                 CPPFLAGS="$save_CPPFLAGS"
14950                         LIBS="$save_LIBS"
14951                 else
14952                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
14953                 fi
14954         fi
14955
14956         if test $ol_with_threads = posix ; then
14957                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
14958         fi
14959 fi
14960
14961 if test $ol_with_threads = auto -o $ol_with_threads = yes \
14962         -o $ol_with_threads = mach ; then
14963
14964                 for ac_hdr in mach/cthreads.h cthreads.h
14965 do
14966 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14967 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14968 echo "configure:14969: checking for $ac_hdr" >&5
14969 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14970   echo $ac_n "(cached) $ac_c" 1>&6
14971 else
14972   cat > conftest.$ac_ext <<EOF
14973 #line 14974 "configure"
14974 #include "confdefs.h"
14975 #include <$ac_hdr>
14976 EOF
14977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14978 { (eval echo configure:14979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14980 if test -z "$ac_err"; then
14981   rm -rf conftest*
14982   eval "ac_cv_header_$ac_safe=yes"
14983 else
14984   echo "$ac_err" >&5
14985   echo "configure: failed program was:" >&5
14986   cat conftest.$ac_ext >&5
14987   rm -rf conftest*
14988   eval "ac_cv_header_$ac_safe=no"
14989 fi
14990 rm -f conftest*
14991 fi
14992 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14993   echo "$ac_t""yes" 1>&6
14994     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14995   cat >> confdefs.h <<EOF
14996 #define $ac_tr_hdr 1
14997 EOF
14998  
14999 else
15000   echo "$ac_t""no" 1>&6
15001 fi
15002 done
15003
15004         if test $ac_cv_header_mach_cthreads_h = yes ; then
15005                 ol_with_threads=found
15006
15007                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15008 echo "configure:15009: checking for cthread_fork" >&5
15009 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15010   echo $ac_n "(cached) $ac_c" 1>&6
15011 else
15012   cat > conftest.$ac_ext <<EOF
15013 #line 15014 "configure"
15014 #include "confdefs.h"
15015 /* System header to define __stub macros and hopefully few prototypes,
15016     which can conflict with char cthread_fork(); below.  */
15017 #include <assert.h>
15018 /* Override any gcc2 internal prototype to avoid an error.  */
15019 /* We use char because int might match the return type of a gcc2
15020     builtin and then its argument prototype would still apply.  */
15021 char cthread_fork();
15022 char (*f)();
15023
15024 int main() {
15025
15026 /* The GNU C library defines this for functions which it implements
15027     to always fail with ENOSYS.  Some functions are actually named
15028     something starting with __ and the normal name is an alias.  */
15029 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15030 choke me
15031 #else
15032 f = cthread_fork;
15033 #endif
15034
15035 ; return 0; }
15036 EOF
15037 if { (eval echo configure:15038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15038   rm -rf conftest*
15039   eval "ac_cv_func_cthread_fork=yes"
15040 else
15041   echo "configure: failed program was:" >&5
15042   cat conftest.$ac_ext >&5
15043   rm -rf conftest*
15044   eval "ac_cv_func_cthread_fork=no"
15045 fi
15046 rm -f conftest*
15047 fi
15048
15049 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15050   echo "$ac_t""yes" 1>&6
15051   ol_link_threads=yes
15052 else
15053   echo "$ac_t""no" 1>&6
15054 fi
15055
15056
15057                 if test $ol_link_threads = no ; then
15058                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15059 echo "configure:15060: checking for cthread_fork with -all_load" >&5
15060 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15061   echo $ac_n "(cached) $ac_c" 1>&6
15062 else
15063   
15064                                                                 save_LIBS="$LIBS"
15065                                 LIBS="-all_load $LIBS"
15066                                 cat > conftest.$ac_ext <<EOF
15067 #line 15068 "configure"
15068 #include "confdefs.h"
15069 #include <mach/cthreads.h>
15070 int main() {
15071
15072                                         cthread_fork((void *)0, (void *)0);
15073                                         
15074 ; return 0; }
15075 EOF
15076 if { (eval echo configure:15077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15077   rm -rf conftest*
15078   ol_cv_cthread_all_load=yes
15079 else
15080   echo "configure: failed program was:" >&5
15081   cat conftest.$ac_ext >&5
15082   rm -rf conftest*
15083   ol_cv_cthread_all_load=no
15084 fi
15085 rm -f conftest*
15086                                                                 LIBS="$save_LIBS"
15087                         
15088 fi
15089
15090 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15091
15092                         if test $ol_cv_cthread_all_load = yes ; then
15093                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15094                                 ol_link_threads=mach
15095                                 ol_with_threads=found
15096                         fi
15097                 fi
15098
15099         elif test $ac_cv_header_cthreads_h = yes ; then
15100                                 
15101                 ol_with_threads=found
15102  
15103                                 save_LIBS="$LIBS"
15104                 LIBS="$LIBS -lthreads"
15105                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15106 echo "configure:15107: checking for cthread_fork" >&5
15107 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15108   echo $ac_n "(cached) $ac_c" 1>&6
15109 else
15110   cat > conftest.$ac_ext <<EOF
15111 #line 15112 "configure"
15112 #include "confdefs.h"
15113 /* System header to define __stub macros and hopefully few prototypes,
15114     which can conflict with char cthread_fork(); below.  */
15115 #include <assert.h>
15116 /* Override any gcc2 internal prototype to avoid an error.  */
15117 /* We use char because int might match the return type of a gcc2
15118     builtin and then its argument prototype would still apply.  */
15119 char cthread_fork();
15120 char (*f)();
15121
15122 int main() {
15123
15124 /* The GNU C library defines this for functions which it implements
15125     to always fail with ENOSYS.  Some functions are actually named
15126     something starting with __ and the normal name is an alias.  */
15127 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15128 choke me
15129 #else
15130 f = cthread_fork;
15131 #endif
15132
15133 ; return 0; }
15134 EOF
15135 if { (eval echo configure:15136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15136   rm -rf conftest*
15137   eval "ac_cv_func_cthread_fork=yes"
15138 else
15139   echo "configure: failed program was:" >&5
15140   cat conftest.$ac_ext >&5
15141   rm -rf conftest*
15142   eval "ac_cv_func_cthread_fork=no"
15143 fi
15144 rm -f conftest*
15145 fi
15146
15147 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15148   echo "$ac_t""yes" 1>&6
15149   ol_link_threads=yes
15150 else
15151   echo "$ac_t""no" 1>&6
15152 fi
15153
15154                 LIBS="$save_LIBS"
15155
15156                 if test $ol_link_threads = yes ; then
15157                         LTHREAD_LIBS="-lthreads"
15158                         ol_link_threads=mach
15159                         ol_with_threads=found
15160                 else
15161                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15162                 fi
15163
15164         elif test $ol_with_threads = mach ; then
15165                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15166         fi
15167
15168         if test $ol_link_threads = mach ; then
15169                 cat >> confdefs.h <<\EOF
15170 #define HAVE_MACH_CTHREADS 1
15171 EOF
15172
15173         elif test $ol_with_threads = found ; then
15174                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15175         fi
15176 fi
15177
15178 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15179         -o $ol_with_threads = pth ; then
15180
15181         for ac_hdr in pth.h
15182 do
15183 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15184 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15185 echo "configure:15186: checking for $ac_hdr" >&5
15186 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15187   echo $ac_n "(cached) $ac_c" 1>&6
15188 else
15189   cat > conftest.$ac_ext <<EOF
15190 #line 15191 "configure"
15191 #include "confdefs.h"
15192 #include <$ac_hdr>
15193 EOF
15194 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15195 { (eval echo configure:15196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15196 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15197 if test -z "$ac_err"; then
15198   rm -rf conftest*
15199   eval "ac_cv_header_$ac_safe=yes"
15200 else
15201   echo "$ac_err" >&5
15202   echo "configure: failed program was:" >&5
15203   cat conftest.$ac_ext >&5
15204   rm -rf conftest*
15205   eval "ac_cv_header_$ac_safe=no"
15206 fi
15207 rm -f conftest*
15208 fi
15209 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15210   echo "$ac_t""yes" 1>&6
15211     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15212   cat >> confdefs.h <<EOF
15213 #define $ac_tr_hdr 1
15214 EOF
15215  
15216 else
15217   echo "$ac_t""no" 1>&6
15218 fi
15219 done
15220
15221
15222         if test $ac_cv_header_pth_h = yes ; then
15223                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15224 echo "configure:15225: checking for pth_version in -lpth" >&5
15225 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15226 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15227   echo $ac_n "(cached) $ac_c" 1>&6
15228 else
15229   ac_save_LIBS="$LIBS"
15230 LIBS="-lpth  $LIBS"
15231 cat > conftest.$ac_ext <<EOF
15232 #line 15233 "configure"
15233 #include "confdefs.h"
15234 /* Override any gcc2 internal prototype to avoid an error.  */
15235 /* We use char because int might match the return type of a gcc2
15236     builtin and then its argument prototype would still apply.  */
15237 char pth_version();
15238
15239 int main() {
15240 pth_version()
15241 ; return 0; }
15242 EOF
15243 if { (eval echo configure:15244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15244   rm -rf conftest*
15245   eval "ac_cv_lib_$ac_lib_var=yes"
15246 else
15247   echo "configure: failed program was:" >&5
15248   cat conftest.$ac_ext >&5
15249   rm -rf conftest*
15250   eval "ac_cv_lib_$ac_lib_var=no"
15251 fi
15252 rm -f conftest*
15253 LIBS="$ac_save_LIBS"
15254
15255 fi
15256 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15257   echo "$ac_t""yes" 1>&6
15258   have_pth=yes
15259 else
15260   echo "$ac_t""no" 1>&6
15261 have_pth=no
15262 fi
15263
15264
15265                 if test $have_pth = yes ; then
15266                         cat >> confdefs.h <<\EOF
15267 #define HAVE_GNU_PTH 1
15268 EOF
15269
15270                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15271                         ol_link_threads=pth
15272                         ol_with_threads=found
15273
15274                         if test $ol_with_yielding_select = auto ; then
15275                                 ol_with_yielding_select=yes
15276                         fi
15277                 fi
15278         fi
15279 fi
15280
15281 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15282         -o $ol_with_threads = lwp ; then
15283
15284                 for ac_hdr in thread.h synch.h
15285 do
15286 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15287 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15288 echo "configure:15289: checking for $ac_hdr" >&5
15289 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15290   echo $ac_n "(cached) $ac_c" 1>&6
15291 else
15292   cat > conftest.$ac_ext <<EOF
15293 #line 15294 "configure"
15294 #include "confdefs.h"
15295 #include <$ac_hdr>
15296 EOF
15297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15298 { (eval echo configure:15299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15300 if test -z "$ac_err"; then
15301   rm -rf conftest*
15302   eval "ac_cv_header_$ac_safe=yes"
15303 else
15304   echo "$ac_err" >&5
15305   echo "configure: failed program was:" >&5
15306   cat conftest.$ac_ext >&5
15307   rm -rf conftest*
15308   eval "ac_cv_header_$ac_safe=no"
15309 fi
15310 rm -f conftest*
15311 fi
15312 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15313   echo "$ac_t""yes" 1>&6
15314     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15315   cat >> confdefs.h <<EOF
15316 #define $ac_tr_hdr 1
15317 EOF
15318  
15319 else
15320   echo "$ac_t""no" 1>&6
15321 fi
15322 done
15323
15324         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15325                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15326 echo "configure:15327: checking for thr_create in -lthread" >&5
15327 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15328 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15329   echo $ac_n "(cached) $ac_c" 1>&6
15330 else
15331   ac_save_LIBS="$LIBS"
15332 LIBS="-lthread  $LIBS"
15333 cat > conftest.$ac_ext <<EOF
15334 #line 15335 "configure"
15335 #include "confdefs.h"
15336 /* Override any gcc2 internal prototype to avoid an error.  */
15337 /* We use char because int might match the return type of a gcc2
15338     builtin and then its argument prototype would still apply.  */
15339 char thr_create();
15340
15341 int main() {
15342 thr_create()
15343 ; return 0; }
15344 EOF
15345 if { (eval echo configure:15346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15346   rm -rf conftest*
15347   eval "ac_cv_lib_$ac_lib_var=yes"
15348 else
15349   echo "configure: failed program was:" >&5
15350   cat conftest.$ac_ext >&5
15351   rm -rf conftest*
15352   eval "ac_cv_lib_$ac_lib_var=no"
15353 fi
15354 rm -f conftest*
15355 LIBS="$ac_save_LIBS"
15356
15357 fi
15358 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15359   echo "$ac_t""yes" 1>&6
15360   have_thr=yes
15361 else
15362   echo "$ac_t""no" 1>&6
15363 have_thr=no
15364 fi
15365
15366
15367                 if test $have_thr = yes ; then
15368                         cat >> confdefs.h <<\EOF
15369 #define HAVE_THR 1
15370 EOF
15371
15372                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15373                         ol_link_threads=thr
15374
15375                         if test $ol_with_yielding_select = auto ; then
15376                                 ol_with_yielding_select=yes
15377                         fi
15378
15379                                                 for ac_func in \
15380                                 thr_setconcurrency \
15381                                 thr_getconcurrency \
15382                         
15383 do
15384 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15385 echo "configure:15386: checking for $ac_func" >&5
15386 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15387   echo $ac_n "(cached) $ac_c" 1>&6
15388 else
15389   cat > conftest.$ac_ext <<EOF
15390 #line 15391 "configure"
15391 #include "confdefs.h"
15392 /* System header to define __stub macros and hopefully few prototypes,
15393     which can conflict with char $ac_func(); below.  */
15394 #include <assert.h>
15395 /* Override any gcc2 internal prototype to avoid an error.  */
15396 /* We use char because int might match the return type of a gcc2
15397     builtin and then its argument prototype would still apply.  */
15398 char $ac_func();
15399 char (*f)();
15400
15401 int main() {
15402
15403 /* The GNU C library defines this for functions which it implements
15404     to always fail with ENOSYS.  Some functions are actually named
15405     something starting with __ and the normal name is an alias.  */
15406 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15407 choke me
15408 #else
15409 f = $ac_func;
15410 #endif
15411
15412 ; return 0; }
15413 EOF
15414 if { (eval echo configure:15415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15415   rm -rf conftest*
15416   eval "ac_cv_func_$ac_func=yes"
15417 else
15418   echo "configure: failed program was:" >&5
15419   cat conftest.$ac_ext >&5
15420   rm -rf conftest*
15421   eval "ac_cv_func_$ac_func=no"
15422 fi
15423 rm -f conftest*
15424 fi
15425
15426 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15427   echo "$ac_t""yes" 1>&6
15428     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15429   cat >> confdefs.h <<EOF
15430 #define $ac_tr_func 1
15431 EOF
15432  
15433 else
15434   echo "$ac_t""no" 1>&6
15435 fi
15436 done
15437
15438                 fi
15439         fi
15440
15441                 for ac_hdr in lwp/lwp.h
15442 do
15443 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15444 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15445 echo "configure:15446: checking for $ac_hdr" >&5
15446 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15447   echo $ac_n "(cached) $ac_c" 1>&6
15448 else
15449   cat > conftest.$ac_ext <<EOF
15450 #line 15451 "configure"
15451 #include "confdefs.h"
15452 #include <$ac_hdr>
15453 EOF
15454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15455 { (eval echo configure:15456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15457 if test -z "$ac_err"; then
15458   rm -rf conftest*
15459   eval "ac_cv_header_$ac_safe=yes"
15460 else
15461   echo "$ac_err" >&5
15462   echo "configure: failed program was:" >&5
15463   cat conftest.$ac_ext >&5
15464   rm -rf conftest*
15465   eval "ac_cv_header_$ac_safe=no"
15466 fi
15467 rm -f conftest*
15468 fi
15469 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15470   echo "$ac_t""yes" 1>&6
15471     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15472   cat >> confdefs.h <<EOF
15473 #define $ac_tr_hdr 1
15474 EOF
15475  
15476 else
15477   echo "$ac_t""no" 1>&6
15478 fi
15479 done
15480
15481         if test $ac_cv_header_lwp_lwp_h = yes ; then
15482                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15483 echo "configure:15484: checking for lwp_create in -llwp" >&5
15484 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15485 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15486   echo $ac_n "(cached) $ac_c" 1>&6
15487 else
15488   ac_save_LIBS="$LIBS"
15489 LIBS="-llwp  $LIBS"
15490 cat > conftest.$ac_ext <<EOF
15491 #line 15492 "configure"
15492 #include "confdefs.h"
15493 /* Override any gcc2 internal prototype to avoid an error.  */
15494 /* We use char because int might match the return type of a gcc2
15495     builtin and then its argument prototype would still apply.  */
15496 char lwp_create();
15497
15498 int main() {
15499 lwp_create()
15500 ; return 0; }
15501 EOF
15502 if { (eval echo configure:15503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15503   rm -rf conftest*
15504   eval "ac_cv_lib_$ac_lib_var=yes"
15505 else
15506   echo "configure: failed program was:" >&5
15507   cat conftest.$ac_ext >&5
15508   rm -rf conftest*
15509   eval "ac_cv_lib_$ac_lib_var=no"
15510 fi
15511 rm -f conftest*
15512 LIBS="$ac_save_LIBS"
15513
15514 fi
15515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15516   echo "$ac_t""yes" 1>&6
15517   have_lwp=yes
15518 else
15519   echo "$ac_t""no" 1>&6
15520 have_lwp=no
15521 fi
15522
15523
15524                 if test $have_lwp = yes ; then
15525                         cat >> confdefs.h <<\EOF
15526 #define HAVE_LWP 1
15527 EOF
15528
15529                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15530                         ol_link_threads=lwp
15531
15532                         if test $ol_with_yielding_select = auto ; then
15533                                 ol_with_yielding_select=no
15534                         fi
15535                 fi
15536         fi
15537 fi
15538
15539 if test $ol_with_yielding_select = yes ; then
15540         cat >> confdefs.h <<\EOF
15541 #define HAVE_YIELDING_SELECT 1
15542 EOF
15543
15544 fi
15545
15546 if test $ol_with_threads = manual ; then
15547                 ol_link_threads=yes
15548
15549         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15550
15551         for ac_hdr in pthread.h sched.h
15552 do
15553 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15554 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15555 echo "configure:15556: checking for $ac_hdr" >&5
15556 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15557   echo $ac_n "(cached) $ac_c" 1>&6
15558 else
15559   cat > conftest.$ac_ext <<EOF
15560 #line 15561 "configure"
15561 #include "confdefs.h"
15562 #include <$ac_hdr>
15563 EOF
15564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15565 { (eval echo configure:15566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15567 if test -z "$ac_err"; then
15568   rm -rf conftest*
15569   eval "ac_cv_header_$ac_safe=yes"
15570 else
15571   echo "$ac_err" >&5
15572   echo "configure: failed program was:" >&5
15573   cat conftest.$ac_ext >&5
15574   rm -rf conftest*
15575   eval "ac_cv_header_$ac_safe=no"
15576 fi
15577 rm -f conftest*
15578 fi
15579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15580   echo "$ac_t""yes" 1>&6
15581     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15582   cat >> confdefs.h <<EOF
15583 #define $ac_tr_hdr 1
15584 EOF
15585  
15586 else
15587   echo "$ac_t""no" 1>&6
15588 fi
15589 done
15590
15591         for ac_func in sched_yield pthread_yield
15592 do
15593 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15594 echo "configure:15595: checking for $ac_func" >&5
15595 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15596   echo $ac_n "(cached) $ac_c" 1>&6
15597 else
15598   cat > conftest.$ac_ext <<EOF
15599 #line 15600 "configure"
15600 #include "confdefs.h"
15601 /* System header to define __stub macros and hopefully few prototypes,
15602     which can conflict with char $ac_func(); below.  */
15603 #include <assert.h>
15604 /* Override any gcc2 internal prototype to avoid an error.  */
15605 /* We use char because int might match the return type of a gcc2
15606     builtin and then its argument prototype would still apply.  */
15607 char $ac_func();
15608 char (*f)();
15609
15610 int main() {
15611
15612 /* The GNU C library defines this for functions which it implements
15613     to always fail with ENOSYS.  Some functions are actually named
15614     something starting with __ and the normal name is an alias.  */
15615 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15616 choke me
15617 #else
15618 f = $ac_func;
15619 #endif
15620
15621 ; return 0; }
15622 EOF
15623 if { (eval echo configure:15624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15624   rm -rf conftest*
15625   eval "ac_cv_func_$ac_func=yes"
15626 else
15627   echo "configure: failed program was:" >&5
15628   cat conftest.$ac_ext >&5
15629   rm -rf conftest*
15630   eval "ac_cv_func_$ac_func=no"
15631 fi
15632 rm -f conftest*
15633 fi
15634
15635 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15636   echo "$ac_t""yes" 1>&6
15637     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15638   cat >> confdefs.h <<EOF
15639 #define $ac_tr_func 1
15640 EOF
15641  
15642 else
15643   echo "$ac_t""no" 1>&6
15644 fi
15645 done
15646
15647         
15648         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15649 echo "configure:15650: checking for LinuxThreads pthread.h" >&5
15650 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15651   echo $ac_n "(cached) $ac_c" 1>&6
15652 else
15653   cat > conftest.$ac_ext <<EOF
15654 #line 15655 "configure"
15655 #include "confdefs.h"
15656 #include <pthread.h>
15657 EOF
15658 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15659   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15660   rm -rf conftest*
15661   ol_cv_header_linux_threads=yes
15662 else
15663   rm -rf conftest*
15664   ol_cv_header_linux_threads=no
15665 fi
15666 rm -f conftest*
15667
15668                 
15669 fi
15670
15671 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15672         if test $ol_cv_header_linux_threads = yes; then
15673                 cat >> confdefs.h <<\EOF
15674 #define HAVE_LINUX_THREADS 1
15675 EOF
15676
15677         fi
15678
15679
15680         for ac_hdr in mach/cthreads.h
15681 do
15682 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15683 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15684 echo "configure:15685: checking for $ac_hdr" >&5
15685 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15686   echo $ac_n "(cached) $ac_c" 1>&6
15687 else
15688   cat > conftest.$ac_ext <<EOF
15689 #line 15690 "configure"
15690 #include "confdefs.h"
15691 #include <$ac_hdr>
15692 EOF
15693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15694 { (eval echo configure:15695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15695 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15696 if test -z "$ac_err"; then
15697   rm -rf conftest*
15698   eval "ac_cv_header_$ac_safe=yes"
15699 else
15700   echo "$ac_err" >&5
15701   echo "configure: failed program was:" >&5
15702   cat conftest.$ac_ext >&5
15703   rm -rf conftest*
15704   eval "ac_cv_header_$ac_safe=no"
15705 fi
15706 rm -f conftest*
15707 fi
15708 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15709   echo "$ac_t""yes" 1>&6
15710     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15711   cat >> confdefs.h <<EOF
15712 #define $ac_tr_hdr 1
15713 EOF
15714  
15715 else
15716   echo "$ac_t""no" 1>&6
15717 fi
15718 done
15719
15720         for ac_hdr in lwp/lwp.h
15721 do
15722 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15723 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15724 echo "configure:15725: checking for $ac_hdr" >&5
15725 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15726   echo $ac_n "(cached) $ac_c" 1>&6
15727 else
15728   cat > conftest.$ac_ext <<EOF
15729 #line 15730 "configure"
15730 #include "confdefs.h"
15731 #include <$ac_hdr>
15732 EOF
15733 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15734 { (eval echo configure:15735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15735 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15736 if test -z "$ac_err"; then
15737   rm -rf conftest*
15738   eval "ac_cv_header_$ac_safe=yes"
15739 else
15740   echo "$ac_err" >&5
15741   echo "configure: failed program was:" >&5
15742   cat conftest.$ac_ext >&5
15743   rm -rf conftest*
15744   eval "ac_cv_header_$ac_safe=no"
15745 fi
15746 rm -f conftest*
15747 fi
15748 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15749   echo "$ac_t""yes" 1>&6
15750     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15751   cat >> confdefs.h <<EOF
15752 #define $ac_tr_hdr 1
15753 EOF
15754  
15755 else
15756   echo "$ac_t""no" 1>&6
15757 fi
15758 done
15759
15760         for ac_hdr in thread.h synch.h
15761 do
15762 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15763 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15764 echo "configure:15765: checking for $ac_hdr" >&5
15765 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15766   echo $ac_n "(cached) $ac_c" 1>&6
15767 else
15768   cat > conftest.$ac_ext <<EOF
15769 #line 15770 "configure"
15770 #include "confdefs.h"
15771 #include <$ac_hdr>
15772 EOF
15773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15774 { (eval echo configure:15775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15776 if test -z "$ac_err"; then
15777   rm -rf conftest*
15778   eval "ac_cv_header_$ac_safe=yes"
15779 else
15780   echo "$ac_err" >&5
15781   echo "configure: failed program was:" >&5
15782   cat conftest.$ac_ext >&5
15783   rm -rf conftest*
15784   eval "ac_cv_header_$ac_safe=no"
15785 fi
15786 rm -f conftest*
15787 fi
15788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15789   echo "$ac_t""yes" 1>&6
15790     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15791   cat >> confdefs.h <<EOF
15792 #define $ac_tr_hdr 1
15793 EOF
15794  
15795 else
15796   echo "$ac_t""no" 1>&6
15797 fi
15798 done
15799
15800 fi
15801
15802 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
15803                         cat >> confdefs.h <<\EOF
15804 #define REENTRANT 1
15805 EOF
15806
15807         cat >> confdefs.h <<\EOF
15808 #define _REENTRANT 1
15809 EOF
15810
15811         cat >> confdefs.h <<\EOF
15812 #define THREAD_SAFE 1
15813 EOF
15814
15815         cat >> confdefs.h <<\EOF
15816 #define _THREAD_SAFE 1
15817 EOF
15818
15819         cat >> confdefs.h <<\EOF
15820 #define THREADSAFE 1
15821 EOF
15822
15823         cat >> confdefs.h <<\EOF
15824 #define _THREADSAFE 1
15825 EOF
15826
15827         cat >> confdefs.h <<\EOF
15828 #define _SGI_MP_SOURCE 1
15829 EOF
15830
15831
15832                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
15833 echo "configure:15834: checking for thread specific errno" >&5
15834 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
15835   echo $ac_n "(cached) $ac_c" 1>&6
15836 else
15837   
15838                 cat > conftest.$ac_ext <<EOF
15839 #line 15840 "configure"
15840 #include "confdefs.h"
15841 #include <errno.h>
15842 int main() {
15843 errno = 0;
15844 ; return 0; }
15845 EOF
15846 if { (eval echo configure:15847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15847   rm -rf conftest*
15848   ol_cv_errno_thread_specific=yes
15849 else
15850   echo "configure: failed program was:" >&5
15851   cat conftest.$ac_ext >&5
15852   rm -rf conftest*
15853   ol_cv_errno_thread_specific=no
15854 fi
15855 rm -f conftest*
15856         
15857 fi
15858
15859 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
15860
15861                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
15862 echo "configure:15863: checking for thread specific h_errno" >&5
15863 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
15864   echo $ac_n "(cached) $ac_c" 1>&6
15865 else
15866   
15867                 cat > conftest.$ac_ext <<EOF
15868 #line 15869 "configure"
15869 #include "confdefs.h"
15870 #include <netdb.h>
15871 int main() {
15872 h_errno = 0;
15873 ; return 0; }
15874 EOF
15875 if { (eval echo configure:15876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15876   rm -rf conftest*
15877   ol_cv_h_errno_thread_specific=yes
15878 else
15879   echo "configure: failed program was:" >&5
15880   cat conftest.$ac_ext >&5
15881   rm -rf conftest*
15882   ol_cv_h_errno_thread_specific=no
15883 fi
15884 rm -f conftest*
15885         
15886 fi
15887
15888 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
15889
15890         if test $ol_cv_errno_thread_specific != yes \
15891                 -o $ol_cv_h_errno_thread_specific != yes ; then
15892                 LIBS="$LTHREAD_LIBS $LIBS"
15893                 LTHREAD_LIBS=""
15894         fi
15895
15896 fi  
15897
15898 if test $ol_link_threads = no ; then
15899         if test $ol_with_threads = yes ; then
15900                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
15901         fi
15902
15903         if test $ol_with_threads = auto ; then
15904                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
15905                 ol_with_threads=no
15906         fi
15907
15908         cat >> confdefs.h <<\EOF
15909 #define NO_THREADS 1
15910 EOF
15911
15912         LTHREAD_LIBS=""
15913 fi
15914
15915 if test $ol_link_threads != no ; then
15916         cat >> confdefs.h <<\EOF
15917 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
15918 EOF
15919
15920 fi
15921
15922 for ac_func in \
15923         ctime_r                 \
15924         gethostbyname_r gethostbyaddr_r \
15925
15926 do
15927 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15928 echo "configure:15929: checking for $ac_func" >&5
15929 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15930   echo $ac_n "(cached) $ac_c" 1>&6
15931 else
15932   cat > conftest.$ac_ext <<EOF
15933 #line 15934 "configure"
15934 #include "confdefs.h"
15935 /* System header to define __stub macros and hopefully few prototypes,
15936     which can conflict with char $ac_func(); below.  */
15937 #include <assert.h>
15938 /* Override any gcc2 internal prototype to avoid an error.  */
15939 /* We use char because int might match the return type of a gcc2
15940     builtin and then its argument prototype would still apply.  */
15941 char $ac_func();
15942 char (*f)();
15943
15944 int main() {
15945
15946 /* The GNU C library defines this for functions which it implements
15947     to always fail with ENOSYS.  Some functions are actually named
15948     something starting with __ and the normal name is an alias.  */
15949 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15950 choke me
15951 #else
15952 f = $ac_func;
15953 #endif
15954
15955 ; return 0; }
15956 EOF
15957 if { (eval echo configure:15958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15958   rm -rf conftest*
15959   eval "ac_cv_func_$ac_func=yes"
15960 else
15961   echo "configure: failed program was:" >&5
15962   cat conftest.$ac_ext >&5
15963   rm -rf conftest*
15964   eval "ac_cv_func_$ac_func=no"
15965 fi
15966 rm -f conftest*
15967 fi
15968
15969 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15970   echo "$ac_t""yes" 1>&6
15971     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15972   cat >> confdefs.h <<EOF
15973 #define $ac_tr_func 1
15974 EOF
15975  
15976 else
15977   echo "$ac_t""no" 1>&6
15978 fi
15979 done
15980
15981
15982 if test "$ac_cv_func_ctime_r" = no ; then
15983         ol_cv_func_ctime_r_nargs=0
15984 else
15985         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
15986 echo "configure:15987: checking number of arguments of ctime_r" >&5
15987 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
15988   echo $ac_n "(cached) $ac_c" 1>&6
15989 else
15990   cat > conftest.$ac_ext <<EOF
15991 #line 15992 "configure"
15992 #include "confdefs.h"
15993 #include <time.h>
15994 int main() {
15995 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
15996 ; return 0; }
15997 EOF
15998 if { (eval echo configure:15999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15999   rm -rf conftest*
16000   ol_cv_func_ctime_r_nargs3=yes
16001 else
16002   echo "configure: failed program was:" >&5
16003   cat conftest.$ac_ext >&5
16004   rm -rf conftest*
16005   ol_cv_func_ctime_r_nargs3=no
16006 fi
16007 rm -f conftest*
16008
16009         cat > conftest.$ac_ext <<EOF
16010 #line 16011 "configure"
16011 #include "confdefs.h"
16012 #include <time.h>
16013 int main() {
16014 time_t ti; char *buffer; ctime_r(&ti,buffer);
16015 ; return 0; }
16016 EOF
16017 if { (eval echo configure:16018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16018   rm -rf conftest*
16019   ol_cv_func_ctime_r_nargs2=yes
16020 else
16021   echo "configure: failed program was:" >&5
16022   cat conftest.$ac_ext >&5
16023   rm -rf conftest*
16024   ol_cv_func_ctime_r_nargs2=no
16025 fi
16026 rm -f conftest*
16027
16028         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16029                 $ol_cv_func_ctime_r_nargs2 = no ; then
16030
16031                 ol_cv_func_ctime_r_nargs=3
16032
16033         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16034                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16035
16036                 ol_cv_func_ctime_r_nargs=2
16037
16038         else
16039                 ol_cv_func_ctime_r_nargs=0
16040         fi
16041   
16042 fi
16043
16044 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16045
16046   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16047         cat >> confdefs.h <<EOF
16048 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16049 EOF
16050
16051   fi
16052
16053 fi
16054
16055 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16056         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16057 echo "configure:16058: checking number of arguments of gethostbyname_r" >&5
16058 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16059   echo $ac_n "(cached) $ac_c" 1>&6
16060 else
16061   cat > conftest.$ac_ext <<EOF
16062 #line 16063 "configure"
16063 #include "confdefs.h"
16064 #include <sys/types.h>
16065 #include <sys/socket.h>
16066 #include <netinet/in.h>
16067 #include <netdb.h>
16068 #define BUFSIZE (sizeof(struct hostent)+10)
16069 int main() {
16070 struct hostent hent; char buffer[BUFSIZE];
16071                 int bufsize=BUFSIZE;int h_errno;
16072                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16073                         buffer, bufsize, &h_errno);
16074 ; return 0; }
16075 EOF
16076 if { (eval echo configure:16077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16077   rm -rf conftest*
16078   ol_cv_func_gethostbyname_r_nargs5=yes
16079 else
16080   echo "configure: failed program was:" >&5
16081   cat conftest.$ac_ext >&5
16082   rm -rf conftest*
16083   ol_cv_func_gethostbyname_r_nargs5=no
16084 fi
16085 rm -f conftest*
16086
16087         cat > conftest.$ac_ext <<EOF
16088 #line 16089 "configure"
16089 #include "confdefs.h"
16090 #include <sys/types.h>
16091 #include <sys/socket.h>
16092 #include <netinet/in.h>
16093 #include <netdb.h>
16094 #define BUFSIZE (sizeof(struct hostent)+10)
16095 int main() {
16096 struct hostent hent;struct hostent *rhent;
16097                 char buffer[BUFSIZE];
16098                 int bufsize=BUFSIZE;int h_errno;
16099                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16100                         &rhent, &h_errno);
16101 ; return 0; }
16102 EOF
16103 if { (eval echo configure:16104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16104   rm -rf conftest*
16105   ol_cv_func_gethostbyname_r_nargs6=yes
16106 else
16107   echo "configure: failed program was:" >&5
16108   cat conftest.$ac_ext >&5
16109   rm -rf conftest*
16110   ol_cv_func_gethostbyname_r_nargs6=no
16111 fi
16112 rm -f conftest*
16113
16114         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16115                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16116
16117                 ol_cv_func_gethostbyname_r_nargs=5
16118
16119         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16120                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16121
16122                 ol_cv_func_gethostbyname_r_nargs=6
16123
16124         else
16125                 ol_cv_func_gethostbyname_r_nargs=0
16126         fi
16127   
16128 fi
16129
16130 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16131   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16132         cat >> confdefs.h <<EOF
16133 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16134 EOF
16135
16136   fi
16137
16138 else
16139         ol_cv_func_gethostbyname_r_nargs=0
16140 fi
16141  
16142 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16143         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16144 echo "configure:16145: checking number of arguments of gethostbyaddr_r" >&5
16145 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16146   echo $ac_n "(cached) $ac_c" 1>&6
16147 else
16148   cat > conftest.$ac_ext <<EOF
16149 #line 16150 "configure"
16150 #include "confdefs.h"
16151 #include <sys/types.h>
16152 #include <sys/socket.h>
16153 #include <netinet/in.h>
16154 #include <netdb.h>
16155 #define BUFSIZE (sizeof(struct hostent)+10)
16156 int main() {
16157 struct hostent hent; char buffer[BUFSIZE]; 
16158             struct in_addr add;
16159             size_t alen=sizeof(struct in_addr);
16160             int bufsize=BUFSIZE;int h_errno;
16161                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16162                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16163 ; return 0; }
16164 EOF
16165 if { (eval echo configure:16166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16166   rm -rf conftest*
16167   ol_cv_func_gethostbyaddr_r_nargs7=yes
16168 else
16169   echo "configure: failed program was:" >&5
16170   cat conftest.$ac_ext >&5
16171   rm -rf conftest*
16172   ol_cv_func_gethostbyaddr_r_nargs7=no
16173 fi
16174 rm -f conftest*
16175
16176         cat > conftest.$ac_ext <<EOF
16177 #line 16178 "configure"
16178 #include "confdefs.h"
16179 #include <sys/types.h>
16180 #include <sys/socket.h>
16181 #include <netinet/in.h>
16182 #include <netdb.h>
16183 #define BUFSIZE (sizeof(struct hostent)+10)
16184 int main() {
16185 struct hostent hent;
16186                 struct hostent *rhent; char buffer[BUFSIZE]; 
16187                 struct in_addr add;
16188                 size_t alen=sizeof(struct in_addr);
16189                 int bufsize=BUFSIZE;int h_errno;
16190                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16191                         alen, AF_INET, &hent, buffer, bufsize, 
16192                         &rhent, &h_errno);
16193 ; return 0; }
16194 EOF
16195 if { (eval echo configure:16196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16196   rm -rf conftest*
16197   ol_cv_func_gethostbyaddr_r_nargs8=yes
16198 else
16199   echo "configure: failed program was:" >&5
16200   cat conftest.$ac_ext >&5
16201   rm -rf conftest*
16202   ol_cv_func_gethostbyaddr_r_nargs8=no
16203 fi
16204 rm -f conftest*
16205
16206         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16207                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16208
16209                 ol_cv_func_gethostbyaddr_r_nargs=7
16210
16211         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16212                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16213
16214                 ol_cv_func_gethostbyaddr_r_nargs=8
16215
16216         else
16217                 ol_cv_func_gethostbyaddr_r_nargs=0
16218         fi
16219   
16220 fi
16221
16222 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16223   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16224     cat >> confdefs.h <<EOF
16225 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16226 EOF
16227
16228   fi
16229
16230 else
16231         ol_cv_func_gethostbyaddr_r_nargs=0
16232 fi
16233
16234 ol_link_ldbm=no 
16235
16236 if test $ol_with_ldbm_api = auto \
16237         -o $ol_with_ldbm_api = berkeley \
16238         -o $ol_with_ldbm_api = bcompat ; then
16239
16240         if test $ol_with_ldbm_api = bcompat; then \
16241                 for ac_hdr in db_185.h db.h
16242 do
16243 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16244 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16245 echo "configure:16246: checking for $ac_hdr" >&5
16246 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16247   echo $ac_n "(cached) $ac_c" 1>&6
16248 else
16249   cat > conftest.$ac_ext <<EOF
16250 #line 16251 "configure"
16251 #include "confdefs.h"
16252 #include <$ac_hdr>
16253 EOF
16254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16255 { (eval echo configure:16256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16257 if test -z "$ac_err"; then
16258   rm -rf conftest*
16259   eval "ac_cv_header_$ac_safe=yes"
16260 else
16261   echo "$ac_err" >&5
16262   echo "configure: failed program was:" >&5
16263   cat conftest.$ac_ext >&5
16264   rm -rf conftest*
16265   eval "ac_cv_header_$ac_safe=no"
16266 fi
16267 rm -f conftest*
16268 fi
16269 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16270   echo "$ac_t""yes" 1>&6
16271     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16272   cat >> confdefs.h <<EOF
16273 #define $ac_tr_hdr 1
16274 EOF
16275  
16276 else
16277   echo "$ac_t""no" 1>&6
16278 fi
16279 done
16280
16281 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16282         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16283 echo "configure:16284: checking if Berkeley DB header compatibility" >&5
16284 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16285   echo $ac_n "(cached) $ac_c" 1>&6
16286 else
16287   
16288                 cat > conftest.$ac_ext <<EOF
16289 #line 16290 "configure"
16290 #include "confdefs.h"
16291
16292 #if HAVE_DB_185_H
16293 #       include <db_185.h>
16294 #else
16295 #       include <db.h>
16296 #endif
16297
16298  /* this check could be improved */
16299 #ifndef DB_VERSION_MAJOR
16300 #       define DB_VERSION_MAJOR 1
16301 #endif
16302
16303 #if DB_VERSION_MAJOR == 1 
16304         __db_version_1
16305 #endif
16306
16307 EOF
16308 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16309   egrep "__db_version_1" >/dev/null 2>&1; then
16310   rm -rf conftest*
16311   ol_cv_header_db1=yes
16312 else
16313   rm -rf conftest*
16314   ol_cv_header_db1=no
16315 fi
16316 rm -f conftest*
16317
16318 fi
16319
16320 echo "$ac_t""$ol_cv_header_db1" 1>&6
16321
16322         if test $ol_cv_header_db1 = yes ; then
16323                 ol_cv_lib_db=no
16324 if test $ol_cv_lib_db = no ; then
16325         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16326 echo "configure:16327: checking for Berkeley DB link (default)" >&5
16327 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16328   echo $ac_n "(cached) $ac_c" 1>&6
16329 else
16330   
16331         ol_DB_LIB=
16332         ol_LIBS=$LIBS
16333         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16334
16335         cat > conftest.$ac_ext <<EOF
16336 #line 16337 "configure"
16337 #include "confdefs.h"
16338
16339 #ifdef HAVE_DB_185_H
16340 # include <db_185.h>
16341 #else
16342 # include <db.h>
16343 #endif
16344
16345 #ifndef DB_VERSION_MAJOR
16346 # define DB_VERSION_MAJOR 1
16347 #endif
16348
16349 #ifndef NULL
16350 #define NULL ((void*)0)
16351 #endif
16352
16353 int main() {
16354
16355 #if DB_VERSION_MAJOR > 1
16356         {
16357                 char *version;
16358                 int major, minor, patch;
16359
16360                 version = db_version( &major, &minor, &patch );
16361
16362                 if( major != DB_VERSION_MAJOR ||
16363                         minor < DB_VERSION_MINOR )
16364                 {
16365                         printf("Berkeley DB version mismatch\n"
16366                                 "\theader: %s\n\tlibrary: %s\n",
16367                                 DB_VERSION_STRING, version);
16368                         return 1;
16369                 }
16370         }
16371 #endif
16372
16373 #if DB_VERSION_MAJOR > 2
16374         db_env_create( NULL, 0 );
16375 #elif DB_VERSION_MAJOR > 1
16376         db_appexit( NULL );
16377 #else
16378         (void) dbopen( NULL, 0, 0, 0, NULL);
16379 #endif
16380
16381 ; return 0; }
16382 EOF
16383 if { (eval echo configure:16384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16384   rm -rf conftest*
16385   ol_cv_db_none=yes
16386 else
16387   echo "configure: failed program was:" >&5
16388   cat conftest.$ac_ext >&5
16389   rm -rf conftest*
16390   ol_cv_db_none=no
16391 fi
16392 rm -f conftest*
16393
16394         LIBS="$ol_LIBS"
16395
16396 fi
16397
16398 echo "$ac_t""$ol_cv_db_none" 1>&6
16399
16400         if test $ol_cv_db_none = yes ; then
16401                 ol_cv_lib_db=yes
16402         fi
16403 fi
16404
16405 if test $ol_cv_lib_db = no ; then
16406         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
16407 echo "configure:16408: checking for Berkeley DB link (-ldb43)" >&5
16408 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
16409   echo $ac_n "(cached) $ac_c" 1>&6
16410 else
16411   
16412         ol_DB_LIB=-ldb43
16413         ol_LIBS=$LIBS
16414         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16415
16416         cat > conftest.$ac_ext <<EOF
16417 #line 16418 "configure"
16418 #include "confdefs.h"
16419
16420 #ifdef HAVE_DB_185_H
16421 # include <db_185.h>
16422 #else
16423 # include <db.h>
16424 #endif
16425
16426 #ifndef DB_VERSION_MAJOR
16427 # define DB_VERSION_MAJOR 1
16428 #endif
16429
16430 #ifndef NULL
16431 #define NULL ((void*)0)
16432 #endif
16433
16434 int main() {
16435
16436 #if DB_VERSION_MAJOR > 1
16437         {
16438                 char *version;
16439                 int major, minor, patch;
16440
16441                 version = db_version( &major, &minor, &patch );
16442
16443                 if( major != DB_VERSION_MAJOR ||
16444                         minor < DB_VERSION_MINOR )
16445                 {
16446                         printf("Berkeley DB version mismatch\n"
16447                                 "\theader: %s\n\tlibrary: %s\n",
16448                                 DB_VERSION_STRING, version);
16449                         return 1;
16450                 }
16451         }
16452 #endif
16453
16454 #if DB_VERSION_MAJOR > 2
16455         db_env_create( NULL, 0 );
16456 #elif DB_VERSION_MAJOR > 1
16457         db_appexit( NULL );
16458 #else
16459         (void) dbopen( NULL, 0, 0, 0, NULL);
16460 #endif
16461
16462 ; return 0; }
16463 EOF
16464 if { (eval echo configure:16465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16465   rm -rf conftest*
16466   ol_cv_db_db43=yes
16467 else
16468   echo "configure: failed program was:" >&5
16469   cat conftest.$ac_ext >&5
16470   rm -rf conftest*
16471   ol_cv_db_db43=no
16472 fi
16473 rm -f conftest*
16474
16475         LIBS="$ol_LIBS"
16476
16477 fi
16478
16479 echo "$ac_t""$ol_cv_db_db43" 1>&6
16480
16481         if test $ol_cv_db_db43 = yes ; then
16482                 ol_cv_lib_db=-ldb43
16483         fi
16484 fi
16485
16486 if test $ol_cv_lib_db = no ; then
16487         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
16488 echo "configure:16489: checking for Berkeley DB link (-ldb-43)" >&5
16489 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
16490   echo $ac_n "(cached) $ac_c" 1>&6
16491 else
16492   
16493         ol_DB_LIB=-ldb-43
16494         ol_LIBS=$LIBS
16495         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16496
16497         cat > conftest.$ac_ext <<EOF
16498 #line 16499 "configure"
16499 #include "confdefs.h"
16500
16501 #ifdef HAVE_DB_185_H
16502 # include <db_185.h>
16503 #else
16504 # include <db.h>
16505 #endif
16506
16507 #ifndef DB_VERSION_MAJOR
16508 # define DB_VERSION_MAJOR 1
16509 #endif
16510
16511 #ifndef NULL
16512 #define NULL ((void*)0)
16513 #endif
16514
16515 int main() {
16516
16517 #if DB_VERSION_MAJOR > 1
16518         {
16519                 char *version;
16520                 int major, minor, patch;
16521
16522                 version = db_version( &major, &minor, &patch );
16523
16524                 if( major != DB_VERSION_MAJOR ||
16525                         minor < DB_VERSION_MINOR )
16526                 {
16527                         printf("Berkeley DB version mismatch\n"
16528                                 "\theader: %s\n\tlibrary: %s\n",
16529                                 DB_VERSION_STRING, version);
16530                         return 1;
16531                 }
16532         }
16533 #endif
16534
16535 #if DB_VERSION_MAJOR > 2
16536         db_env_create( NULL, 0 );
16537 #elif DB_VERSION_MAJOR > 1
16538         db_appexit( NULL );
16539 #else
16540         (void) dbopen( NULL, 0, 0, 0, NULL);
16541 #endif
16542
16543 ; return 0; }
16544 EOF
16545 if { (eval echo configure:16546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16546   rm -rf conftest*
16547   ol_cv_db_db_43=yes
16548 else
16549   echo "configure: failed program was:" >&5
16550   cat conftest.$ac_ext >&5
16551   rm -rf conftest*
16552   ol_cv_db_db_43=no
16553 fi
16554 rm -f conftest*
16555
16556         LIBS="$ol_LIBS"
16557
16558 fi
16559
16560 echo "$ac_t""$ol_cv_db_db_43" 1>&6
16561
16562         if test $ol_cv_db_db_43 = yes ; then
16563                 ol_cv_lib_db=-ldb-43
16564         fi
16565 fi
16566
16567 if test $ol_cv_lib_db = no ; then
16568         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
16569 echo "configure:16570: checking for Berkeley DB link (-ldb-4.3)" >&5
16570 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
16571   echo $ac_n "(cached) $ac_c" 1>&6
16572 else
16573   
16574         ol_DB_LIB=-ldb-4.3
16575         ol_LIBS=$LIBS
16576         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16577
16578         cat > conftest.$ac_ext <<EOF
16579 #line 16580 "configure"
16580 #include "confdefs.h"
16581
16582 #ifdef HAVE_DB_185_H
16583 # include <db_185.h>
16584 #else
16585 # include <db.h>
16586 #endif
16587
16588 #ifndef DB_VERSION_MAJOR
16589 # define DB_VERSION_MAJOR 1
16590 #endif
16591
16592 #ifndef NULL
16593 #define NULL ((void*)0)
16594 #endif
16595
16596 int main() {
16597
16598 #if DB_VERSION_MAJOR > 1
16599         {
16600                 char *version;
16601                 int major, minor, patch;
16602
16603                 version = db_version( &major, &minor, &patch );
16604
16605                 if( major != DB_VERSION_MAJOR ||
16606                         minor < DB_VERSION_MINOR )
16607                 {
16608                         printf("Berkeley DB version mismatch\n"
16609                                 "\theader: %s\n\tlibrary: %s\n",
16610                                 DB_VERSION_STRING, version);
16611                         return 1;
16612                 }
16613         }
16614 #endif
16615
16616 #if DB_VERSION_MAJOR > 2
16617         db_env_create( NULL, 0 );
16618 #elif DB_VERSION_MAJOR > 1
16619         db_appexit( NULL );
16620 #else
16621         (void) dbopen( NULL, 0, 0, 0, NULL);
16622 #endif
16623
16624 ; return 0; }
16625 EOF
16626 if { (eval echo configure:16627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16627   rm -rf conftest*
16628   ol_cv_db_db_4_dot_3=yes
16629 else
16630   echo "configure: failed program was:" >&5
16631   cat conftest.$ac_ext >&5
16632   rm -rf conftest*
16633   ol_cv_db_db_4_dot_3=no
16634 fi
16635 rm -f conftest*
16636
16637         LIBS="$ol_LIBS"
16638
16639 fi
16640
16641 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
16642
16643         if test $ol_cv_db_db_4_dot_3 = yes ; then
16644                 ol_cv_lib_db=-ldb-4.3
16645         fi
16646 fi
16647
16648 if test $ol_cv_lib_db = no ; then
16649         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
16650 echo "configure:16651: checking for Berkeley DB link (-ldb-4-3)" >&5
16651 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
16652   echo $ac_n "(cached) $ac_c" 1>&6
16653 else
16654   
16655         ol_DB_LIB=-ldb-4-3
16656         ol_LIBS=$LIBS
16657         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16658
16659         cat > conftest.$ac_ext <<EOF
16660 #line 16661 "configure"
16661 #include "confdefs.h"
16662
16663 #ifdef HAVE_DB_185_H
16664 # include <db_185.h>
16665 #else
16666 # include <db.h>
16667 #endif
16668
16669 #ifndef DB_VERSION_MAJOR
16670 # define DB_VERSION_MAJOR 1
16671 #endif
16672
16673 #ifndef NULL
16674 #define NULL ((void*)0)
16675 #endif
16676
16677 int main() {
16678
16679 #if DB_VERSION_MAJOR > 1
16680         {
16681                 char *version;
16682                 int major, minor, patch;
16683
16684                 version = db_version( &major, &minor, &patch );
16685
16686                 if( major != DB_VERSION_MAJOR ||
16687                         minor < DB_VERSION_MINOR )
16688                 {
16689                         printf("Berkeley DB version mismatch\n"
16690                                 "\theader: %s\n\tlibrary: %s\n",
16691                                 DB_VERSION_STRING, version);
16692                         return 1;
16693                 }
16694         }
16695 #endif
16696
16697 #if DB_VERSION_MAJOR > 2
16698         db_env_create( NULL, 0 );
16699 #elif DB_VERSION_MAJOR > 1
16700         db_appexit( NULL );
16701 #else
16702         (void) dbopen( NULL, 0, 0, 0, NULL);
16703 #endif
16704
16705 ; return 0; }
16706 EOF
16707 if { (eval echo configure:16708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16708   rm -rf conftest*
16709   ol_cv_db_db_4_3=yes
16710 else
16711   echo "configure: failed program was:" >&5
16712   cat conftest.$ac_ext >&5
16713   rm -rf conftest*
16714   ol_cv_db_db_4_3=no
16715 fi
16716 rm -f conftest*
16717
16718         LIBS="$ol_LIBS"
16719
16720 fi
16721
16722 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
16723
16724         if test $ol_cv_db_db_4_3 = yes ; then
16725                 ol_cv_lib_db=-ldb-4-3
16726         fi
16727 fi
16728
16729 if test $ol_cv_lib_db = no ; then
16730         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16731 echo "configure:16732: checking for Berkeley DB link (-ldb42)" >&5
16732 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16733   echo $ac_n "(cached) $ac_c" 1>&6
16734 else
16735   
16736         ol_DB_LIB=-ldb42
16737         ol_LIBS=$LIBS
16738         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16739
16740         cat > conftest.$ac_ext <<EOF
16741 #line 16742 "configure"
16742 #include "confdefs.h"
16743
16744 #ifdef HAVE_DB_185_H
16745 # include <db_185.h>
16746 #else
16747 # include <db.h>
16748 #endif
16749
16750 #ifndef DB_VERSION_MAJOR
16751 # define DB_VERSION_MAJOR 1
16752 #endif
16753
16754 #ifndef NULL
16755 #define NULL ((void*)0)
16756 #endif
16757
16758 int main() {
16759
16760 #if DB_VERSION_MAJOR > 1
16761         {
16762                 char *version;
16763                 int major, minor, patch;
16764
16765                 version = db_version( &major, &minor, &patch );
16766
16767                 if( major != DB_VERSION_MAJOR ||
16768                         minor < DB_VERSION_MINOR )
16769                 {
16770                         printf("Berkeley DB version mismatch\n"
16771                                 "\theader: %s\n\tlibrary: %s\n",
16772                                 DB_VERSION_STRING, version);
16773                         return 1;
16774                 }
16775         }
16776 #endif
16777
16778 #if DB_VERSION_MAJOR > 2
16779         db_env_create( NULL, 0 );
16780 #elif DB_VERSION_MAJOR > 1
16781         db_appexit( NULL );
16782 #else
16783         (void) dbopen( NULL, 0, 0, 0, NULL);
16784 #endif
16785
16786 ; return 0; }
16787 EOF
16788 if { (eval echo configure:16789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16789   rm -rf conftest*
16790   ol_cv_db_db42=yes
16791 else
16792   echo "configure: failed program was:" >&5
16793   cat conftest.$ac_ext >&5
16794   rm -rf conftest*
16795   ol_cv_db_db42=no
16796 fi
16797 rm -f conftest*
16798
16799         LIBS="$ol_LIBS"
16800
16801 fi
16802
16803 echo "$ac_t""$ol_cv_db_db42" 1>&6
16804
16805         if test $ol_cv_db_db42 = yes ; then
16806                 ol_cv_lib_db=-ldb42
16807         fi
16808 fi
16809
16810 if test $ol_cv_lib_db = no ; then
16811         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16812 echo "configure:16813: checking for Berkeley DB link (-ldb-42)" >&5
16813 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16814   echo $ac_n "(cached) $ac_c" 1>&6
16815 else
16816   
16817         ol_DB_LIB=-ldb-42
16818         ol_LIBS=$LIBS
16819         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16820
16821         cat > conftest.$ac_ext <<EOF
16822 #line 16823 "configure"
16823 #include "confdefs.h"
16824
16825 #ifdef HAVE_DB_185_H
16826 # include <db_185.h>
16827 #else
16828 # include <db.h>
16829 #endif
16830
16831 #ifndef DB_VERSION_MAJOR
16832 # define DB_VERSION_MAJOR 1
16833 #endif
16834
16835 #ifndef NULL
16836 #define NULL ((void*)0)
16837 #endif
16838
16839 int main() {
16840
16841 #if DB_VERSION_MAJOR > 1
16842         {
16843                 char *version;
16844                 int major, minor, patch;
16845
16846                 version = db_version( &major, &minor, &patch );
16847
16848                 if( major != DB_VERSION_MAJOR ||
16849                         minor < DB_VERSION_MINOR )
16850                 {
16851                         printf("Berkeley DB version mismatch\n"
16852                                 "\theader: %s\n\tlibrary: %s\n",
16853                                 DB_VERSION_STRING, version);
16854                         return 1;
16855                 }
16856         }
16857 #endif
16858
16859 #if DB_VERSION_MAJOR > 2
16860         db_env_create( NULL, 0 );
16861 #elif DB_VERSION_MAJOR > 1
16862         db_appexit( NULL );
16863 #else
16864         (void) dbopen( NULL, 0, 0, 0, NULL);
16865 #endif
16866
16867 ; return 0; }
16868 EOF
16869 if { (eval echo configure:16870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16870   rm -rf conftest*
16871   ol_cv_db_db_42=yes
16872 else
16873   echo "configure: failed program was:" >&5
16874   cat conftest.$ac_ext >&5
16875   rm -rf conftest*
16876   ol_cv_db_db_42=no
16877 fi
16878 rm -f conftest*
16879
16880         LIBS="$ol_LIBS"
16881
16882 fi
16883
16884 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16885
16886         if test $ol_cv_db_db_42 = yes ; then
16887                 ol_cv_lib_db=-ldb-42
16888         fi
16889 fi
16890
16891 if test $ol_cv_lib_db = no ; then
16892         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16893 echo "configure:16894: checking for Berkeley DB link (-ldb-4.2)" >&5
16894 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16895   echo $ac_n "(cached) $ac_c" 1>&6
16896 else
16897   
16898         ol_DB_LIB=-ldb-4.2
16899         ol_LIBS=$LIBS
16900         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16901
16902         cat > conftest.$ac_ext <<EOF
16903 #line 16904 "configure"
16904 #include "confdefs.h"
16905
16906 #ifdef HAVE_DB_185_H
16907 # include <db_185.h>
16908 #else
16909 # include <db.h>
16910 #endif
16911
16912 #ifndef DB_VERSION_MAJOR
16913 # define DB_VERSION_MAJOR 1
16914 #endif
16915
16916 #ifndef NULL
16917 #define NULL ((void*)0)
16918 #endif
16919
16920 int main() {
16921
16922 #if DB_VERSION_MAJOR > 1
16923         {
16924                 char *version;
16925                 int major, minor, patch;
16926
16927                 version = db_version( &major, &minor, &patch );
16928
16929                 if( major != DB_VERSION_MAJOR ||
16930                         minor < DB_VERSION_MINOR )
16931                 {
16932                         printf("Berkeley DB version mismatch\n"
16933                                 "\theader: %s\n\tlibrary: %s\n",
16934                                 DB_VERSION_STRING, version);
16935                         return 1;
16936                 }
16937         }
16938 #endif
16939
16940 #if DB_VERSION_MAJOR > 2
16941         db_env_create( NULL, 0 );
16942 #elif DB_VERSION_MAJOR > 1
16943         db_appexit( NULL );
16944 #else
16945         (void) dbopen( NULL, 0, 0, 0, NULL);
16946 #endif
16947
16948 ; return 0; }
16949 EOF
16950 if { (eval echo configure:16951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16951   rm -rf conftest*
16952   ol_cv_db_db_4_dot_2=yes
16953 else
16954   echo "configure: failed program was:" >&5
16955   cat conftest.$ac_ext >&5
16956   rm -rf conftest*
16957   ol_cv_db_db_4_dot_2=no
16958 fi
16959 rm -f conftest*
16960
16961         LIBS="$ol_LIBS"
16962
16963 fi
16964
16965 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16966
16967         if test $ol_cv_db_db_4_dot_2 = yes ; then
16968                 ol_cv_lib_db=-ldb-4.2
16969         fi
16970 fi
16971
16972 if test $ol_cv_lib_db = no ; then
16973         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16974 echo "configure:16975: checking for Berkeley DB link (-ldb-4-2)" >&5
16975 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16976   echo $ac_n "(cached) $ac_c" 1>&6
16977 else
16978   
16979         ol_DB_LIB=-ldb-4-2
16980         ol_LIBS=$LIBS
16981         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16982
16983         cat > conftest.$ac_ext <<EOF
16984 #line 16985 "configure"
16985 #include "confdefs.h"
16986
16987 #ifdef HAVE_DB_185_H
16988 # include <db_185.h>
16989 #else
16990 # include <db.h>
16991 #endif
16992
16993 #ifndef DB_VERSION_MAJOR
16994 # define DB_VERSION_MAJOR 1
16995 #endif
16996
16997 #ifndef NULL
16998 #define NULL ((void*)0)
16999 #endif
17000
17001 int main() {
17002
17003 #if DB_VERSION_MAJOR > 1
17004         {
17005                 char *version;
17006                 int major, minor, patch;
17007
17008                 version = db_version( &major, &minor, &patch );
17009
17010                 if( major != DB_VERSION_MAJOR ||
17011                         minor < DB_VERSION_MINOR )
17012                 {
17013                         printf("Berkeley DB version mismatch\n"
17014                                 "\theader: %s\n\tlibrary: %s\n",
17015                                 DB_VERSION_STRING, version);
17016                         return 1;
17017                 }
17018         }
17019 #endif
17020
17021 #if DB_VERSION_MAJOR > 2
17022         db_env_create( NULL, 0 );
17023 #elif DB_VERSION_MAJOR > 1
17024         db_appexit( NULL );
17025 #else
17026         (void) dbopen( NULL, 0, 0, 0, NULL);
17027 #endif
17028
17029 ; return 0; }
17030 EOF
17031 if { (eval echo configure:17032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17032   rm -rf conftest*
17033   ol_cv_db_db_4_2=yes
17034 else
17035   echo "configure: failed program was:" >&5
17036   cat conftest.$ac_ext >&5
17037   rm -rf conftest*
17038   ol_cv_db_db_4_2=no
17039 fi
17040 rm -f conftest*
17041
17042         LIBS="$ol_LIBS"
17043
17044 fi
17045
17046 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17047
17048         if test $ol_cv_db_db_4_2 = yes ; then
17049                 ol_cv_lib_db=-ldb-4-2
17050         fi
17051 fi
17052
17053 if test $ol_cv_lib_db = no ; then
17054         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17055 echo "configure:17056: checking for Berkeley DB link (-ldb-4)" >&5
17056 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17057   echo $ac_n "(cached) $ac_c" 1>&6
17058 else
17059   
17060         ol_DB_LIB=-ldb-4
17061         ol_LIBS=$LIBS
17062         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17063
17064         cat > conftest.$ac_ext <<EOF
17065 #line 17066 "configure"
17066 #include "confdefs.h"
17067
17068 #ifdef HAVE_DB_185_H
17069 # include <db_185.h>
17070 #else
17071 # include <db.h>
17072 #endif
17073
17074 #ifndef DB_VERSION_MAJOR
17075 # define DB_VERSION_MAJOR 1
17076 #endif
17077
17078 #ifndef NULL
17079 #define NULL ((void*)0)
17080 #endif
17081
17082 int main() {
17083
17084 #if DB_VERSION_MAJOR > 1
17085         {
17086                 char *version;
17087                 int major, minor, patch;
17088
17089                 version = db_version( &major, &minor, &patch );
17090
17091                 if( major != DB_VERSION_MAJOR ||
17092                         minor < DB_VERSION_MINOR )
17093                 {
17094                         printf("Berkeley DB version mismatch\n"
17095                                 "\theader: %s\n\tlibrary: %s\n",
17096                                 DB_VERSION_STRING, version);
17097                         return 1;
17098                 }
17099         }
17100 #endif
17101
17102 #if DB_VERSION_MAJOR > 2
17103         db_env_create( NULL, 0 );
17104 #elif DB_VERSION_MAJOR > 1
17105         db_appexit( NULL );
17106 #else
17107         (void) dbopen( NULL, 0, 0, 0, NULL);
17108 #endif
17109
17110 ; return 0; }
17111 EOF
17112 if { (eval echo configure:17113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17113   rm -rf conftest*
17114   ol_cv_db_db_4=yes
17115 else
17116   echo "configure: failed program was:" >&5
17117   cat conftest.$ac_ext >&5
17118   rm -rf conftest*
17119   ol_cv_db_db_4=no
17120 fi
17121 rm -f conftest*
17122
17123         LIBS="$ol_LIBS"
17124
17125 fi
17126
17127 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17128
17129         if test $ol_cv_db_db_4 = yes ; then
17130                 ol_cv_lib_db=-ldb-4
17131         fi
17132 fi
17133
17134 if test $ol_cv_lib_db = no ; then
17135         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17136 echo "configure:17137: checking for Berkeley DB link (-ldb4)" >&5
17137 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17138   echo $ac_n "(cached) $ac_c" 1>&6
17139 else
17140   
17141         ol_DB_LIB=-ldb4
17142         ol_LIBS=$LIBS
17143         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17144
17145         cat > conftest.$ac_ext <<EOF
17146 #line 17147 "configure"
17147 #include "confdefs.h"
17148
17149 #ifdef HAVE_DB_185_H
17150 # include <db_185.h>
17151 #else
17152 # include <db.h>
17153 #endif
17154
17155 #ifndef DB_VERSION_MAJOR
17156 # define DB_VERSION_MAJOR 1
17157 #endif
17158
17159 #ifndef NULL
17160 #define NULL ((void*)0)
17161 #endif
17162
17163 int main() {
17164
17165 #if DB_VERSION_MAJOR > 1
17166         {
17167                 char *version;
17168                 int major, minor, patch;
17169
17170                 version = db_version( &major, &minor, &patch );
17171
17172                 if( major != DB_VERSION_MAJOR ||
17173                         minor < DB_VERSION_MINOR )
17174                 {
17175                         printf("Berkeley DB version mismatch\n"
17176                                 "\theader: %s\n\tlibrary: %s\n",
17177                                 DB_VERSION_STRING, version);
17178                         return 1;
17179                 }
17180         }
17181 #endif
17182
17183 #if DB_VERSION_MAJOR > 2
17184         db_env_create( NULL, 0 );
17185 #elif DB_VERSION_MAJOR > 1
17186         db_appexit( NULL );
17187 #else
17188         (void) dbopen( NULL, 0, 0, 0, NULL);
17189 #endif
17190
17191 ; return 0; }
17192 EOF
17193 if { (eval echo configure:17194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17194   rm -rf conftest*
17195   ol_cv_db_db4=yes
17196 else
17197   echo "configure: failed program was:" >&5
17198   cat conftest.$ac_ext >&5
17199   rm -rf conftest*
17200   ol_cv_db_db4=no
17201 fi
17202 rm -f conftest*
17203
17204         LIBS="$ol_LIBS"
17205
17206 fi
17207
17208 echo "$ac_t""$ol_cv_db_db4" 1>&6
17209
17210         if test $ol_cv_db_db4 = yes ; then
17211                 ol_cv_lib_db=-ldb4
17212         fi
17213 fi
17214
17215 if test $ol_cv_lib_db = no ; then
17216         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17217 echo "configure:17218: checking for Berkeley DB link (-ldb)" >&5
17218 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17219   echo $ac_n "(cached) $ac_c" 1>&6
17220 else
17221   
17222         ol_DB_LIB=-ldb
17223         ol_LIBS=$LIBS
17224         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17225
17226         cat > conftest.$ac_ext <<EOF
17227 #line 17228 "configure"
17228 #include "confdefs.h"
17229
17230 #ifdef HAVE_DB_185_H
17231 # include <db_185.h>
17232 #else
17233 # include <db.h>
17234 #endif
17235
17236 #ifndef DB_VERSION_MAJOR
17237 # define DB_VERSION_MAJOR 1
17238 #endif
17239
17240 #ifndef NULL
17241 #define NULL ((void*)0)
17242 #endif
17243
17244 int main() {
17245
17246 #if DB_VERSION_MAJOR > 1
17247         {
17248                 char *version;
17249                 int major, minor, patch;
17250
17251                 version = db_version( &major, &minor, &patch );
17252
17253                 if( major != DB_VERSION_MAJOR ||
17254                         minor < DB_VERSION_MINOR )
17255                 {
17256                         printf("Berkeley DB version mismatch\n"
17257                                 "\theader: %s\n\tlibrary: %s\n",
17258                                 DB_VERSION_STRING, version);
17259                         return 1;
17260                 }
17261         }
17262 #endif
17263
17264 #if DB_VERSION_MAJOR > 2
17265         db_env_create( NULL, 0 );
17266 #elif DB_VERSION_MAJOR > 1
17267         db_appexit( NULL );
17268 #else
17269         (void) dbopen( NULL, 0, 0, 0, NULL);
17270 #endif
17271
17272 ; return 0; }
17273 EOF
17274 if { (eval echo configure:17275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17275   rm -rf conftest*
17276   ol_cv_db_db=yes
17277 else
17278   echo "configure: failed program was:" >&5
17279   cat conftest.$ac_ext >&5
17280   rm -rf conftest*
17281   ol_cv_db_db=no
17282 fi
17283 rm -f conftest*
17284
17285         LIBS="$ol_LIBS"
17286
17287 fi
17288
17289 echo "$ac_t""$ol_cv_db_db" 1>&6
17290
17291         if test $ol_cv_db_db = yes ; then
17292                 ol_cv_lib_db=-ldb
17293         fi
17294 fi
17295
17296 if test $ol_cv_lib_db = no ; then
17297         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17298 echo "configure:17299: checking for Berkeley DB link (-ldb41)" >&5
17299 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17300   echo $ac_n "(cached) $ac_c" 1>&6
17301 else
17302   
17303         ol_DB_LIB=-ldb41
17304         ol_LIBS=$LIBS
17305         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17306
17307         cat > conftest.$ac_ext <<EOF
17308 #line 17309 "configure"
17309 #include "confdefs.h"
17310
17311 #ifdef HAVE_DB_185_H
17312 # include <db_185.h>
17313 #else
17314 # include <db.h>
17315 #endif
17316
17317 #ifndef DB_VERSION_MAJOR
17318 # define DB_VERSION_MAJOR 1
17319 #endif
17320
17321 #ifndef NULL
17322 #define NULL ((void*)0)
17323 #endif
17324
17325 int main() {
17326
17327 #if DB_VERSION_MAJOR > 1
17328         {
17329                 char *version;
17330                 int major, minor, patch;
17331
17332                 version = db_version( &major, &minor, &patch );
17333
17334                 if( major != DB_VERSION_MAJOR ||
17335                         minor < DB_VERSION_MINOR )
17336                 {
17337                         printf("Berkeley DB version mismatch\n"
17338                                 "\theader: %s\n\tlibrary: %s\n",
17339                                 DB_VERSION_STRING, version);
17340                         return 1;
17341                 }
17342         }
17343 #endif
17344
17345 #if DB_VERSION_MAJOR > 2
17346         db_env_create( NULL, 0 );
17347 #elif DB_VERSION_MAJOR > 1
17348         db_appexit( NULL );
17349 #else
17350         (void) dbopen( NULL, 0, 0, 0, NULL);
17351 #endif
17352
17353 ; return 0; }
17354 EOF
17355 if { (eval echo configure:17356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17356   rm -rf conftest*
17357   ol_cv_db_db41=yes
17358 else
17359   echo "configure: failed program was:" >&5
17360   cat conftest.$ac_ext >&5
17361   rm -rf conftest*
17362   ol_cv_db_db41=no
17363 fi
17364 rm -f conftest*
17365
17366         LIBS="$ol_LIBS"
17367
17368 fi
17369
17370 echo "$ac_t""$ol_cv_db_db41" 1>&6
17371
17372         if test $ol_cv_db_db41 = yes ; then
17373                 ol_cv_lib_db=-ldb41
17374         fi
17375 fi
17376
17377 if test $ol_cv_lib_db = no ; then
17378         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17379 echo "configure:17380: checking for Berkeley DB link (-ldb-41)" >&5
17380 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17381   echo $ac_n "(cached) $ac_c" 1>&6
17382 else
17383   
17384         ol_DB_LIB=-ldb-41
17385         ol_LIBS=$LIBS
17386         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17387
17388         cat > conftest.$ac_ext <<EOF
17389 #line 17390 "configure"
17390 #include "confdefs.h"
17391
17392 #ifdef HAVE_DB_185_H
17393 # include <db_185.h>
17394 #else
17395 # include <db.h>
17396 #endif
17397
17398 #ifndef DB_VERSION_MAJOR
17399 # define DB_VERSION_MAJOR 1
17400 #endif
17401
17402 #ifndef NULL
17403 #define NULL ((void*)0)
17404 #endif
17405
17406 int main() {
17407
17408 #if DB_VERSION_MAJOR > 1
17409         {
17410                 char *version;
17411                 int major, minor, patch;
17412
17413                 version = db_version( &major, &minor, &patch );
17414
17415                 if( major != DB_VERSION_MAJOR ||
17416                         minor < DB_VERSION_MINOR )
17417                 {
17418                         printf("Berkeley DB version mismatch\n"
17419                                 "\theader: %s\n\tlibrary: %s\n",
17420                                 DB_VERSION_STRING, version);
17421                         return 1;
17422                 }
17423         }
17424 #endif
17425
17426 #if DB_VERSION_MAJOR > 2
17427         db_env_create( NULL, 0 );
17428 #elif DB_VERSION_MAJOR > 1
17429         db_appexit( NULL );
17430 #else
17431         (void) dbopen( NULL, 0, 0, 0, NULL);
17432 #endif
17433
17434 ; return 0; }
17435 EOF
17436 if { (eval echo configure:17437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17437   rm -rf conftest*
17438   ol_cv_db_db_41=yes
17439 else
17440   echo "configure: failed program was:" >&5
17441   cat conftest.$ac_ext >&5
17442   rm -rf conftest*
17443   ol_cv_db_db_41=no
17444 fi
17445 rm -f conftest*
17446
17447         LIBS="$ol_LIBS"
17448
17449 fi
17450
17451 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17452
17453         if test $ol_cv_db_db_41 = yes ; then
17454                 ol_cv_lib_db=-ldb-41
17455         fi
17456 fi
17457
17458 if test $ol_cv_lib_db = no ; then
17459         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17460 echo "configure:17461: checking for Berkeley DB link (-ldb-4.1)" >&5
17461 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17462   echo $ac_n "(cached) $ac_c" 1>&6
17463 else
17464   
17465         ol_DB_LIB=-ldb-4.1
17466         ol_LIBS=$LIBS
17467         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17468
17469         cat > conftest.$ac_ext <<EOF
17470 #line 17471 "configure"
17471 #include "confdefs.h"
17472
17473 #ifdef HAVE_DB_185_H
17474 # include <db_185.h>
17475 #else
17476 # include <db.h>
17477 #endif
17478
17479 #ifndef DB_VERSION_MAJOR
17480 # define DB_VERSION_MAJOR 1
17481 #endif
17482
17483 #ifndef NULL
17484 #define NULL ((void*)0)
17485 #endif
17486
17487 int main() {
17488
17489 #if DB_VERSION_MAJOR > 1
17490         {
17491                 char *version;
17492                 int major, minor, patch;
17493
17494                 version = db_version( &major, &minor, &patch );
17495
17496                 if( major != DB_VERSION_MAJOR ||
17497                         minor < DB_VERSION_MINOR )
17498                 {
17499                         printf("Berkeley DB version mismatch\n"
17500                                 "\theader: %s\n\tlibrary: %s\n",
17501                                 DB_VERSION_STRING, version);
17502                         return 1;
17503                 }
17504         }
17505 #endif
17506
17507 #if DB_VERSION_MAJOR > 2
17508         db_env_create( NULL, 0 );
17509 #elif DB_VERSION_MAJOR > 1
17510         db_appexit( NULL );
17511 #else
17512         (void) dbopen( NULL, 0, 0, 0, NULL);
17513 #endif
17514
17515 ; return 0; }
17516 EOF
17517 if { (eval echo configure:17518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17518   rm -rf conftest*
17519   ol_cv_db_db_4_dot_1=yes
17520 else
17521   echo "configure: failed program was:" >&5
17522   cat conftest.$ac_ext >&5
17523   rm -rf conftest*
17524   ol_cv_db_db_4_dot_1=no
17525 fi
17526 rm -f conftest*
17527
17528         LIBS="$ol_LIBS"
17529
17530 fi
17531
17532 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17533
17534         if test $ol_cv_db_db_4_dot_1 = yes ; then
17535                 ol_cv_lib_db=-ldb-4.1
17536         fi
17537 fi
17538
17539 if test $ol_cv_lib_db = no ; then
17540         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17541 echo "configure:17542: checking for Berkeley DB link (-ldb-4-1)" >&5
17542 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17543   echo $ac_n "(cached) $ac_c" 1>&6
17544 else
17545   
17546         ol_DB_LIB=-ldb-4-1
17547         ol_LIBS=$LIBS
17548         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17549
17550         cat > conftest.$ac_ext <<EOF
17551 #line 17552 "configure"
17552 #include "confdefs.h"
17553
17554 #ifdef HAVE_DB_185_H
17555 # include <db_185.h>
17556 #else
17557 # include <db.h>
17558 #endif
17559
17560 #ifndef DB_VERSION_MAJOR
17561 # define DB_VERSION_MAJOR 1
17562 #endif
17563
17564 #ifndef NULL
17565 #define NULL ((void*)0)
17566 #endif
17567
17568 int main() {
17569
17570 #if DB_VERSION_MAJOR > 1
17571         {
17572                 char *version;
17573                 int major, minor, patch;
17574
17575                 version = db_version( &major, &minor, &patch );
17576
17577                 if( major != DB_VERSION_MAJOR ||
17578                         minor < DB_VERSION_MINOR )
17579                 {
17580                         printf("Berkeley DB version mismatch\n"
17581                                 "\theader: %s\n\tlibrary: %s\n",
17582                                 DB_VERSION_STRING, version);
17583                         return 1;
17584                 }
17585         }
17586 #endif
17587
17588 #if DB_VERSION_MAJOR > 2
17589         db_env_create( NULL, 0 );
17590 #elif DB_VERSION_MAJOR > 1
17591         db_appexit( NULL );
17592 #else
17593         (void) dbopen( NULL, 0, 0, 0, NULL);
17594 #endif
17595
17596 ; return 0; }
17597 EOF
17598 if { (eval echo configure:17599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17599   rm -rf conftest*
17600   ol_cv_db_db_4_1=yes
17601 else
17602   echo "configure: failed program was:" >&5
17603   cat conftest.$ac_ext >&5
17604   rm -rf conftest*
17605   ol_cv_db_db_4_1=no
17606 fi
17607 rm -f conftest*
17608
17609         LIBS="$ol_LIBS"
17610
17611 fi
17612
17613 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17614
17615         if test $ol_cv_db_db_4_1 = yes ; then
17616                 ol_cv_lib_db=-ldb-4-1
17617         fi
17618 fi
17619
17620 if test $ol_cv_lib_db = no ; then
17621         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17622 echo "configure:17623: checking for Berkeley DB link (-ldb3)" >&5
17623 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17624   echo $ac_n "(cached) $ac_c" 1>&6
17625 else
17626   
17627         ol_DB_LIB=-ldb3
17628         ol_LIBS=$LIBS
17629         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17630
17631         cat > conftest.$ac_ext <<EOF
17632 #line 17633 "configure"
17633 #include "confdefs.h"
17634
17635 #ifdef HAVE_DB_185_H
17636 # include <db_185.h>
17637 #else
17638 # include <db.h>
17639 #endif
17640
17641 #ifndef DB_VERSION_MAJOR
17642 # define DB_VERSION_MAJOR 1
17643 #endif
17644
17645 #ifndef NULL
17646 #define NULL ((void*)0)
17647 #endif
17648
17649 int main() {
17650
17651 #if DB_VERSION_MAJOR > 1
17652         {
17653                 char *version;
17654                 int major, minor, patch;
17655
17656                 version = db_version( &major, &minor, &patch );
17657
17658                 if( major != DB_VERSION_MAJOR ||
17659                         minor < DB_VERSION_MINOR )
17660                 {
17661                         printf("Berkeley DB version mismatch\n"
17662                                 "\theader: %s\n\tlibrary: %s\n",
17663                                 DB_VERSION_STRING, version);
17664                         return 1;
17665                 }
17666         }
17667 #endif
17668
17669 #if DB_VERSION_MAJOR > 2
17670         db_env_create( NULL, 0 );
17671 #elif DB_VERSION_MAJOR > 1
17672         db_appexit( NULL );
17673 #else
17674         (void) dbopen( NULL, 0, 0, 0, NULL);
17675 #endif
17676
17677 ; return 0; }
17678 EOF
17679 if { (eval echo configure:17680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17680   rm -rf conftest*
17681   ol_cv_db_db3=yes
17682 else
17683   echo "configure: failed program was:" >&5
17684   cat conftest.$ac_ext >&5
17685   rm -rf conftest*
17686   ol_cv_db_db3=no
17687 fi
17688 rm -f conftest*
17689
17690         LIBS="$ol_LIBS"
17691
17692 fi
17693
17694 echo "$ac_t""$ol_cv_db_db3" 1>&6
17695
17696         if test $ol_cv_db_db3 = yes ; then
17697                 ol_cv_lib_db=-ldb3
17698         fi
17699 fi
17700
17701 if test $ol_cv_lib_db = no ; then
17702         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17703 echo "configure:17704: checking for Berkeley DB link (-ldb-3)" >&5
17704 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17705   echo $ac_n "(cached) $ac_c" 1>&6
17706 else
17707   
17708         ol_DB_LIB=-ldb-3
17709         ol_LIBS=$LIBS
17710         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17711
17712         cat > conftest.$ac_ext <<EOF
17713 #line 17714 "configure"
17714 #include "confdefs.h"
17715
17716 #ifdef HAVE_DB_185_H
17717 # include <db_185.h>
17718 #else
17719 # include <db.h>
17720 #endif
17721
17722 #ifndef DB_VERSION_MAJOR
17723 # define DB_VERSION_MAJOR 1
17724 #endif
17725
17726 #ifndef NULL
17727 #define NULL ((void*)0)
17728 #endif
17729
17730 int main() {
17731
17732 #if DB_VERSION_MAJOR > 1
17733         {
17734                 char *version;
17735                 int major, minor, patch;
17736
17737                 version = db_version( &major, &minor, &patch );
17738
17739                 if( major != DB_VERSION_MAJOR ||
17740                         minor < DB_VERSION_MINOR )
17741                 {
17742                         printf("Berkeley DB version mismatch\n"
17743                                 "\theader: %s\n\tlibrary: %s\n",
17744                                 DB_VERSION_STRING, version);
17745                         return 1;
17746                 }
17747         }
17748 #endif
17749
17750 #if DB_VERSION_MAJOR > 2
17751         db_env_create( NULL, 0 );
17752 #elif DB_VERSION_MAJOR > 1
17753         db_appexit( NULL );
17754 #else
17755         (void) dbopen( NULL, 0, 0, 0, NULL);
17756 #endif
17757
17758 ; return 0; }
17759 EOF
17760 if { (eval echo configure:17761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17761   rm -rf conftest*
17762   ol_cv_db_db_3=yes
17763 else
17764   echo "configure: failed program was:" >&5
17765   cat conftest.$ac_ext >&5
17766   rm -rf conftest*
17767   ol_cv_db_db_3=no
17768 fi
17769 rm -f conftest*
17770
17771         LIBS="$ol_LIBS"
17772
17773 fi
17774
17775 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17776
17777         if test $ol_cv_db_db_3 = yes ; then
17778                 ol_cv_lib_db=-ldb-3
17779         fi
17780 fi
17781
17782 if test $ol_cv_lib_db = no ; then
17783         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17784 echo "configure:17785: checking for Berkeley DB link (-ldb2)" >&5
17785 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17786   echo $ac_n "(cached) $ac_c" 1>&6
17787 else
17788   
17789         ol_DB_LIB=-ldb2
17790         ol_LIBS=$LIBS
17791         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17792
17793         cat > conftest.$ac_ext <<EOF
17794 #line 17795 "configure"
17795 #include "confdefs.h"
17796
17797 #ifdef HAVE_DB_185_H
17798 # include <db_185.h>
17799 #else
17800 # include <db.h>
17801 #endif
17802
17803 #ifndef DB_VERSION_MAJOR
17804 # define DB_VERSION_MAJOR 1
17805 #endif
17806
17807 #ifndef NULL
17808 #define NULL ((void*)0)
17809 #endif
17810
17811 int main() {
17812
17813 #if DB_VERSION_MAJOR > 1
17814         {
17815                 char *version;
17816                 int major, minor, patch;
17817
17818                 version = db_version( &major, &minor, &patch );
17819
17820                 if( major != DB_VERSION_MAJOR ||
17821                         minor < DB_VERSION_MINOR )
17822                 {
17823                         printf("Berkeley DB version mismatch\n"
17824                                 "\theader: %s\n\tlibrary: %s\n",
17825                                 DB_VERSION_STRING, version);
17826                         return 1;
17827                 }
17828         }
17829 #endif
17830
17831 #if DB_VERSION_MAJOR > 2
17832         db_env_create( NULL, 0 );
17833 #elif DB_VERSION_MAJOR > 1
17834         db_appexit( NULL );
17835 #else
17836         (void) dbopen( NULL, 0, 0, 0, NULL);
17837 #endif
17838
17839 ; return 0; }
17840 EOF
17841 if { (eval echo configure:17842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17842   rm -rf conftest*
17843   ol_cv_db_db2=yes
17844 else
17845   echo "configure: failed program was:" >&5
17846   cat conftest.$ac_ext >&5
17847   rm -rf conftest*
17848   ol_cv_db_db2=no
17849 fi
17850 rm -f conftest*
17851
17852         LIBS="$ol_LIBS"
17853
17854 fi
17855
17856 echo "$ac_t""$ol_cv_db_db2" 1>&6
17857
17858         if test $ol_cv_db_db2 = yes ; then
17859                 ol_cv_lib_db=-ldb2
17860         fi
17861 fi
17862
17863 if test $ol_cv_lib_db = no ; then
17864         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17865 echo "configure:17866: checking for Berkeley DB link (-ldb-2)" >&5
17866 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17867   echo $ac_n "(cached) $ac_c" 1>&6
17868 else
17869   
17870         ol_DB_LIB=-ldb-2
17871         ol_LIBS=$LIBS
17872         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17873
17874         cat > conftest.$ac_ext <<EOF
17875 #line 17876 "configure"
17876 #include "confdefs.h"
17877
17878 #ifdef HAVE_DB_185_H
17879 # include <db_185.h>
17880 #else
17881 # include <db.h>
17882 #endif
17883
17884 #ifndef DB_VERSION_MAJOR
17885 # define DB_VERSION_MAJOR 1
17886 #endif
17887
17888 #ifndef NULL
17889 #define NULL ((void*)0)
17890 #endif
17891
17892 int main() {
17893
17894 #if DB_VERSION_MAJOR > 1
17895         {
17896                 char *version;
17897                 int major, minor, patch;
17898
17899                 version = db_version( &major, &minor, &patch );
17900
17901                 if( major != DB_VERSION_MAJOR ||
17902                         minor < DB_VERSION_MINOR )
17903                 {
17904                         printf("Berkeley DB version mismatch\n"
17905                                 "\theader: %s\n\tlibrary: %s\n",
17906                                 DB_VERSION_STRING, version);
17907                         return 1;
17908                 }
17909         }
17910 #endif
17911
17912 #if DB_VERSION_MAJOR > 2
17913         db_env_create( NULL, 0 );
17914 #elif DB_VERSION_MAJOR > 1
17915         db_appexit( NULL );
17916 #else
17917         (void) dbopen( NULL, 0, 0, 0, NULL);
17918 #endif
17919
17920 ; return 0; }
17921 EOF
17922 if { (eval echo configure:17923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17923   rm -rf conftest*
17924   ol_cv_db_db_2=yes
17925 else
17926   echo "configure: failed program was:" >&5
17927   cat conftest.$ac_ext >&5
17928   rm -rf conftest*
17929   ol_cv_db_db_2=no
17930 fi
17931 rm -f conftest*
17932
17933         LIBS="$ol_LIBS"
17934
17935 fi
17936
17937 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17938
17939         if test $ol_cv_db_db_2 = yes ; then
17940                 ol_cv_lib_db=-ldb-2
17941         fi
17942 fi
17943
17944 if test $ol_cv_lib_db = no ; then
17945         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17946 echo "configure:17947: checking for Berkeley DB link (-ldb1)" >&5
17947 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17948   echo $ac_n "(cached) $ac_c" 1>&6
17949 else
17950   
17951         ol_DB_LIB=-ldb1
17952         ol_LIBS=$LIBS
17953         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17954
17955         cat > conftest.$ac_ext <<EOF
17956 #line 17957 "configure"
17957 #include "confdefs.h"
17958
17959 #ifdef HAVE_DB_185_H
17960 # include <db_185.h>
17961 #else
17962 # include <db.h>
17963 #endif
17964
17965 #ifndef DB_VERSION_MAJOR
17966 # define DB_VERSION_MAJOR 1
17967 #endif
17968
17969 #ifndef NULL
17970 #define NULL ((void*)0)
17971 #endif
17972
17973 int main() {
17974
17975 #if DB_VERSION_MAJOR > 1
17976         {
17977                 char *version;
17978                 int major, minor, patch;
17979
17980                 version = db_version( &major, &minor, &patch );
17981
17982                 if( major != DB_VERSION_MAJOR ||
17983                         minor < DB_VERSION_MINOR )
17984                 {
17985                         printf("Berkeley DB version mismatch\n"
17986                                 "\theader: %s\n\tlibrary: %s\n",
17987                                 DB_VERSION_STRING, version);
17988                         return 1;
17989                 }
17990         }
17991 #endif
17992
17993 #if DB_VERSION_MAJOR > 2
17994         db_env_create( NULL, 0 );
17995 #elif DB_VERSION_MAJOR > 1
17996         db_appexit( NULL );
17997 #else
17998         (void) dbopen( NULL, 0, 0, 0, NULL);
17999 #endif
18000
18001 ; return 0; }
18002 EOF
18003 if { (eval echo configure:18004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18004   rm -rf conftest*
18005   ol_cv_db_db1=yes
18006 else
18007   echo "configure: failed program was:" >&5
18008   cat conftest.$ac_ext >&5
18009   rm -rf conftest*
18010   ol_cv_db_db1=no
18011 fi
18012 rm -f conftest*
18013
18014         LIBS="$ol_LIBS"
18015
18016 fi
18017
18018 echo "$ac_t""$ol_cv_db_db1" 1>&6
18019
18020         if test $ol_cv_db_db1 = yes ; then
18021                 ol_cv_lib_db=-ldb1
18022         fi
18023 fi
18024
18025 if test $ol_cv_lib_db = no ; then
18026         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18027 echo "configure:18028: checking for Berkeley DB link (-ldb-1)" >&5
18028 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18029   echo $ac_n "(cached) $ac_c" 1>&6
18030 else
18031   
18032         ol_DB_LIB=-ldb-1
18033         ol_LIBS=$LIBS
18034         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18035
18036         cat > conftest.$ac_ext <<EOF
18037 #line 18038 "configure"
18038 #include "confdefs.h"
18039
18040 #ifdef HAVE_DB_185_H
18041 # include <db_185.h>
18042 #else
18043 # include <db.h>
18044 #endif
18045
18046 #ifndef DB_VERSION_MAJOR
18047 # define DB_VERSION_MAJOR 1
18048 #endif
18049
18050 #ifndef NULL
18051 #define NULL ((void*)0)
18052 #endif
18053
18054 int main() {
18055
18056 #if DB_VERSION_MAJOR > 1
18057         {
18058                 char *version;
18059                 int major, minor, patch;
18060
18061                 version = db_version( &major, &minor, &patch );
18062
18063                 if( major != DB_VERSION_MAJOR ||
18064                         minor < DB_VERSION_MINOR )
18065                 {
18066                         printf("Berkeley DB version mismatch\n"
18067                                 "\theader: %s\n\tlibrary: %s\n",
18068                                 DB_VERSION_STRING, version);
18069                         return 1;
18070                 }
18071         }
18072 #endif
18073
18074 #if DB_VERSION_MAJOR > 2
18075         db_env_create( NULL, 0 );
18076 #elif DB_VERSION_MAJOR > 1
18077         db_appexit( NULL );
18078 #else
18079         (void) dbopen( NULL, 0, 0, 0, NULL);
18080 #endif
18081
18082 ; return 0; }
18083 EOF
18084 if { (eval echo configure:18085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18085   rm -rf conftest*
18086   ol_cv_db_db_1=yes
18087 else
18088   echo "configure: failed program was:" >&5
18089   cat conftest.$ac_ext >&5
18090   rm -rf conftest*
18091   ol_cv_db_db_1=no
18092 fi
18093 rm -f conftest*
18094
18095         LIBS="$ol_LIBS"
18096
18097 fi
18098
18099 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18100
18101         if test $ol_cv_db_db_1 = yes ; then
18102                 ol_cv_lib_db=-ldb-1
18103         fi
18104 fi
18105
18106
18107                 if test "$ol_cv_lib_db" != no ; then
18108                         ol_cv_berkeley_db=yes
18109                 fi
18110         fi
18111 fi
18112
18113         else
18114                 ol_cv_berkeley_db=no
18115 for ac_hdr in db.h
18116 do
18117 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18118 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18119 echo "configure:18120: checking for $ac_hdr" >&5
18120 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18121   echo $ac_n "(cached) $ac_c" 1>&6
18122 else
18123   cat > conftest.$ac_ext <<EOF
18124 #line 18125 "configure"
18125 #include "confdefs.h"
18126 #include <$ac_hdr>
18127 EOF
18128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18129 { (eval echo configure:18130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18131 if test -z "$ac_err"; then
18132   rm -rf conftest*
18133   eval "ac_cv_header_$ac_safe=yes"
18134 else
18135   echo "$ac_err" >&5
18136   echo "configure: failed program was:" >&5
18137   cat conftest.$ac_ext >&5
18138   rm -rf conftest*
18139   eval "ac_cv_header_$ac_safe=no"
18140 fi
18141 rm -f conftest*
18142 fi
18143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18144   echo "$ac_t""yes" 1>&6
18145     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18146   cat >> confdefs.h <<EOF
18147 #define $ac_tr_hdr 1
18148 EOF
18149  
18150 else
18151   echo "$ac_t""no" 1>&6
18152 fi
18153 done
18154
18155 if test $ac_cv_header_db_h = yes; then
18156         ol_cv_lib_db=no
18157 if test $ol_cv_lib_db = no ; then
18158         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18159 echo "configure:18160: checking for Berkeley DB link (default)" >&5
18160 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18161   echo $ac_n "(cached) $ac_c" 1>&6
18162 else
18163   
18164         ol_DB_LIB=
18165         ol_LIBS=$LIBS
18166         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18167
18168         cat > conftest.$ac_ext <<EOF
18169 #line 18170 "configure"
18170 #include "confdefs.h"
18171
18172 #ifdef HAVE_DB_185_H
18173 # include <db_185.h>
18174 #else
18175 # include <db.h>
18176 #endif
18177
18178 #ifndef DB_VERSION_MAJOR
18179 # define DB_VERSION_MAJOR 1
18180 #endif
18181
18182 #ifndef NULL
18183 #define NULL ((void*)0)
18184 #endif
18185
18186 int main() {
18187
18188 #if DB_VERSION_MAJOR > 1
18189         {
18190                 char *version;
18191                 int major, minor, patch;
18192
18193                 version = db_version( &major, &minor, &patch );
18194
18195                 if( major != DB_VERSION_MAJOR ||
18196                         minor < DB_VERSION_MINOR )
18197                 {
18198                         printf("Berkeley DB version mismatch\n"
18199                                 "\theader: %s\n\tlibrary: %s\n",
18200                                 DB_VERSION_STRING, version);
18201                         return 1;
18202                 }
18203         }
18204 #endif
18205
18206 #if DB_VERSION_MAJOR > 2
18207         db_env_create( NULL, 0 );
18208 #elif DB_VERSION_MAJOR > 1
18209         db_appexit( NULL );
18210 #else
18211         (void) dbopen( NULL, 0, 0, 0, NULL);
18212 #endif
18213
18214 ; return 0; }
18215 EOF
18216 if { (eval echo configure:18217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18217   rm -rf conftest*
18218   ol_cv_db_none=yes
18219 else
18220   echo "configure: failed program was:" >&5
18221   cat conftest.$ac_ext >&5
18222   rm -rf conftest*
18223   ol_cv_db_none=no
18224 fi
18225 rm -f conftest*
18226
18227         LIBS="$ol_LIBS"
18228
18229 fi
18230
18231 echo "$ac_t""$ol_cv_db_none" 1>&6
18232
18233         if test $ol_cv_db_none = yes ; then
18234                 ol_cv_lib_db=yes
18235         fi
18236 fi
18237
18238 if test $ol_cv_lib_db = no ; then
18239         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
18240 echo "configure:18241: checking for Berkeley DB link (-ldb43)" >&5
18241 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
18242   echo $ac_n "(cached) $ac_c" 1>&6
18243 else
18244   
18245         ol_DB_LIB=-ldb43
18246         ol_LIBS=$LIBS
18247         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18248
18249         cat > conftest.$ac_ext <<EOF
18250 #line 18251 "configure"
18251 #include "confdefs.h"
18252
18253 #ifdef HAVE_DB_185_H
18254 # include <db_185.h>
18255 #else
18256 # include <db.h>
18257 #endif
18258
18259 #ifndef DB_VERSION_MAJOR
18260 # define DB_VERSION_MAJOR 1
18261 #endif
18262
18263 #ifndef NULL
18264 #define NULL ((void*)0)
18265 #endif
18266
18267 int main() {
18268
18269 #if DB_VERSION_MAJOR > 1
18270         {
18271                 char *version;
18272                 int major, minor, patch;
18273
18274                 version = db_version( &major, &minor, &patch );
18275
18276                 if( major != DB_VERSION_MAJOR ||
18277                         minor < DB_VERSION_MINOR )
18278                 {
18279                         printf("Berkeley DB version mismatch\n"
18280                                 "\theader: %s\n\tlibrary: %s\n",
18281                                 DB_VERSION_STRING, version);
18282                         return 1;
18283                 }
18284         }
18285 #endif
18286
18287 #if DB_VERSION_MAJOR > 2
18288         db_env_create( NULL, 0 );
18289 #elif DB_VERSION_MAJOR > 1
18290         db_appexit( NULL );
18291 #else
18292         (void) dbopen( NULL, 0, 0, 0, NULL);
18293 #endif
18294
18295 ; return 0; }
18296 EOF
18297 if { (eval echo configure:18298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18298   rm -rf conftest*
18299   ol_cv_db_db43=yes
18300 else
18301   echo "configure: failed program was:" >&5
18302   cat conftest.$ac_ext >&5
18303   rm -rf conftest*
18304   ol_cv_db_db43=no
18305 fi
18306 rm -f conftest*
18307
18308         LIBS="$ol_LIBS"
18309
18310 fi
18311
18312 echo "$ac_t""$ol_cv_db_db43" 1>&6
18313
18314         if test $ol_cv_db_db43 = yes ; then
18315                 ol_cv_lib_db=-ldb43
18316         fi
18317 fi
18318
18319 if test $ol_cv_lib_db = no ; then
18320         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
18321 echo "configure:18322: checking for Berkeley DB link (-ldb-43)" >&5
18322 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
18323   echo $ac_n "(cached) $ac_c" 1>&6
18324 else
18325   
18326         ol_DB_LIB=-ldb-43
18327         ol_LIBS=$LIBS
18328         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18329
18330         cat > conftest.$ac_ext <<EOF
18331 #line 18332 "configure"
18332 #include "confdefs.h"
18333
18334 #ifdef HAVE_DB_185_H
18335 # include <db_185.h>
18336 #else
18337 # include <db.h>
18338 #endif
18339
18340 #ifndef DB_VERSION_MAJOR
18341 # define DB_VERSION_MAJOR 1
18342 #endif
18343
18344 #ifndef NULL
18345 #define NULL ((void*)0)
18346 #endif
18347
18348 int main() {
18349
18350 #if DB_VERSION_MAJOR > 1
18351         {
18352                 char *version;
18353                 int major, minor, patch;
18354
18355                 version = db_version( &major, &minor, &patch );
18356
18357                 if( major != DB_VERSION_MAJOR ||
18358                         minor < DB_VERSION_MINOR )
18359                 {
18360                         printf("Berkeley DB version mismatch\n"
18361                                 "\theader: %s\n\tlibrary: %s\n",
18362                                 DB_VERSION_STRING, version);
18363                         return 1;
18364                 }
18365         }
18366 #endif
18367
18368 #if DB_VERSION_MAJOR > 2
18369         db_env_create( NULL, 0 );
18370 #elif DB_VERSION_MAJOR > 1
18371         db_appexit( NULL );
18372 #else
18373         (void) dbopen( NULL, 0, 0, 0, NULL);
18374 #endif
18375
18376 ; return 0; }
18377 EOF
18378 if { (eval echo configure:18379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18379   rm -rf conftest*
18380   ol_cv_db_db_43=yes
18381 else
18382   echo "configure: failed program was:" >&5
18383   cat conftest.$ac_ext >&5
18384   rm -rf conftest*
18385   ol_cv_db_db_43=no
18386 fi
18387 rm -f conftest*
18388
18389         LIBS="$ol_LIBS"
18390
18391 fi
18392
18393 echo "$ac_t""$ol_cv_db_db_43" 1>&6
18394
18395         if test $ol_cv_db_db_43 = yes ; then
18396                 ol_cv_lib_db=-ldb-43
18397         fi
18398 fi
18399
18400 if test $ol_cv_lib_db = no ; then
18401         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
18402 echo "configure:18403: checking for Berkeley DB link (-ldb-4.3)" >&5
18403 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
18404   echo $ac_n "(cached) $ac_c" 1>&6
18405 else
18406   
18407         ol_DB_LIB=-ldb-4.3
18408         ol_LIBS=$LIBS
18409         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18410
18411         cat > conftest.$ac_ext <<EOF
18412 #line 18413 "configure"
18413 #include "confdefs.h"
18414
18415 #ifdef HAVE_DB_185_H
18416 # include <db_185.h>
18417 #else
18418 # include <db.h>
18419 #endif
18420
18421 #ifndef DB_VERSION_MAJOR
18422 # define DB_VERSION_MAJOR 1
18423 #endif
18424
18425 #ifndef NULL
18426 #define NULL ((void*)0)
18427 #endif
18428
18429 int main() {
18430
18431 #if DB_VERSION_MAJOR > 1
18432         {
18433                 char *version;
18434                 int major, minor, patch;
18435
18436                 version = db_version( &major, &minor, &patch );
18437
18438                 if( major != DB_VERSION_MAJOR ||
18439                         minor < DB_VERSION_MINOR )
18440                 {
18441                         printf("Berkeley DB version mismatch\n"
18442                                 "\theader: %s\n\tlibrary: %s\n",
18443                                 DB_VERSION_STRING, version);
18444                         return 1;
18445                 }
18446         }
18447 #endif
18448
18449 #if DB_VERSION_MAJOR > 2
18450         db_env_create( NULL, 0 );
18451 #elif DB_VERSION_MAJOR > 1
18452         db_appexit( NULL );
18453 #else
18454         (void) dbopen( NULL, 0, 0, 0, NULL);
18455 #endif
18456
18457 ; return 0; }
18458 EOF
18459 if { (eval echo configure:18460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18460   rm -rf conftest*
18461   ol_cv_db_db_4_dot_3=yes
18462 else
18463   echo "configure: failed program was:" >&5
18464   cat conftest.$ac_ext >&5
18465   rm -rf conftest*
18466   ol_cv_db_db_4_dot_3=no
18467 fi
18468 rm -f conftest*
18469
18470         LIBS="$ol_LIBS"
18471
18472 fi
18473
18474 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
18475
18476         if test $ol_cv_db_db_4_dot_3 = yes ; then
18477                 ol_cv_lib_db=-ldb-4.3
18478         fi
18479 fi
18480
18481 if test $ol_cv_lib_db = no ; then
18482         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
18483 echo "configure:18484: checking for Berkeley DB link (-ldb-4-3)" >&5
18484 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
18485   echo $ac_n "(cached) $ac_c" 1>&6
18486 else
18487   
18488         ol_DB_LIB=-ldb-4-3
18489         ol_LIBS=$LIBS
18490         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18491
18492         cat > conftest.$ac_ext <<EOF
18493 #line 18494 "configure"
18494 #include "confdefs.h"
18495
18496 #ifdef HAVE_DB_185_H
18497 # include <db_185.h>
18498 #else
18499 # include <db.h>
18500 #endif
18501
18502 #ifndef DB_VERSION_MAJOR
18503 # define DB_VERSION_MAJOR 1
18504 #endif
18505
18506 #ifndef NULL
18507 #define NULL ((void*)0)
18508 #endif
18509
18510 int main() {
18511
18512 #if DB_VERSION_MAJOR > 1
18513         {
18514                 char *version;
18515                 int major, minor, patch;
18516
18517                 version = db_version( &major, &minor, &patch );
18518
18519                 if( major != DB_VERSION_MAJOR ||
18520                         minor < DB_VERSION_MINOR )
18521                 {
18522                         printf("Berkeley DB version mismatch\n"
18523                                 "\theader: %s\n\tlibrary: %s\n",
18524                                 DB_VERSION_STRING, version);
18525                         return 1;
18526                 }
18527         }
18528 #endif
18529
18530 #if DB_VERSION_MAJOR > 2
18531         db_env_create( NULL, 0 );
18532 #elif DB_VERSION_MAJOR > 1
18533         db_appexit( NULL );
18534 #else
18535         (void) dbopen( NULL, 0, 0, 0, NULL);
18536 #endif
18537
18538 ; return 0; }
18539 EOF
18540 if { (eval echo configure:18541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18541   rm -rf conftest*
18542   ol_cv_db_db_4_3=yes
18543 else
18544   echo "configure: failed program was:" >&5
18545   cat conftest.$ac_ext >&5
18546   rm -rf conftest*
18547   ol_cv_db_db_4_3=no
18548 fi
18549 rm -f conftest*
18550
18551         LIBS="$ol_LIBS"
18552
18553 fi
18554
18555 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
18556
18557         if test $ol_cv_db_db_4_3 = yes ; then
18558                 ol_cv_lib_db=-ldb-4-3
18559         fi
18560 fi
18561
18562 if test $ol_cv_lib_db = no ; then
18563         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18564 echo "configure:18565: checking for Berkeley DB link (-ldb42)" >&5
18565 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18566   echo $ac_n "(cached) $ac_c" 1>&6
18567 else
18568   
18569         ol_DB_LIB=-ldb42
18570         ol_LIBS=$LIBS
18571         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18572
18573         cat > conftest.$ac_ext <<EOF
18574 #line 18575 "configure"
18575 #include "confdefs.h"
18576
18577 #ifdef HAVE_DB_185_H
18578 # include <db_185.h>
18579 #else
18580 # include <db.h>
18581 #endif
18582
18583 #ifndef DB_VERSION_MAJOR
18584 # define DB_VERSION_MAJOR 1
18585 #endif
18586
18587 #ifndef NULL
18588 #define NULL ((void*)0)
18589 #endif
18590
18591 int main() {
18592
18593 #if DB_VERSION_MAJOR > 1
18594         {
18595                 char *version;
18596                 int major, minor, patch;
18597
18598                 version = db_version( &major, &minor, &patch );
18599
18600                 if( major != DB_VERSION_MAJOR ||
18601                         minor < DB_VERSION_MINOR )
18602                 {
18603                         printf("Berkeley DB version mismatch\n"
18604                                 "\theader: %s\n\tlibrary: %s\n",
18605                                 DB_VERSION_STRING, version);
18606                         return 1;
18607                 }
18608         }
18609 #endif
18610
18611 #if DB_VERSION_MAJOR > 2
18612         db_env_create( NULL, 0 );
18613 #elif DB_VERSION_MAJOR > 1
18614         db_appexit( NULL );
18615 #else
18616         (void) dbopen( NULL, 0, 0, 0, NULL);
18617 #endif
18618
18619 ; return 0; }
18620 EOF
18621 if { (eval echo configure:18622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18622   rm -rf conftest*
18623   ol_cv_db_db42=yes
18624 else
18625   echo "configure: failed program was:" >&5
18626   cat conftest.$ac_ext >&5
18627   rm -rf conftest*
18628   ol_cv_db_db42=no
18629 fi
18630 rm -f conftest*
18631
18632         LIBS="$ol_LIBS"
18633
18634 fi
18635
18636 echo "$ac_t""$ol_cv_db_db42" 1>&6
18637
18638         if test $ol_cv_db_db42 = yes ; then
18639                 ol_cv_lib_db=-ldb42
18640         fi
18641 fi
18642
18643 if test $ol_cv_lib_db = no ; then
18644         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18645 echo "configure:18646: checking for Berkeley DB link (-ldb-42)" >&5
18646 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18647   echo $ac_n "(cached) $ac_c" 1>&6
18648 else
18649   
18650         ol_DB_LIB=-ldb-42
18651         ol_LIBS=$LIBS
18652         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18653
18654         cat > conftest.$ac_ext <<EOF
18655 #line 18656 "configure"
18656 #include "confdefs.h"
18657
18658 #ifdef HAVE_DB_185_H
18659 # include <db_185.h>
18660 #else
18661 # include <db.h>
18662 #endif
18663
18664 #ifndef DB_VERSION_MAJOR
18665 # define DB_VERSION_MAJOR 1
18666 #endif
18667
18668 #ifndef NULL
18669 #define NULL ((void*)0)
18670 #endif
18671
18672 int main() {
18673
18674 #if DB_VERSION_MAJOR > 1
18675         {
18676                 char *version;
18677                 int major, minor, patch;
18678
18679                 version = db_version( &major, &minor, &patch );
18680
18681                 if( major != DB_VERSION_MAJOR ||
18682                         minor < DB_VERSION_MINOR )
18683                 {
18684                         printf("Berkeley DB version mismatch\n"
18685                                 "\theader: %s\n\tlibrary: %s\n",
18686                                 DB_VERSION_STRING, version);
18687                         return 1;
18688                 }
18689         }
18690 #endif
18691
18692 #if DB_VERSION_MAJOR > 2
18693         db_env_create( NULL, 0 );
18694 #elif DB_VERSION_MAJOR > 1
18695         db_appexit( NULL );
18696 #else
18697         (void) dbopen( NULL, 0, 0, 0, NULL);
18698 #endif
18699
18700 ; return 0; }
18701 EOF
18702 if { (eval echo configure:18703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18703   rm -rf conftest*
18704   ol_cv_db_db_42=yes
18705 else
18706   echo "configure: failed program was:" >&5
18707   cat conftest.$ac_ext >&5
18708   rm -rf conftest*
18709   ol_cv_db_db_42=no
18710 fi
18711 rm -f conftest*
18712
18713         LIBS="$ol_LIBS"
18714
18715 fi
18716
18717 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18718
18719         if test $ol_cv_db_db_42 = yes ; then
18720                 ol_cv_lib_db=-ldb-42
18721         fi
18722 fi
18723
18724 if test $ol_cv_lib_db = no ; then
18725         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18726 echo "configure:18727: checking for Berkeley DB link (-ldb-4.2)" >&5
18727 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18728   echo $ac_n "(cached) $ac_c" 1>&6
18729 else
18730   
18731         ol_DB_LIB=-ldb-4.2
18732         ol_LIBS=$LIBS
18733         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18734
18735         cat > conftest.$ac_ext <<EOF
18736 #line 18737 "configure"
18737 #include "confdefs.h"
18738
18739 #ifdef HAVE_DB_185_H
18740 # include <db_185.h>
18741 #else
18742 # include <db.h>
18743 #endif
18744
18745 #ifndef DB_VERSION_MAJOR
18746 # define DB_VERSION_MAJOR 1
18747 #endif
18748
18749 #ifndef NULL
18750 #define NULL ((void*)0)
18751 #endif
18752
18753 int main() {
18754
18755 #if DB_VERSION_MAJOR > 1
18756         {
18757                 char *version;
18758                 int major, minor, patch;
18759
18760                 version = db_version( &major, &minor, &patch );
18761
18762                 if( major != DB_VERSION_MAJOR ||
18763                         minor < DB_VERSION_MINOR )
18764                 {
18765                         printf("Berkeley DB version mismatch\n"
18766                                 "\theader: %s\n\tlibrary: %s\n",
18767                                 DB_VERSION_STRING, version);
18768                         return 1;
18769                 }
18770         }
18771 #endif
18772
18773 #if DB_VERSION_MAJOR > 2
18774         db_env_create( NULL, 0 );
18775 #elif DB_VERSION_MAJOR > 1
18776         db_appexit( NULL );
18777 #else
18778         (void) dbopen( NULL, 0, 0, 0, NULL);
18779 #endif
18780
18781 ; return 0; }
18782 EOF
18783 if { (eval echo configure:18784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18784   rm -rf conftest*
18785   ol_cv_db_db_4_dot_2=yes
18786 else
18787   echo "configure: failed program was:" >&5
18788   cat conftest.$ac_ext >&5
18789   rm -rf conftest*
18790   ol_cv_db_db_4_dot_2=no
18791 fi
18792 rm -f conftest*
18793
18794         LIBS="$ol_LIBS"
18795
18796 fi
18797
18798 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18799
18800         if test $ol_cv_db_db_4_dot_2 = yes ; then
18801                 ol_cv_lib_db=-ldb-4.2
18802         fi
18803 fi
18804
18805 if test $ol_cv_lib_db = no ; then
18806         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18807 echo "configure:18808: checking for Berkeley DB link (-ldb-4-2)" >&5
18808 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18809   echo $ac_n "(cached) $ac_c" 1>&6
18810 else
18811   
18812         ol_DB_LIB=-ldb-4-2
18813         ol_LIBS=$LIBS
18814         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18815
18816         cat > conftest.$ac_ext <<EOF
18817 #line 18818 "configure"
18818 #include "confdefs.h"
18819
18820 #ifdef HAVE_DB_185_H
18821 # include <db_185.h>
18822 #else
18823 # include <db.h>
18824 #endif
18825
18826 #ifndef DB_VERSION_MAJOR
18827 # define DB_VERSION_MAJOR 1
18828 #endif
18829
18830 #ifndef NULL
18831 #define NULL ((void*)0)
18832 #endif
18833
18834 int main() {
18835
18836 #if DB_VERSION_MAJOR > 1
18837         {
18838                 char *version;
18839                 int major, minor, patch;
18840
18841                 version = db_version( &major, &minor, &patch );
18842
18843                 if( major != DB_VERSION_MAJOR ||
18844                         minor < DB_VERSION_MINOR )
18845                 {
18846                         printf("Berkeley DB version mismatch\n"
18847                                 "\theader: %s\n\tlibrary: %s\n",
18848                                 DB_VERSION_STRING, version);
18849                         return 1;
18850                 }
18851         }
18852 #endif
18853
18854 #if DB_VERSION_MAJOR > 2
18855         db_env_create( NULL, 0 );
18856 #elif DB_VERSION_MAJOR > 1
18857         db_appexit( NULL );
18858 #else
18859         (void) dbopen( NULL, 0, 0, 0, NULL);
18860 #endif
18861
18862 ; return 0; }
18863 EOF
18864 if { (eval echo configure:18865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18865   rm -rf conftest*
18866   ol_cv_db_db_4_2=yes
18867 else
18868   echo "configure: failed program was:" >&5
18869   cat conftest.$ac_ext >&5
18870   rm -rf conftest*
18871   ol_cv_db_db_4_2=no
18872 fi
18873 rm -f conftest*
18874
18875         LIBS="$ol_LIBS"
18876
18877 fi
18878
18879 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18880
18881         if test $ol_cv_db_db_4_2 = yes ; then
18882                 ol_cv_lib_db=-ldb-4-2
18883         fi
18884 fi
18885
18886 if test $ol_cv_lib_db = no ; then
18887         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18888 echo "configure:18889: checking for Berkeley DB link (-ldb-4)" >&5
18889 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18890   echo $ac_n "(cached) $ac_c" 1>&6
18891 else
18892   
18893         ol_DB_LIB=-ldb-4
18894         ol_LIBS=$LIBS
18895         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18896
18897         cat > conftest.$ac_ext <<EOF
18898 #line 18899 "configure"
18899 #include "confdefs.h"
18900
18901 #ifdef HAVE_DB_185_H
18902 # include <db_185.h>
18903 #else
18904 # include <db.h>
18905 #endif
18906
18907 #ifndef DB_VERSION_MAJOR
18908 # define DB_VERSION_MAJOR 1
18909 #endif
18910
18911 #ifndef NULL
18912 #define NULL ((void*)0)
18913 #endif
18914
18915 int main() {
18916
18917 #if DB_VERSION_MAJOR > 1
18918         {
18919                 char *version;
18920                 int major, minor, patch;
18921
18922                 version = db_version( &major, &minor, &patch );
18923
18924                 if( major != DB_VERSION_MAJOR ||
18925                         minor < DB_VERSION_MINOR )
18926                 {
18927                         printf("Berkeley DB version mismatch\n"
18928                                 "\theader: %s\n\tlibrary: %s\n",
18929                                 DB_VERSION_STRING, version);
18930                         return 1;
18931                 }
18932         }
18933 #endif
18934
18935 #if DB_VERSION_MAJOR > 2
18936         db_env_create( NULL, 0 );
18937 #elif DB_VERSION_MAJOR > 1
18938         db_appexit( NULL );
18939 #else
18940         (void) dbopen( NULL, 0, 0, 0, NULL);
18941 #endif
18942
18943 ; return 0; }
18944 EOF
18945 if { (eval echo configure:18946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18946   rm -rf conftest*
18947   ol_cv_db_db_4=yes
18948 else
18949   echo "configure: failed program was:" >&5
18950   cat conftest.$ac_ext >&5
18951   rm -rf conftest*
18952   ol_cv_db_db_4=no
18953 fi
18954 rm -f conftest*
18955
18956         LIBS="$ol_LIBS"
18957
18958 fi
18959
18960 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18961
18962         if test $ol_cv_db_db_4 = yes ; then
18963                 ol_cv_lib_db=-ldb-4
18964         fi
18965 fi
18966
18967 if test $ol_cv_lib_db = no ; then
18968         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18969 echo "configure:18970: checking for Berkeley DB link (-ldb4)" >&5
18970 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18971   echo $ac_n "(cached) $ac_c" 1>&6
18972 else
18973   
18974         ol_DB_LIB=-ldb4
18975         ol_LIBS=$LIBS
18976         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18977
18978         cat > conftest.$ac_ext <<EOF
18979 #line 18980 "configure"
18980 #include "confdefs.h"
18981
18982 #ifdef HAVE_DB_185_H
18983 # include <db_185.h>
18984 #else
18985 # include <db.h>
18986 #endif
18987
18988 #ifndef DB_VERSION_MAJOR
18989 # define DB_VERSION_MAJOR 1
18990 #endif
18991
18992 #ifndef NULL
18993 #define NULL ((void*)0)
18994 #endif
18995
18996 int main() {
18997
18998 #if DB_VERSION_MAJOR > 1
18999         {
19000                 char *version;
19001                 int major, minor, patch;
19002
19003                 version = db_version( &major, &minor, &patch );
19004
19005                 if( major != DB_VERSION_MAJOR ||
19006                         minor < DB_VERSION_MINOR )
19007                 {
19008                         printf("Berkeley DB version mismatch\n"
19009                                 "\theader: %s\n\tlibrary: %s\n",
19010                                 DB_VERSION_STRING, version);
19011                         return 1;
19012                 }
19013         }
19014 #endif
19015
19016 #if DB_VERSION_MAJOR > 2
19017         db_env_create( NULL, 0 );
19018 #elif DB_VERSION_MAJOR > 1
19019         db_appexit( NULL );
19020 #else
19021         (void) dbopen( NULL, 0, 0, 0, NULL);
19022 #endif
19023
19024 ; return 0; }
19025 EOF
19026 if { (eval echo configure:19027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19027   rm -rf conftest*
19028   ol_cv_db_db4=yes
19029 else
19030   echo "configure: failed program was:" >&5
19031   cat conftest.$ac_ext >&5
19032   rm -rf conftest*
19033   ol_cv_db_db4=no
19034 fi
19035 rm -f conftest*
19036
19037         LIBS="$ol_LIBS"
19038
19039 fi
19040
19041 echo "$ac_t""$ol_cv_db_db4" 1>&6
19042
19043         if test $ol_cv_db_db4 = yes ; then
19044                 ol_cv_lib_db=-ldb4
19045         fi
19046 fi
19047
19048 if test $ol_cv_lib_db = no ; then
19049         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19050 echo "configure:19051: checking for Berkeley DB link (-ldb)" >&5
19051 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19052   echo $ac_n "(cached) $ac_c" 1>&6
19053 else
19054   
19055         ol_DB_LIB=-ldb
19056         ol_LIBS=$LIBS
19057         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19058
19059         cat > conftest.$ac_ext <<EOF
19060 #line 19061 "configure"
19061 #include "confdefs.h"
19062
19063 #ifdef HAVE_DB_185_H
19064 # include <db_185.h>
19065 #else
19066 # include <db.h>
19067 #endif
19068
19069 #ifndef DB_VERSION_MAJOR
19070 # define DB_VERSION_MAJOR 1
19071 #endif
19072
19073 #ifndef NULL
19074 #define NULL ((void*)0)
19075 #endif
19076
19077 int main() {
19078
19079 #if DB_VERSION_MAJOR > 1
19080         {
19081                 char *version;
19082                 int major, minor, patch;
19083
19084                 version = db_version( &major, &minor, &patch );
19085
19086                 if( major != DB_VERSION_MAJOR ||
19087                         minor < DB_VERSION_MINOR )
19088                 {
19089                         printf("Berkeley DB version mismatch\n"
19090                                 "\theader: %s\n\tlibrary: %s\n",
19091                                 DB_VERSION_STRING, version);
19092                         return 1;
19093                 }
19094         }
19095 #endif
19096
19097 #if DB_VERSION_MAJOR > 2
19098         db_env_create( NULL, 0 );
19099 #elif DB_VERSION_MAJOR > 1
19100         db_appexit( NULL );
19101 #else
19102         (void) dbopen( NULL, 0, 0, 0, NULL);
19103 #endif
19104
19105 ; return 0; }
19106 EOF
19107 if { (eval echo configure:19108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19108   rm -rf conftest*
19109   ol_cv_db_db=yes
19110 else
19111   echo "configure: failed program was:" >&5
19112   cat conftest.$ac_ext >&5
19113   rm -rf conftest*
19114   ol_cv_db_db=no
19115 fi
19116 rm -f conftest*
19117
19118         LIBS="$ol_LIBS"
19119
19120 fi
19121
19122 echo "$ac_t""$ol_cv_db_db" 1>&6
19123
19124         if test $ol_cv_db_db = yes ; then
19125                 ol_cv_lib_db=-ldb
19126         fi
19127 fi
19128
19129 if test $ol_cv_lib_db = no ; then
19130         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19131 echo "configure:19132: checking for Berkeley DB link (-ldb41)" >&5
19132 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19133   echo $ac_n "(cached) $ac_c" 1>&6
19134 else
19135   
19136         ol_DB_LIB=-ldb41
19137         ol_LIBS=$LIBS
19138         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19139
19140         cat > conftest.$ac_ext <<EOF
19141 #line 19142 "configure"
19142 #include "confdefs.h"
19143
19144 #ifdef HAVE_DB_185_H
19145 # include <db_185.h>
19146 #else
19147 # include <db.h>
19148 #endif
19149
19150 #ifndef DB_VERSION_MAJOR
19151 # define DB_VERSION_MAJOR 1
19152 #endif
19153
19154 #ifndef NULL
19155 #define NULL ((void*)0)
19156 #endif
19157
19158 int main() {
19159
19160 #if DB_VERSION_MAJOR > 1
19161         {
19162                 char *version;
19163                 int major, minor, patch;
19164
19165                 version = db_version( &major, &minor, &patch );
19166
19167                 if( major != DB_VERSION_MAJOR ||
19168                         minor < DB_VERSION_MINOR )
19169                 {
19170                         printf("Berkeley DB version mismatch\n"
19171                                 "\theader: %s\n\tlibrary: %s\n",
19172                                 DB_VERSION_STRING, version);
19173                         return 1;
19174                 }
19175         }
19176 #endif
19177
19178 #if DB_VERSION_MAJOR > 2
19179         db_env_create( NULL, 0 );
19180 #elif DB_VERSION_MAJOR > 1
19181         db_appexit( NULL );
19182 #else
19183         (void) dbopen( NULL, 0, 0, 0, NULL);
19184 #endif
19185
19186 ; return 0; }
19187 EOF
19188 if { (eval echo configure:19189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19189   rm -rf conftest*
19190   ol_cv_db_db41=yes
19191 else
19192   echo "configure: failed program was:" >&5
19193   cat conftest.$ac_ext >&5
19194   rm -rf conftest*
19195   ol_cv_db_db41=no
19196 fi
19197 rm -f conftest*
19198
19199         LIBS="$ol_LIBS"
19200
19201 fi
19202
19203 echo "$ac_t""$ol_cv_db_db41" 1>&6
19204
19205         if test $ol_cv_db_db41 = yes ; then
19206                 ol_cv_lib_db=-ldb41
19207         fi
19208 fi
19209
19210 if test $ol_cv_lib_db = no ; then
19211         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19212 echo "configure:19213: checking for Berkeley DB link (-ldb-41)" >&5
19213 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19214   echo $ac_n "(cached) $ac_c" 1>&6
19215 else
19216   
19217         ol_DB_LIB=-ldb-41
19218         ol_LIBS=$LIBS
19219         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19220
19221         cat > conftest.$ac_ext <<EOF
19222 #line 19223 "configure"
19223 #include "confdefs.h"
19224
19225 #ifdef HAVE_DB_185_H
19226 # include <db_185.h>
19227 #else
19228 # include <db.h>
19229 #endif
19230
19231 #ifndef DB_VERSION_MAJOR
19232 # define DB_VERSION_MAJOR 1
19233 #endif
19234
19235 #ifndef NULL
19236 #define NULL ((void*)0)
19237 #endif
19238
19239 int main() {
19240
19241 #if DB_VERSION_MAJOR > 1
19242         {
19243                 char *version;
19244                 int major, minor, patch;
19245
19246                 version = db_version( &major, &minor, &patch );
19247
19248                 if( major != DB_VERSION_MAJOR ||
19249                         minor < DB_VERSION_MINOR )
19250                 {
19251                         printf("Berkeley DB version mismatch\n"
19252                                 "\theader: %s\n\tlibrary: %s\n",
19253                                 DB_VERSION_STRING, version);
19254                         return 1;
19255                 }
19256         }
19257 #endif
19258
19259 #if DB_VERSION_MAJOR > 2
19260         db_env_create( NULL, 0 );
19261 #elif DB_VERSION_MAJOR > 1
19262         db_appexit( NULL );
19263 #else
19264         (void) dbopen( NULL, 0, 0, 0, NULL);
19265 #endif
19266
19267 ; return 0; }
19268 EOF
19269 if { (eval echo configure:19270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19270   rm -rf conftest*
19271   ol_cv_db_db_41=yes
19272 else
19273   echo "configure: failed program was:" >&5
19274   cat conftest.$ac_ext >&5
19275   rm -rf conftest*
19276   ol_cv_db_db_41=no
19277 fi
19278 rm -f conftest*
19279
19280         LIBS="$ol_LIBS"
19281
19282 fi
19283
19284 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19285
19286         if test $ol_cv_db_db_41 = yes ; then
19287                 ol_cv_lib_db=-ldb-41
19288         fi
19289 fi
19290
19291 if test $ol_cv_lib_db = no ; then
19292         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19293 echo "configure:19294: checking for Berkeley DB link (-ldb-4.1)" >&5
19294 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19295   echo $ac_n "(cached) $ac_c" 1>&6
19296 else
19297   
19298         ol_DB_LIB=-ldb-4.1
19299         ol_LIBS=$LIBS
19300         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19301
19302         cat > conftest.$ac_ext <<EOF
19303 #line 19304 "configure"
19304 #include "confdefs.h"
19305
19306 #ifdef HAVE_DB_185_H
19307 # include <db_185.h>
19308 #else
19309 # include <db.h>
19310 #endif
19311
19312 #ifndef DB_VERSION_MAJOR
19313 # define DB_VERSION_MAJOR 1
19314 #endif
19315
19316 #ifndef NULL
19317 #define NULL ((void*)0)
19318 #endif
19319
19320 int main() {
19321
19322 #if DB_VERSION_MAJOR > 1
19323         {
19324                 char *version;
19325                 int major, minor, patch;
19326
19327                 version = db_version( &major, &minor, &patch );
19328
19329                 if( major != DB_VERSION_MAJOR ||
19330                         minor < DB_VERSION_MINOR )
19331                 {
19332                         printf("Berkeley DB version mismatch\n"
19333                                 "\theader: %s\n\tlibrary: %s\n",
19334                                 DB_VERSION_STRING, version);
19335                         return 1;
19336                 }
19337         }
19338 #endif
19339
19340 #if DB_VERSION_MAJOR > 2
19341         db_env_create( NULL, 0 );
19342 #elif DB_VERSION_MAJOR > 1
19343         db_appexit( NULL );
19344 #else
19345         (void) dbopen( NULL, 0, 0, 0, NULL);
19346 #endif
19347
19348 ; return 0; }
19349 EOF
19350 if { (eval echo configure:19351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19351   rm -rf conftest*
19352   ol_cv_db_db_4_dot_1=yes
19353 else
19354   echo "configure: failed program was:" >&5
19355   cat conftest.$ac_ext >&5
19356   rm -rf conftest*
19357   ol_cv_db_db_4_dot_1=no
19358 fi
19359 rm -f conftest*
19360
19361         LIBS="$ol_LIBS"
19362
19363 fi
19364
19365 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19366
19367         if test $ol_cv_db_db_4_dot_1 = yes ; then
19368                 ol_cv_lib_db=-ldb-4.1
19369         fi
19370 fi
19371
19372 if test $ol_cv_lib_db = no ; then
19373         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19374 echo "configure:19375: checking for Berkeley DB link (-ldb-4-1)" >&5
19375 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19376   echo $ac_n "(cached) $ac_c" 1>&6
19377 else
19378   
19379         ol_DB_LIB=-ldb-4-1
19380         ol_LIBS=$LIBS
19381         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19382
19383         cat > conftest.$ac_ext <<EOF
19384 #line 19385 "configure"
19385 #include "confdefs.h"
19386
19387 #ifdef HAVE_DB_185_H
19388 # include <db_185.h>
19389 #else
19390 # include <db.h>
19391 #endif
19392
19393 #ifndef DB_VERSION_MAJOR
19394 # define DB_VERSION_MAJOR 1
19395 #endif
19396
19397 #ifndef NULL
19398 #define NULL ((void*)0)
19399 #endif
19400
19401 int main() {
19402
19403 #if DB_VERSION_MAJOR > 1
19404         {
19405                 char *version;
19406                 int major, minor, patch;
19407
19408                 version = db_version( &major, &minor, &patch );
19409
19410                 if( major != DB_VERSION_MAJOR ||
19411                         minor < DB_VERSION_MINOR )
19412                 {
19413                         printf("Berkeley DB version mismatch\n"
19414                                 "\theader: %s\n\tlibrary: %s\n",
19415                                 DB_VERSION_STRING, version);
19416                         return 1;
19417                 }
19418         }
19419 #endif
19420
19421 #if DB_VERSION_MAJOR > 2
19422         db_env_create( NULL, 0 );
19423 #elif DB_VERSION_MAJOR > 1
19424         db_appexit( NULL );
19425 #else
19426         (void) dbopen( NULL, 0, 0, 0, NULL);
19427 #endif
19428
19429 ; return 0; }
19430 EOF
19431 if { (eval echo configure:19432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19432   rm -rf conftest*
19433   ol_cv_db_db_4_1=yes
19434 else
19435   echo "configure: failed program was:" >&5
19436   cat conftest.$ac_ext >&5
19437   rm -rf conftest*
19438   ol_cv_db_db_4_1=no
19439 fi
19440 rm -f conftest*
19441
19442         LIBS="$ol_LIBS"
19443
19444 fi
19445
19446 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19447
19448         if test $ol_cv_db_db_4_1 = yes ; then
19449                 ol_cv_lib_db=-ldb-4-1
19450         fi
19451 fi
19452
19453 if test $ol_cv_lib_db = no ; then
19454         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19455 echo "configure:19456: checking for Berkeley DB link (-ldb3)" >&5
19456 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19457   echo $ac_n "(cached) $ac_c" 1>&6
19458 else
19459   
19460         ol_DB_LIB=-ldb3
19461         ol_LIBS=$LIBS
19462         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19463
19464         cat > conftest.$ac_ext <<EOF
19465 #line 19466 "configure"
19466 #include "confdefs.h"
19467
19468 #ifdef HAVE_DB_185_H
19469 # include <db_185.h>
19470 #else
19471 # include <db.h>
19472 #endif
19473
19474 #ifndef DB_VERSION_MAJOR
19475 # define DB_VERSION_MAJOR 1
19476 #endif
19477
19478 #ifndef NULL
19479 #define NULL ((void*)0)
19480 #endif
19481
19482 int main() {
19483
19484 #if DB_VERSION_MAJOR > 1
19485         {
19486                 char *version;
19487                 int major, minor, patch;
19488
19489                 version = db_version( &major, &minor, &patch );
19490
19491                 if( major != DB_VERSION_MAJOR ||
19492                         minor < DB_VERSION_MINOR )
19493                 {
19494                         printf("Berkeley DB version mismatch\n"
19495                                 "\theader: %s\n\tlibrary: %s\n",
19496                                 DB_VERSION_STRING, version);
19497                         return 1;
19498                 }
19499         }
19500 #endif
19501
19502 #if DB_VERSION_MAJOR > 2
19503         db_env_create( NULL, 0 );
19504 #elif DB_VERSION_MAJOR > 1
19505         db_appexit( NULL );
19506 #else
19507         (void) dbopen( NULL, 0, 0, 0, NULL);
19508 #endif
19509
19510 ; return 0; }
19511 EOF
19512 if { (eval echo configure:19513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19513   rm -rf conftest*
19514   ol_cv_db_db3=yes
19515 else
19516   echo "configure: failed program was:" >&5
19517   cat conftest.$ac_ext >&5
19518   rm -rf conftest*
19519   ol_cv_db_db3=no
19520 fi
19521 rm -f conftest*
19522
19523         LIBS="$ol_LIBS"
19524
19525 fi
19526
19527 echo "$ac_t""$ol_cv_db_db3" 1>&6
19528
19529         if test $ol_cv_db_db3 = yes ; then
19530                 ol_cv_lib_db=-ldb3
19531         fi
19532 fi
19533
19534 if test $ol_cv_lib_db = no ; then
19535         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19536 echo "configure:19537: checking for Berkeley DB link (-ldb-3)" >&5
19537 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19538   echo $ac_n "(cached) $ac_c" 1>&6
19539 else
19540   
19541         ol_DB_LIB=-ldb-3
19542         ol_LIBS=$LIBS
19543         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19544
19545         cat > conftest.$ac_ext <<EOF
19546 #line 19547 "configure"
19547 #include "confdefs.h"
19548
19549 #ifdef HAVE_DB_185_H
19550 # include <db_185.h>
19551 #else
19552 # include <db.h>
19553 #endif
19554
19555 #ifndef DB_VERSION_MAJOR
19556 # define DB_VERSION_MAJOR 1
19557 #endif
19558
19559 #ifndef NULL
19560 #define NULL ((void*)0)
19561 #endif
19562
19563 int main() {
19564
19565 #if DB_VERSION_MAJOR > 1
19566         {
19567                 char *version;
19568                 int major, minor, patch;
19569
19570                 version = db_version( &major, &minor, &patch );
19571
19572                 if( major != DB_VERSION_MAJOR ||
19573                         minor < DB_VERSION_MINOR )
19574                 {
19575                         printf("Berkeley DB version mismatch\n"
19576                                 "\theader: %s\n\tlibrary: %s\n",
19577                                 DB_VERSION_STRING, version);
19578                         return 1;
19579                 }
19580         }
19581 #endif
19582
19583 #if DB_VERSION_MAJOR > 2
19584         db_env_create( NULL, 0 );
19585 #elif DB_VERSION_MAJOR > 1
19586         db_appexit( NULL );
19587 #else
19588         (void) dbopen( NULL, 0, 0, 0, NULL);
19589 #endif
19590
19591 ; return 0; }
19592 EOF
19593 if { (eval echo configure:19594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19594   rm -rf conftest*
19595   ol_cv_db_db_3=yes
19596 else
19597   echo "configure: failed program was:" >&5
19598   cat conftest.$ac_ext >&5
19599   rm -rf conftest*
19600   ol_cv_db_db_3=no
19601 fi
19602 rm -f conftest*
19603
19604         LIBS="$ol_LIBS"
19605
19606 fi
19607
19608 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19609
19610         if test $ol_cv_db_db_3 = yes ; then
19611                 ol_cv_lib_db=-ldb-3
19612         fi
19613 fi
19614
19615 if test $ol_cv_lib_db = no ; then
19616         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19617 echo "configure:19618: checking for Berkeley DB link (-ldb2)" >&5
19618 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19619   echo $ac_n "(cached) $ac_c" 1>&6
19620 else
19621   
19622         ol_DB_LIB=-ldb2
19623         ol_LIBS=$LIBS
19624         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19625
19626         cat > conftest.$ac_ext <<EOF
19627 #line 19628 "configure"
19628 #include "confdefs.h"
19629
19630 #ifdef HAVE_DB_185_H
19631 # include <db_185.h>
19632 #else
19633 # include <db.h>
19634 #endif
19635
19636 #ifndef DB_VERSION_MAJOR
19637 # define DB_VERSION_MAJOR 1
19638 #endif
19639
19640 #ifndef NULL
19641 #define NULL ((void*)0)
19642 #endif
19643
19644 int main() {
19645
19646 #if DB_VERSION_MAJOR > 1
19647         {
19648                 char *version;
19649                 int major, minor, patch;
19650
19651                 version = db_version( &major, &minor, &patch );
19652
19653                 if( major != DB_VERSION_MAJOR ||
19654                         minor < DB_VERSION_MINOR )
19655                 {
19656                         printf("Berkeley DB version mismatch\n"
19657                                 "\theader: %s\n\tlibrary: %s\n",
19658                                 DB_VERSION_STRING, version);
19659                         return 1;
19660                 }
19661         }
19662 #endif
19663
19664 #if DB_VERSION_MAJOR > 2
19665         db_env_create( NULL, 0 );
19666 #elif DB_VERSION_MAJOR > 1
19667         db_appexit( NULL );
19668 #else
19669         (void) dbopen( NULL, 0, 0, 0, NULL);
19670 #endif
19671
19672 ; return 0; }
19673 EOF
19674 if { (eval echo configure:19675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19675   rm -rf conftest*
19676   ol_cv_db_db2=yes
19677 else
19678   echo "configure: failed program was:" >&5
19679   cat conftest.$ac_ext >&5
19680   rm -rf conftest*
19681   ol_cv_db_db2=no
19682 fi
19683 rm -f conftest*
19684
19685         LIBS="$ol_LIBS"
19686
19687 fi
19688
19689 echo "$ac_t""$ol_cv_db_db2" 1>&6
19690
19691         if test $ol_cv_db_db2 = yes ; then
19692                 ol_cv_lib_db=-ldb2
19693         fi
19694 fi
19695
19696 if test $ol_cv_lib_db = no ; then
19697         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19698 echo "configure:19699: checking for Berkeley DB link (-ldb-2)" >&5
19699 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19700   echo $ac_n "(cached) $ac_c" 1>&6
19701 else
19702   
19703         ol_DB_LIB=-ldb-2
19704         ol_LIBS=$LIBS
19705         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19706
19707         cat > conftest.$ac_ext <<EOF
19708 #line 19709 "configure"
19709 #include "confdefs.h"
19710
19711 #ifdef HAVE_DB_185_H
19712 # include <db_185.h>
19713 #else
19714 # include <db.h>
19715 #endif
19716
19717 #ifndef DB_VERSION_MAJOR
19718 # define DB_VERSION_MAJOR 1
19719 #endif
19720
19721 #ifndef NULL
19722 #define NULL ((void*)0)
19723 #endif
19724
19725 int main() {
19726
19727 #if DB_VERSION_MAJOR > 1
19728         {
19729                 char *version;
19730                 int major, minor, patch;
19731
19732                 version = db_version( &major, &minor, &patch );
19733
19734                 if( major != DB_VERSION_MAJOR ||
19735                         minor < DB_VERSION_MINOR )
19736                 {
19737                         printf("Berkeley DB version mismatch\n"
19738                                 "\theader: %s\n\tlibrary: %s\n",
19739                                 DB_VERSION_STRING, version);
19740                         return 1;
19741                 }
19742         }
19743 #endif
19744
19745 #if DB_VERSION_MAJOR > 2
19746         db_env_create( NULL, 0 );
19747 #elif DB_VERSION_MAJOR > 1
19748         db_appexit( NULL );
19749 #else
19750         (void) dbopen( NULL, 0, 0, 0, NULL);
19751 #endif
19752
19753 ; return 0; }
19754 EOF
19755 if { (eval echo configure:19756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19756   rm -rf conftest*
19757   ol_cv_db_db_2=yes
19758 else
19759   echo "configure: failed program was:" >&5
19760   cat conftest.$ac_ext >&5
19761   rm -rf conftest*
19762   ol_cv_db_db_2=no
19763 fi
19764 rm -f conftest*
19765
19766         LIBS="$ol_LIBS"
19767
19768 fi
19769
19770 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19771
19772         if test $ol_cv_db_db_2 = yes ; then
19773                 ol_cv_lib_db=-ldb-2
19774         fi
19775 fi
19776
19777 if test $ol_cv_lib_db = no ; then
19778         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19779 echo "configure:19780: checking for Berkeley DB link (-ldb1)" >&5
19780 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19781   echo $ac_n "(cached) $ac_c" 1>&6
19782 else
19783   
19784         ol_DB_LIB=-ldb1
19785         ol_LIBS=$LIBS
19786         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19787
19788         cat > conftest.$ac_ext <<EOF
19789 #line 19790 "configure"
19790 #include "confdefs.h"
19791
19792 #ifdef HAVE_DB_185_H
19793 # include <db_185.h>
19794 #else
19795 # include <db.h>
19796 #endif
19797
19798 #ifndef DB_VERSION_MAJOR
19799 # define DB_VERSION_MAJOR 1
19800 #endif
19801
19802 #ifndef NULL
19803 #define NULL ((void*)0)
19804 #endif
19805
19806 int main() {
19807
19808 #if DB_VERSION_MAJOR > 1
19809         {
19810                 char *version;
19811                 int major, minor, patch;
19812
19813                 version = db_version( &major, &minor, &patch );
19814
19815                 if( major != DB_VERSION_MAJOR ||
19816                         minor < DB_VERSION_MINOR )
19817                 {
19818                         printf("Berkeley DB version mismatch\n"
19819                                 "\theader: %s\n\tlibrary: %s\n",
19820                                 DB_VERSION_STRING, version);
19821                         return 1;
19822                 }
19823         }
19824 #endif
19825
19826 #if DB_VERSION_MAJOR > 2
19827         db_env_create( NULL, 0 );
19828 #elif DB_VERSION_MAJOR > 1
19829         db_appexit( NULL );
19830 #else
19831         (void) dbopen( NULL, 0, 0, 0, NULL);
19832 #endif
19833
19834 ; return 0; }
19835 EOF
19836 if { (eval echo configure:19837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19837   rm -rf conftest*
19838   ol_cv_db_db1=yes
19839 else
19840   echo "configure: failed program was:" >&5
19841   cat conftest.$ac_ext >&5
19842   rm -rf conftest*
19843   ol_cv_db_db1=no
19844 fi
19845 rm -f conftest*
19846
19847         LIBS="$ol_LIBS"
19848
19849 fi
19850
19851 echo "$ac_t""$ol_cv_db_db1" 1>&6
19852
19853         if test $ol_cv_db_db1 = yes ; then
19854                 ol_cv_lib_db=-ldb1
19855         fi
19856 fi
19857
19858 if test $ol_cv_lib_db = no ; then
19859         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19860 echo "configure:19861: checking for Berkeley DB link (-ldb-1)" >&5
19861 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19862   echo $ac_n "(cached) $ac_c" 1>&6
19863 else
19864   
19865         ol_DB_LIB=-ldb-1
19866         ol_LIBS=$LIBS
19867         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19868
19869         cat > conftest.$ac_ext <<EOF
19870 #line 19871 "configure"
19871 #include "confdefs.h"
19872
19873 #ifdef HAVE_DB_185_H
19874 # include <db_185.h>
19875 #else
19876 # include <db.h>
19877 #endif
19878
19879 #ifndef DB_VERSION_MAJOR
19880 # define DB_VERSION_MAJOR 1
19881 #endif
19882
19883 #ifndef NULL
19884 #define NULL ((void*)0)
19885 #endif
19886
19887 int main() {
19888
19889 #if DB_VERSION_MAJOR > 1
19890         {
19891                 char *version;
19892                 int major, minor, patch;
19893
19894                 version = db_version( &major, &minor, &patch );
19895
19896                 if( major != DB_VERSION_MAJOR ||
19897                         minor < DB_VERSION_MINOR )
19898                 {
19899                         printf("Berkeley DB version mismatch\n"
19900                                 "\theader: %s\n\tlibrary: %s\n",
19901                                 DB_VERSION_STRING, version);
19902                         return 1;
19903                 }
19904         }
19905 #endif
19906
19907 #if DB_VERSION_MAJOR > 2
19908         db_env_create( NULL, 0 );
19909 #elif DB_VERSION_MAJOR > 1
19910         db_appexit( NULL );
19911 #else
19912         (void) dbopen( NULL, 0, 0, 0, NULL);
19913 #endif
19914
19915 ; return 0; }
19916 EOF
19917 if { (eval echo configure:19918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19918   rm -rf conftest*
19919   ol_cv_db_db_1=yes
19920 else
19921   echo "configure: failed program was:" >&5
19922   cat conftest.$ac_ext >&5
19923   rm -rf conftest*
19924   ol_cv_db_db_1=no
19925 fi
19926 rm -f conftest*
19927
19928         LIBS="$ol_LIBS"
19929
19930 fi
19931
19932 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19933
19934         if test $ol_cv_db_db_1 = yes ; then
19935                 ol_cv_lib_db=-ldb-1
19936         fi
19937 fi
19938
19939
19940         if test "$ol_cv_lib_db" != no ; then
19941                 ol_cv_berkeley_db=yes
19942                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
19943 echo "configure:19944: checking for Berkeley DB version match" >&5
19944 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
19945   echo $ac_n "(cached) $ac_c" 1>&6
19946 else
19947   
19948         ol_LIBS="$LIBS"
19949         LIBS="$LTHREAD_LIBS $LIBS"
19950         if test $ol_cv_lib_db != yes ; then
19951                 LIBS="$ol_cv_lib_db $LIBS"
19952         fi
19953
19954         if test "$cross_compiling" = yes; then
19955   ol_cv_berkeley_db_version=cross
19956 else
19957   cat > conftest.$ac_ext <<EOF
19958 #line 19959 "configure"
19959 #include "confdefs.h"
19960
19961 #ifdef HAVE_DB_185_H
19962         choke me;
19963 #else
19964 #include <db.h>
19965 #endif
19966 #ifndef DB_VERSION_MAJOR
19967 # define DB_VERSION_MAJOR 1
19968 #endif
19969 #ifndef NULL
19970 #define NULL ((void *)0)
19971 #endif
19972 main()
19973 {
19974 #if DB_VERSION_MAJOR > 1
19975         char *version;
19976         int major, minor, patch;
19977
19978         version = db_version( &major, &minor, &patch );
19979
19980         if( major != DB_VERSION_MAJOR ||
19981                 minor != DB_VERSION_MINOR ||
19982                 patch != DB_VERSION_PATCH )
19983         {
19984                 printf("Berkeley DB version mismatch\n"
19985                         "\theader: %s\n\tlibrary: %s\n",
19986                         DB_VERSION_STRING, version);
19987                 return 1;
19988         }
19989 #endif
19990
19991         return 0;
19992 }
19993 EOF
19994 if { (eval echo configure:19995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
19995 then
19996   ol_cv_berkeley_db_version=yes
19997 else
19998   echo "configure: failed program was:" >&5
19999   cat conftest.$ac_ext >&5
20000   rm -fr conftest*
20001   ol_cv_berkeley_db_version=no
20002 fi
20003 rm -fr conftest*
20004 fi
20005
20006
20007         LIBS="$ol_LIBS"
20008
20009 fi
20010
20011 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
20012
20013         if test $ol_cv_berkeley_db_version = no ; then
20014                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
20015         fi
20016
20017                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
20018 echo "configure:20019: checking for Berkeley DB thread support" >&5
20019 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
20020   echo $ac_n "(cached) $ac_c" 1>&6
20021 else
20022   
20023         ol_LIBS="$LIBS"
20024         LIBS="$LTHREAD_LIBS $LIBS"
20025         if test $ol_cv_lib_db != yes ; then
20026                 LIBS="$ol_cv_lib_db $LIBS"
20027         fi
20028
20029         if test "$cross_compiling" = yes; then
20030   ol_cv_berkeley_db_thread=cross
20031 else
20032   cat > conftest.$ac_ext <<EOF
20033 #line 20034 "configure"
20034 #include "confdefs.h"
20035
20036 #ifdef HAVE_DB_185_H
20037         choke me;
20038 #else
20039 #include <db.h>
20040 #endif
20041 #ifndef NULL
20042 #define NULL ((void *)0)
20043 #endif
20044 main()
20045 {
20046         int rc;
20047         u_int32_t flags = DB_CREATE |
20048 #ifdef DB_PRIVATE
20049                 DB_PRIVATE |
20050 #endif
20051                 DB_THREAD;
20052
20053 #if DB_VERSION_MAJOR > 2
20054         DB_ENV *env = NULL;
20055
20056         rc = db_env_create( &env, 0 );
20057
20058         flags |= DB_INIT_MPOOL;
20059 #ifdef DB_MPOOL_PRIVATE
20060         flags |= DB_MPOOL_PRIVATE;
20061 #endif
20062
20063         if( rc ) {
20064                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20065                 return rc;
20066         }
20067
20068 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20069         rc = env->open( env, NULL, flags, 0 );
20070 #else
20071         rc = env->open( env, NULL, NULL, flags, 0 );
20072 #endif
20073
20074         if ( rc == 0 ) {
20075                 rc = env->close( env, 0 );
20076         }
20077
20078         if( rc ) {
20079                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20080                 return rc;
20081         }
20082
20083 #else
20084         DB_ENV env;
20085         memset( &env, '\0', sizeof(env) );
20086
20087         rc = db_appinit( NULL, NULL, &env, flags );
20088
20089         if( rc == 0 ) {
20090                 db_appexit( &env );
20091         }
20092
20093         unlink("__db_mpool.share");
20094         unlink("__db_lock.share");
20095 #endif
20096
20097         return rc;
20098 }
20099 EOF
20100 if { (eval echo configure:20101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20101 then
20102   ol_cv_berkeley_db_thread=yes
20103 else
20104   echo "configure: failed program was:" >&5
20105   cat conftest.$ac_ext >&5
20106   rm -fr conftest*
20107   ol_cv_berkeley_db_thread=no
20108 fi
20109 rm -fr conftest*
20110 fi
20111
20112
20113         LIBS="$ol_LIBS"
20114
20115 fi
20116
20117 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20118
20119         if test $ol_cv_berkeley_db_thread != no ; then
20120                 cat >> confdefs.h <<\EOF
20121 #define HAVE_BERKELEY_DB_THREAD 1
20122 EOF
20123
20124         fi
20125
20126         fi
20127 fi
20128
20129         fi
20130
20131         if test $ol_cv_berkeley_db != no ; then
20132                 cat >> confdefs.h <<\EOF
20133 #define HAVE_BERKELEY_DB 1
20134 EOF
20135
20136
20137                 ol_link_ldbm=berkeley
20138                 ol_with_ldbm_api=berkeley
20139
20140                 if test $ol_with_ldbm_type = hash ; then
20141                         cat >> confdefs.h <<\EOF
20142 #define LDBM_USE_DBHASH 1
20143 EOF
20144
20145                 else
20146                         cat >> confdefs.h <<\EOF
20147 #define LDBM_USE_DBBTREE 1
20148 EOF
20149
20150                 fi
20151
20152                                                 if test $ol_cv_lib_db != yes ; then
20153                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20154                 fi
20155         fi
20156 fi
20157
20158 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20159         if test $ol_link_ldbm != berkeley ; then
20160                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20161         else
20162                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20163 echo "configure:20164: checking Berkeley DB version for BDB backend" >&5
20164 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20165   echo $ac_n "(cached) $ac_c" 1>&6
20166 else
20167   
20168         cat > conftest.$ac_ext <<EOF
20169 #line 20170 "configure"
20170 #include "confdefs.h"
20171
20172 #include <db.h>
20173
20174  /* this check could be improved */
20175 #ifndef DB_VERSION_MAJOR
20176 #       define DB_VERSION_MAJOR 1
20177 #endif
20178 #ifndef DB_VERSION_MINOR
20179 #       define DB_VERSION_MINOR 0
20180 #endif
20181
20182 /* require 4.2 or later */
20183 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20184         __db_version_compat
20185 #endif
20186         
20187 EOF
20188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20189   egrep "__db_version_compat" >/dev/null 2>&1; then
20190   rm -rf conftest*
20191   ol_cv_bdb_compat=yes
20192 else
20193   rm -rf conftest*
20194   ol_cv_bdb_compat=no
20195 fi
20196 rm -f conftest*
20197
20198 fi
20199
20200 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20201
20202
20203                 if test $ol_cv_bdb_compat != yes ; then
20204                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20205                 fi
20206         fi
20207 fi
20208
20209 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20210         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20211         ol_with_ldbm_api=none
20212 fi
20213
20214 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20215         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20216 echo "configure:20217: checking for MDBM library" >&5
20217 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20218   echo $ac_n "(cached) $ac_c" 1>&6
20219 else
20220         ol_LIBS="$LIBS"
20221         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20222 echo "configure:20223: checking for mdbm_set_chain" >&5
20223 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20224   echo $ac_n "(cached) $ac_c" 1>&6
20225 else
20226   cat > conftest.$ac_ext <<EOF
20227 #line 20228 "configure"
20228 #include "confdefs.h"
20229 /* System header to define __stub macros and hopefully few prototypes,
20230     which can conflict with char mdbm_set_chain(); below.  */
20231 #include <assert.h>
20232 /* Override any gcc2 internal prototype to avoid an error.  */
20233 /* We use char because int might match the return type of a gcc2
20234     builtin and then its argument prototype would still apply.  */
20235 char mdbm_set_chain();
20236 char (*f)();
20237
20238 int main() {
20239
20240 /* The GNU C library defines this for functions which it implements
20241     to always fail with ENOSYS.  Some functions are actually named
20242     something starting with __ and the normal name is an alias.  */
20243 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20244 choke me
20245 #else
20246 f = mdbm_set_chain;
20247 #endif
20248
20249 ; return 0; }
20250 EOF
20251 if { (eval echo configure:20252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20252   rm -rf conftest*
20253   eval "ac_cv_func_mdbm_set_chain=yes"
20254 else
20255   echo "configure: failed program was:" >&5
20256   cat conftest.$ac_ext >&5
20257   rm -rf conftest*
20258   eval "ac_cv_func_mdbm_set_chain=no"
20259 fi
20260 rm -f conftest*
20261 fi
20262
20263 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20264   echo "$ac_t""yes" 1>&6
20265   ol_cv_lib_mdbm=yes
20266 else
20267   echo "$ac_t""no" 1>&6
20268
20269                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20270 echo "configure:20271: checking for mdbm_set_chain in -lmdbm" >&5
20271 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20272 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20273   echo $ac_n "(cached) $ac_c" 1>&6
20274 else
20275   ac_save_LIBS="$LIBS"
20276 LIBS="-lmdbm  $LIBS"
20277 cat > conftest.$ac_ext <<EOF
20278 #line 20279 "configure"
20279 #include "confdefs.h"
20280 /* Override any gcc2 internal prototype to avoid an error.  */
20281 /* We use char because int might match the return type of a gcc2
20282     builtin and then its argument prototype would still apply.  */
20283 char mdbm_set_chain();
20284
20285 int main() {
20286 mdbm_set_chain()
20287 ; return 0; }
20288 EOF
20289 if { (eval echo configure:20290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20290   rm -rf conftest*
20291   eval "ac_cv_lib_$ac_lib_var=yes"
20292 else
20293   echo "configure: failed program was:" >&5
20294   cat conftest.$ac_ext >&5
20295   rm -rf conftest*
20296   eval "ac_cv_lib_$ac_lib_var=no"
20297 fi
20298 rm -f conftest*
20299 LIBS="$ac_save_LIBS"
20300
20301 fi
20302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20303   echo "$ac_t""yes" 1>&6
20304   ol_cv_lib_mdbm=-lmdbm
20305 else
20306   echo "$ac_t""no" 1>&6
20307 ol_cv_lib_mdbm=no
20308 fi
20309
20310         
20311 fi
20312
20313         LIBS="$ol_LIBS"
20314
20315 fi
20316
20317 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20318
20319
20320  for ac_hdr in mdbm.h
20321 do
20322 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20323 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20324 echo "configure:20325: checking for $ac_hdr" >&5
20325 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20326   echo $ac_n "(cached) $ac_c" 1>&6
20327 else
20328   cat > conftest.$ac_ext <<EOF
20329 #line 20330 "configure"
20330 #include "confdefs.h"
20331 #include <$ac_hdr>
20332 EOF
20333 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20334 { (eval echo configure:20335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20335 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20336 if test -z "$ac_err"; then
20337   rm -rf conftest*
20338   eval "ac_cv_header_$ac_safe=yes"
20339 else
20340   echo "$ac_err" >&5
20341   echo "configure: failed program was:" >&5
20342   cat conftest.$ac_ext >&5
20343   rm -rf conftest*
20344   eval "ac_cv_header_$ac_safe=no"
20345 fi
20346 rm -f conftest*
20347 fi
20348 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20349   echo "$ac_t""yes" 1>&6
20350     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20351   cat >> confdefs.h <<EOF
20352 #define $ac_tr_hdr 1
20353 EOF
20354  
20355 else
20356   echo "$ac_t""no" 1>&6
20357 fi
20358 done
20359
20360  echo $ac_n "checking for db""... $ac_c" 1>&6
20361 echo "configure:20362: checking for db" >&5
20362 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20363   echo $ac_n "(cached) $ac_c" 1>&6
20364 else
20365   
20366         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20367                 ol_cv_mdbm=no
20368         else
20369                 ol_cv_mdbm=yes
20370         fi
20371
20372 fi
20373
20374 echo "$ac_t""$ol_cv_mdbm" 1>&6
20375  if test $ol_cv_mdbm = yes ; then
20376         cat >> confdefs.h <<\EOF
20377 #define HAVE_MDBM 1
20378 EOF
20379
20380  fi
20381
20382
20383         if test $ol_cv_mdbm = yes ; then
20384                 ol_link_ldbm=mdbm
20385                 ol_with_ldbm_api=mdbm
20386                 if test $ol_cv_lib_mdbm != yes ; then
20387                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20388                 fi
20389         fi
20390 fi
20391
20392 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20393         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20394 echo "configure:20395: checking for GDBM library" >&5
20395 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20396   echo $ac_n "(cached) $ac_c" 1>&6
20397 else
20398         ol_LIBS="$LIBS"
20399         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20400 echo "configure:20401: checking for gdbm_open" >&5
20401 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20402   echo $ac_n "(cached) $ac_c" 1>&6
20403 else
20404   cat > conftest.$ac_ext <<EOF
20405 #line 20406 "configure"
20406 #include "confdefs.h"
20407 /* System header to define __stub macros and hopefully few prototypes,
20408     which can conflict with char gdbm_open(); below.  */
20409 #include <assert.h>
20410 /* Override any gcc2 internal prototype to avoid an error.  */
20411 /* We use char because int might match the return type of a gcc2
20412     builtin and then its argument prototype would still apply.  */
20413 char gdbm_open();
20414 char (*f)();
20415
20416 int main() {
20417
20418 /* The GNU C library defines this for functions which it implements
20419     to always fail with ENOSYS.  Some functions are actually named
20420     something starting with __ and the normal name is an alias.  */
20421 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20422 choke me
20423 #else
20424 f = gdbm_open;
20425 #endif
20426
20427 ; return 0; }
20428 EOF
20429 if { (eval echo configure:20430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20430   rm -rf conftest*
20431   eval "ac_cv_func_gdbm_open=yes"
20432 else
20433   echo "configure: failed program was:" >&5
20434   cat conftest.$ac_ext >&5
20435   rm -rf conftest*
20436   eval "ac_cv_func_gdbm_open=no"
20437 fi
20438 rm -f conftest*
20439 fi
20440
20441 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20442   echo "$ac_t""yes" 1>&6
20443   ol_cv_lib_gdbm=yes
20444 else
20445   echo "$ac_t""no" 1>&6
20446
20447                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20448 echo "configure:20449: checking for gdbm_open in -lgdbm" >&5
20449 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20450 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20451   echo $ac_n "(cached) $ac_c" 1>&6
20452 else
20453   ac_save_LIBS="$LIBS"
20454 LIBS="-lgdbm  $LIBS"
20455 cat > conftest.$ac_ext <<EOF
20456 #line 20457 "configure"
20457 #include "confdefs.h"
20458 /* Override any gcc2 internal prototype to avoid an error.  */
20459 /* We use char because int might match the return type of a gcc2
20460     builtin and then its argument prototype would still apply.  */
20461 char gdbm_open();
20462
20463 int main() {
20464 gdbm_open()
20465 ; return 0; }
20466 EOF
20467 if { (eval echo configure:20468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20468   rm -rf conftest*
20469   eval "ac_cv_lib_$ac_lib_var=yes"
20470 else
20471   echo "configure: failed program was:" >&5
20472   cat conftest.$ac_ext >&5
20473   rm -rf conftest*
20474   eval "ac_cv_lib_$ac_lib_var=no"
20475 fi
20476 rm -f conftest*
20477 LIBS="$ac_save_LIBS"
20478
20479 fi
20480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20481   echo "$ac_t""yes" 1>&6
20482   ol_cv_lib_gdbm=-lgdbm
20483 else
20484   echo "$ac_t""no" 1>&6
20485 ol_cv_lib_gdbm=no
20486 fi
20487
20488         
20489 fi
20490
20491         LIBS="$ol_LIBS"
20492
20493 fi
20494
20495 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20496
20497
20498  for ac_hdr in gdbm.h
20499 do
20500 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20501 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20502 echo "configure:20503: checking for $ac_hdr" >&5
20503 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20504   echo $ac_n "(cached) $ac_c" 1>&6
20505 else
20506   cat > conftest.$ac_ext <<EOF
20507 #line 20508 "configure"
20508 #include "confdefs.h"
20509 #include <$ac_hdr>
20510 EOF
20511 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20512 { (eval echo configure:20513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20513 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20514 if test -z "$ac_err"; then
20515   rm -rf conftest*
20516   eval "ac_cv_header_$ac_safe=yes"
20517 else
20518   echo "$ac_err" >&5
20519   echo "configure: failed program was:" >&5
20520   cat conftest.$ac_ext >&5
20521   rm -rf conftest*
20522   eval "ac_cv_header_$ac_safe=no"
20523 fi
20524 rm -f conftest*
20525 fi
20526 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20527   echo "$ac_t""yes" 1>&6
20528     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20529   cat >> confdefs.h <<EOF
20530 #define $ac_tr_hdr 1
20531 EOF
20532  
20533 else
20534   echo "$ac_t""no" 1>&6
20535 fi
20536 done
20537
20538  echo $ac_n "checking for db""... $ac_c" 1>&6
20539 echo "configure:20540: checking for db" >&5
20540 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20541   echo $ac_n "(cached) $ac_c" 1>&6
20542 else
20543   
20544         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20545                 ol_cv_gdbm=no
20546         else
20547                 ol_cv_gdbm=yes
20548         fi
20549
20550 fi
20551
20552 echo "$ac_t""$ol_cv_gdbm" 1>&6
20553  if test $ol_cv_gdbm = yes ; then
20554         cat >> confdefs.h <<\EOF
20555 #define HAVE_GDBM 1
20556 EOF
20557
20558  fi
20559
20560
20561         if test $ol_cv_gdbm = yes ; then
20562                 ol_link_ldbm=gdbm
20563                 ol_with_ldbm_api=gdbm
20564
20565                 if test $ol_cv_lib_gdbm != yes ; then
20566                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20567                 fi
20568         fi
20569 fi
20570
20571 if test $ol_with_ldbm_api = ndbm ; then
20572         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20573 echo "configure:20574: checking for NDBM library" >&5
20574 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20575   echo $ac_n "(cached) $ac_c" 1>&6
20576 else
20577         ol_LIBS="$LIBS"
20578         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20579 echo "configure:20580: checking for dbm_open" >&5
20580 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20581   echo $ac_n "(cached) $ac_c" 1>&6
20582 else
20583   cat > conftest.$ac_ext <<EOF
20584 #line 20585 "configure"
20585 #include "confdefs.h"
20586 /* System header to define __stub macros and hopefully few prototypes,
20587     which can conflict with char dbm_open(); below.  */
20588 #include <assert.h>
20589 /* Override any gcc2 internal prototype to avoid an error.  */
20590 /* We use char because int might match the return type of a gcc2
20591     builtin and then its argument prototype would still apply.  */
20592 char dbm_open();
20593 char (*f)();
20594
20595 int main() {
20596
20597 /* The GNU C library defines this for functions which it implements
20598     to always fail with ENOSYS.  Some functions are actually named
20599     something starting with __ and the normal name is an alias.  */
20600 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20601 choke me
20602 #else
20603 f = dbm_open;
20604 #endif
20605
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_func_dbm_open=yes"
20611 else
20612   echo "configure: failed program was:" >&5
20613   cat conftest.$ac_ext >&5
20614   rm -rf conftest*
20615   eval "ac_cv_func_dbm_open=no"
20616 fi
20617 rm -f conftest*
20618 fi
20619
20620 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20621   echo "$ac_t""yes" 1>&6
20622   ol_cv_lib_ndbm=yes
20623 else
20624   echo "$ac_t""no" 1>&6
20625
20626                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20627 echo "configure:20628: checking for dbm_open in -lndbm" >&5
20628 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20629 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20630   echo $ac_n "(cached) $ac_c" 1>&6
20631 else
20632   ac_save_LIBS="$LIBS"
20633 LIBS="-lndbm  $LIBS"
20634 cat > conftest.$ac_ext <<EOF
20635 #line 20636 "configure"
20636 #include "confdefs.h"
20637 /* Override any gcc2 internal prototype to avoid an error.  */
20638 /* We use char because int might match the return type of a gcc2
20639     builtin and then its argument prototype would still apply.  */
20640 char dbm_open();
20641
20642 int main() {
20643 dbm_open()
20644 ; return 0; }
20645 EOF
20646 if { (eval echo configure:20647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20647   rm -rf conftest*
20648   eval "ac_cv_lib_$ac_lib_var=yes"
20649 else
20650   echo "configure: failed program was:" >&5
20651   cat conftest.$ac_ext >&5
20652   rm -rf conftest*
20653   eval "ac_cv_lib_$ac_lib_var=no"
20654 fi
20655 rm -f conftest*
20656 LIBS="$ac_save_LIBS"
20657
20658 fi
20659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20660   echo "$ac_t""yes" 1>&6
20661   ol_cv_lib_ndbm=-lndbm
20662 else
20663   echo "$ac_t""no" 1>&6
20664
20665                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20666 echo "configure:20667: checking for dbm_open in -ldbm" >&5
20667 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20668 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20669   echo $ac_n "(cached) $ac_c" 1>&6
20670 else
20671   ac_save_LIBS="$LIBS"
20672 LIBS="-ldbm  $LIBS"
20673 cat > conftest.$ac_ext <<EOF
20674 #line 20675 "configure"
20675 #include "confdefs.h"
20676 /* Override any gcc2 internal prototype to avoid an error.  */
20677 /* We use char because int might match the return type of a gcc2
20678     builtin and then its argument prototype would still apply.  */
20679 char dbm_open();
20680
20681 int main() {
20682 dbm_open()
20683 ; return 0; }
20684 EOF
20685 if { (eval echo configure:20686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20686   rm -rf conftest*
20687   eval "ac_cv_lib_$ac_lib_var=yes"
20688 else
20689   echo "configure: failed program was:" >&5
20690   cat conftest.$ac_ext >&5
20691   rm -rf conftest*
20692   eval "ac_cv_lib_$ac_lib_var=no"
20693 fi
20694 rm -f conftest*
20695 LIBS="$ac_save_LIBS"
20696
20697 fi
20698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20699   echo "$ac_t""yes" 1>&6
20700   ol_cv_lib_ndbm=-ldbm
20701 else
20702   echo "$ac_t""no" 1>&6
20703 ol_cv_lib_ndbm=no
20704 fi
20705                 
20706 fi
20707
20708         
20709 fi
20710
20711         LIBS="$ol_LIBS"
20712
20713 fi
20714
20715 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20716
20717
20718  for ac_hdr in ndbm.h
20719 do
20720 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20721 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20722 echo "configure:20723: checking for $ac_hdr" >&5
20723 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20724   echo $ac_n "(cached) $ac_c" 1>&6
20725 else
20726   cat > conftest.$ac_ext <<EOF
20727 #line 20728 "configure"
20728 #include "confdefs.h"
20729 #include <$ac_hdr>
20730 EOF
20731 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20732 { (eval echo configure:20733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20733 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20734 if test -z "$ac_err"; then
20735   rm -rf conftest*
20736   eval "ac_cv_header_$ac_safe=yes"
20737 else
20738   echo "$ac_err" >&5
20739   echo "configure: failed program was:" >&5
20740   cat conftest.$ac_ext >&5
20741   rm -rf conftest*
20742   eval "ac_cv_header_$ac_safe=no"
20743 fi
20744 rm -f conftest*
20745 fi
20746 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20747   echo "$ac_t""yes" 1>&6
20748     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20749   cat >> confdefs.h <<EOF
20750 #define $ac_tr_hdr 1
20751 EOF
20752  
20753 else
20754   echo "$ac_t""no" 1>&6
20755 fi
20756 done
20757
20758  echo $ac_n "checking for db""... $ac_c" 1>&6
20759 echo "configure:20760: checking for db" >&5
20760 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20761   echo $ac_n "(cached) $ac_c" 1>&6
20762 else
20763   
20764         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20765                 ol_cv_ndbm=no
20766         else
20767                 ol_cv_ndbm=yes
20768         fi
20769
20770 fi
20771
20772 echo "$ac_t""$ol_cv_ndbm" 1>&6
20773  if test $ol_cv_ndbm = yes ; then
20774         cat >> confdefs.h <<\EOF
20775 #define HAVE_NDBM 1
20776 EOF
20777
20778  fi
20779
20780
20781         if test $ol_cv_ndbm = yes ; then
20782                 ol_link_ldbm=ndbm
20783                 ol_with_ldbm_api=ndbm
20784
20785                 if test $ol_cv_lib_ndbm != yes ; then
20786                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20787                 fi
20788         fi
20789 fi
20790
20791 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20792         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20793         if test $ol_enable_ldbm = yes ; then
20794                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20795         fi
20796
20797         echo "configure: warning: disabling LDBM" 1>&2
20798         ol_enable_ldbm=no
20799 fi
20800
20801 if test $ol_enable_bdb = yes -o \
20802         $ol_enable_hdb = yes -o \
20803         $ol_enable_ldbm = yes ; then
20804         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
20805 fi
20806
20807
20808 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20809         BUILD_LIBS_DYNAMIC=shared
20810         cat >> confdefs.h <<\EOF
20811 #define LDAP_LIBS_DYNAMIC 1
20812 EOF
20813
20814         LTSTATIC=""
20815 else
20816         BUILD_LIBS_DYNAMIC=static
20817         LTSTATIC="-static"
20818 fi
20819
20820 if test $ol_enable_wrappers != no ; then
20821         for ac_hdr in tcpd.h
20822 do
20823 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20824 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20825 echo "configure:20826: checking for $ac_hdr" >&5
20826 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20827   echo $ac_n "(cached) $ac_c" 1>&6
20828 else
20829   cat > conftest.$ac_ext <<EOF
20830 #line 20831 "configure"
20831 #include "confdefs.h"
20832 #include <$ac_hdr>
20833 EOF
20834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20835 { (eval echo configure:20836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20837 if test -z "$ac_err"; then
20838   rm -rf conftest*
20839   eval "ac_cv_header_$ac_safe=yes"
20840 else
20841   echo "$ac_err" >&5
20842   echo "configure: failed program was:" >&5
20843   cat conftest.$ac_ext >&5
20844   rm -rf conftest*
20845   eval "ac_cv_header_$ac_safe=no"
20846 fi
20847 rm -f conftest*
20848 fi
20849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20850   echo "$ac_t""yes" 1>&6
20851     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20852   cat >> confdefs.h <<EOF
20853 #define $ac_tr_hdr 1
20854 EOF
20855  
20856                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20857 echo "configure:20858: checking for TCP wrappers library" >&5
20858                 save_LIBS="$LIBS"
20859                 LIBS="$LIBS -lwrap"
20860                 cat > conftest.$ac_ext <<EOF
20861 #line 20862 "configure"
20862 #include "confdefs.h"
20863
20864 #include <tcpd.h>
20865 int allow_severity = 0;
20866 int deny_severity  = 0;
20867
20868 struct request_info *req;
20869                 
20870 int main() {
20871
20872 hosts_access(req)
20873                 
20874 ; return 0; }
20875 EOF
20876 if { (eval echo configure:20877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20877   rm -rf conftest*
20878   echo "$ac_t""-lwrap" 1>&6
20879                 have_wrappers=yes
20880                 LIBS="$save_LIBS"
20881 else
20882   echo "configure: failed program was:" >&5
20883   cat conftest.$ac_ext >&5
20884   rm -rf conftest*
20885   
20886                                 LIBS="$LIBS -lnsl"
20887                 cat > conftest.$ac_ext <<EOF
20888 #line 20889 "configure"
20889 #include "confdefs.h"
20890
20891 #include <tcpd.h>
20892 int allow_severity = 0;
20893 int deny_severity  = 0;
20894
20895 struct request_info *req;
20896                 
20897 int main() {
20898
20899 hosts_access(req)
20900                 
20901 ; return 0; }
20902 EOF
20903 if { (eval echo configure:20904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20904   rm -rf conftest*
20905   echo "$ac_t""-lwrap -lnsl" 1>&6
20906                 have_wrappers=yes
20907                 LIBS="$save_LIBS -lnsl"
20908 else
20909   echo "configure: failed program was:" >&5
20910   cat conftest.$ac_ext >&5
20911   rm -rf conftest*
20912   
20913                 echo "$ac_t""no" 1>&6
20914                 have_wrappers=no
20915                 LIBS=$save_LIBS
20916 fi
20917 rm -f conftest*
20918 fi
20919 rm -f conftest*
20920 else
20921   echo "$ac_t""no" 1>&6
20922 have_wrappers=no
20923 fi
20924 done
20925
20926
20927         if test $have_wrappers = yes ; then
20928                 cat >> confdefs.h <<\EOF
20929 #define HAVE_TCPD 1
20930 EOF
20931
20932                 WRAP_LIBS="-lwrap"
20933         elif test $ol_enable_wrappers = yes ; then
20934                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20935         else
20936                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20937                 WRAP_LIBS=""
20938         fi
20939 fi
20940
20941 if test $ol_enable_syslog != no ; then
20942         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20943 echo "configure:20944: checking for openlog" >&5
20944 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20945   echo $ac_n "(cached) $ac_c" 1>&6
20946 else
20947   cat > conftest.$ac_ext <<EOF
20948 #line 20949 "configure"
20949 #include "confdefs.h"
20950 /* System header to define __stub macros and hopefully few prototypes,
20951     which can conflict with char openlog(); below.  */
20952 #include <assert.h>
20953 /* Override any gcc2 internal prototype to avoid an error.  */
20954 /* We use char because int might match the return type of a gcc2
20955     builtin and then its argument prototype would still apply.  */
20956 char openlog();
20957 char (*f)();
20958
20959 int main() {
20960
20961 /* The GNU C library defines this for functions which it implements
20962     to always fail with ENOSYS.  Some functions are actually named
20963     something starting with __ and the normal name is an alias.  */
20964 #if defined (__stub_openlog) || defined (__stub___openlog)
20965 choke me
20966 #else
20967 f = openlog;
20968 #endif
20969
20970 ; return 0; }
20971 EOF
20972 if { (eval echo configure:20973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20973   rm -rf conftest*
20974   eval "ac_cv_func_openlog=yes"
20975 else
20976   echo "configure: failed program was:" >&5
20977   cat conftest.$ac_ext >&5
20978   rm -rf conftest*
20979   eval "ac_cv_func_openlog=no"
20980 fi
20981 rm -f conftest*
20982 fi
20983
20984 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20985   echo "$ac_t""yes" 1>&6
20986   :
20987 else
20988   echo "$ac_t""no" 1>&6
20989 fi
20990
20991         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20992                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20993         fi
20994         ol_enable_syslog=$ac_cv_func_openlog
20995 fi
20996
20997
20998 ol_link_sql=no
20999 if test $ol_enable_sql != no ; then
21000         for ac_hdr in sql.h sqlext.h
21001 do
21002 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21003 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21004 echo "configure:21005: checking for $ac_hdr" >&5
21005 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21006   echo $ac_n "(cached) $ac_c" 1>&6
21007 else
21008   cat > conftest.$ac_ext <<EOF
21009 #line 21010 "configure"
21010 #include "confdefs.h"
21011 #include <$ac_hdr>
21012 EOF
21013 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21014 { (eval echo configure:21015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21015 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21016 if test -z "$ac_err"; then
21017   rm -rf conftest*
21018   eval "ac_cv_header_$ac_safe=yes"
21019 else
21020   echo "$ac_err" >&5
21021   echo "configure: failed program was:" >&5
21022   cat conftest.$ac_ext >&5
21023   rm -rf conftest*
21024   eval "ac_cv_header_$ac_safe=no"
21025 fi
21026 rm -f conftest*
21027 fi
21028 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21029   echo "$ac_t""yes" 1>&6
21030     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21031   cat >> confdefs.h <<EOF
21032 #define $ac_tr_hdr 1
21033 EOF
21034  
21035 else
21036   echo "$ac_t""no" 1>&6
21037 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21038         
21039 fi
21040 done
21041
21042
21043         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21044 echo "configure:21045: checking for SQLDriverConnect in -liodbc" >&5
21045 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21046 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21047   echo $ac_n "(cached) $ac_c" 1>&6
21048 else
21049   ac_save_LIBS="$LIBS"
21050 LIBS="-liodbc  $LIBS"
21051 cat > conftest.$ac_ext <<EOF
21052 #line 21053 "configure"
21053 #include "confdefs.h"
21054 /* Override any gcc2 internal prototype to avoid an error.  */
21055 /* We use char because int might match the return type of a gcc2
21056     builtin and then its argument prototype would still apply.  */
21057 char SQLDriverConnect();
21058
21059 int main() {
21060 SQLDriverConnect()
21061 ; return 0; }
21062 EOF
21063 if { (eval echo configure:21064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21064   rm -rf conftest*
21065   eval "ac_cv_lib_$ac_lib_var=yes"
21066 else
21067   echo "configure: failed program was:" >&5
21068   cat conftest.$ac_ext >&5
21069   rm -rf conftest*
21070   eval "ac_cv_lib_$ac_lib_var=no"
21071 fi
21072 rm -f conftest*
21073 LIBS="$ac_save_LIBS"
21074
21075 fi
21076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21077   echo "$ac_t""yes" 1>&6
21078   have_iodbc=yes
21079 else
21080   echo "$ac_t""no" 1>&6
21081 have_iodbc=no
21082 fi
21083
21084         if test $have_iodbc = yes ; then
21085                 ol_link_sql="-liodbc"
21086         else
21087                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21088 echo "configure:21089: checking for SQLDriverConnect in -lodbc" >&5
21089 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21090 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21091   echo $ac_n "(cached) $ac_c" 1>&6
21092 else
21093   ac_save_LIBS="$LIBS"
21094 LIBS="-lodbc  $LIBS"
21095 cat > conftest.$ac_ext <<EOF
21096 #line 21097 "configure"
21097 #include "confdefs.h"
21098 /* Override any gcc2 internal prototype to avoid an error.  */
21099 /* We use char because int might match the return type of a gcc2
21100     builtin and then its argument prototype would still apply.  */
21101 char SQLDriverConnect();
21102
21103 int main() {
21104 SQLDriverConnect()
21105 ; return 0; }
21106 EOF
21107 if { (eval echo configure:21108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21108   rm -rf conftest*
21109   eval "ac_cv_lib_$ac_lib_var=yes"
21110 else
21111   echo "configure: failed program was:" >&5
21112   cat conftest.$ac_ext >&5
21113   rm -rf conftest*
21114   eval "ac_cv_lib_$ac_lib_var=no"
21115 fi
21116 rm -f conftest*
21117 LIBS="$ac_save_LIBS"
21118
21119 fi
21120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21121   echo "$ac_t""yes" 1>&6
21122   have_odbc=yes
21123 else
21124   echo "$ac_t""no" 1>&6
21125 have_odbc=no
21126 fi
21127
21128                 if test $have_odbc = yes ; then
21129                         ol_link_sql="-lodbc"
21130                 fi
21131         fi
21132
21133         if test $ol_link_sql != no ; then
21134                 SLAPD_SQL_LIBS="$ol_link_sql"
21135
21136         elif test $ol_enable_sql != auto ; then
21137                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21138         fi
21139 fi
21140
21141 ol_link_sasl=no
21142 ol_link_spasswd=no
21143 if test $ol_with_cyrus_sasl != no ; then
21144         for ac_hdr in sasl/sasl.h sasl.h
21145 do
21146 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21147 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21148 echo "configure:21149: checking for $ac_hdr" >&5
21149 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21150   echo $ac_n "(cached) $ac_c" 1>&6
21151 else
21152   cat > conftest.$ac_ext <<EOF
21153 #line 21154 "configure"
21154 #include "confdefs.h"
21155 #include <$ac_hdr>
21156 EOF
21157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21158 { (eval echo configure:21159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21160 if test -z "$ac_err"; then
21161   rm -rf conftest*
21162   eval "ac_cv_header_$ac_safe=yes"
21163 else
21164   echo "$ac_err" >&5
21165   echo "configure: failed program was:" >&5
21166   cat conftest.$ac_ext >&5
21167   rm -rf conftest*
21168   eval "ac_cv_header_$ac_safe=no"
21169 fi
21170 rm -f conftest*
21171 fi
21172 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21173   echo "$ac_t""yes" 1>&6
21174     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21175   cat >> confdefs.h <<EOF
21176 #define $ac_tr_hdr 1
21177 EOF
21178  
21179 else
21180   echo "$ac_t""no" 1>&6
21181 fi
21182 done
21183
21184
21185         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21186                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21187 echo "configure:21188: checking for sasl_client_init in -lsasl2" >&5
21188 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21189 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21190   echo $ac_n "(cached) $ac_c" 1>&6
21191 else
21192   ac_save_LIBS="$LIBS"
21193 LIBS="-lsasl2  $LIBS"
21194 cat > conftest.$ac_ext <<EOF
21195 #line 21196 "configure"
21196 #include "confdefs.h"
21197 /* Override any gcc2 internal prototype to avoid an error.  */
21198 /* We use char because int might match the return type of a gcc2
21199     builtin and then its argument prototype would still apply.  */
21200 char sasl_client_init();
21201
21202 int main() {
21203 sasl_client_init()
21204 ; return 0; }
21205 EOF
21206 if { (eval echo configure:21207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21207   rm -rf conftest*
21208   eval "ac_cv_lib_$ac_lib_var=yes"
21209 else
21210   echo "configure: failed program was:" >&5
21211   cat conftest.$ac_ext >&5
21212   rm -rf conftest*
21213   eval "ac_cv_lib_$ac_lib_var=no"
21214 fi
21215 rm -f conftest*
21216 LIBS="$ac_save_LIBS"
21217
21218 fi
21219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21220   echo "$ac_t""yes" 1>&6
21221   ol_link_sasl="-lsasl2"
21222 else
21223   echo "$ac_t""no" 1>&6
21224 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21225 echo "configure:21226: checking for sasl_client_init in -lsasl" >&5
21226 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21227 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21228   echo $ac_n "(cached) $ac_c" 1>&6
21229 else
21230   ac_save_LIBS="$LIBS"
21231 LIBS="-lsasl  $LIBS"
21232 cat > conftest.$ac_ext <<EOF
21233 #line 21234 "configure"
21234 #include "confdefs.h"
21235 /* Override any gcc2 internal prototype to avoid an error.  */
21236 /* We use char because int might match the return type of a gcc2
21237     builtin and then its argument prototype would still apply.  */
21238 char sasl_client_init();
21239
21240 int main() {
21241 sasl_client_init()
21242 ; return 0; }
21243 EOF
21244 if { (eval echo configure:21245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21245   rm -rf conftest*
21246   eval "ac_cv_lib_$ac_lib_var=yes"
21247 else
21248   echo "configure: failed program was:" >&5
21249   cat conftest.$ac_ext >&5
21250   rm -rf conftest*
21251   eval "ac_cv_lib_$ac_lib_var=no"
21252 fi
21253 rm -f conftest*
21254 LIBS="$ac_save_LIBS"
21255
21256 fi
21257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21258   echo "$ac_t""yes" 1>&6
21259   ol_link_sasl="-lsasl"
21260 else
21261   echo "$ac_t""no" 1>&6
21262 fi
21263
21264 fi
21265
21266         fi
21267
21268         if test $ol_link_sasl = no ; then
21269                 if test $ol_with_cyrus_sasl != auto ; then
21270                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21271                 else
21272                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21273                         echo "configure: warning: SASL authentication not supported!" 1>&2
21274                         if test $ol_link_tls = no ; then
21275                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21276                         fi
21277                 fi
21278         else
21279                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21280 echo "configure:21281: checking Cyrus SASL library version" >&5
21281 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21282   echo $ac_n "(cached) $ac_c" 1>&6
21283 else
21284   
21285         cat > conftest.$ac_ext <<EOF
21286 #line 21287 "configure"
21287 #include "confdefs.h"
21288
21289 #ifdef HAVE_SASL_SASL_H
21290 #include <sasl/sasl.h>
21291 #else
21292 #include <sasl.h>
21293 #endif
21294
21295 /* Require 2.1.15+ */
21296 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21297         char *__sasl_compat = "2.2+ or better okay (we guess)";
21298 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21299         && SASL_VERSION_STEP >=15
21300         char *__sasl_compat = "2.1.15+ or better okay";
21301 #endif
21302         
21303 EOF
21304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21305   egrep "__sasl_compat" >/dev/null 2>&1; then
21306   rm -rf conftest*
21307   ol_cv_sasl_compat=yes
21308 else
21309   rm -rf conftest*
21310   ol_cv_sasl_compat=no
21311 fi
21312 rm -f conftest*
21313
21314 fi
21315
21316 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21317
21318                 if test $ol_cv_sasl_compat = no ; then
21319                         ol_link_sasl=no
21320                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
21321                 fi
21322
21323                 cat >> confdefs.h <<\EOF
21324 #define HAVE_CYRUS_SASL 1
21325 EOF
21326
21327                 SASL_LIBS="$ol_link_sasl"
21328                 if test $ol_enable_spasswd != no ; then
21329                         ol_link_spasswd=yes
21330                 fi
21331
21332                 ac_save_LIBS="$LIBS"
21333                 LIBS="$LIBS $ol_link_sasl"
21334                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21335 echo "configure:21336: checking for sasl_version" >&5
21336 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21337   echo $ac_n "(cached) $ac_c" 1>&6
21338 else
21339   cat > conftest.$ac_ext <<EOF
21340 #line 21341 "configure"
21341 #include "confdefs.h"
21342 /* System header to define __stub macros and hopefully few prototypes,
21343     which can conflict with char sasl_version(); below.  */
21344 #include <assert.h>
21345 /* Override any gcc2 internal prototype to avoid an error.  */
21346 /* We use char because int might match the return type of a gcc2
21347     builtin and then its argument prototype would still apply.  */
21348 char sasl_version();
21349 char (*f)();
21350
21351 int main() {
21352
21353 /* The GNU C library defines this for functions which it implements
21354     to always fail with ENOSYS.  Some functions are actually named
21355     something starting with __ and the normal name is an alias.  */
21356 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21357 choke me
21358 #else
21359 f = sasl_version;
21360 #endif
21361
21362 ; return 0; }
21363 EOF
21364 if { (eval echo configure:21365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21365   rm -rf conftest*
21366   eval "ac_cv_func_sasl_version=yes"
21367 else
21368   echo "configure: failed program was:" >&5
21369   cat conftest.$ac_ext >&5
21370   rm -rf conftest*
21371   eval "ac_cv_func_sasl_version=no"
21372 fi
21373 rm -f conftest*
21374 fi
21375
21376 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21377   echo "$ac_t""yes" 1>&6
21378   cat >> confdefs.h <<\EOF
21379 #define HAVE_SASL_VERSION 1
21380 EOF
21381
21382 else
21383   echo "$ac_t""no" 1>&6
21384 fi
21385
21386                 LIBS="$ac_save_LIBS"
21387         fi
21388
21389 else
21390         echo "configure: warning: SASL authentication not supported!" 1>&2
21391         if test $ol_link_tls = no ; then
21392                 echo "configure: warning: Strong authentication not supported!" 1>&2
21393         fi
21394 fi
21395
21396 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21397         dev=no
21398         if test -r /dev/urandom ; then
21399                 dev="/dev/urandom";
21400         elif test -r /idev/urandom ; then
21401                 dev="/idev/urandom";
21402         elif test -r /dev/srandom ; then
21403                 dev="/dev/srandom";
21404         elif test -r /dev/random ; then
21405                 dev="/dev/random";
21406         elif test -r /idev/random ; then
21407                 dev="/idev/random";
21408         fi
21409
21410         if test $dev != no ; then
21411                 cat >> confdefs.h <<EOF
21412 #define URANDOM_DEVICE "$dev"
21413 EOF
21414
21415         fi
21416 fi
21417
21418 ol_link_fetch=no
21419 if test $ol_with_fetch != no ; then
21420         ol_LIBS=$LIBS
21421 LIBS="-lfetch -lcom_err $LIBS"
21422 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21423 echo "configure:21424: checking fetch(3) library" >&5
21424 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21425   echo $ac_n "(cached) $ac_c" 1>&6
21426 else
21427   
21428         cat > conftest.$ac_ext <<EOF
21429 #line 21430 "configure"
21430 #include "confdefs.h"
21431
21432 #include <sys/param.h>
21433 #include <stdio.h>
21434 #include <fetch.h>
21435 int main() {
21436 struct url *u = fetchParseURL("file:///"); 
21437 ; return 0; }
21438 EOF
21439 if { (eval echo configure:21440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21440   rm -rf conftest*
21441   ol_cv_lib_fetch=yes
21442 else
21443   echo "configure: failed program was:" >&5
21444   cat conftest.$ac_ext >&5
21445   rm -rf conftest*
21446   ol_cv_lib_fetch=no
21447 fi
21448 rm -f conftest*
21449 fi
21450
21451 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21452 LIBS=$ol_LIBS
21453 if test $ol_cv_lib_fetch != no ; then
21454         ol_link_fetch="-lfetch -lcom_err"
21455         cat >> confdefs.h <<\EOF
21456 #define HAVE_FETCH 1
21457 EOF
21458
21459 fi
21460
21461
21462         if test $ol_cv_lib_fetch != no ; then
21463                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21464                 ol_link_fetch=freebsd
21465
21466         elif test $ol_with_fetch != auto ; then
21467                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21468         fi 
21469 fi
21470
21471 if test $ol_enable_crypt != no ; then
21472         save_LIBS="$LIBS"
21473         LIBS="$TLS_LIBS $LIBS"
21474
21475         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21476 echo "configure:21477: checking for crypt" >&5
21477 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21478   echo $ac_n "(cached) $ac_c" 1>&6
21479 else
21480   cat > conftest.$ac_ext <<EOF
21481 #line 21482 "configure"
21482 #include "confdefs.h"
21483 /* System header to define __stub macros and hopefully few prototypes,
21484     which can conflict with char crypt(); below.  */
21485 #include <assert.h>
21486 /* Override any gcc2 internal prototype to avoid an error.  */
21487 /* We use char because int might match the return type of a gcc2
21488     builtin and then its argument prototype would still apply.  */
21489 char crypt();
21490 char (*f)();
21491
21492 int main() {
21493
21494 /* The GNU C library defines this for functions which it implements
21495     to always fail with ENOSYS.  Some functions are actually named
21496     something starting with __ and the normal name is an alias.  */
21497 #if defined (__stub_crypt) || defined (__stub___crypt)
21498 choke me
21499 #else
21500 f = crypt;
21501 #endif
21502
21503 ; return 0; }
21504 EOF
21505 if { (eval echo configure:21506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21506   rm -rf conftest*
21507   eval "ac_cv_func_crypt=yes"
21508 else
21509   echo "configure: failed program was:" >&5
21510   cat conftest.$ac_ext >&5
21511   rm -rf conftest*
21512   eval "ac_cv_func_crypt=no"
21513 fi
21514 rm -f conftest*
21515 fi
21516
21517 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21518   echo "$ac_t""yes" 1>&6
21519   have_crypt=yes
21520 else
21521   echo "$ac_t""no" 1>&6
21522
21523                 LIBS="$save_LIBS"
21524                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21525 echo "configure:21526: checking for crypt in -lcrypt" >&5
21526 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21527 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21528   echo $ac_n "(cached) $ac_c" 1>&6
21529 else
21530   ac_save_LIBS="$LIBS"
21531 LIBS="-lcrypt  $LIBS"
21532 cat > conftest.$ac_ext <<EOF
21533 #line 21534 "configure"
21534 #include "confdefs.h"
21535 /* Override any gcc2 internal prototype to avoid an error.  */
21536 /* We use char because int might match the return type of a gcc2
21537     builtin and then its argument prototype would still apply.  */
21538 char crypt();
21539
21540 int main() {
21541 crypt()
21542 ; return 0; }
21543 EOF
21544 if { (eval echo configure:21545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21545   rm -rf conftest*
21546   eval "ac_cv_lib_$ac_lib_var=yes"
21547 else
21548   echo "configure: failed program was:" >&5
21549   cat conftest.$ac_ext >&5
21550   rm -rf conftest*
21551   eval "ac_cv_lib_$ac_lib_var=no"
21552 fi
21553 rm -f conftest*
21554 LIBS="$ac_save_LIBS"
21555
21556 fi
21557 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21558   echo "$ac_t""yes" 1>&6
21559   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21560                         have_crypt=yes
21561 else
21562   echo "$ac_t""no" 1>&6
21563 have_crypt=no
21564 fi
21565
21566 fi
21567
21568
21569         LIBS="$save_LIBS"
21570
21571         if test $have_crypt = yes ; then
21572                 cat >> confdefs.h <<\EOF
21573 #define HAVE_CRYPT 1
21574 EOF
21575
21576         else
21577                 echo "configure: warning: could not find crypt" 1>&2
21578                 if test $ol_enable_crypt = yes ; then
21579                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
21580                 fi
21581
21582                 echo "configure: warning: disabling crypt support" 1>&2
21583                 ol_enable_crypt=no
21584         fi
21585 fi
21586
21587 if test $ol_enable_proctitle != no ; then
21588         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21589 echo "configure:21590: checking for setproctitle" >&5
21590 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21591   echo $ac_n "(cached) $ac_c" 1>&6
21592 else
21593   cat > conftest.$ac_ext <<EOF
21594 #line 21595 "configure"
21595 #include "confdefs.h"
21596 /* System header to define __stub macros and hopefully few prototypes,
21597     which can conflict with char setproctitle(); below.  */
21598 #include <assert.h>
21599 /* Override any gcc2 internal prototype to avoid an error.  */
21600 /* We use char because int might match the return type of a gcc2
21601     builtin and then its argument prototype would still apply.  */
21602 char setproctitle();
21603 char (*f)();
21604
21605 int main() {
21606
21607 /* The GNU C library defines this for functions which it implements
21608     to always fail with ENOSYS.  Some functions are actually named
21609     something starting with __ and the normal name is an alias.  */
21610 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21611 choke me
21612 #else
21613 f = setproctitle;
21614 #endif
21615
21616 ; return 0; }
21617 EOF
21618 if { (eval echo configure:21619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21619   rm -rf conftest*
21620   eval "ac_cv_func_setproctitle=yes"
21621 else
21622   echo "configure: failed program was:" >&5
21623   cat conftest.$ac_ext >&5
21624   rm -rf conftest*
21625   eval "ac_cv_func_setproctitle=no"
21626 fi
21627 rm -f conftest*
21628 fi
21629
21630 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21631   echo "$ac_t""yes" 1>&6
21632   have_setproctitle=yes
21633 else
21634   echo "$ac_t""no" 1>&6
21635
21636                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21637 echo "configure:21638: checking for setproctitle in -lutil" >&5
21638 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21639 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21640   echo $ac_n "(cached) $ac_c" 1>&6
21641 else
21642   ac_save_LIBS="$LIBS"
21643 LIBS="-lutil  $LIBS"
21644 cat > conftest.$ac_ext <<EOF
21645 #line 21646 "configure"
21646 #include "confdefs.h"
21647 /* Override any gcc2 internal prototype to avoid an error.  */
21648 /* We use char because int might match the return type of a gcc2
21649     builtin and then its argument prototype would still apply.  */
21650 char setproctitle();
21651
21652 int main() {
21653 setproctitle()
21654 ; return 0; }
21655 EOF
21656 if { (eval echo configure:21657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21657   rm -rf conftest*
21658   eval "ac_cv_lib_$ac_lib_var=yes"
21659 else
21660   echo "configure: failed program was:" >&5
21661   cat conftest.$ac_ext >&5
21662   rm -rf conftest*
21663   eval "ac_cv_lib_$ac_lib_var=no"
21664 fi
21665 rm -f conftest*
21666 LIBS="$ac_save_LIBS"
21667
21668 fi
21669 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21670   echo "$ac_t""yes" 1>&6
21671   have_setproctitle=yes
21672                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21673 else
21674   echo "$ac_t""no" 1>&6
21675 have_setproctitle=no
21676                         LIBOBJS="$LIBOBJS setproctitle.o"
21677                         LIBSRCS="$LIBSRCS setproctitle.c"
21678 fi
21679
21680 fi
21681
21682
21683         if test $have_setproctitle = yes ; then
21684                 cat >> confdefs.h <<\EOF
21685 #define HAVE_SETPROCTITLE 1
21686 EOF
21687
21688         fi
21689 fi
21690
21691 if test $ol_enable_slp != no ; then
21692         for ac_hdr in slp.h 
21693 do
21694 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21695 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21696 echo "configure:21697: checking for $ac_hdr" >&5
21697 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21698   echo $ac_n "(cached) $ac_c" 1>&6
21699 else
21700   cat > conftest.$ac_ext <<EOF
21701 #line 21702 "configure"
21702 #include "confdefs.h"
21703 #include <$ac_hdr>
21704 EOF
21705 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21706 { (eval echo configure:21707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21707 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21708 if test -z "$ac_err"; then
21709   rm -rf conftest*
21710   eval "ac_cv_header_$ac_safe=yes"
21711 else
21712   echo "$ac_err" >&5
21713   echo "configure: failed program was:" >&5
21714   cat conftest.$ac_ext >&5
21715   rm -rf conftest*
21716   eval "ac_cv_header_$ac_safe=no"
21717 fi
21718 rm -f conftest*
21719 fi
21720 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21721   echo "$ac_t""yes" 1>&6
21722     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21723   cat >> confdefs.h <<EOF
21724 #define $ac_tr_hdr 1
21725 EOF
21726  
21727 else
21728   echo "$ac_t""no" 1>&6
21729 fi
21730 done
21731
21732
21733         if test $ac_cv_header_slp_h = yes ; then
21734                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21735 echo "configure:21736: checking for SLPOpen in -lslp" >&5
21736 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21737 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21738   echo $ac_n "(cached) $ac_c" 1>&6
21739 else
21740   ac_save_LIBS="$LIBS"
21741 LIBS="-lslp  $LIBS"
21742 cat > conftest.$ac_ext <<EOF
21743 #line 21744 "configure"
21744 #include "confdefs.h"
21745 /* Override any gcc2 internal prototype to avoid an error.  */
21746 /* We use char because int might match the return type of a gcc2
21747     builtin and then its argument prototype would still apply.  */
21748 char SLPOpen();
21749
21750 int main() {
21751 SLPOpen()
21752 ; return 0; }
21753 EOF
21754 if { (eval echo configure:21755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21755   rm -rf conftest*
21756   eval "ac_cv_lib_$ac_lib_var=yes"
21757 else
21758   echo "configure: failed program was:" >&5
21759   cat conftest.$ac_ext >&5
21760   rm -rf conftest*
21761   eval "ac_cv_lib_$ac_lib_var=no"
21762 fi
21763 rm -f conftest*
21764 LIBS="$ac_save_LIBS"
21765
21766 fi
21767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21768   echo "$ac_t""yes" 1>&6
21769   have_slp=yes
21770 else
21771   echo "$ac_t""no" 1>&6
21772 have_slp=no
21773 fi
21774
21775                 if test $have_slp = yes ; then
21776                         cat >> confdefs.h <<\EOF
21777 #define HAVE_SLP 1
21778 EOF
21779
21780                         SLAPD_SLP_LIBS=-lslp
21781                 fi
21782
21783         elif test $ol_enable_slp = yes ; then
21784                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21785         fi
21786 fi
21787
21788
21789 echo $ac_n "checking long long""... $ac_c" 1>&6
21790 echo "configure:21791: checking long long" >&5
21791 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21792   echo $ac_n "(cached) $ac_c" 1>&6
21793 else
21794   
21795         cat > conftest.$ac_ext <<EOF
21796 #line 21797 "configure"
21797 #include "confdefs.h"
21798
21799 int main() {
21800 long long x;
21801 ; return 0; }
21802 EOF
21803 if { (eval echo configure:21804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21804   rm -rf conftest*
21805   ol_cv_type_long_long=yes
21806 else
21807   echo "configure: failed program was:" >&5
21808   cat conftest.$ac_ext >&5
21809   rm -rf conftest*
21810   ol_cv_type_long_long=no
21811 fi
21812 rm -f conftest*
21813 fi
21814
21815 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21816 if test $ol_cv_type_long_long = yes; then
21817         cat >> confdefs.h <<\EOF
21818 #define HAVE_LONG_LONG 1
21819 EOF
21820
21821 fi
21822
21823 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21824 echo "configure:21825: checking for ANSI C header files" >&5
21825 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21826   echo $ac_n "(cached) $ac_c" 1>&6
21827 else
21828   cat > conftest.$ac_ext <<EOF
21829 #line 21830 "configure"
21830 #include "confdefs.h"
21831 #include <stdlib.h>
21832 #include <stdarg.h>
21833 #include <string.h>
21834 #include <float.h>
21835 EOF
21836 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21837 { (eval echo configure:21838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21838 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21839 if test -z "$ac_err"; then
21840   rm -rf conftest*
21841   ac_cv_header_stdc=yes
21842 else
21843   echo "$ac_err" >&5
21844   echo "configure: failed program was:" >&5
21845   cat conftest.$ac_ext >&5
21846   rm -rf conftest*
21847   ac_cv_header_stdc=no
21848 fi
21849 rm -f conftest*
21850
21851 if test $ac_cv_header_stdc = yes; then
21852   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21853 cat > conftest.$ac_ext <<EOF
21854 #line 21855 "configure"
21855 #include "confdefs.h"
21856 #include <string.h>
21857 EOF
21858 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21859   egrep "memchr" >/dev/null 2>&1; then
21860   :
21861 else
21862   rm -rf conftest*
21863   ac_cv_header_stdc=no
21864 fi
21865 rm -f conftest*
21866
21867 fi
21868
21869 if test $ac_cv_header_stdc = yes; then
21870   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21871 cat > conftest.$ac_ext <<EOF
21872 #line 21873 "configure"
21873 #include "confdefs.h"
21874 #include <stdlib.h>
21875 EOF
21876 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21877   egrep "free" >/dev/null 2>&1; then
21878   :
21879 else
21880   rm -rf conftest*
21881   ac_cv_header_stdc=no
21882 fi
21883 rm -f conftest*
21884
21885 fi
21886
21887 if test $ac_cv_header_stdc = yes; then
21888   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21889 if test "$cross_compiling" = yes; then
21890   :
21891 else
21892   cat > conftest.$ac_ext <<EOF
21893 #line 21894 "configure"
21894 #include "confdefs.h"
21895 #include <ctype.h>
21896 #if ((' ' & 0x0FF) == 0x020)
21897 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21898 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21899 #else
21900 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21901  || ('j' <= (c) && (c) <= 'r') \
21902  || ('s' <= (c) && (c) <= 'z'))
21903 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21904 #endif
21905 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21906 int main () { int i; for (i = 0; i < 256; i++)
21907 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21908 exit (0); }
21909
21910 EOF
21911 if { (eval echo configure:21912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
21912 then
21913   :
21914 else
21915   echo "configure: failed program was:" >&5
21916   cat conftest.$ac_ext >&5
21917   rm -fr conftest*
21918   ac_cv_header_stdc=no
21919 fi
21920 rm -fr conftest*
21921 fi
21922
21923 fi
21924 fi
21925
21926 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21927 if test $ac_cv_header_stdc = yes; then
21928   cat >> confdefs.h <<\EOF
21929 #define STDC_HEADERS 1
21930 EOF
21931
21932 fi
21933
21934 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21935 echo "configure:21936: checking for mode_t" >&5
21936 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21937   echo $ac_n "(cached) $ac_c" 1>&6
21938 else
21939   cat > conftest.$ac_ext <<EOF
21940 #line 21941 "configure"
21941 #include "confdefs.h"
21942 #include <sys/types.h>
21943 #if STDC_HEADERS
21944 #include <stdlib.h>
21945 #include <stddef.h>
21946 #endif
21947
21948 EOF
21949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21950   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21951   rm -rf conftest*
21952   eval "ac_cv_type_mode_t=yes"
21953 else
21954   rm -rf conftest*
21955   eval "ac_cv_type_mode_t=no"
21956 fi
21957 rm -f conftest*
21958
21959 fi
21960 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21961   echo "$ac_t""yes" 1>&6
21962 else
21963   echo "$ac_t""no" 1>&6
21964   cat >> confdefs.h <<EOF
21965 #define mode_t int
21966 EOF
21967
21968 fi
21969
21970 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21971 echo "configure:21972: checking for off_t" >&5
21972 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21973   echo $ac_n "(cached) $ac_c" 1>&6
21974 else
21975   cat > conftest.$ac_ext <<EOF
21976 #line 21977 "configure"
21977 #include "confdefs.h"
21978 #include <sys/types.h>
21979 #if STDC_HEADERS
21980 #include <stdlib.h>
21981 #include <stddef.h>
21982 #endif
21983
21984 EOF
21985 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21986   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21987   rm -rf conftest*
21988   eval "ac_cv_type_off_t=yes"
21989 else
21990   rm -rf conftest*
21991   eval "ac_cv_type_off_t=no"
21992 fi
21993 rm -f conftest*
21994
21995 fi
21996 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21997   echo "$ac_t""yes" 1>&6
21998 else
21999   echo "$ac_t""no" 1>&6
22000   cat >> confdefs.h <<EOF
22001 #define off_t long
22002 EOF
22003
22004 fi
22005
22006 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
22007 echo "configure:22008: checking for pid_t" >&5
22008 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
22009   echo $ac_n "(cached) $ac_c" 1>&6
22010 else
22011   cat > conftest.$ac_ext <<EOF
22012 #line 22013 "configure"
22013 #include "confdefs.h"
22014 #include <sys/types.h>
22015 #if STDC_HEADERS
22016 #include <stdlib.h>
22017 #include <stddef.h>
22018 #endif
22019
22020 EOF
22021 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22022   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22023   rm -rf conftest*
22024   eval "ac_cv_type_pid_t=yes"
22025 else
22026   rm -rf conftest*
22027   eval "ac_cv_type_pid_t=no"
22028 fi
22029 rm -f conftest*
22030
22031 fi
22032 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
22033   echo "$ac_t""yes" 1>&6
22034 else
22035   echo "$ac_t""no" 1>&6
22036   cat >> confdefs.h <<EOF
22037 #define pid_t int
22038 EOF
22039
22040 fi
22041
22042 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
22043 echo "configure:22044: checking for ptrdiff_t" >&5
22044 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
22045   echo $ac_n "(cached) $ac_c" 1>&6
22046 else
22047   cat > conftest.$ac_ext <<EOF
22048 #line 22049 "configure"
22049 #include "confdefs.h"
22050 #include <stddef.h>
22051 int main() {
22052 ptrdiff_t p
22053 ; return 0; }
22054 EOF
22055 if { (eval echo configure:22056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22056   rm -rf conftest*
22057   am_cv_type_ptrdiff_t=yes
22058 else
22059   echo "configure: failed program was:" >&5
22060   cat conftest.$ac_ext >&5
22061   rm -rf conftest*
22062   am_cv_type_ptrdiff_t=no
22063 fi
22064 rm -f conftest*
22065 fi
22066
22067 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
22068    if test $am_cv_type_ptrdiff_t = yes; then
22069      cat >> confdefs.h <<\EOF
22070 #define HAVE_PTRDIFF_T 1
22071 EOF
22072
22073    fi
22074
22075 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
22076 echo "configure:22077: checking return type of signal handlers" >&5
22077 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
22078   echo $ac_n "(cached) $ac_c" 1>&6
22079 else
22080   cat > conftest.$ac_ext <<EOF
22081 #line 22082 "configure"
22082 #include "confdefs.h"
22083 #include <sys/types.h>
22084 #include <signal.h>
22085 #ifdef signal
22086 #undef signal
22087 #endif
22088 #ifdef __cplusplus
22089 extern "C" void (*signal (int, void (*)(int)))(int);
22090 #else
22091 void (*signal ()) ();
22092 #endif
22093
22094 int main() {
22095 int i;
22096 ; return 0; }
22097 EOF
22098 if { (eval echo configure:22099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22099   rm -rf conftest*
22100   ac_cv_type_signal=void
22101 else
22102   echo "configure: failed program was:" >&5
22103   cat conftest.$ac_ext >&5
22104   rm -rf conftest*
22105   ac_cv_type_signal=int
22106 fi
22107 rm -f conftest*
22108 fi
22109
22110 echo "$ac_t""$ac_cv_type_signal" 1>&6
22111 cat >> confdefs.h <<EOF
22112 #define RETSIGTYPE $ac_cv_type_signal
22113 EOF
22114
22115
22116 echo $ac_n "checking for size_t""... $ac_c" 1>&6
22117 echo "configure:22118: checking for size_t" >&5
22118 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
22119   echo $ac_n "(cached) $ac_c" 1>&6
22120 else
22121   cat > conftest.$ac_ext <<EOF
22122 #line 22123 "configure"
22123 #include "confdefs.h"
22124 #include <sys/types.h>
22125 #if STDC_HEADERS
22126 #include <stdlib.h>
22127 #include <stddef.h>
22128 #endif
22129
22130 EOF
22131 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22132   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22133   rm -rf conftest*
22134   eval "ac_cv_type_size_t=yes"
22135 else
22136   rm -rf conftest*
22137   eval "ac_cv_type_size_t=no"
22138 fi
22139 rm -f conftest*
22140
22141 fi
22142 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
22143   echo "$ac_t""yes" 1>&6
22144 else
22145   echo "$ac_t""no" 1>&6
22146   cat >> confdefs.h <<EOF
22147 #define size_t unsigned
22148 EOF
22149
22150 fi
22151
22152
22153 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
22154 echo "configure:22155: checking for ssize_t" >&5
22155 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
22156   echo $ac_n "(cached) $ac_c" 1>&6
22157 else
22158   cat > conftest.$ac_ext <<EOF
22159 #line 22160 "configure"
22160 #include "confdefs.h"
22161 #include <sys/types.h>
22162 #if STDC_HEADERS
22163 #include <stdlib.h>
22164 #include <stddef.h>
22165 #endif
22166
22167 EOF
22168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22169   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22170   rm -rf conftest*
22171   eval "ac_cv_type_ssize_t=yes"
22172 else
22173   rm -rf conftest*
22174   eval "ac_cv_type_ssize_t=no"
22175 fi
22176 rm -f conftest*
22177
22178 fi
22179 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
22180   echo "$ac_t""yes" 1>&6
22181 else
22182   echo "$ac_t""no" 1>&6
22183   cat >> confdefs.h <<EOF
22184 #define ssize_t signed int
22185 EOF
22186
22187 fi
22188
22189 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
22190 echo "configure:22191: checking for caddr_t" >&5
22191 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
22192   echo $ac_n "(cached) $ac_c" 1>&6
22193 else
22194   cat > conftest.$ac_ext <<EOF
22195 #line 22196 "configure"
22196 #include "confdefs.h"
22197 #include <sys/types.h>
22198 #if STDC_HEADERS
22199 #include <stdlib.h>
22200 #include <stddef.h>
22201 #endif
22202
22203 EOF
22204 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22205   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22206   rm -rf conftest*
22207   eval "ac_cv_type_caddr_t=yes"
22208 else
22209   rm -rf conftest*
22210   eval "ac_cv_type_caddr_t=no"
22211 fi
22212 rm -f conftest*
22213
22214 fi
22215 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
22216   echo "$ac_t""yes" 1>&6
22217 else
22218   echo "$ac_t""no" 1>&6
22219   cat >> confdefs.h <<EOF
22220 #define caddr_t char *
22221 EOF
22222
22223 fi
22224
22225
22226 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
22227 echo "configure:22228: checking for socklen_t" >&5
22228 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
22229   echo $ac_n "(cached) $ac_c" 1>&6
22230 else
22231   cat > conftest.$ac_ext <<EOF
22232 #line 22233 "configure"
22233 #include "confdefs.h"
22234
22235 #ifdef HAVE_SYS_TYPES_H
22236 #include <sys/types.h>
22237 #endif
22238 #ifdef HAVE_SYS_SOCKET_H
22239 #include <sys/socket.h>
22240 #endif
22241
22242 int main() {
22243 socklen_t len;
22244 ; return 0; }
22245 EOF
22246 if { (eval echo configure:22247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22247   rm -rf conftest*
22248   ol_cv_type_socklen_t=yes
22249 else
22250   echo "configure: failed program was:" >&5
22251   cat conftest.$ac_ext >&5
22252   rm -rf conftest*
22253   ol_cv_type_socklen_t=no
22254 fi
22255 rm -f conftest*
22256 fi
22257
22258 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
22259   if test $ol_cv_type_socklen_t = no; then
22260     cat >> confdefs.h <<\EOF
22261 #define socklen_t int
22262 EOF
22263
22264   fi
22265  
22266 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
22267 echo "configure:22268: checking for member st_blksize in aggregate type struct stat" >&5
22268 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
22269   echo $ac_n "(cached) $ac_c" 1>&6
22270 else
22271   cat > conftest.$ac_ext <<EOF
22272 #line 22273 "configure"
22273 #include "confdefs.h"
22274 #include <sys/types.h>
22275 #include <sys/stat.h>
22276 int main() {
22277 struct stat foo; foo.st_blksize;
22278 ; return 0; }
22279 EOF
22280 if { (eval echo configure:22281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22281   rm -rf conftest*
22282   ac_cv_c_struct_member_st_blksize=yes
22283 else
22284   echo "configure: failed program was:" >&5
22285   cat conftest.$ac_ext >&5
22286   rm -rf conftest*
22287   ac_cv_c_struct_member_st_blksize=no
22288 fi
22289 rm -f conftest*
22290 fi
22291
22292 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22293 st_blksize="$ac_cv_c_struct_member_st_blksize"
22294 if test $ac_cv_c_struct_member_st_blksize = yes; then
22295   cat >> confdefs.h <<\EOF
22296 #define HAVE_ST_BLKSIZE 1
22297 EOF
22298
22299 fi
22300
22301 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22302 echo "configure:22303: checking whether time.h and sys/time.h may both be included" >&5
22303 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22304   echo $ac_n "(cached) $ac_c" 1>&6
22305 else
22306   cat > conftest.$ac_ext <<EOF
22307 #line 22308 "configure"
22308 #include "confdefs.h"
22309 #include <sys/types.h>
22310 #include <sys/time.h>
22311 #include <time.h>
22312 int main() {
22313 struct tm *tp;
22314 ; return 0; }
22315 EOF
22316 if { (eval echo configure:22317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22317   rm -rf conftest*
22318   ac_cv_header_time=yes
22319 else
22320   echo "configure: failed program was:" >&5
22321   cat conftest.$ac_ext >&5
22322   rm -rf conftest*
22323   ac_cv_header_time=no
22324 fi
22325 rm -f conftest*
22326 fi
22327
22328 echo "$ac_t""$ac_cv_header_time" 1>&6
22329 if test $ac_cv_header_time = yes; then
22330   cat >> confdefs.h <<\EOF
22331 #define TIME_WITH_SYS_TIME 1
22332 EOF
22333
22334 fi
22335
22336 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22337 echo "configure:22338: checking whether struct tm is in sys/time.h or time.h" >&5
22338 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22339   echo $ac_n "(cached) $ac_c" 1>&6
22340 else
22341   cat > conftest.$ac_ext <<EOF
22342 #line 22343 "configure"
22343 #include "confdefs.h"
22344 #include <sys/types.h>
22345 #include <time.h>
22346 int main() {
22347 struct tm *tp; tp->tm_sec;
22348 ; return 0; }
22349 EOF
22350 if { (eval echo configure:22351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22351   rm -rf conftest*
22352   ac_cv_struct_tm=time.h
22353 else
22354   echo "configure: failed program was:" >&5
22355   cat conftest.$ac_ext >&5
22356   rm -rf conftest*
22357   ac_cv_struct_tm=sys/time.h
22358 fi
22359 rm -f conftest*
22360 fi
22361
22362 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22363 if test $ac_cv_struct_tm = sys/time.h; then
22364   cat >> confdefs.h <<\EOF
22365 #define TM_IN_SYS_TIME 1
22366 EOF
22367
22368 fi
22369
22370 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22371 echo "configure:22372: checking for uid_t in sys/types.h" >&5
22372 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22373   echo $ac_n "(cached) $ac_c" 1>&6
22374 else
22375   cat > conftest.$ac_ext <<EOF
22376 #line 22377 "configure"
22377 #include "confdefs.h"
22378 #include <sys/types.h>
22379 EOF
22380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22381   egrep "uid_t" >/dev/null 2>&1; then
22382   rm -rf conftest*
22383   ac_cv_type_uid_t=yes
22384 else
22385   rm -rf conftest*
22386   ac_cv_type_uid_t=no
22387 fi
22388 rm -f conftest*
22389
22390 fi
22391
22392 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22393 if test $ac_cv_type_uid_t = no; then
22394   cat >> confdefs.h <<\EOF
22395 #define uid_t int
22396 EOF
22397
22398   cat >> confdefs.h <<\EOF
22399 #define gid_t int
22400 EOF
22401
22402 fi
22403
22404 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22405 echo "configure:22406: checking for sig_atomic_t" >&5
22406 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22407   echo $ac_n "(cached) $ac_c" 1>&6
22408 else
22409   cat > conftest.$ac_ext <<EOF
22410 #line 22411 "configure"
22411 #include "confdefs.h"
22412 #include <signal.h>
22413 int main() {
22414 sig_atomic_t atomic;
22415 ; return 0; }
22416 EOF
22417 if { (eval echo configure:22418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22418   rm -rf conftest*
22419   ol_cv_type_sig_atomic_t=yes
22420 else
22421   echo "configure: failed program was:" >&5
22422   cat conftest.$ac_ext >&5
22423   rm -rf conftest*
22424   ol_cv_type_sig_atomic_t=no
22425 fi
22426 rm -f conftest*
22427 fi
22428
22429 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22430   if test $ol_cv_type_sig_atomic_t = no; then
22431     cat >> confdefs.h <<\EOF
22432 #define sig_atomic_t int
22433 EOF
22434
22435   fi
22436  
22437
22438
22439 # test for pw_gecos in struct passwd
22440 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22441 echo "configure:22442: checking struct passwd for pw_gecos" >&5
22442 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22443   echo $ac_n "(cached) $ac_c" 1>&6
22444 else
22445   
22446         cat > conftest.$ac_ext <<EOF
22447 #line 22448 "configure"
22448 #include "confdefs.h"
22449 #include <pwd.h>
22450 int main() {
22451
22452         struct passwd pwd;
22453         pwd.pw_gecos = pwd.pw_name;
22454
22455 ; return 0; }
22456 EOF
22457 if { (eval echo configure:22458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22458   rm -rf conftest*
22459   ol_cv_struct_passwd_pw_gecos=yes
22460 else
22461   echo "configure: failed program was:" >&5
22462   cat conftest.$ac_ext >&5
22463   rm -rf conftest*
22464   ol_cv_struct_passwd_pw_gecos=no
22465 fi
22466 rm -f conftest*
22467 fi
22468
22469 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22470 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22471         cat >> confdefs.h <<\EOF
22472 #define HAVE_PW_GECOS 1
22473 EOF
22474
22475 fi
22476
22477 # test for pw_passwd in struct passwd
22478 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22479 echo "configure:22480: checking struct passwd for pw_passwd" >&5
22480 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22481   echo $ac_n "(cached) $ac_c" 1>&6
22482 else
22483   
22484         cat > conftest.$ac_ext <<EOF
22485 #line 22486 "configure"
22486 #include "confdefs.h"
22487 #include <pwd.h>
22488 int main() {
22489
22490         struct passwd pwd;
22491         pwd.pw_passwd = pwd.pw_name;
22492
22493 ; return 0; }
22494 EOF
22495 if { (eval echo configure:22496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22496   rm -rf conftest*
22497   ol_cv_struct_passwd_pw_passwd=yes
22498 else
22499   echo "configure: failed program was:" >&5
22500   cat conftest.$ac_ext >&5
22501   rm -rf conftest*
22502   ol_cv_struct_passwd_pw_passwd=no
22503 fi
22504 rm -f conftest*
22505 fi
22506
22507 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22508 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22509         cat >> confdefs.h <<\EOF
22510 #define HAVE_PW_PASSWD 1
22511 EOF
22512
22513 fi
22514
22515
22516 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22517 echo "configure:22518: checking if toupper() requires islower()" >&5
22518 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22519   echo $ac_n "(cached) $ac_c" 1>&6
22520 else
22521   
22522         if test "$cross_compiling" = yes; then
22523   ol_cv_c_upper_lower=safe
22524 else
22525   cat > conftest.$ac_ext <<EOF
22526 #line 22527 "configure"
22527 #include "confdefs.h"
22528
22529 #include <ctype.h>
22530 main()
22531 {
22532         if ('C' == toupper('C'))
22533                 exit(0);
22534         else
22535                 exit(1);
22536 }
22537 EOF
22538 if { (eval echo configure:22539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
22539 then
22540   ol_cv_c_upper_lower=no
22541 else
22542   echo "configure: failed program was:" >&5
22543   cat conftest.$ac_ext >&5
22544   rm -fr conftest*
22545   ol_cv_c_upper_lower=yes
22546 fi
22547 rm -fr conftest*
22548 fi
22549
22550 fi
22551
22552 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22553 if test $ol_cv_c_upper_lower != no ; then
22554         cat >> confdefs.h <<\EOF
22555 #define C_UPPER_LOWER 1
22556 EOF
22557
22558 fi
22559
22560 echo $ac_n "checking for working const""... $ac_c" 1>&6
22561 echo "configure:22562: checking for working const" >&5
22562 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22563   echo $ac_n "(cached) $ac_c" 1>&6
22564 else
22565   cat > conftest.$ac_ext <<EOF
22566 #line 22567 "configure"
22567 #include "confdefs.h"
22568
22569 int main() {
22570
22571 /* Ultrix mips cc rejects this.  */
22572 typedef int charset[2]; const charset x;
22573 /* SunOS 4.1.1 cc rejects this.  */
22574 char const *const *ccp;
22575 char **p;
22576 /* NEC SVR4.0.2 mips cc rejects this.  */
22577 struct point {int x, y;};
22578 static struct point const zero = {0,0};
22579 /* AIX XL C 1.02.0.0 rejects this.
22580    It does not let you subtract one const X* pointer from another in an arm
22581    of an if-expression whose if-part is not a constant expression */
22582 const char *g = "string";
22583 ccp = &g + (g ? g-g : 0);
22584 /* HPUX 7.0 cc rejects these. */
22585 ++ccp;
22586 p = (char**) ccp;
22587 ccp = (char const *const *) p;
22588 { /* SCO 3.2v4 cc rejects this.  */
22589   char *t;
22590   char const *s = 0 ? (char *) 0 : (char const *) 0;
22591
22592   *t++ = 0;
22593 }
22594 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22595   int x[] = {25, 17};
22596   const int *foo = &x[0];
22597   ++foo;
22598 }
22599 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22600   typedef const int *iptr;
22601   iptr p = 0;
22602   ++p;
22603 }
22604 { /* AIX XL C 1.02.0.0 rejects this saying
22605      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22606   struct s { int j; const int *ap[3]; };
22607   struct s *b; b->j = 5;
22608 }
22609 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22610   const int foo = 10;
22611 }
22612
22613 ; return 0; }
22614 EOF
22615 if { (eval echo configure:22616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22616   rm -rf conftest*
22617   ac_cv_c_const=yes
22618 else
22619   echo "configure: failed program was:" >&5
22620   cat conftest.$ac_ext >&5
22621   rm -rf conftest*
22622   ac_cv_c_const=no
22623 fi
22624 rm -f conftest*
22625 fi
22626
22627 echo "$ac_t""$ac_cv_c_const" 1>&6
22628 if test $ac_cv_c_const = no; then
22629   cat >> confdefs.h <<\EOF
22630 #define const 
22631 EOF
22632
22633 fi
22634
22635 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22636 echo "configure:22637: checking if compiler understands volatile" >&5
22637 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22638   echo $ac_n "(cached) $ac_c" 1>&6
22639 else
22640   cat > conftest.$ac_ext <<EOF
22641 #line 22642 "configure"
22642 #include "confdefs.h"
22643 int x, y, z;
22644 int main() {
22645 volatile int a; int * volatile b = x ? &y : &z;
22646       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22647       *b = 0;
22648 ; return 0; }
22649 EOF
22650 if { (eval echo configure:22651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22651   rm -rf conftest*
22652   ol_cv_c_volatile=yes
22653 else
22654   echo "configure: failed program was:" >&5
22655   cat conftest.$ac_ext >&5
22656   rm -rf conftest*
22657   ol_cv_c_volatile=no
22658 fi
22659 rm -f conftest*
22660 fi
22661
22662 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22663   if test $ol_cv_c_volatile = yes; then
22664     : 
22665   else
22666     cat >> confdefs.h <<\EOF
22667 #define volatile 
22668 EOF
22669
22670   fi
22671  
22672
22673 if test $cross_compiling = yes ; then
22674         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
22675         cat >> confdefs.h <<\EOF
22676 #define CROSS_COMPILING 1
22677 EOF
22678
22679 else
22680         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22681 echo "configure:22682: checking whether byte ordering is bigendian" >&5
22682 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22683   echo $ac_n "(cached) $ac_c" 1>&6
22684 else
22685   ac_cv_c_bigendian=unknown
22686 # See if sys/param.h defines the BYTE_ORDER macro.
22687 cat > conftest.$ac_ext <<EOF
22688 #line 22689 "configure"
22689 #include "confdefs.h"
22690 #include <sys/types.h>
22691 #include <sys/param.h>
22692 int main() {
22693
22694 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22695  bogus endian macros
22696 #endif
22697 ; return 0; }
22698 EOF
22699 if { (eval echo configure:22700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22700   rm -rf conftest*
22701   # It does; now see whether it defined to BIG_ENDIAN or not.
22702 cat > conftest.$ac_ext <<EOF
22703 #line 22704 "configure"
22704 #include "confdefs.h"
22705 #include <sys/types.h>
22706 #include <sys/param.h>
22707 int main() {
22708
22709 #if BYTE_ORDER != BIG_ENDIAN
22710  not big endian
22711 #endif
22712 ; return 0; }
22713 EOF
22714 if { (eval echo configure:22715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22715   rm -rf conftest*
22716   ac_cv_c_bigendian=yes
22717 else
22718   echo "configure: failed program was:" >&5
22719   cat conftest.$ac_ext >&5
22720   rm -rf conftest*
22721   ac_cv_c_bigendian=no
22722 fi
22723 rm -f conftest*
22724 else
22725   echo "configure: failed program was:" >&5
22726   cat conftest.$ac_ext >&5
22727 fi
22728 rm -f conftest*
22729 if test $ac_cv_c_bigendian = unknown; then
22730 if test "$cross_compiling" = yes; then
22731     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22732 else
22733   cat > conftest.$ac_ext <<EOF
22734 #line 22735 "configure"
22735 #include "confdefs.h"
22736 main () {
22737   /* Are we little or big endian?  From Harbison&Steele.  */
22738   union
22739   {
22740     long l;
22741     char c[sizeof (long)];
22742   } u;
22743   u.l = 1;
22744   exit (u.c[sizeof (long) - 1] == 1);
22745 }
22746 EOF
22747 if { (eval echo configure:22748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
22748 then
22749   ac_cv_c_bigendian=no
22750 else
22751   echo "configure: failed program was:" >&5
22752   cat conftest.$ac_ext >&5
22753   rm -fr conftest*
22754   ac_cv_c_bigendian=yes
22755 fi
22756 rm -fr conftest*
22757 fi
22758
22759 fi
22760 fi
22761
22762 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22763 if test $ac_cv_c_bigendian = yes; then
22764   cat >> confdefs.h <<\EOF
22765 #define WORDS_BIGENDIAN 1
22766 EOF
22767
22768 fi
22769
22770 fi
22771
22772 echo $ac_n "checking size of short""... $ac_c" 1>&6
22773 echo "configure:22774: checking size of short" >&5 
22774 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22775   echo $ac_n "(cached) $ac_c" 1>&6
22776 else
22777   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22778   cat > conftest.$ac_ext <<EOF
22779 #line 22780 "configure"
22780 #include "confdefs.h"
22781 #include "confdefs.h" 
22782 #include <stdlib.h>
22783 #include <sys/types.h> 
22784  
22785
22786 int main() {
22787 switch (0) case 0: case (sizeof (short) == $ac_size):;
22788 ; return 0; }
22789 EOF
22790 if { (eval echo configure:22791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22791   rm -rf conftest*
22792   ac_cv_sizeof_short=$ac_size
22793 else
22794   echo "configure: failed program was:" >&5
22795   cat conftest.$ac_ext >&5
22796 fi
22797 rm -f conftest* 
22798   if test x$ac_cv_sizeof_short != x ; then break; fi 
22799 done 
22800
22801 fi
22802  
22803 if test x$ac_cv_sizeof_short = x ; then 
22804   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22805 fi 
22806 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22807 cat >> confdefs.h <<EOF
22808 #define SIZEOF_SHORT $ac_cv_sizeof_short
22809 EOF
22810  
22811  
22812 echo $ac_n "checking size of int""... $ac_c" 1>&6
22813 echo "configure:22814: checking size of int" >&5 
22814 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22815   echo $ac_n "(cached) $ac_c" 1>&6
22816 else
22817   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22818   cat > conftest.$ac_ext <<EOF
22819 #line 22820 "configure"
22820 #include "confdefs.h"
22821 #include "confdefs.h" 
22822 #include <stdlib.h>
22823 #include <sys/types.h> 
22824  
22825
22826 int main() {
22827 switch (0) case 0: case (sizeof (int) == $ac_size):;
22828 ; return 0; }
22829 EOF
22830 if { (eval echo configure:22831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22831   rm -rf conftest*
22832   ac_cv_sizeof_int=$ac_size
22833 else
22834   echo "configure: failed program was:" >&5
22835   cat conftest.$ac_ext >&5
22836 fi
22837 rm -f conftest* 
22838   if test x$ac_cv_sizeof_int != x ; then break; fi 
22839 done 
22840
22841 fi
22842  
22843 if test x$ac_cv_sizeof_int = x ; then 
22844   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22845 fi 
22846 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22847 cat >> confdefs.h <<EOF
22848 #define SIZEOF_INT $ac_cv_sizeof_int
22849 EOF
22850  
22851  
22852 echo $ac_n "checking size of long""... $ac_c" 1>&6
22853 echo "configure:22854: checking size of long" >&5 
22854 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22855   echo $ac_n "(cached) $ac_c" 1>&6
22856 else
22857   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22858   cat > conftest.$ac_ext <<EOF
22859 #line 22860 "configure"
22860 #include "confdefs.h"
22861 #include "confdefs.h" 
22862 #include <stdlib.h>
22863 #include <sys/types.h> 
22864  
22865
22866 int main() {
22867 switch (0) case 0: case (sizeof (long) == $ac_size):;
22868 ; return 0; }
22869 EOF
22870 if { (eval echo configure:22871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22871   rm -rf conftest*
22872   ac_cv_sizeof_long=$ac_size
22873 else
22874   echo "configure: failed program was:" >&5
22875   cat conftest.$ac_ext >&5
22876 fi
22877 rm -f conftest* 
22878   if test x$ac_cv_sizeof_long != x ; then break; fi 
22879 done 
22880
22881 fi
22882  
22883 if test x$ac_cv_sizeof_long = x ; then 
22884   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22885 fi 
22886 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22887 cat >> confdefs.h <<EOF
22888 #define SIZEOF_LONG $ac_cv_sizeof_long
22889 EOF
22890  
22891
22892 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
22893 echo "configure:22894: checking size of wchar_t" >&5 
22894 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
22895   echo $ac_n "(cached) $ac_c" 1>&6
22896 else
22897   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22898   cat > conftest.$ac_ext <<EOF
22899 #line 22900 "configure"
22900 #include "confdefs.h"
22901 #include "confdefs.h" 
22902 #include <stdlib.h>
22903 #include <sys/types.h> 
22904  
22905
22906 int main() {
22907 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
22908 ; return 0; }
22909 EOF
22910 if { (eval echo configure:22911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22911   rm -rf conftest*
22912   ac_cv_sizeof_wchar_t=$ac_size
22913 else
22914   echo "configure: failed program was:" >&5
22915   cat conftest.$ac_ext >&5
22916 fi
22917 rm -f conftest* 
22918   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
22919 done 
22920
22921 fi
22922  
22923 if test x$ac_cv_sizeof_wchar_t = x ; then 
22924   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
22925 fi 
22926 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
22927 cat >> confdefs.h <<EOF
22928 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22929 EOF
22930  
22931
22932
22933 if test "$ac_cv_sizeof_int" -lt 4 ; then
22934         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22935
22936         cat >> confdefs.h <<\EOF
22937 #define LBER_INT_T long
22938 EOF
22939
22940 else
22941         cat >> confdefs.h <<\EOF
22942 #define LBER_INT_T int
22943 EOF
22944
22945 fi
22946
22947 cat >> confdefs.h <<\EOF
22948 #define LBER_LEN_T long
22949 EOF
22950
22951 cat >> confdefs.h <<\EOF
22952 #define LBER_SOCKET_T int
22953 EOF
22954
22955 cat >> confdefs.h <<\EOF
22956 #define LBER_TAG_T long
22957 EOF
22958
22959
22960 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22961 echo "configure:22962: checking for 8-bit clean memcmp" >&5
22962 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22963   echo $ac_n "(cached) $ac_c" 1>&6
22964 else
22965   if test "$cross_compiling" = yes; then
22966   ac_cv_func_memcmp_clean=no
22967 else
22968   cat > conftest.$ac_ext <<EOF
22969 #line 22970 "configure"
22970 #include "confdefs.h"
22971
22972 main()
22973 {
22974   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22975   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22976 }
22977
22978 EOF
22979 if { (eval echo configure:22980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
22980 then
22981   ac_cv_func_memcmp_clean=yes
22982 else
22983   echo "configure: failed program was:" >&5
22984   cat conftest.$ac_ext >&5
22985   rm -fr conftest*
22986   ac_cv_func_memcmp_clean=no
22987 fi
22988 rm -fr conftest*
22989 fi
22990
22991 fi
22992
22993 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22994 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22995
22996
22997 if test $ac_cv_func_memcmp_clean = no ; then
22998         cat >> confdefs.h <<\EOF
22999 #define NEED_MEMCMP_REPLACEMENT 1
23000 EOF
23001
23002 fi
23003
23004 echo $ac_n "checking for strftime""... $ac_c" 1>&6
23005 echo "configure:23006: checking for strftime" >&5
23006 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
23007   echo $ac_n "(cached) $ac_c" 1>&6
23008 else
23009   cat > conftest.$ac_ext <<EOF
23010 #line 23011 "configure"
23011 #include "confdefs.h"
23012 /* System header to define __stub macros and hopefully few prototypes,
23013     which can conflict with char strftime(); below.  */
23014 #include <assert.h>
23015 /* Override any gcc2 internal prototype to avoid an error.  */
23016 /* We use char because int might match the return type of a gcc2
23017     builtin and then its argument prototype would still apply.  */
23018 char strftime();
23019 char (*f)();
23020
23021 int main() {
23022
23023 /* The GNU C library defines this for functions which it implements
23024     to always fail with ENOSYS.  Some functions are actually named
23025     something starting with __ and the normal name is an alias.  */
23026 #if defined (__stub_strftime) || defined (__stub___strftime)
23027 choke me
23028 #else
23029 f = strftime;
23030 #endif
23031
23032 ; return 0; }
23033 EOF
23034 if { (eval echo configure:23035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23035   rm -rf conftest*
23036   eval "ac_cv_func_strftime=yes"
23037 else
23038   echo "configure: failed program was:" >&5
23039   cat conftest.$ac_ext >&5
23040   rm -rf conftest*
23041   eval "ac_cv_func_strftime=no"
23042 fi
23043 rm -f conftest*
23044 fi
23045
23046 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
23047   echo "$ac_t""yes" 1>&6
23048   cat >> confdefs.h <<\EOF
23049 #define HAVE_STRFTIME 1
23050 EOF
23051
23052 else
23053   echo "$ac_t""no" 1>&6
23054 # strftime is in -lintl on SCO UNIX.
23055 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
23056 echo "configure:23057: checking for strftime in -lintl" >&5
23057 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
23058 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23059   echo $ac_n "(cached) $ac_c" 1>&6
23060 else
23061   ac_save_LIBS="$LIBS"
23062 LIBS="-lintl  $LIBS"
23063 cat > conftest.$ac_ext <<EOF
23064 #line 23065 "configure"
23065 #include "confdefs.h"
23066 /* Override any gcc2 internal prototype to avoid an error.  */
23067 /* We use char because int might match the return type of a gcc2
23068     builtin and then its argument prototype would still apply.  */
23069 char strftime();
23070
23071 int main() {
23072 strftime()
23073 ; return 0; }
23074 EOF
23075 if { (eval echo configure:23076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23076   rm -rf conftest*
23077   eval "ac_cv_lib_$ac_lib_var=yes"
23078 else
23079   echo "configure: failed program was:" >&5
23080   cat conftest.$ac_ext >&5
23081   rm -rf conftest*
23082   eval "ac_cv_lib_$ac_lib_var=no"
23083 fi
23084 rm -f conftest*
23085 LIBS="$ac_save_LIBS"
23086
23087 fi
23088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23089   echo "$ac_t""yes" 1>&6
23090   cat >> confdefs.h <<\EOF
23091 #define HAVE_STRFTIME 1
23092 EOF
23093
23094 LIBS="-lintl $LIBS"
23095 else
23096   echo "$ac_t""no" 1>&6
23097 fi
23098
23099 fi
23100
23101
23102 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
23103 echo "configure:23104: checking for inet_aton()" >&5
23104 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
23105   echo $ac_n "(cached) $ac_c" 1>&6
23106 else
23107   cat > conftest.$ac_ext <<EOF
23108 #line 23109 "configure"
23109 #include "confdefs.h"
23110
23111 #ifdef HAVE_SYS_TYPES_H
23112 #       include <sys/types.h>
23113 #endif
23114 #ifdef HAVE_SYS_SOCKET_H
23115 #       include <sys/socket.h>
23116 #       ifdef HAVE_SYS_SELECT_H
23117 #               include <sys/select.h>
23118 #       endif
23119 #       include <netinet/in.h>
23120 #       ifdef HAVE_ARPA_INET_H
23121 #               include <arpa/inet.h>
23122 #       endif
23123 #endif
23124
23125 int main() {
23126 struct in_addr in;
23127 int rc = inet_aton( "255.255.255.255", &in );
23128 ; return 0; }
23129 EOF
23130 if { (eval echo configure:23131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23131   rm -rf conftest*
23132   ol_cv_func_inet_aton=yes
23133 else
23134   echo "configure: failed program was:" >&5
23135   cat conftest.$ac_ext >&5
23136   rm -rf conftest*
23137   ol_cv_func_inet_aton=no
23138 fi
23139 rm -f conftest*
23140 fi
23141
23142 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
23143   if test $ol_cv_func_inet_aton != no; then
23144     cat >> confdefs.h <<\EOF
23145 #define HAVE_INET_ATON 1
23146 EOF
23147
23148   fi
23149  
23150
23151 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
23152 echo "configure:23153: checking for _spawnlp" >&5
23153 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
23154   echo $ac_n "(cached) $ac_c" 1>&6
23155 else
23156   cat > conftest.$ac_ext <<EOF
23157 #line 23158 "configure"
23158 #include "confdefs.h"
23159 /* System header to define __stub macros and hopefully few prototypes,
23160     which can conflict with char _spawnlp(); below.  */
23161 #include <assert.h>
23162 /* Override any gcc2 internal prototype to avoid an error.  */
23163 /* We use char because int might match the return type of a gcc2
23164     builtin and then its argument prototype would still apply.  */
23165 char _spawnlp();
23166 char (*f)();
23167
23168 int main() {
23169
23170 /* The GNU C library defines this for functions which it implements
23171     to always fail with ENOSYS.  Some functions are actually named
23172     something starting with __ and the normal name is an alias.  */
23173 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
23174 choke me
23175 #else
23176 f = _spawnlp;
23177 #endif
23178
23179 ; return 0; }
23180 EOF
23181 if { (eval echo configure:23182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23182   rm -rf conftest*
23183   eval "ac_cv_func__spawnlp=yes"
23184 else
23185   echo "configure: failed program was:" >&5
23186   cat conftest.$ac_ext >&5
23187   rm -rf conftest*
23188   eval "ac_cv_func__spawnlp=no"
23189 fi
23190 rm -f conftest*
23191 fi
23192
23193 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
23194   echo "$ac_t""yes" 1>&6
23195   cat >> confdefs.h <<\EOF
23196 #define HAVE_SPAWNLP 1
23197 EOF
23198
23199 else
23200   echo "$ac_t""no" 1>&6
23201 fi
23202
23203
23204 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
23205 echo "configure:23206: checking for _snprintf" >&5
23206 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
23207   echo $ac_n "(cached) $ac_c" 1>&6
23208 else
23209   cat > conftest.$ac_ext <<EOF
23210 #line 23211 "configure"
23211 #include "confdefs.h"
23212 /* System header to define __stub macros and hopefully few prototypes,
23213     which can conflict with char _snprintf(); below.  */
23214 #include <assert.h>
23215 /* Override any gcc2 internal prototype to avoid an error.  */
23216 /* We use char because int might match the return type of a gcc2
23217     builtin and then its argument prototype would still apply.  */
23218 char _snprintf();
23219 char (*f)();
23220
23221 int main() {
23222
23223 /* The GNU C library defines this for functions which it implements
23224     to always fail with ENOSYS.  Some functions are actually named
23225     something starting with __ and the normal name is an alias.  */
23226 #if defined (__stub__snprintf) || defined (__stub____snprintf)
23227 choke me
23228 #else
23229 f = _snprintf;
23230 #endif
23231
23232 ; return 0; }
23233 EOF
23234 if { (eval echo configure:23235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23235   rm -rf conftest*
23236   eval "ac_cv_func__snprintf=yes"
23237 else
23238   echo "configure: failed program was:" >&5
23239   cat conftest.$ac_ext >&5
23240   rm -rf conftest*
23241   eval "ac_cv_func__snprintf=no"
23242 fi
23243 rm -f conftest*
23244 fi
23245
23246 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
23247   echo "$ac_t""yes" 1>&6
23248   ac_cv_func_snprintf=yes
23249         cat >> confdefs.h <<\EOF
23250 #define snprintf _snprintf
23251 EOF
23252
23253
23254 else
23255   echo "$ac_t""no" 1>&6
23256 fi
23257
23258
23259 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
23260 echo "configure:23261: checking for _vsnprintf" >&5
23261 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
23262   echo $ac_n "(cached) $ac_c" 1>&6
23263 else
23264   cat > conftest.$ac_ext <<EOF
23265 #line 23266 "configure"
23266 #include "confdefs.h"
23267 /* System header to define __stub macros and hopefully few prototypes,
23268     which can conflict with char _vsnprintf(); below.  */
23269 #include <assert.h>
23270 /* Override any gcc2 internal prototype to avoid an error.  */
23271 /* We use char because int might match the return type of a gcc2
23272     builtin and then its argument prototype would still apply.  */
23273 char _vsnprintf();
23274 char (*f)();
23275
23276 int main() {
23277
23278 /* The GNU C library defines this for functions which it implements
23279     to always fail with ENOSYS.  Some functions are actually named
23280     something starting with __ and the normal name is an alias.  */
23281 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
23282 choke me
23283 #else
23284 f = _vsnprintf;
23285 #endif
23286
23287 ; return 0; }
23288 EOF
23289 if { (eval echo configure:23290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23290   rm -rf conftest*
23291   eval "ac_cv_func__vsnprintf=yes"
23292 else
23293   echo "configure: failed program was:" >&5
23294   cat conftest.$ac_ext >&5
23295   rm -rf conftest*
23296   eval "ac_cv_func__vsnprintf=no"
23297 fi
23298 rm -f conftest*
23299 fi
23300
23301 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
23302   echo "$ac_t""yes" 1>&6
23303   ac_cv_func_vsnprintf=yes
23304         cat >> confdefs.h <<\EOF
23305 #define vsnprintf _vsnprintf
23306 EOF
23307
23308
23309 else
23310   echo "$ac_t""no" 1>&6
23311 fi
23312
23313
23314 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
23315 echo "configure:23316: checking for vprintf" >&5
23316 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
23317   echo $ac_n "(cached) $ac_c" 1>&6
23318 else
23319   cat > conftest.$ac_ext <<EOF
23320 #line 23321 "configure"
23321 #include "confdefs.h"
23322 /* System header to define __stub macros and hopefully few prototypes,
23323     which can conflict with char vprintf(); below.  */
23324 #include <assert.h>
23325 /* Override any gcc2 internal prototype to avoid an error.  */
23326 /* We use char because int might match the return type of a gcc2
23327     builtin and then its argument prototype would still apply.  */
23328 char vprintf();
23329 char (*f)();
23330
23331 int main() {
23332
23333 /* The GNU C library defines this for functions which it implements
23334     to always fail with ENOSYS.  Some functions are actually named
23335     something starting with __ and the normal name is an alias.  */
23336 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23337 choke me
23338 #else
23339 f = vprintf;
23340 #endif
23341
23342 ; return 0; }
23343 EOF
23344 if { (eval echo configure:23345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23345   rm -rf conftest*
23346   eval "ac_cv_func_vprintf=yes"
23347 else
23348   echo "configure: failed program was:" >&5
23349   cat conftest.$ac_ext >&5
23350   rm -rf conftest*
23351   eval "ac_cv_func_vprintf=no"
23352 fi
23353 rm -f conftest*
23354 fi
23355
23356 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23357   echo "$ac_t""yes" 1>&6
23358   cat >> confdefs.h <<\EOF
23359 #define HAVE_VPRINTF 1
23360 EOF
23361
23362 else
23363   echo "$ac_t""no" 1>&6
23364 fi
23365
23366 if test "$ac_cv_func_vprintf" != yes; then
23367 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23368 echo "configure:23369: checking for _doprnt" >&5
23369 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23370   echo $ac_n "(cached) $ac_c" 1>&6
23371 else
23372   cat > conftest.$ac_ext <<EOF
23373 #line 23374 "configure"
23374 #include "confdefs.h"
23375 /* System header to define __stub macros and hopefully few prototypes,
23376     which can conflict with char _doprnt(); below.  */
23377 #include <assert.h>
23378 /* Override any gcc2 internal prototype to avoid an error.  */
23379 /* We use char because int might match the return type of a gcc2
23380     builtin and then its argument prototype would still apply.  */
23381 char _doprnt();
23382 char (*f)();
23383
23384 int main() {
23385
23386 /* The GNU C library defines this for functions which it implements
23387     to always fail with ENOSYS.  Some functions are actually named
23388     something starting with __ and the normal name is an alias.  */
23389 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23390 choke me
23391 #else
23392 f = _doprnt;
23393 #endif
23394
23395 ; return 0; }
23396 EOF
23397 if { (eval echo configure:23398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23398   rm -rf conftest*
23399   eval "ac_cv_func__doprnt=yes"
23400 else
23401   echo "configure: failed program was:" >&5
23402   cat conftest.$ac_ext >&5
23403   rm -rf conftest*
23404   eval "ac_cv_func__doprnt=no"
23405 fi
23406 rm -f conftest*
23407 fi
23408
23409 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23410   echo "$ac_t""yes" 1>&6
23411   cat >> confdefs.h <<\EOF
23412 #define HAVE_DOPRNT 1
23413 EOF
23414
23415 else
23416   echo "$ac_t""no" 1>&6
23417 fi
23418
23419 fi
23420
23421
23422 if test $ac_cv_func_vprintf = yes ; then
23423                 for ac_func in snprintf vsnprintf
23424 do
23425 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23426 echo "configure:23427: checking for $ac_func" >&5
23427 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23428   echo $ac_n "(cached) $ac_c" 1>&6
23429 else
23430   cat > conftest.$ac_ext <<EOF
23431 #line 23432 "configure"
23432 #include "confdefs.h"
23433 /* System header to define __stub macros and hopefully few prototypes,
23434     which can conflict with char $ac_func(); below.  */
23435 #include <assert.h>
23436 /* Override any gcc2 internal prototype to avoid an error.  */
23437 /* We use char because int might match the return type of a gcc2
23438     builtin and then its argument prototype would still apply.  */
23439 char $ac_func();
23440 char (*f)();
23441
23442 int main() {
23443
23444 /* The GNU C library defines this for functions which it implements
23445     to always fail with ENOSYS.  Some functions are actually named
23446     something starting with __ and the normal name is an alias.  */
23447 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23448 choke me
23449 #else
23450 f = $ac_func;
23451 #endif
23452
23453 ; return 0; }
23454 EOF
23455 if { (eval echo configure:23456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23456   rm -rf conftest*
23457   eval "ac_cv_func_$ac_func=yes"
23458 else
23459   echo "configure: failed program was:" >&5
23460   cat conftest.$ac_ext >&5
23461   rm -rf conftest*
23462   eval "ac_cv_func_$ac_func=no"
23463 fi
23464 rm -f conftest*
23465 fi
23466
23467 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23468   echo "$ac_t""yes" 1>&6
23469     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23470   cat >> confdefs.h <<EOF
23471 #define $ac_tr_func 1
23472 EOF
23473  
23474 else
23475   echo "$ac_t""no" 1>&6
23476 fi
23477 done
23478
23479 fi
23480
23481 for ac_func in \
23482         bcopy                   \
23483         closesocket             \
23484         chroot                  \
23485         endgrent                \
23486         endpwent                \
23487         fcntl                   \
23488         flock                   \
23489         fstat                   \
23490         getdtablesize   \
23491         getgrgid                \
23492         gethostname             \
23493         getpass                 \
23494         getpassphrase   \
23495         getpwuid                \
23496         getpwnam                \
23497         getspnam                \
23498         gettimeofday    \
23499         initgroups              \
23500         lockf                   \
23501         memcpy                  \
23502         memmove                 \
23503         mkstemp                 \
23504         mktemp                  \
23505         pipe                    \
23506         read                    \
23507         recv                    \
23508         recvfrom                \
23509         setpwfile               \
23510         setgid                  \
23511         setegid                 \
23512         setsid                  \
23513         setuid                  \
23514         seteuid                 \
23515         signal                  \
23516         strdup                  \
23517         strerror                \
23518         strpbrk                 \
23519         strrchr                 \
23520         strsep                  \
23521         strstr                  \
23522         strtol                  \
23523         strtoul                 \
23524         strtoq                  \
23525         strtouq                 \
23526         strtoll                 \
23527         strspn                  \
23528         sysconf                 \
23529         usleep                  \
23530         waitpid                 \
23531         wait4                   \
23532         write                   \
23533         send                    \
23534         sendmsg                 \
23535         sendto                  \
23536
23537 do
23538 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23539 echo "configure:23540: checking for $ac_func" >&5
23540 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23541   echo $ac_n "(cached) $ac_c" 1>&6
23542 else
23543   cat > conftest.$ac_ext <<EOF
23544 #line 23545 "configure"
23545 #include "confdefs.h"
23546 /* System header to define __stub macros and hopefully few prototypes,
23547     which can conflict with char $ac_func(); below.  */
23548 #include <assert.h>
23549 /* Override any gcc2 internal prototype to avoid an error.  */
23550 /* We use char because int might match the return type of a gcc2
23551     builtin and then its argument prototype would still apply.  */
23552 char $ac_func();
23553 char (*f)();
23554
23555 int main() {
23556
23557 /* The GNU C library defines this for functions which it implements
23558     to always fail with ENOSYS.  Some functions are actually named
23559     something starting with __ and the normal name is an alias.  */
23560 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23561 choke me
23562 #else
23563 f = $ac_func;
23564 #endif
23565
23566 ; return 0; }
23567 EOF
23568 if { (eval echo configure:23569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23569   rm -rf conftest*
23570   eval "ac_cv_func_$ac_func=yes"
23571 else
23572   echo "configure: failed program was:" >&5
23573   cat conftest.$ac_ext >&5
23574   rm -rf conftest*
23575   eval "ac_cv_func_$ac_func=no"
23576 fi
23577 rm -f conftest*
23578 fi
23579
23580 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23581   echo "$ac_t""yes" 1>&6
23582     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23583   cat >> confdefs.h <<EOF
23584 #define $ac_tr_func 1
23585 EOF
23586  
23587 else
23588   echo "$ac_t""no" 1>&6
23589 fi
23590 done
23591
23592
23593 for ac_func in getopt getpeereid
23594 do
23595 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23596 echo "configure:23597: checking for $ac_func" >&5
23597 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23598   echo $ac_n "(cached) $ac_c" 1>&6
23599 else
23600   cat > conftest.$ac_ext <<EOF
23601 #line 23602 "configure"
23602 #include "confdefs.h"
23603 /* System header to define __stub macros and hopefully few prototypes,
23604     which can conflict with char $ac_func(); below.  */
23605 #include <assert.h>
23606 /* Override any gcc2 internal prototype to avoid an error.  */
23607 /* We use char because int might match the return type of a gcc2
23608     builtin and then its argument prototype would still apply.  */
23609 char $ac_func();
23610 char (*f)();
23611
23612 int main() {
23613
23614 /* The GNU C library defines this for functions which it implements
23615     to always fail with ENOSYS.  Some functions are actually named
23616     something starting with __ and the normal name is an alias.  */
23617 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23618 choke me
23619 #else
23620 f = $ac_func;
23621 #endif
23622
23623 ; return 0; }
23624 EOF
23625 if { (eval echo configure:23626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23626   rm -rf conftest*
23627   eval "ac_cv_func_$ac_func=yes"
23628 else
23629   echo "configure: failed program was:" >&5
23630   cat conftest.$ac_ext >&5
23631   rm -rf conftest*
23632   eval "ac_cv_func_$ac_func=no"
23633 fi
23634 rm -f conftest*
23635 fi
23636
23637 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23638   echo "$ac_t""yes" 1>&6
23639     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23640   cat >> confdefs.h <<EOF
23641 #define $ac_tr_func 1
23642 EOF
23643  
23644 else
23645   echo "$ac_t""no" 1>&6
23646 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23647 fi
23648 done
23649
23650
23651
23652 if test "$ac_cv_func_getopt" != yes; then
23653         LIBSRCS="$LIBSRCS getopt.c"
23654 fi
23655 if test "$ac_cv_func_getpeereid" != yes; then
23656         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23657 echo "configure:23658: checking for msg_accrights in msghdr" >&5
23658 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23659   echo $ac_n "(cached) $ac_c" 1>&6
23660 else
23661   cat > conftest.$ac_ext <<EOF
23662 #line 23663 "configure"
23663 #include "confdefs.h"
23664 #include <sys/socket.h>
23665 int main() {
23666 struct msghdr m; m.msg_accrightslen=0
23667 ; return 0; }
23668 EOF
23669 if { (eval echo configure:23670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23670   rm -rf conftest*
23671   ol_cv_msghdr_msg_accrights=yes
23672 else
23673   echo "configure: failed program was:" >&5
23674   cat conftest.$ac_ext >&5
23675   rm -rf conftest*
23676   ol_cv_msghdr_msg_accrights=no
23677 fi
23678 rm -f conftest*
23679         
23680 fi
23681
23682 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23683   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23684         cat >> confdefs.h <<\EOF
23685 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23686 EOF
23687
23688   fi
23689
23690         LIBSRCS="$LIBSRCS getpeereid.c"
23691 fi
23692 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23693         if test "$ac_cv_func_snprintf" != yes; then
23694                 cat >> confdefs.h <<\EOF
23695 #define snprintf ber_pvt_snprintf
23696 EOF
23697
23698         fi
23699         if test "$ac_cv_func_vsnprintf" != yes; then
23700                 cat >> confdefs.h <<\EOF
23701 #define vsnprintf ber_pvt_vsnprintf
23702 EOF
23703
23704         fi
23705 fi
23706
23707 # Check Configuration
23708 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23709 echo "configure:23710: checking declaration of sys_errlist" >&5
23710 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23711   echo $ac_n "(cached) $ac_c" 1>&6
23712 else
23713   
23714         cat > conftest.$ac_ext <<EOF
23715 #line 23716 "configure"
23716 #include "confdefs.h"
23717
23718 #include <stdio.h>
23719 #include <sys/types.h>
23720 #include <errno.h>
23721 #ifdef WINNT
23722 #include <stdlib.h>
23723 #endif 
23724 int main() {
23725 char *c = (char *) *sys_errlist
23726 ; return 0; }
23727 EOF
23728 if { (eval echo configure:23729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23729   rm -rf conftest*
23730   ol_cv_dcl_sys_errlist=yes
23731         ol_cv_have_sys_errlist=yes
23732 else
23733   echo "configure: failed program was:" >&5
23734   cat conftest.$ac_ext >&5
23735   rm -rf conftest*
23736   ol_cv_dcl_sys_errlist=no
23737 fi
23738 rm -f conftest*
23739 fi
23740
23741 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23742 #
23743 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23744 if test $ol_cv_dcl_sys_errlist = no ; then
23745         cat >> confdefs.h <<\EOF
23746 #define DECL_SYS_ERRLIST 1
23747 EOF
23748
23749
23750         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23751 echo "configure:23752: checking existence of sys_errlist" >&5
23752 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23753   echo $ac_n "(cached) $ac_c" 1>&6
23754 else
23755   
23756                 cat > conftest.$ac_ext <<EOF
23757 #line 23758 "configure"
23758 #include "confdefs.h"
23759 #include <errno.h>
23760 int main() {
23761 char *c = (char *) *sys_errlist
23762 ; return 0; }
23763 EOF
23764 if { (eval echo configure:23765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23765   rm -rf conftest*
23766   ol_cv_have_sys_errlist=yes
23767 else
23768   echo "configure: failed program was:" >&5
23769   cat conftest.$ac_ext >&5
23770   rm -rf conftest*
23771   ol_cv_have_sys_errlist=no
23772 fi
23773 rm -f conftest*
23774 fi
23775
23776 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23777 fi
23778 if test $ol_cv_have_sys_errlist = yes ; then
23779         cat >> confdefs.h <<\EOF
23780 #define HAVE_SYS_ERRLIST 1
23781 EOF
23782
23783 fi
23784
23785
23786
23787 if test "$ol_enable_slapi" != no ; then
23788                         for ac_hdr in ltdl.h
23789 do
23790 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23791 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23792 echo "configure:23793: checking for $ac_hdr" >&5
23793 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23794   echo $ac_n "(cached) $ac_c" 1>&6
23795 else
23796   cat > conftest.$ac_ext <<EOF
23797 #line 23798 "configure"
23798 #include "confdefs.h"
23799 #include <$ac_hdr>
23800 EOF
23801 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23802 { (eval echo configure:23803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23803 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23804 if test -z "$ac_err"; then
23805   rm -rf conftest*
23806   eval "ac_cv_header_$ac_safe=yes"
23807 else
23808   echo "$ac_err" >&5
23809   echo "configure: failed program was:" >&5
23810   cat conftest.$ac_ext >&5
23811   rm -rf conftest*
23812   eval "ac_cv_header_$ac_safe=no"
23813 fi
23814 rm -f conftest*
23815 fi
23816 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23817   echo "$ac_t""yes" 1>&6
23818     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23819   cat >> confdefs.h <<EOF
23820 #define $ac_tr_hdr 1
23821 EOF
23822  
23823 else
23824   echo "$ac_t""no" 1>&6
23825 fi
23826 done
23827
23828
23829         if test $ac_cv_header_ltdl_h != yes ; then
23830                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23831         fi
23832         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23833 echo "configure:23834: checking for lt_dlinit in -lltdl" >&5
23834 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23835 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23836   echo $ac_n "(cached) $ac_c" 1>&6
23837 else
23838   ac_save_LIBS="$LIBS"
23839 LIBS="-lltdl  $LIBS"
23840 cat > conftest.$ac_ext <<EOF
23841 #line 23842 "configure"
23842 #include "confdefs.h"
23843 /* Override any gcc2 internal prototype to avoid an error.  */
23844 /* We use char because int might match the return type of a gcc2
23845     builtin and then its argument prototype would still apply.  */
23846 char lt_dlinit();
23847
23848 int main() {
23849 lt_dlinit()
23850 ; return 0; }
23851 EOF
23852 if { (eval echo configure:23853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23853   rm -rf conftest*
23854   eval "ac_cv_lib_$ac_lib_var=yes"
23855 else
23856   echo "configure: failed program was:" >&5
23857   cat conftest.$ac_ext >&5
23858   rm -rf conftest*
23859   eval "ac_cv_lib_$ac_lib_var=no"
23860 fi
23861 rm -f conftest*
23862 LIBS="$ac_save_LIBS"
23863
23864 fi
23865 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23866   echo "$ac_t""yes" 1>&6
23867   
23868                 SLAPI_LIBS=-lltdl
23869                 LIBSLAPI=libslapi.a
23870                 LIBSLAPITOOLS=../libslapi.a
23871                 cat >> confdefs.h <<\EOF
23872 #define HAVE_LIBLTDL 1
23873 EOF
23874
23875         
23876 else
23877   echo "$ac_t""no" 1>&6
23878 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23879 fi
23880
23881
23882         cat >> confdefs.h <<\EOF
23883 #define LDAP_SLAPI 1
23884 EOF
23885
23886 fi
23887
23888 if test "$ol_enable_debug" != no ; then
23889         cat >> confdefs.h <<\EOF
23890 #define LDAP_DEBUG 1
23891 EOF
23892
23893 fi
23894 if test "$ol_enable_syslog" = yes ; then
23895         cat >> confdefs.h <<\EOF
23896 #define LDAP_SYSLOG 1
23897 EOF
23898
23899 fi
23900 if test "$ol_link_kbind" != no ; then
23901         cat >> confdefs.h <<\EOF
23902 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23903 EOF
23904
23905 fi
23906 if test "$ol_enable_proctitle" != no ; then
23907         cat >> confdefs.h <<\EOF
23908 #define LDAP_PROCTITLE 1
23909 EOF
23910
23911 fi
23912 if test "$ol_enable_referrals" != no ; then
23913         cat >> confdefs.h <<\EOF
23914 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23915 EOF
23916
23917 fi
23918 if test "$ol_enable_local" != no; then
23919         cat >> confdefs.h <<\EOF
23920 #define LDAP_PF_LOCAL 1
23921 EOF
23922
23923 fi
23924 if test "$ol_link_ipv6" != no; then
23925         cat >> confdefs.h <<\EOF
23926 #define LDAP_PF_INET6 1
23927 EOF
23928
23929 fi
23930 if test "$ol_enable_cleartext" != no ; then
23931         cat >> confdefs.h <<\EOF
23932 #define SLAPD_CLEARTEXT 1
23933 EOF
23934
23935 fi
23936 if test "$ol_enable_crypt" != no ; then
23937         cat >> confdefs.h <<\EOF
23938 #define SLAPD_CRYPT 1
23939 EOF
23940
23941 fi
23942 if test "$ol_link_spasswd" != no ; then
23943         cat >> confdefs.h <<\EOF
23944 #define SLAPD_SPASSWD 1
23945 EOF
23946
23947 fi
23948 if test "$ol_enable_multimaster" != no ; then
23949         cat >> confdefs.h <<\EOF
23950 #define SLAPD_MULTIMASTER 1
23951 EOF
23952
23953 fi
23954 if test "$ol_enable_rlookups" != no ; then
23955         cat >> confdefs.h <<\EOF
23956 #define SLAPD_RLOOKUPS 1
23957 EOF
23958
23959 fi
23960 if test "$ol_enable_aci" != no ; then
23961         cat >> confdefs.h <<\EOF
23962 #define SLAPD_ACI_ENABLED 1
23963 EOF
23964
23965 fi
23966
23967 if test "$ol_link_modules" != no ; then
23968         cat >> confdefs.h <<\EOF
23969 #define SLAPD_MODULES 1
23970 EOF
23971
23972         BUILD_SLAPD=yes
23973         SLAPD_MODULES_LDFLAGS="-dlopen self"
23974 fi
23975
23976 cat >> confdefs.h <<\EOF
23977 #define SLAPD_MOD_STATIC 1
23978 EOF
23979
23980 cat >> confdefs.h <<\EOF
23981 #define SLAPD_MOD_DYNAMIC 2
23982 EOF
23983
23984
23985 if test "$ol_enable_bdb" != no ; then
23986         BUILD_SLAPD=yes
23987         BUILD_BDB=$ol_enable_bdb
23988         if test "$ol_enable_bdb" = mod ; then
23989                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23990                 MFLAG=SLAPD_MOD_DYNAMIC
23991         else
23992                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23993                 MFLAG=SLAPD_MOD_STATIC
23994         fi
23995         cat >> confdefs.h <<EOF
23996 #define SLAPD_BDB $MFLAG
23997 EOF
23998
23999 fi
24000
24001 if test "$ol_enable_dnssrv" != no ; then
24002         BUILD_SLAPD=yes
24003         BUILD_DNSSRV=$ol_enable_dnssrv
24004         if test "$ol_enable_dnssrv" = mod ; then
24005                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24006                 MFLAG=SLAPD_MOD_DYNAMIC
24007         else
24008                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24009                 MFLAG=SLAPD_MOD_STATIC
24010         fi
24011         cat >> confdefs.h <<EOF
24012 #define SLAPD_DNSSRV $MFLAG
24013 EOF
24014
24015 fi
24016
24017 if test "$ol_enable_hdb" != no ; then
24018         BUILD_SLAPD=yes
24019         BUILD_HDB=$ol_enable_hdb
24020         if test "$ol_enable_hdb" = mod ; then
24021                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24022                 MFLAG=SLAPD_MOD_DYNAMIC
24023         else
24024                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24025                 MFLAG=SLAPD_MOD_STATIC
24026         fi
24027         cat >> confdefs.h <<EOF
24028 #define SLAPD_HDB $MFLAG
24029 EOF
24030
24031 fi
24032
24033 if test "$ol_enable_ldap" != no ; then
24034         BUILD_SLAPD=yes
24035         BUILD_LDAP=$ol_enable_ldap
24036         if test "$ol_enable_ldap" = mod ; then
24037                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24038                 MFLAG=SLAPD_MOD_DYNAMIC
24039         else
24040                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24041                 MFLAG=SLAPD_MOD_STATIC
24042         fi
24043         cat >> confdefs.h <<EOF
24044 #define SLAPD_LDAP $MFLAG
24045 EOF
24046
24047 fi
24048
24049 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
24050         BUILD_SLAPD=yes
24051         BUILD_LDBM=$ol_enable_ldbm
24052         if test "$ol_enable_ldbm" = mod ; then
24053                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
24054                 MFLAG=SLAPD_MOD_DYNAMIC
24055         else
24056                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
24057                 MFLAG=SLAPD_MOD_STATIC
24058         fi
24059         cat >> confdefs.h <<EOF
24060 #define SLAPD_LDBM $MFLAG
24061 EOF
24062
24063 fi
24064
24065 if test "$ol_enable_meta" != no ; then
24066         BUILD_SLAPD=yes
24067         BUILD_META=$ol_enable_meta
24068         BUILD_REWRITE=yes
24069         if test "$ol_enable_meta" = mod ; then
24070                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24071                 MFLAG=SLAPD_MOD_DYNAMIC
24072         else
24073                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24074                 MFLAG=SLAPD_MOD_STATIC
24075         fi
24076         cat >> confdefs.h <<EOF
24077 #define SLAPD_META $MFLAG
24078 EOF
24079
24080 fi
24081
24082 if test "$ol_enable_monitor" != no ; then
24083         BUILD_SLAPD=yes
24084         BUILD_MONITOR=$ol_enable_monitor
24085         if test "$ol_enable_monitor" = mod ; then
24086                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24087                 MFLAG=SLAPD_MOD_DYNAMIC
24088         else
24089                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24090                 MFLAG=SLAPD_MOD_STATIC
24091         fi
24092         cat >> confdefs.h <<EOF
24093 #define SLAPD_MONITOR $MFLAG
24094 EOF
24095
24096 fi
24097
24098 if test "$ol_enable_null" != no ; then
24099         BUILD_SLAPD=yes
24100         BUILD_NULL=$ol_enable_null
24101         if test "$ol_enable_null" = mod ; then
24102                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24103                 MFLAG=SLAPD_MOD_DYNAMIC
24104         else
24105                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24106                 MFLAG=SLAPD_MOD_STATIC
24107         fi
24108         cat >> confdefs.h <<EOF
24109 #define SLAPD_NULL $MFLAG
24110 EOF
24111
24112 fi
24113
24114 if test "$ol_enable_passwd" != no ; then
24115         BUILD_SLAPD=yes
24116         BUILD_PASSWD=$ol_enable_passwd
24117         if test "$ol_enable_passwd" = mod ; then
24118                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24119                 MFLAG=SLAPD_MOD_DYNAMIC
24120         else
24121                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24122                 MFLAG=SLAPD_MOD_STATIC
24123         fi
24124         cat >> confdefs.h <<EOF
24125 #define SLAPD_PASSWD $MFLAG
24126 EOF
24127
24128 fi
24129
24130 if test "$ol_link_perl" != no ; then
24131         BUILD_SLAPD=yes
24132         BUILD_PERL=$ol_enable_perl
24133         if test "$ol_enable_perl" = mod ; then
24134                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24135                 MFLAG=SLAPD_MOD_DYNAMIC
24136         else
24137                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24138                 MFLAG=SLAPD_MOD_STATIC
24139         fi
24140         cat >> confdefs.h <<EOF
24141 #define SLAPD_PERL $MFLAG
24142 EOF
24143
24144 fi
24145
24146 if test "$ol_enable_shell" != no ; then
24147         if test "$ol_link_thread" != no ; then
24148                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
24149         fi
24150         BUILD_SLAPD=yes
24151         BUILD_SHELL=$ol_enable_shell
24152         if test "$ol_enable_shell" = mod ; then
24153                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
24154                 MFLAG=SLAPD_MOD_DYNAMIC
24155         else
24156                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24157                 MFLAG=SLAPD_MOD_STATIC
24158         fi
24159         cat >> confdefs.h <<EOF
24160 #define SLAPD_SHELL $MFLAG
24161 EOF
24162
24163 fi
24164
24165 if test "$ol_link_sql" != no ; then
24166         BUILD_SLAPD=yes
24167         BUILD_SQL=$ol_enable_sql
24168         if test "$ol_enable_sql" = mod; then
24169                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24170                 MFLAG=SLAPD_MOD_DYNAMIC
24171         else
24172                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24173                 MFLAG=SLAPD_MOD_STATIC
24174         fi
24175         cat >> confdefs.h <<EOF
24176 #define SLAPD_SQL $MFLAG
24177 EOF
24178
24179 fi
24180
24181 if test "$ol_enable_dyngroup" != no ; then
24182         BUILD_DYNGROUP=$ol_enable_dyngroup
24183         if test "$ol_enable_dyngroup" = mod ; then
24184                 MFLAG=SLAPD_MOD_DYNAMIC
24185                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24186         else
24187                 MFLAG=SLAPD_MOD_STATIC
24188         fi
24189         cat >> confdefs.h <<EOF
24190 #define SLAPD_OVER_DYNGROUP $MFLAG
24191 EOF
24192
24193 fi
24194
24195 if test "$ol_enable_proxycache" != no ; then
24196         BUILD_PROXYCACHE=$ol_enable_proxycache
24197         if test "$ol_enable_proxycache" = mod ; then
24198                 MFLAG=SLAPD_MOD_DYNAMIC
24199                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24200         else
24201                 MFLAG=SLAPD_MOD_STATIC
24202         fi
24203         cat >> confdefs.h <<EOF
24204 #define SLAPD_OVER_PROXYCACHE $MFLAG
24205 EOF
24206
24207 fi
24208
24209 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
24210         $BUILD_SLAPD = yes ; then
24211         BUILD_SLURPD=yes
24212 fi
24213
24214 if test "$ol_enable_rewrite" != no ; then
24215         cat >> confdefs.h <<\EOF
24216 #define ENABLE_REWRITE 1
24217 EOF
24218
24219         BUILD_REWRITE=yes
24220 fi
24221
24222 if test "$ol_enable_slapi" != no ; then
24223         cat >> confdefs.h <<\EOF
24224 #define ENABLE_SLAPI 1
24225 EOF
24226
24227         BUILD_SLAPI=yes
24228         SLAPD_SLAPI_DEPEND=libslapi.a
24229 fi
24230
24231
24232
24233 if test "$ac_cv_mingw32" = yes ; then
24234         PLAT=NT
24235         SLAPD_MODULES_LDFLAGS=
24236 else
24237         PLAT=UNIX
24238 fi
24239
24240 if test -z "$SLAPD_STATIC_BACKENDS"; then
24241         SLAPD_NO_STATIC='#'
24242 else
24243         SLAPD_NO_STATIC=
24244 fi
24245
24246
24247
24248
24249
24250
24251
24252   
24253   
24254   
24255   
24256   
24257   
24258   
24259   
24260   
24261   
24262   
24263   
24264   
24265   
24266   
24267   
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306 # Check whether --with-xxinstall or --without-xxinstall was given.
24307 if test "${with_xxinstall+set}" = set; then
24308   withval="$with_xxinstall"
24309   :
24310 fi
24311
24312
24313
24314 trap '' 1 2 15
24315
24316 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24317
24318 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24319 # Let make expand exec_prefix.
24320 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24321
24322 # Any assignment to VPATH causes Sun make to only execute
24323 # the first set of double-colon rules, so remove it if not needed.
24324 # If there is a colon in the path, we need to keep it.
24325 if test "x$srcdir" = x.; then
24326   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24327 fi
24328
24329 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24330
24331 DEFS=-DHAVE_CONFIG_H
24332
24333 # Without the "./", some shells look in PATH for config.status.
24334 : ${CONFIG_STATUS=./config.status}
24335
24336 echo creating $CONFIG_STATUS
24337 rm -f $CONFIG_STATUS
24338 cat > $CONFIG_STATUS <<EOF
24339 #! /bin/sh
24340 # Generated automatically by configure.
24341 # Run this file to recreate the current configuration.
24342 # This directory was configured as follows,
24343 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24344 #
24345 # $0 $ac_configure_args
24346 #
24347 # Compiler output produced by configure, useful for debugging
24348 # configure, is in ./config.log if it exists.
24349
24350 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24351 for ac_option
24352 do
24353   case "\$ac_option" in
24354   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24355     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24356     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24357   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24358     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24359     exit 0 ;;
24360   -help | --help | --hel | --he | --h)
24361     echo "\$ac_cs_usage"; exit 0 ;;
24362   *) echo "\$ac_cs_usage"; exit 1 ;;
24363   esac
24364 done
24365
24366 ac_given_srcdir=$srcdir
24367 ac_given_INSTALL="$INSTALL"
24368
24369 trap 'rm -fr `echo "\
24370 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24371 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24372 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24373 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24374 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24375 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24376 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24377 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24378 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24379 include/Makefile:build/top.mk:include/Makefile.in \
24380 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24381 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24382 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24383 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24384 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24385 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24386 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24387 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24388 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24389 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24390 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24391 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24392 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24393 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24394 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24395 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24396 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24397 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24398 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24399 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24400 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24401 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24402 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24403 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24404 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24405 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24406 tests/run \
24407 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24408  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24409 EOF
24410 cat >> $CONFIG_STATUS <<EOF
24411
24412 # Protect against being on the right side of a sed subst in config.status.
24413 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24414  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24415 $ac_vpsub
24416 $extrasub
24417 s%@SHELL@%$SHELL%g
24418 s%@CFLAGS@%$CFLAGS%g
24419 s%@CPPFLAGS@%$CPPFLAGS%g
24420 s%@CXXFLAGS@%$CXXFLAGS%g
24421 s%@FFLAGS@%$FFLAGS%g
24422 s%@DEFS@%$DEFS%g
24423 s%@LDFLAGS@%$LDFLAGS%g
24424 s%@LIBS@%$LIBS%g
24425 s%@exec_prefix@%$exec_prefix%g
24426 s%@prefix@%$prefix%g
24427 s%@program_transform_name@%$program_transform_name%g
24428 s%@bindir@%$bindir%g
24429 s%@sbindir@%$sbindir%g
24430 s%@libexecdir@%$libexecdir%g
24431 s%@datadir@%$datadir%g
24432 s%@sysconfdir@%$sysconfdir%g
24433 s%@sharedstatedir@%$sharedstatedir%g
24434 s%@localstatedir@%$localstatedir%g
24435 s%@libdir@%$libdir%g
24436 s%@includedir@%$includedir%g
24437 s%@oldincludedir@%$oldincludedir%g
24438 s%@infodir@%$infodir%g
24439 s%@mandir@%$mandir%g
24440 s%@host@%$host%g
24441 s%@host_alias@%$host_alias%g
24442 s%@host_cpu@%$host_cpu%g
24443 s%@host_vendor@%$host_vendor%g
24444 s%@host_os@%$host_os%g
24445 s%@target@%$target%g
24446 s%@target_alias@%$target_alias%g
24447 s%@target_cpu@%$target_cpu%g
24448 s%@target_vendor@%$target_vendor%g
24449 s%@target_os@%$target_os%g
24450 s%@build@%$build%g
24451 s%@build_alias@%$build_alias%g
24452 s%@build_cpu@%$build_cpu%g
24453 s%@build_vendor@%$build_vendor%g
24454 s%@build_os@%$build_os%g
24455 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24456 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24457 s%@INSTALL_DATA@%$INSTALL_DATA%g
24458 s%@PACKAGE@%$PACKAGE%g
24459 s%@VERSION@%$VERSION%g
24460 s%@ACLOCAL@%$ACLOCAL%g
24461 s%@AUTOCONF@%$AUTOCONF%g
24462 s%@AUTOMAKE@%$AUTOMAKE%g
24463 s%@AUTOHEADER@%$AUTOHEADER%g
24464 s%@MAKEINFO@%$MAKEINFO%g
24465 s%@install_sh@%$install_sh%g
24466 s%@AMTAR@%$AMTAR%g
24467 s%@AWK@%$AWK%g
24468 s%@AMTARFLAGS@%$AMTARFLAGS%g
24469 s%@SET_MAKE@%$SET_MAKE%g
24470 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
24471 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24472 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24473 s%@top_builddir@%$top_builddir%g
24474 s%@ldap_subdir@%$ldap_subdir%g
24475 s%@CC@%$CC%g
24476 s%@AR@%$AR%g
24477 s%@LN_S@%$LN_S%g
24478 s%@OBJEXT@%$OBJEXT%g
24479 s%@EXEEXT@%$EXEEXT%g
24480 s%@ECHO@%$ECHO%g
24481 s%@RANLIB@%$RANLIB%g
24482 s%@STRIP@%$STRIP%g
24483 s%@DLLTOOL@%$DLLTOOL%g
24484 s%@AS@%$AS%g
24485 s%@OBJDUMP@%$OBJDUMP%g
24486 s%@CPP@%$CPP%g
24487 s%@LIBTOOL@%$LIBTOOL%g
24488 s%@LN_H@%$LN_H%g
24489 s%@PERLBIN@%$PERLBIN%g
24490 s%@OL_MKDEP@%$OL_MKDEP%g
24491 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24492 s%@LTSTATIC@%$LTSTATIC%g
24493 s%@LIBOBJS@%$LIBOBJS%g
24494 s%@LIBSRCS@%$LIBSRCS%g
24495 s%@PLAT@%$PLAT%g
24496 s%@WITH_TLS@%$WITH_TLS%g
24497 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24498 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24499 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24500 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24501 s%@BUILD_BDB@%$BUILD_BDB%g
24502 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24503 s%@BUILD_HDB@%$BUILD_HDB%g
24504 s%@BUILD_LDAP@%$BUILD_LDAP%g
24505 s%@BUILD_LDBM@%$BUILD_LDBM%g
24506 s%@BUILD_META@%$BUILD_META%g
24507 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24508 s%@BUILD_NULL@%$BUILD_NULL%g
24509 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24510 s%@BUILD_PERL@%$BUILD_PERL%g
24511 s%@BUILD_SHELL@%$BUILD_SHELL%g
24512 s%@BUILD_SQL@%$BUILD_SQL%g
24513 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24514 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24515 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24516 s%@LDAP_LIBS@%$LDAP_LIBS%g
24517 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24518 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24519 s%@LDBM_LIBS@%$LDBM_LIBS%g
24520 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24521 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24522 s%@WRAP_LIBS@%$WRAP_LIBS%g
24523 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24524 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24525 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24526 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24527 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24528 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24529 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24530 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24531 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24532 s%@KRB4_LIBS@%$KRB4_LIBS%g
24533 s%@KRB5_LIBS@%$KRB5_LIBS%g
24534 s%@SASL_LIBS@%$SASL_LIBS%g
24535 s%@TLS_LIBS@%$TLS_LIBS%g
24536 s%@MODULES_LIBS@%$MODULES_LIBS%g
24537 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24538 s%@LIBSLAPI@%$LIBSLAPI%g
24539 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24540 s%@AUTH_LIBS@%$AUTH_LIBS%g
24541 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24542 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24543 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24544 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24545
24546 CEOF
24547 EOF
24548
24549 cat >> $CONFIG_STATUS <<\EOF
24550
24551 # Split the substitutions into bite-sized pieces for seds with
24552 # small command number limits, like on Digital OSF/1 and HP-UX.
24553 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24554 ac_file=1 # Number of current file.
24555 ac_beg=1 # First line for current file.
24556 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24557 ac_more_lines=:
24558 ac_sed_cmds=""
24559 while $ac_more_lines; do
24560   if test $ac_beg -gt 1; then
24561     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24562   else
24563     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24564   fi
24565   if test ! -s conftest.s$ac_file; then
24566     ac_more_lines=false
24567     rm -f conftest.s$ac_file
24568   else
24569     if test -z "$ac_sed_cmds"; then
24570       ac_sed_cmds="sed -f conftest.s$ac_file"
24571     else
24572       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24573     fi
24574     ac_file=`expr $ac_file + 1`
24575     ac_beg=$ac_end
24576     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24577   fi
24578 done
24579 if test -z "$ac_sed_cmds"; then
24580   ac_sed_cmds=cat
24581 fi
24582 EOF
24583
24584 cat >> $CONFIG_STATUS <<EOF
24585
24586 CONFIG_FILES=\${CONFIG_FILES-"\
24587 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24588 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24589 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24590 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24591 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24592 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24593 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24594 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24595 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24596 include/Makefile:build/top.mk:include/Makefile.in \
24597 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24598 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24599 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24600 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24601 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24602 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24603 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24604 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24605 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24606 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24607 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24608 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24609 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24610 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24611 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24612 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24613 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24614 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24615 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24616 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24617 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24618 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24619 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24620 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24621 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24622 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24623 tests/run \
24624 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24625 "}
24626 EOF
24627 cat >> $CONFIG_STATUS <<\EOF
24628 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24629   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24630   case "$ac_file" in
24631   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24632        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24633   *) ac_file_in="${ac_file}.in" ;;
24634   esac
24635
24636   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24637
24638   # Remove last slash and all that follows it.  Not all systems have dirname.
24639   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24640   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24641     # The file is in a subdirectory.
24642     test ! -d "$ac_dir" && mkdir "$ac_dir"
24643     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24644     # A "../" for each directory in $ac_dir_suffix.
24645     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24646   else
24647     ac_dir_suffix= ac_dots=
24648   fi
24649
24650   case "$ac_given_srcdir" in
24651   .)  srcdir=.
24652       if test -z "$ac_dots"; then top_srcdir=.
24653       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24654   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24655   *) # Relative path.
24656     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24657     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24658   esac
24659
24660   case "$ac_given_INSTALL" in
24661   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24662   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24663   esac
24664
24665   echo creating "$ac_file"
24666   rm -f "$ac_file"
24667   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24668   case "$ac_file" in
24669   *[Mm]akefile*) ac_comsub="1i\\
24670 # $configure_input" ;;
24671   *) ac_comsub= ;;
24672   esac
24673
24674   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24675   sed -e "$ac_comsub
24676 s%@configure_input@%$configure_input%g
24677 s%@srcdir@%$srcdir%g
24678 s%@top_srcdir@%$top_srcdir%g
24679 s%@INSTALL@%$INSTALL%g
24680 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24681 fi; done
24682 rm -f conftest.s*
24683
24684 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24685 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24686 #
24687 # ac_d sets the value in "#define NAME VALUE" lines.
24688 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24689 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24690 ac_dC='\3'
24691 ac_dD='%g'
24692 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24693 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24694 ac_uB='\([      ]\)%\1#\2define\3'
24695 ac_uC=' '
24696 ac_uD='\4%g'
24697 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24698 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24699 ac_eB='$%\1#\2define\3'
24700 ac_eC=' '
24701 ac_eD='%g'
24702
24703 if test "${CONFIG_HEADERS+set}" != set; then
24704 EOF
24705 cat >> $CONFIG_STATUS <<EOF
24706   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24707 EOF
24708 cat >> $CONFIG_STATUS <<\EOF
24709 fi
24710 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24711   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24712   case "$ac_file" in
24713   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24714        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24715   *) ac_file_in="${ac_file}.in" ;;
24716   esac
24717
24718   echo creating $ac_file
24719
24720   rm -f conftest.frag conftest.in conftest.out
24721   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24722   cat $ac_file_inputs > conftest.in
24723
24724 EOF
24725
24726 # Transform confdefs.h into a sed script conftest.vals that substitutes
24727 # the proper values into config.h.in to produce config.h.  And first:
24728 # Protect against being on the right side of a sed subst in config.status.
24729 # Protect against being in an unquoted here document in config.status.
24730 rm -f conftest.vals
24731 cat > conftest.hdr <<\EOF
24732 s/[\\&%]/\\&/g
24733 s%[\\$`]%\\&%g
24734 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24735 s%ac_d%ac_u%gp
24736 s%ac_u%ac_e%gp
24737 EOF
24738 sed -n -f conftest.hdr confdefs.h > conftest.vals
24739 rm -f conftest.hdr
24740
24741 # This sed command replaces #undef with comments.  This is necessary, for
24742 # example, in the case of _POSIX_SOURCE, which is predefined and required
24743 # on some systems where configure will not decide to define it.
24744 cat >> conftest.vals <<\EOF
24745 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24746 EOF
24747
24748 # Break up conftest.vals because some shells have a limit on
24749 # the size of here documents, and old seds have small limits too.
24750
24751 rm -f conftest.tail
24752 while :
24753 do
24754   ac_lines=`grep -c . conftest.vals`
24755   # grep -c gives empty output for an empty file on some AIX systems.
24756   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24757   # Write a limited-size here document to conftest.frag.
24758   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24759   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24760   echo 'CEOF
24761   sed -f conftest.frag conftest.in > conftest.out
24762   rm -f conftest.in
24763   mv conftest.out conftest.in
24764 ' >> $CONFIG_STATUS
24765   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24766   rm -f conftest.vals
24767   mv conftest.tail conftest.vals
24768 done
24769 rm -f conftest.vals
24770
24771 cat >> $CONFIG_STATUS <<\EOF
24772   rm -f conftest.frag conftest.h
24773   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24774   cat conftest.in >> conftest.h
24775   rm -f conftest.in
24776   if cmp -s $ac_file conftest.h 2>/dev/null; then
24777     echo "$ac_file is unchanged"
24778     rm -f conftest.h
24779   else
24780     # Remove last slash and all that follows it.  Not all systems have dirname.
24781       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24782       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24783       # The file is in a subdirectory.
24784       test ! -d "$ac_dir" && mkdir "$ac_dir"
24785     fi
24786     rm -f $ac_file
24787     mv conftest.h $ac_file
24788   fi
24789 fi; done
24790
24791 EOF
24792 cat >> $CONFIG_STATUS <<EOF
24793
24794 EOF
24795 cat >> $CONFIG_STATUS <<\EOF
24796
24797 chmod +x tests/run
24798 date > stamp-h
24799 echo Please run \"make depend\" to build dependencies
24800
24801 exit 0
24802 EOF
24803 chmod +x $CONFIG_STATUS
24804 rm -fr confdefs* $ac_clean_files
24805 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24806